Official Debian support!
#81
I was finally able to install (current) Debian bookworm on my RockPro64 !

The big missing part for me was that (a recent) uboot needed to be installed in SPI memory,
which makes subsequent Debian installations much easier since the Debian Installer doesn't install uboot by itself.
I documented the installation procedure here: https://0xacab.org/varac-projects/doc/-/...ial-debian


Hope it works for everyone else here !
  Reply
#82
(08-16-2023, 01:32 AM)varac Wrote: The big missing part for me was that (a recent) uboot needed to be installed in SPI memory,

Debian's u-boot-rockchip package now supports the RockPro64 v2, too.

With that, I was able to create a fresh bootable microsd card by populating a GPT partition with the kernel, initrd, dtbs, and extlinux files, and running u-boot-install-rockchip /dev/devicename .

Note that the partition must not start before the 16MiB mark, because the space before that is where the bootloader files are written. I think it requires the bootable flag to be set, too.

https://opensource.rock-chips.com/wiki_Partitions

It's also helpful to put a script in /etc/kernel/postinst.d and /etc/kernel/postrm.d to automate copying the new .dtb file to the boot partition whenever a new kernel is installed.
  Reply
#83
Code:
#!/bin/sh # This script installs RockPro64 devicetree files into /boot when new kernels # are installed, removes them when kernels are removed, and updates the # "dtbs" and "dtbs.old" symlinks accordingly. # It should be copied into /etc/kernel/postinst.d/ and /etc/kernel/postrm.d/ # and given execute permission. # https://www.debian.org/doc/manuals/debian-kernel-handbook/ch-update-hooks.html set -e exec </dev/null >&2  # Don't use stdin or stdout version="$1" pkgname=${DPKG_MAINTSCRIPT_PACKAGE:-kernel package} if [ -z "$version" ]; then     echo "W: $pkgname did not pass a version number; exiting."     exit 0 fi eval set -- "$DEB_MAINT_PARAMS" action="$1" # return 0 if $1 matches any of the remaining args among() {     val="$1"     shift     for a in "$@"; do         if [ "$val" = "$a" ]; then return 0; fi     done     return 1; } # update /boot/dtbs and /boot/dtbs.old # expects $1 to be "configure" or "remove" # expects $version to be set # see also: linux-update-symlinks update_symlinks() {     # build a list of dtbs-<ver> symlink targets, highest priority first...     # ...first priority is a newly installed kernel     if [ "$action" = configure ]; then         set -- "dtbs-$version"     else         set --     fi     if [ "$action" = remove ]; then         rmtarget=dtbs-$version     fi     # ...next priority is the existing primary symlink (if not being removed)     link1=/boot/dtbs     target1="$(readlink "$link1" || true)"     if [ -e "$link1" ] && ! among "$target1" "$@"; then         if [ "$target1" != "$rmtarget" ]; then             set -- "$@" "$target1"         fi     fi     # ...next priority is the existing secondary symlink (if not being removed)     link2=/boot/dtbs.old     target2="$(readlink "$link2" || true)"     if [ -e "$link2" ] && ! among "$target2" "$@"; then         if [ "$target2" != "$rmtarget" ]; then             set -- "$@" "$target2"         fi     fi     # ...finally, any other installed kernels, newest first     for v in $(linux-version list | linux-version sort --reverse); do         if [ "$action" = remove ] && [ "$v" = "$version" ]; then             continue;         fi         if ! among "dtbs-$v" "$@"; then             set -- "$@" "dtbs-$v"         fi     done     # create/replace/remove the primary and secondary symlinks     if [ $# -ge 1 ]; then         echo "I: creating symlink $link1 -> $1"         ln -sfn "$1" "$link1"     elif [ -L "$link1" ]; then         echo "I: removing $link1"         rm -f "$link1"     fi     if [ $# -ge 2 ]; then shift; fi     if [ $# -ge 1 ]; then         echo "I: creating symlink $link2 -> $1"         ln -sfn "$1" "$link2"     elif [ -L "$link2" ]; then         echo "I: removing $link2"         rm -f "$link2"     fi     if [ ! -e "$link1" ]; then         echo "W: $link1 symlink is missing; unable to find a target for it"     fi } srcdir=/usr/lib/linux-image-${version}/rockchip destbase=dtbs-${version} destdir=/boot/$destbase/rockchip fname=rk3399-rockpro64-v2.dtb if [ "$action" = configure ]; then     if [ -f "$srcdir/$fname" ]; then         echo "I: installing $destdir/$fname"         mkdir -p "$destdir"         cp "$srcdir/$fname" "$destdir/$fname"     else         echo "W: $pkgname doesn't contain $srcdir/$fname; making symlink anyway"     fi     update_symlinks "$action" fi if [ "$action" = remove ]; then     update_symlinks "$action"     if [ -f "$destdir/$fname" ]; then         echo "I: removing $destdir/$fname"         rm "$destdir/$fname"         rmdir "$destdir" || true         rmdir "/boot/$destbase" || true     fi fi
  Reply
#84
I was trying this out today and it seems to work well.


One question: how can I change the resolution? I am guessing that has to be done at boot but I can't find anything in /boot to configure.
  Reply
#85
(12-16-2023, 03:00 PM)foresto Wrote: [code]#!/bin/sh

# This script installs RockPro64 devicetree files into /boot when new kernels
# are installed, removes them when kernels are removed, and updates the
# "dtbs" and "dtbs.old" symlinks accordingly.
# It should be copied into /etc/kernel/postinst.d/ and /etc/kernel/postrm.d/
# and given execute permission.

I have edited that post to contain the latest version of the script. It is now smart enough to create a new /boot/dtbs.old symlink when a kernel is removed and the existing dtbs.old becomes dtbs. (It uses the same logic as used for the other symlinks in /boot.)
  Reply
#86
hello ,

just received this device, very h appy already with it,
just wanted to ask if this limitation with kernel above 5.15 not functioning on eMMC is still active, since am trying to install devuan/debian on it , and encountering some difficulty,

thanks.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  official support for aarch64 in OpenArena Opvolger 0 5,881 03-24-2022, 02:23 PM
Last Post: Opvolger
  Fedora 32 Release, improved support for Rock(Pro)64 Tharadash 2 9,373 05-05-2020, 08:37 AM
Last Post: zer0sig
  Kickstarter: Allwinner VPU support in the official Linux kernel xalius 8 22,762 10-03-2019, 03:03 AM
Last Post: bunkerWHz
Exclamation First images with DRM and Mali support for A64 Luke 74 183,023 04-27-2018, 10:22 PM
Last Post: Max11

Forum Jump:


Users browsing this thread: 1 Guest(s)