Skip to content

Petitboot, with ability to save configuration to a file (limitations apply)

License

Notifications You must be signed in to change notification settings

Cyanoxygen/petitboot

 
 

Repository files navigation

Petitboot with file backed parameter storage

Original README

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.

Usage

Note

It is recommended to build this Petitboot environment with Buildroot.

  1. Enable BR2_PACKAGE_UTIL_LINUX_LIBMOUNT, BR2_PACKAGE_UTIL_LINUX_LIBBLKID and BR2_PACKAGE_ZLIB.
  2. Apply the diff (View the diff in GitHub UI here).
    • You can download the patch into packages/petitboot/ with a .patch extension.
  3. Add PETITBOOT_AUTORECONF = YES at the beginning section of packages/petitboot/petitboot.mk, since the patch modifies configure.ac.
  4. Enable the petitboot package.
  5. Run make petitboot-dirclean && make to build.
  6. To specify a filesystem for the config block file, either:
    • Create an empty file /boot/petitboot.txt in the filesystem to signify that this filesystem is available to Petitboot.
    • Add PETITBOOT_CONFIG_BLOCK_PARTITION_UUID=UUID_HERE to the kernel command line arguments. It supports FAT volume IDs in ABCD-ABCD format and GUIDs as seen in other filesystems.
  7. Boot the built initramfs image, it will initialize a config block file with default settings at /boot/pbconfig.bin.
  8. Try changing a setting and saving.

Notes

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.

About

Petitboot, with ability to save configuration to a file (limitations apply)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 88.6%
  • M4 4.7%
  • Makefile 2.4%
  • Shell 2.4%
  • Yacc 0.9%
  • Lex 0.4%
  • Other 0.6%