Well I could boot this what I did:
0. Everything is done from the Rock5b itself using EMMC with the image from here the Image I am using as a base is:
https://github.com/radxa/debos-radxa/re ... gpt.img.xz and the destination being a SD
1. Re-did partitions and creating Filesystems in the SD (/dev/mmcblk0) using the same geometry as the debian I'm using in emmc:
$this->bbcode_second_pass_code('', 'Device Start End Sectors Size Type
/dev/mmcblk0p1 32768 1081343 1048576 512M EFI System
/dev/mmcblk0p2 1081344 61069311 59987968 28.6G Linux filesystem')
2. Execute blkid and I get for example:
$this->bbcode_second_pass_code('', '/dev/mmcblk1p1: LABEL_FATBOOT="boot" LABEL="boot" UUID="C3D8-FB42" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="boot" PARTUUID="2913d6d4-d377-49c4-8d7f-734c6c49d6cf"
/dev/mmcblk1p2: LABEL="rootfs" UUID="29a94882-5add-4f09-8cc5-3f43918624fa" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="rootfs" PARTUUID="9e1a9b50-bd9a-415c-b756-cf17ccbc97fd"
/dev/mmcblk0p1: UUID="CD8D-E892" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="f103ade0-f696-b849-bf52-83f75d67ef14"
/dev/mmcblk0p2: LABEL="root" UUID="16e6c2ad-1b64-4e2e-aa8c-c80b3499d1ba" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="9b747d87-565e-a741-8232-a988d4018fd2"
')
3. Mounting /dev/mmcblk0p2 and untaring there
http://os.archlinuxarm.org/os/ArchLinux ... est.tar.gz as:
$this->bbcode_second_pass_code('', 'wget http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz
mkdir /root/arch
mount /dev/mmcblk0p2 /root/arch
tar -xpvf ArchLinuxARM-aarch64-latest.tar.gz -C /root/arch')
4. Mounting /dev/mmcblk0p1 on /root/arch/boot but before I clean the directory /root/arch/boot
$this->bbcode_second_pass_code('', 'rm -rf /root/arch/boot/*
mount /dev/mmcblk0p1 /root/arch/boot
cp -rpv /boot/* /root/arch/boot/')
5. Generate the /etc/fstab for the new arch with the correct UUID as:
/root/arch/etc/fstab
$this->bbcode_second_pass_code('', '
# Static information about the filesystems.
# See fstab(5) for details.
# <file system> <dir> <type> <options> <dump> <pass>
UUID=16e6c2ad-1b64-4e2e-aa8c-c80b3499d1ba / ext4 defaults 0 1
UUID=CD8D-E892 /boot vfat defaults,x-systemd.automount 0
')
6. Add the correct UUID into the /root/arch/boot/extlinux/extlinux.conf for the append line
$this->bbcode_second_pass_code('', 'append root=UUID=16e6c2ad-1b64-4e2e-aa8c-c80b3499d1ba earlycon=uart8250,mmio32,0xfeb50000 console=ttyFIQ0 console=tty1 consoleblank=0 loglevel=0 panic=10 rootwait rw init=/sbin/init rootfstype=ext4 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1 irqchip.gicv3_pseudo_nmi=0 switolb=1 coherent_pool=2M')
7. Copy Firmware, modules and headers to the new arch image:
$this->bbcode_second_pass_code('', '
cp -rvp /lib/modules/5.10.66-27-rockchip-gea60d388902d /root/arch/lib/modules/
cp -rvp /lib/firmware/* /root/arch/lib/firmware/
cp -rvp /usr/src/linux-headers-5.10.66-27-rockchip-gea60d388902d /root/arch/usr/src/
')
8. Doing a `chroot` inside /dev/mmcblk0p2 and execute a `depmod` there... and exit from chroot
$this->bbcode_second_pass_code('', 'mount --bind /dev /root/arch/dev && mount --bind /sys /root/arch/sys && mount --bind /proc /root/arch/proc
chroot /root/arch
depmod
exit')
9. Build and do a dd with as written here u-boot
https://wiki.radxa.com/Rock5/guide/buil ... oot_images $this->bbcode_second_pass_code('', 'dd if=./idbloader.img of=/dev/mmcblk0 bs=512 seek=64
dd if=./u-boot.itb of=/dev/mmcblk0 bs=512 seek=16384')
10.Umount everything
$this->bbcode_second_pass_code('', '
umount /root/arch/dev /root/arch/proc /root/arch/sys /root/arch')
edit: some corrections