Finally I figured it out: Debian bullseye stock on nvme:
Here is what I did:
Prerequisite: bulleye sd card created with
https://d-i.debian.org/daily-images/arm6...rd-images/
Installed this u-boot to emmc:
the modified u-boot images provided by forum user pcm720
be sure to have not boot partition on emmc
create an ext4 and a swap partition on nvme0n1
ext4 nvme0n1p1
swap nvme0n1p2
debootstrap into nvme0n1p1 following this
https://gist.github.com/varqox/42e213b6b2dde2b636ef
(instead of debootstrap the Debian install can also be use but then a serial interface is needed - for debootstrap any Distro booted from SD card works)
create symlinks for vmlinuz-5.10.0-7-arm64 (vmlinuz) and initrd.img-5.10.0-7-arm64 (initrd.img)
cp dtb, dtb-5.10.0-7-arm64 and dtbs folders recursive from boot on debian sd card
to have the following boot folder on nvme0n1p1
root@Pine64:/# ls -ltra boot
total 53548
-rw-r--r-- 1 root root 27400064 May 28 10:31 vmlinuz-5.10.0-7-arm64
-rw-r--r-- 1 root root 254127 May 28 10:31 config-5.10.0-7-arm64
-rw-r--r-- 1 root root 83 May 28 10:31 System.map-5.10.0-7-arm64
drwxr-xr-x 18 root root 4096 Jun 29 07:13 ..
-rw-r--r-- 1 root root 27147997 Jun 29 07:14 initrd.img-5.10.0-7-arm64
lrwxrwxrwx 1 root root 52 Jun 29 07:22 dtb -> dtbs/5.10.0-7-arm64/rockchip/rk3399-pinebook-pro.dtb
lrwxrwxrwx 1 root root 52 Jun 29 07:22 dtb-5.10.0-7-arm64 -> dtbs/5.10.0-7-arm64/rockchip/rk3399-pinebook-pro.dtb
drwxr-xr-x 3 root root 4096 Jun 29 07:22 dtbs
lrwxrwxrwx 1 root root 22 Jun 29 07:23 vmlinuz -> vmlinuz-5.10.0-7-arm64
lrwxrwxrwx 1 root root 25 Jun 29 07:23 initrd.img -> initrd.img-5.10.0-7-arm64
-rw-r--r-- 1 root root 2210 Jun 29 08:47 boot.cmd
drwxr-xr-x 3 root root 4096 Jun 29 08:47 .
-rw-r--r-- 1 root root 2282 Jun 29 08:47 boot.scr
you cannot just copy the boot.scr from debian. you have to strip the 72 long u-boot header like so
https://wiki.ubuntu.com/ARM/EditBootscr to get a boot.cmd
insert a line into boot.cmd (the one I use is attached)
setenv bootargs ${bootargs} quiet
(this one) setenv bootargs root=/dev/nvme0n1p1 rootwait ${bootargs}
if test -z "${fk_kvers}"; then
and
mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
issues remaining:
nvme not detected sporadically though rootwait
wakening from suspend
sound: es8316.c in linux-source is outdated. Upstream contains the necessary patch by Tobias Schramm. so this will come (and I want to stick to stock as this is "Official Debian support")