-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add installer support for target build
While "installer-support" in DISTRO_FEATURES, it enable features of target build. The target build requires: - add dmthin.scc and crypt.scc to kernel config - add distro feature check of systemd and ldconfig - add rpm packages check - emit target image env to help installation Signed-off-by: Hongxu Jia <[email protected]>
- Loading branch information
1 parent
ca542f8
commit 190f6f5
Showing
3 changed files
with
56 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FEATURE_PACKAGES_installer-support = "packagegroup-installer-support" | ||
IMAGE_FEATURES_append = " installer-support" | ||
EXTRA_IMAGEDEPENDS += "grub grub-efi" | ||
|
||
EXTRA_IMAGEDEPENDS += "glibc-locale" | ||
|
||
# Generate filesystem images for image copy install | ||
IMAGE_FSTYPES += "ext4" | ||
|
||
IMAGE_POSTPROCESS_COMMAND_append = " emit_image_env;" | ||
|
||
inherit distro_features_check | ||
REQUIRED_DISTRO_FEATURES = "systemd ldconfig" | ||
|
||
python emit_image_env () { | ||
localdata = bb.data.createCopy(d) | ||
|
||
# Export DISTRO for installer build | ||
localdata.setVarFlag("DISTRO", "unexport", "") | ||
|
||
dumpfile = d.expand("${TOPDIR}/installersupport_${PN}") | ||
with open(dumpfile , "w") as f: | ||
bb.data.emit_env(f, localdata, True) | ||
} | ||
|
||
python __anonymous () { | ||
if not bb.utils.contains("PACKAGE_CLASSES", "package_rpm", True, False, d): | ||
raise bb.parse.SkipPackage('Target build requires RPM packages to be the default in PACKAGE_CLASSES.') | ||
} |
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
25 changes: 25 additions & 0 deletions
25
recipes-installersupport/packagegroups/packagegroup-installer-support.bb
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,25 @@ | ||
DESCRIPTION = "Packages required by target build to help the installation" | ||
LICENSE = "MIT" | ||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
|
||
inherit packagegroup | ||
|
||
RDEPENDS_${PN} = " \ | ||
sudo \ | ||
kernel-image \ | ||
grubby \ | ||
shadow \ | ||
efibootmgr \ | ||
kmod \ | ||
util-linux-mount \ | ||
init-ifupdown \ | ||
libuser \ | ||
dracut \ | ||
cryptsetup \ | ||
sed \ | ||
grep \ | ||
dosfstools \ | ||
e2fsprogs \ | ||
btrfs-tools \ | ||
" | ||
|