Switch from u-boot scripts to generated extlinux.conf
Features
It makes device packages simpler and applies UUIDs to cmdline parsing /etc/fstab
, giving a possibility to have 2 installations on different storages on the same device
We introduced support for it in https://gitlab.com/postmarketOS/boot-deploy/-/merge_requests/18
Current state
Chrome OS and Android device already use these features, but we have a bunch of devices using u-boot scripts with hardcoded cmdline which are not going to use these features this way
Some devices use u-boot scripts for no reason, and I suggest switching these to generated extlinux.conf. For devices that require custom logic in script, the way is to apply pmos_boot=
and pmos_root=
in cmdline
main:
-
purism-librem5 (@craftyguy) - uses custom logic to select dtb
- consider implementing
pmos_boot=
andpmos_root=
in u-boot script - it may be also possible to implement dtb selection with
fdtdir
in extlinux.conf, see boot-deploy#14 (closed)
-
pine64-pinephone (@MartijnBraam, @ollieparanoid, @z3ntu, @dylanvanassche) - uses custom logic in uboot-user.cmd
- consider implementing
pmos_boot=
andpmos_root=
in u-boot script
community:
-
nokia-n900 - the only feasible way to boot is a SD card, no need for these features
- may be possible to use generated extlinux.conf for simplicity, but not necessary
testing:
-
goclever-gcta741l (@JuniorJPDJ) - hardcodes booting from mmcblk0
- can it boot from USB OTG?
-
google-nyan-big - partially solved: provides
pmos_boot=
andpmos_root=
, but not for USB
- partially solved: provides
-
google-nyan-blaze - partially solved: the same to google-nyan-big
-
google-peach-pi - partially solved: the same to google-nyan-big
-
google-peach-pit - partially solved: the same to google-nyan-big
-
google-snow - partially solved: the same to google-nyan-big
-
kobo-clara - custom logic: execution of
load_ntxkernel
command - consider implementing it in u-boot sources or provide
pmos_boot=
andpmos_root=
- custom logic: execution of
-
kobo-librah2o - custom logic: enter fastboot on volume key press
- consider implementing it in u-boot sources or provide
pmos_boot=
andpmos_root=
-
lark-freeme-70-2s (@JuniorJPDJ) - hardcodes booting from mmcblk0
- can it boot from USB OTG?
-
mangopi-mq-pro - hardcodes
setenv bootdev 0
- does it need any of discussed features?
- hardcodes
-
odroid-hc2 (@dylanvanassche) -
odroid-xu4 (@grimler) -
pine64-a64lts -
pine64-dontbeevil -
pine64-pinetab (@MartijnBraam, @dylanvanassche) - makes use of
pmos_boot=
andpmos_root=
for eMMC and SD - can it boot from USB OTG?
- makes use of
-
purism-librem5dev (@craftyguy) -
sipeed-licheezero - custom logic: uses dtbo
- is there only one storage to boot from?
-
sourceparts-pocketpc - provides
pmos_boot=
andpmos_root=
- doesn't have any custom logic, should be able to switch to extlinux.conf, but not necessary
- provides
-
tokio-techbook - weird script...
-
tolino-shine2hd -
tolino-shine3 -
xunlong-orangepi3 (@mxkrsv) - partially solved: provides
pmos_boot=
andpmos_root=
, but not for USB
- partially solved: provides
Implementing
Devices without custom logic
- Remove everything related to u-boot script from device package
- Set up deviceinfo:
deviceinfo_dtb="something"
deviceinfo_kernel_cmdline="something"
deviceinfo_generate_extlinux_config="true"
- Set depending on
postmarketos-base>=25-r1
in APKBUILD - Merge request must depend on !3791
Devices with custom logic
For this situation we have pmos_boot=
and pmos_root=
parsing in initramfs
- Make sure your device-tree uses mmc aliases. If not, number X in
/dev/mmcblkX
may change on each boot. See peach-pit patch for example - Adjust u-boot script to provide
pmos_boot=
andpmos_root=
. See peach-pit uboot-script.cmd for example. Make sure it is implemented for all storages device can boot from