Draft: u-boot+extlinux.conf support for ARM64 (MNT Reform)
Hi,
I have a POC that is booting on the MNT Reform. It loads the kernel and is now stuck at:
Begin: Mounting root file system ... /init: .: line 249: can't open '/scripts/live': No such file or directory
Kernel panic - not syncing: Attempted to kill init!
So this is great because it means we are beyond the bootloader stage and the image I built with "lb build" successfully loaded the kernel. What's missing is probably some higher level configuration but not something related to the bootloader phase which is what this MR is supposed to be about.
This is a WIP/Draft MR where I would like to show my current POC. From reading the code it turns out that the syslinux+hdd format nearly has everything I want for booting a SD-card with a live-build image flashed onto it on the MNT Reform laptop. What I had to change:
-
functions/sourcelist.sh
: I'm using[trusted=yes]
because I'm using my own reprepro with all the packages because I need two repositories one of which contains the kernel and live-build failed when trying to combine multiple mirrors. Roland told me that this is on his TODO list and is supposed to get solved with support for apt's deb822 sources.list format -
binary_bootloader_splash
: there is no support for any splash screen, so I turned it off with anexit 0
-
build/binary_hdd
:- disable installing syslinux
- disable any copying of syslinux stuff
- disable running syslinux
-
DU_DIM=$((DU_DIM+16))
: I'm usingLB_HDD_PARTITION_START="16MiB"
to have enough room for the bootloader. The large offset is required by RK3588 according to Collabora and is also the same offset that debian-installer now uses for ARM. It turns out that this offset is not taken into account when computing the overall size of the image and as a result the partition that is created ends up being too small.
-
build/binary_linux-image
:- I must copy over the
/boot/dtbs
directory so that u-boot can read the appropriate device tree - again, stop installation of syslinux
- write out
/extlinux/extlinux.conf
-- that file is nearly a 1:1 copy of what Debian installer uses with adjusted paths andboot=live
- I must copy over the
The interesting bits of my confix are:
LB_LINUX_FLAVOURS_WITH_ARCH="mnt-reform-arm64"
LB_BOOTLOADERS="syslinux"
LB_IMAGE_TYPE="hdd"
LB_HDD_PARTITION_START="16MiB"
And in config/package-lists/live.list.chroot
I have put the reform-tools
package which takes care to perform all the device specific setup in the chroot.
Why must I not install syslinux? Because syslinux only exists for i386 and amd64 and not on arm64.
How can I make this pretty?