Commit Graph

11 Commits

Author SHA1 Message Date
Gábor Stefanik ab9455f918 Fix warnings in existing code revealed by newer pylint 2023-12-22 13:08:23 +01:00
Gábor Stefanik be1333ee8b Make tmpdir a method parameter of prepare()
Fixes pylint errors.
2023-12-22 13:08:20 +01:00
Gábor Stefanik b45e1f81ae Fix failure with --external-sources 2023-12-22 13:07:45 +01:00
Gábor Stefanik 32dc4c702b More verbose error message on HTTP errors 2023-12-22 13:07:45 +01:00
Gábor Stefanik 55d3c36e09 Move kernel-bootstrap source image out of the directory it's generated from
This way, an incomplete version of the image itself won't get included
in srcfs anymore.
2023-12-22 13:07:45 +01:00
Gábor Stefanik 3305f2a41b Use manifest to deduce pre-network sources list
No need to maintain a separate pre-network-sources file anymore,
the list is instead derived from the bootstrap manifest via the
source manifest.
2023-12-22 13:07:04 +01:00
Gábor Stefanik a68ae62f9e Download distfiles only when needed, based on manifest
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.
2023-12-22 13:07:04 +01:00
Gábor Stefanik b4d9c5e7cb Disk creation improvements
* 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)
2023-12-22 13:06:19 +01:00
Gábor Stefanik dc62d8242c Create external.img only when needed 2023-12-22 12:10:09 +01:00
fosslinux ab47483a51 Linters & CI updates 2023-12-15 21:44:43 +11:00
fosslinux 05c13dd64e Modify rootfs.py infrastructure to support the new layout 2023-12-15 21:43:21 +11:00