[WIP] rootfs: handle cross-compilation with a dummy rootfs #91
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note that this rootfs will not boot, and it's by design.
It does not have the appropriate filesystem label, nor does it have the
right UUID.
This may look absurdly useless, but I assure you it's not.
With this scheme, some targets are easier to deal with. Namely, those
that allow booting from multiple boot sources. With the u-boot system
type, you can produce a full disk image that can be burned on an SD
card, and will boot the internal storage's rootfs that was already
present.
This makes it much more trivial to deal with stage-1 development while
sitll booting the internal rootfs.
Though, I'm not expecting this behaviour to remain.
Notes
I don't know whether this will be merged. For now I'm using this and I thought others might find this useful.
I'd prefer instead figure out a good way to configure that as a
local.nix
thing instead of hijacking the build process.Furthermore, I'd prefer if we could trivially build a rootfs that is cross-compilable, even if it is minimal and not representative of a fulle system.