Python script fixes and improvements#354
Merged
fosslinux merged 13 commits intofosslinux:masterfrom Dec 26, 2023
Merged
Conversation
Collaborator
Googulator
commented
Dec 17, 2023
- Support specifying size of the virtual disk for qemu
- For bare metal, only create a minimal sized boot disk image
- Don't create external.img, unless it's actually needed
- Use truncate() for extending disk images to the desired size (faster than writing zeros)
- Make source_manifest.py work again
- Make -qr compatible with kernel bootstrap (will need fix in kexec-fiwix to actually use more memory)
- Use correct partition alignment (only in the Python scripts yet, move_disk.sh needs to be also fixed)
- Reserve the first 1GB on boot disks (again, needs to be done in move_disk.sh too)
- Fix bootstrap.cfg creation/cleanup (broken by residual sysa reference)
- Avoid including a truncated copy of the srcfs image in itself
- Print the correct paths to the images in bare metal mode
- Rework source manifest generation to be based on the bootstrap manifest
- Support predownloading only the sources that are needed before network
- Eliminate steps/pre-network-sources, decide based on the bootstrap manifest instead
fosslinux
reviewed
Dec 18, 2023
Owner
fosslinux
left a comment
There was a problem hiding this comment.
Could you please also;
- fix pylint errors
- squash any "Fix" commits that fix an error introduced in an earlier commit (within this PR) into that commit
Collaborator
Author
|
Is there a better way to do that in Git than redoing the entire series by hand, and force-pushing? I.e. something similar to Mercurial's histedit. |
stikonas
reviewed
Dec 20, 2023
Owner
|
* Support specifying the size of the target disk image for qemu * For bare metal, only pad the image to the next megabyte * Use truncate() to extend images, instead of writing zeros (faster) * Return None from get_disk() with nonexistent name * Leave 1MiB on non-boot disks, or 1GiB on boot disks, unpartitioned (for proper 4K alignment and to help preserve the srcfs or boot partition creation) * Fix qemu invocation when an external.img is not used * Make -qr work with kernel bootstrap (will need kexec-fiwix fix)
There's no sysa or sysc anymore.
Unless --external-sources is given, only download distfiles that need to be included in srcfs. The rest will be downloaded anyway by the bootstrap system once it gets network access. To accomplish this, instead of searching steps for sources files, we now parse steps/manifest. As a side effect, source_manifest.py now outputs source files in the order they appear in the manifest.
No need to maintain a separate pre-network-sources file anymore, the list is instead derived from the bootstrap manifest via the source manifest.
…d from This way, an incomplete version of the image itself won't get included in srcfs anymore.
Fixes pylint errors.
2b8f033 to
529ea4c
Compare
This was referenced Dec 23, 2023
fosslinux
approved these changes
Dec 26, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.