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

Python script fixes and improvements #354

Merged
merged 13 commits into from
Dec 26, 2023

Conversation

Googulator
Copy link
Collaborator

  • 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

Copy link
Owner

@fosslinux fosslinux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

lib/generator.py Show resolved Hide resolved
@Googulator
Copy link
Collaborator Author

Googulator commented Dec 20, 2023

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.

rootfs.py Show resolved Hide resolved
@fosslinux
Copy link
Owner

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.

git rebase -i HEAD~n, where n is the number of commits back you'd like to adjust the history. Happy to walk you through this on IRC, give me a ping

* 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)
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.
@fosslinux fosslinux merged commit 6905852 into fosslinux:master Dec 26, 2023
5 of 6 checks passed
@Googulator Googulator deleted the script-fixes branch December 28, 2023 19:06
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.

3 participants