-
-
Notifications
You must be signed in to change notification settings - Fork 606
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zfs: new zfs_builder to create ZFS images
This patch makes some incremental improvements to the process of building ZFS images. However, the main driving force here is to support building and running ZFS images with the kernel built with most symbols hidden. The key missing part to support the above is adding libstdc++.so to the image so that it can be loaded as needed by cpiod.so and mkfs.so. However, this would make the loader.elf even larger than the non-hidden version of it. So instead this patch adds new artifact - zfs_builder.elf - which is intended to be used by upload_manifest.py only to build ZFS-images. In essence this patch modifies the main makefile to build new zfs_builder.elf with bootfs populated with all artifacts necessary to build and load ZFS filesystem (cpiod.so, mkfs.so, etc). At the same time we drop support of building kernel.elf which became obsolete in favor of standard loader.elf which now is even leaner - it does not carry the bootfs footprint with ZFS building tools. On top of that we optimise the build time of ZFS image by making it run zfs_builder.elf in QEMU kernel direct mode and VGA console off that cuts boot time to around 20ms. At the end of the day we come close to satisfying #1068 - "Building a full OSv image without running it" - we use new OSv-based build tool zfs_builder.elf to build final ZFS image - usr.img. Another benefit of this approach is that we can use some "old" pre-existing version of zfs_builder.elf (possibly retrieved from github) to build ZFS image that includes new version of kernel (loader.elf). Refs #1068 Refs #1186 Signed-off-by: Waldemar Kozaczuk <[email protected]>
- Loading branch information
Showing
10 changed files
with
58 additions
and
41 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,2 @@ | ||
[manifest] | ||
/libvdso.so: libvdso.so | ||
/libuutil.so: libuutil.so | ||
/zpool.so: zpool.so | ||
/libzfs.so: libzfs.so | ||
/libsolaris.so: libsolaris.so | ||
/zfs.so: zfs.so | ||
/tools/mkfs.so: tools/mkfs/mkfs.so | ||
/tools/cpiod.so: tools/cpiod/cpiod.so | ||
/usr/lib/libgcc_s.so.1: %(libgcc_s_dir)s/libgcc_s.so.1 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[manifest] | ||
/zpool.so: zpool.so | ||
/libzfs.so: libzfs.so | ||
/libuutil.so: libuutil.so | ||
/libsolaris.so: libsolaris.so |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
.global bootfs_start | ||
.hidden bootfs_start | ||
bootfs_start: | ||
.incbin "zfs_builder_bootfs.bin" | ||
.popsection |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[manifest] | ||
/libvdso.so: libvdso.so | ||
/libuutil.so: libuutil.so | ||
/zpool.so: zpool.so | ||
/libzfs.so: libzfs.so | ||
/libsolaris.so: libsolaris.so | ||
/zfs.so: zfs.so | ||
/tools/mkfs.so: tools/mkfs/mkfs.so | ||
/tools/cpiod.so: tools/cpiod/cpiod.so | ||
/usr/lib/libgcc_s.so.1: %(libgcc_s_dir)s/libgcc_s.so.1 |