Commit Graph

6 Commits (master)

Author SHA1 Message Date
Dustin 44b2ce8a99 Begin persistent storage implementation
Aimee OS/aimee-os/pipeline/head This commit looks good Details
Most of the logic in the `init-storage` script is the same as it was in
Aimee OS v1 (Gentoo).  The major difference is now we are initializing
the data volume in the initramfs instead of in the real OS.  This allows
us to make all of `/etc` writable via OverlayFS, instead of having only
certain sub-directories writable via bind-mounts.

Buildroot doesn't really have any tools for building an initramfs,
unfortunately.  It does have a bit of infrastructure for running
`dracut`, but I'd really rather avoid having that much complexity in the
initramfs; all we need is to run the `init-storage` script and then
switch root.  Instead, the `mkinitramfs.sh` script, called in the
post-build stage, creates the CPIO archive from files in the target
directory.  The only particularly interesting bit is how it resolves
shared library dependencies, to make sure the appropriate resources are
available for the requisite commands.

I briefly considered building a statically-linked BusyBox just for the
initramfs.  Since it doesn't provide several important tools like
`btrfs`/`mkfs.btrfs`, I had to implement the dynamic link resolution
function anyway.  It made sense, then, to copy Dash and the necessary
Coreutils binaries themselves.
2025-08-29 20:17:52 -05:00
Dustin 8a2d305b04 grub2: Support setting rootflags in config
The `AIMEEOS_DEFAULT_ROOTFLAGS` kconfig option can be used to set the
default value for the `rootflags` GRUB2 environment variable.  The value
of this variable will be passed along as command-line arguments to
whatever kernel is chosen at boot.

Since post-image scripts do not have access to kconfig option values, we
need to build the GRUB2 environment file in the
`GRUB2_INSTALL_IMAGES_CMDS` script fragment instead.
2025-08-29 20:17:52 -05:00
Dustin 66af20213b board/qemu: Generate sdcard.img with post-image
In order to test AimeeOS A/B filesystem updates, we need a full disk
image just like the Raspberry Pi variant has.
2025-08-29 20:13:18 -05:00
Dustin 4c947bde8a config: rpi: Enable host OpenSSL/GnuTLS for uboot
The default U-Boot configuration tries to build tools that depend on
OpenSSL _and_ GnuTLS.  We need to enable the corresponding buildroot
configuration options, or the build system will try to use the
system-wide headers and libraries.
2025-08-18 19:23:39 -05:00
Dustin 9dae022788 First working revision
At this point, we can generate an SD card image that is composed of an
EFI system partition, a SquashFS root partition (a), a blank root
partition (b), and a data partition.  On the EFI system partition are
the Raspberry Pi firmware and device trees, U-Boot and GRUB.  The
SquashFS filesystem contains the kernel and the whole filesystem tree.

A Raspberry Pi can successfully boot from an SD card containing this
image.  It's not quite usable yet, because there's no writable storage
available, or indeed any way to log in.
2025-08-17 16:01:40 -05:00
Dustin e267f82db1 Initial commit 2025-08-17 10:30:19 -05:00