Commit Graph

10 Commits (2b6b777282bb90bb2eda3c0b05252c64d87cdd9c)

Author SHA1 Message Date
Dustin a5a642cb9a build: Rebuild when Portage config changes
The `host-tools` and `build` targets will now be rebuilt automatically
when the respective Portage configuration changes.
2023-03-12 12:53:16 -05:00
Dustin 9bdf0fbfd0 build: Trigger rebuild on overlay changes
If any file in the `overlay` directory changes, the `build-rootfs.sh`
script needs to be re-run in order to copy the changes into the
destination root and regenerate the SquashFS image.
2023-03-12 12:47:36 -05:00
Dustin 189f1f656e wip: build u-boot with Portage 2023-03-12 12:47:36 -05:00
Dustin 5f62193247 Use Portage config directly from src dir
Instead of copying the Portage configuration files to `/etc/portage` and
`/usr/${target}/etc/portage`, the build scripts now use the
configuration directories from the source directory.  This avoids issues
with changes (especially removal of files) getting propagated to the
actual configuration paths.
2023-03-12 12:47:36 -05:00
Dustin 3ca750f495 build: Rebuild when busybox.symlinks changes 2023-03-12 12:47:36 -05:00
Dustin dbc02a99a1 Simplify specifying packages to build/install
The Portage packages that need to be built and/or installed are now
specified in the `build.packages` and `install.packages` files,
respectively.  Similarly, packages to be installed on the host system
are specified in `host-tools.packages`.  Finally, the
`installonly.packages` file contains a list of packages that are
installed in the destination root, but not built in the sysroot
beforehand.

This allows `make` to better track when the package sets change.  It
will also make it easier to maintain different sets for different
variants in the future.
2023-03-08 11:12:00 -06:00
Dustin 4900085a1c Support external build directory
When running inside a QEMU microvm with the source directory shared
via 9pfs, the kernel build process fails

> Error: Could not mmap file: vmlinux

Thus, we need to run the build in a path on a local filesystem.  To
support this, the Makefile now supports an `O` option, and all the build
scripts have been adjusted to make use of it as needed.

Since building in a local filesystem would ultimately discard the final
artifacts when the VM terminates, we need yet a different location for
the files we want to keep.  The `IMAGESDIR` option can be used to
specify this path.  This path can be on a shared filesystem, thus
saving the artifacts outside the microvm.
2023-03-03 12:36:15 -06:00
Dustin c91bff6f6d Makefile: Allow rebuilding just the squashfs image
This way we can rebuild the image even if nothing changed in the root
filesystem, but the excluded path list did.
2023-02-14 21:08:27 -06:00
Dustin e0d873bbf0 Makefile: Fix recipe dependencies 2023-02-14 00:31:26 -06:00
Dustin 1687e615b4 Add top-level Makefile
Building the OS is now as simple as running `make` on a Gentoo system.

Interestingly, when `make` is executed as a (grand)child process of
another `make` process, it always prints an `Entering directory ...`
message.  This breaks the `make kernelversion` command, by adding
extraneous text to the output.
2023-02-13 23:24:36 -06:00