Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additions to assist with pi-gen image customisation #790

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

learmj
Copy link

@learmj learmj commented Sep 16, 2024

Hi @XECDesign
Here's a small set of commits plus introduction of an examples directory to help jump start projects, or to highlight anything in pi-gen we think would be valuable to users. We can add to examples/ as we see fit.

Supporting a postrun hook when processing stages allows a user to execute operations in that stage after all sub-stage actions have been executed.

The addition of EXPORT_CONFIG_DIR allows a user to define their own actions for image creation rather than using/editing the defaults. By using STAGE_LIST and EXPORT_CONFIG_DIR, a user has complete control over their image construction and generation without having to worry about rebasing/merging things when we make changes in the defaults.

The addition of bootstrap64 is to add a 64-bit debootstrap install wrapper so that a user can create a 64-bit custom image without having to switch to the arm64 branch. I think whoever invokes this (eg from a custom stage) should take responsibility of being able to run it on the Host, or I can a 'suitability test' to it if you'd prefer.

examples/min64 is a generic 64-bit target system with limited functionality, intended to serve as an example for users wishing to create a light-weight system.

Comments and feedback welcome.
Cheers,
-- Matt

It's sometimes useful to perform post-processing on a stage build
so add support for that.
Add new variable EXPORT_CONFIG_DIR to set the location of the scripts
pigen will run when exporting an image. Setting this is optional. If
not specified, the current location is retained.

By utilising STAGE_LIST AND EXPORT_CONFIG_DIR, a user can construct
custom images out-of-tree without modification to any defaults.
Scripts can call bootstrap64 to initialise an arm64 rootfs.
It may be useful for users to have some example pigen configurations
more aligned with their needs, rather than using (or hacking) the
default stages. The examples directory is intended to serve as a
starting point. It's not intended to be production code.

The min64 example is a minimal and generic 64-bit Debian system which
boots kernel8, runs systemd with basic wired networking, and has a
handful of core packages installed in a ~670MB rootfs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant