This Petitboot fork enables devices without proper NVRAM support to use a file as the configuration storage.
It uses a block based format to store the configuration data (everything in the "System Configuration" menu), thus it is not human-readable.
Note
It is recommended to build this Petitboot environment with Buildroot.
- Enable
BR2_PACKAGE_UTIL_LINUX_LIBMOUNT,BR2_PACKAGE_UTIL_LINUX_LIBBLKIDandBR2_PACKAGE_ZLIB. - Apply the diff (View the diff in GitHub UI here).
- You can download the patch into
packages/petitboot/with a.patchextension.
- You can download the patch into
- Add
PETITBOOT_AUTORECONF = YESat the beginning section ofpackages/petitboot/petitboot.mk, since the patch modifiesconfigure.ac. - Enable the petitboot package.
- Run
make petitboot-dirclean && maketo build. - To specify a filesystem for the config block file, either:
- Create an empty file
/boot/petitboot.txtin the filesystem to signify that this filesystem is available to Petitboot. - Add
PETITBOOT_CONFIG_BLOCK_PARTITION_UUID=UUID_HEREto the kernel command line arguments. It supports FAT volume IDs inABCD-ABCDformat and GUIDs as seen in other filesystems.
- Create an empty file
- Boot the built initramfs image, it will initialize a config block file with default settings at
/boot/pbconfig.bin. - Try changing a setting and saving.
This fork is intended for MIPS Loongson devices with a PMON firmware, or an early "Loongson EFI (LEFI)" firmware. Petitboot being able to parse GRUB configuration file makes it feasible.