Skip to content

package petitboot for devicetree support on motorola-smi

julianwi requested to merge julianwi/pmaports:petitboot-motorola-smi into master

This is in preparation to allow upgrading linux-postmarketos-intel-medfield. Newer kernel versions no longer support simple firmware interface (SFI) and have to be booted with devicetree. Therefore, a second stage bootloader is needed. The simplest solution seems to package petitboot in postmarketOS. It could maybe also be usefull for other devices in the future.

  • Fork kexec-tools from alpine with patch for devicetree on x86.
  • Create new package for petitboot.
  • build and package device specific petitboot bootimg in device/testing/petitboot-motorola-smi
    • build the kernel from source, because the linux-postmarketos-intel-medfield will no longer support SFI when upgraded in the future. Also, the kernel config for petitboot can be minimal to allow faster startup. Additionally CONFIG_U_SERIAL_CONSOLE is enabled to access petitboot over USB.
    • Initramfs is build including kexec, petitboot, busybox and udev. To allow navigation in petitboot, a custom keymap is added to remap volume keys as arrow keys.
    • Everything is packed together using abootimg.

There is also an alternative project called kexecboot which does not depend on busybox and udev, but has its own configuration format. Petitboot has the advantage of being able to parses the grub.cfg file generated by boot-deploy.

Dual boot with android is also possible, when manually adding a grub.cfg to the android system partition.

I added a screenshot to the wiki page here.

Maybe, some of the patches in the petitboot package should be upstreamed.

Edited by julianwi

Merge request reports