summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/images
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/images')
-rw-r--r--meta/recipes-core/images/build-appliance-image_15.0.0.bb25
-rw-r--r--meta/recipes-core/images/core-image-initramfs-boot.bb22
-rw-r--r--meta/recipes-core/images/core-image-minimal-initramfs.bb7
-rw-r--r--meta/recipes-core/images/core-image-ptest-all.bb34
-rw-r--r--meta/recipes-core/images/core-image-ptest-fast.bb24
-rw-r--r--meta/recipes-core/images/core-image-ptest.bb44
-rw-r--r--meta/recipes-core/images/core-image-tiny-initramfs.bb4
7 files changed, 110 insertions, 50 deletions
diff --git a/meta/recipes-core/images/build-appliance-image_15.0.0.bb b/meta/recipes-core/images/build-appliance-image_15.0.0.bb
index 2cdac20ce7..4cf55519cc 100644
--- a/meta/recipes-core/images/build-appliance-image_15.0.0.bb
+++ b/meta/recipes-core/images/build-appliance-image_15.0.0.bb
@@ -1,6 +1,6 @@
SUMMARY = "An image containing the build system itself"
DESCRIPTION = "An image containing the build system that you can boot and run using either VirtualBox, VMware Player or VMware Workstation."
-HOMEPAGE = "http://www.yoctoproject.org/documentation/build-appliance"
+HOMEPAGE = "https://docs.yoctoproject.org/overview-manual/yp-intro.html#archived-components"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
@@ -11,7 +11,7 @@ IMAGE_INSTALL = "packagegroup-core-boot packagegroup-core-ssh-openssh packagegro
IMAGE_FEATURES += "x11-base package-management splash"
-QB_MEM = '${@bb.utils.contains("DISTRO_FEATURES", "opengl", "-m 512", "-m 256", d)}'
+QB_MEM ?= '${@bb.utils.contains("DISTRO_FEATURES", "opengl", "-m 512", "-m 256", d)}'
# Ensure there's enough space to do a core-image-sato build, with rm_work enabled
IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
@@ -22,9 +22,11 @@ APPEND += "rootfstype=ext4 quiet"
DEPENDS = "zip-native python3-pip-native"
IMAGE_FSTYPES = "wic.vmdk wic.vhd wic.vhdx"
-inherit core-image setuptools3
+inherit core-image setuptools3 features_check
-SRCREV ?= "093398daf5000e69057aedfe8c9f8df2c4e837f3"
+REQUIRED_DISTRO_FEATURES += "xattr"
+
+SRCREV ?= "17723c6e34096a53fb186cc70cfc604bb30da8b9"
SRC_URI = "git://git.yoctoproject.org/poky;branch=master \
file://Yocto_Build_Appliance.vmx \
file://Yocto_Build_Appliance.vmxf \
@@ -63,6 +65,7 @@ fakeroot do_populate_poky_src () {
echo "INHERIT += \"rm_work\"" >> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf
echo "export LC_ALL=en_US.utf8" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+ echo "export TERM=xterm-color" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
# Also save (for reference only) the actual SRCREV used to create this image
echo "export BA_SRCREV=${SRCREV}" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
@@ -108,7 +111,13 @@ fakeroot do_populate_poky_src () {
chown -R builder:builder ${IMAGE_ROOTFS}/home/builder/.cache
}
-IMAGE_PREPROCESS_COMMAND += "do_populate_poky_src; "
+fakeroot do_tweak_image () {
+ # add a /lib64 symlink
+ # this is needed for building rust-native on a 64-bit build appliance
+ ln -rs ${IMAGE_ROOTFS}/lib ${IMAGE_ROOTFS}/lib64
+}
+
+IMAGE_PREPROCESS_COMMAND += "do_populate_poky_src do_tweak_image"
# For pip usage above
do_image[network] = "1"
@@ -124,9 +133,9 @@ create_bundle_files () {
cd ${WORKDIR}
mkdir -p Yocto_Build_Appliance
cp *.vmx* Yocto_Build_Appliance
- ln -sf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.wic.vmdk Yocto_Build_Appliance/Yocto_Build_Appliance.vmdk
- ln -sf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.wic.vhdx Yocto_Build_Appliance/Yocto_Build_Appliance.vhdx
- ln -sf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.wic.vhd Yocto_Build_Appliance/Yocto_Build_Appliance.vhd
+ ln -sf ${IMGDEPLOYDIR}/${IMAGE_NAME}.wic.vmdk Yocto_Build_Appliance/Yocto_Build_Appliance.vmdk
+ ln -sf ${IMGDEPLOYDIR}/${IMAGE_NAME}.wic.vhdx Yocto_Build_Appliance/Yocto_Build_Appliance.vhdx
+ ln -sf ${IMGDEPLOYDIR}/${IMAGE_NAME}.wic.vhd Yocto_Build_Appliance/Yocto_Build_Appliance.vhd
zip -r ${IMGDEPLOYDIR}/Yocto_Build_Appliance-${DATETIME}.zip Yocto_Build_Appliance
ln -sf Yocto_Build_Appliance-${DATETIME}.zip ${IMGDEPLOYDIR}/Yocto_Build_Appliance.zip
}
diff --git a/meta/recipes-core/images/core-image-initramfs-boot.bb b/meta/recipes-core/images/core-image-initramfs-boot.bb
new file mode 100644
index 0000000000..7258944751
--- /dev/null
+++ b/meta/recipes-core/images/core-image-initramfs-boot.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Basic initramfs to boot a fully-featured rootfs"
+DESCRIPTION = "Small initramfs that contains just udev and init, to find the real rootfs."
+LICENSE = "MIT"
+
+INITRAMFS_SCRIPTS ?= "initramfs-framework-base initramfs-module-udev"
+
+PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS} ${VIRTUAL-RUNTIME_base-utils} base-passwd"
+
+# Ensure the initramfs only contains the bare minimum
+IMAGE_FEATURES = ""
+IMAGE_LINGUAS = ""
+
+# Don't allow the initramfs to contain a kernel, as kernel modules will depend
+# on the kernel image.
+PACKAGE_EXCLUDE = "kernel-image-*"
+
+IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
+IMAGE_NAME_SUFFIX ?= ""
+IMAGE_ROOTFS_SIZE = "8192"
+IMAGE_ROOTFS_EXTRA_SPACE = "0"
+
+inherit image
diff --git a/meta/recipes-core/images/core-image-minimal-initramfs.bb b/meta/recipes-core/images/core-image-minimal-initramfs.bb
index 664fe7310e..36e8771c4a 100644
--- a/meta/recipes-core/images/core-image-minimal-initramfs.bb
+++ b/meta/recipes-core/images/core-image-minimal-initramfs.bb
@@ -1,4 +1,5 @@
# Simple initramfs image. Mostly used for live images.
+SUMMARY = "Small image capable of booting a device."
DESCRIPTION = "Small image capable of booting a device. The kernel includes \
the Minimal RAM-based Initial Root Filesystem (initramfs), which finds the \
first 'init' program more efficiently."
@@ -16,7 +17,9 @@ PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS} ${VIRTUAL-RUNTIME_base-utils} udev base-
# Do not pollute the initrd image with rootfs features
IMAGE_FEATURES = ""
-export IMAGE_BASENAME = "${MLPREFIX}core-image-minimal-initramfs"
+# Don't allow the initramfs to contain a kernel
+PACKAGE_EXCLUDE = "kernel-image-*"
+
IMAGE_NAME_SUFFIX ?= ""
IMAGE_LINGUAS = ""
@@ -29,4 +32,4 @@ IMAGE_ROOTFS_SIZE = "8192"
IMAGE_ROOTFS_EXTRA_SPACE = "0"
# Use the same restriction as initramfs-module-install
-COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
+COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|loongarch64.*)-(linux.*|freebsd.*)'
diff --git a/meta/recipes-core/images/core-image-ptest-all.bb b/meta/recipes-core/images/core-image-ptest-all.bb
index 1472451675..d4edb0fd05 100644
--- a/meta/recipes-core/images/core-image-ptest-all.bb
+++ b/meta/recipes-core/images/core-image-ptest-all.bb
@@ -1,25 +1,25 @@
-inherit features_check
+SUMMARY = "Recipe to trigger execution of all ptest images."
+HOMEPAGE = "https://www.yoctoproject.org/"
+
+LICENSE = "MIT"
+
+inherit features_check nopackages
REQUIRED_DISTRO_FEATURES = "ptest"
-require core-image-minimal.bb
require conf/distro/include/ptest-packagelists.inc
-DESCRIPTION += "Also includes ptest packages."
-HOMEPAGE = "https://www.yoctoproject.org/"
-
# Include the full set of ptests
-IMAGE_INSTALL += "${PTESTS_FAST} ${PTESTS_SLOW}"
+PTESTS = "${PTESTS_FAST} ${PTESTS_SLOW}"
+
+do_testimage[noexec] = "1"
+do_testimage[depends] = "${@' '.join(['core-image-ptest-'+x+':do_testimage' for x in d.getVar('PTESTS').split()])}"
-# This image is sufficiently large (~1.8GB) that we need to be careful that it fits in a live
-# image (which has a 4GB limit), so nullify the overhead factor (1.3x out of the
-# box) and explicitly add just 1100MB.
-# strace-ptest in particular needs more than 500MB
-IMAGE_OVERHEAD_FACTOR = "1.0"
-IMAGE_ROOTFS_EXTRA_SPACE = "1124288"
+do_build[depends] = "${@' '.join(['core-image-ptest-'+x+':do_build' for x in d.getVar('PTESTS').split()])}"
-# ptests need more memory than standard to avoid the OOM killer
-# also lttng-tools needs /tmp that has at least 2G
-QB_MEM = "-m 4096"
+# normally image.bbclass would do this
+EXCLUDE_FROM_WORLD = "1"
-# Sadly at the moment the full set of ptests is not robust enough and sporadically fails in random places
-PTEST_EXPECT_FAILURE = "1"
+python () {
+ if bb.utils.contains('IMAGE_CLASSES', 'testimage', True, False, d):
+ bb.build.addtask("do_testimage", "", "", d)
+}
diff --git a/meta/recipes-core/images/core-image-ptest-fast.bb b/meta/recipes-core/images/core-image-ptest-fast.bb
index 40df274c4c..a5364e6cbf 100644
--- a/meta/recipes-core/images/core-image-ptest-fast.bb
+++ b/meta/recipes-core/images/core-image-ptest-fast.bb
@@ -1,24 +1,6 @@
-inherit features_check
-REQUIRED_DISTRO_FEATURES = "ptest"
+require core-image-ptest-all.bb
-require core-image-minimal.bb
-require conf/distro/include/ptest-packagelists.inc
+SUMMARY = "Recipe to trigger execution of all fast ptest images."
-# Include only fast (< 30 sec) ptests
-IMAGE_INSTALL += "${PTESTS_FAST}"
+PTESTS = "${PTESTS_FAST}"
-DESCRIPTION += "Also includes ptest packages with fast execution times to allow for more automated QA."
-HOMEPAGE = "https://www.yoctoproject.org/"
-
-# This image is sufficiently large (~1.8GB) that it can't actually fit in a live
-# image (which has a 4GB limit), so nullify the overhead factor (1.3x out of the
-# box) and explicitly add just 1500MB.
-# strace-ptest in particular needs more than 500MB
-IMAGE_OVERHEAD_FACTOR = "1.0"
-IMAGE_ROOTFS_EXTRA_SPACE = "1524288"
-
-# ptests need more memory than standard to avoid the OOM killer
-QB_MEM = "-m 1024"
-
-# Sadly at the moment the fast set of ptests is not robust enough and sporadically fails in a couple of places
-PTEST_EXPECT_FAILURE = "1"
diff --git a/meta/recipes-core/images/core-image-ptest.bb b/meta/recipes-core/images/core-image-ptest.bb
new file mode 100644
index 0000000000..72081f938d
--- /dev/null
+++ b/meta/recipes-core/images/core-image-ptest.bb
@@ -0,0 +1,44 @@
+inherit features_check
+REQUIRED_DISTRO_FEATURES = "ptest"
+
+require core-image-minimal.bb
+require conf/distro/include/ptest-packagelists.inc
+
+DESCRIPTION += "Also including the ${MCNAME} ptest package."
+SUMMARY ?= "${MCNAME} ptest image."
+HOMEPAGE = "https://www.yoctoproject.org/"
+
+PTESTS = "${PTESTS_SLOW} ${PTESTS_FAST}"
+
+IMAGE_INSTALL:append = " ${MCNAME}-ptest openssh"
+
+BBCLASSEXTEND = "${@' '.join(['mcextend:'+x for x in d.getVar('PTESTS').split()])}"
+
+# The image can sufficiently large (~1.8GB) that we need to be careful that it fits in a live
+# image (which has a 4GB limit), so nullify the overhead factor (1.3x out of the
+# box) and explicitly add up to 1500MB.
+# strace-ptest in particular needs more than 500MB
+IMAGE_OVERHEAD_FACTOR = "1.0"
+IMAGE_ROOTFS_EXTRA_SPACE = "324288"
+IMAGE_ROOTFS_EXTRA_SPACE:virtclass-mcextend-mdadm = "1524288"
+IMAGE_ROOTFS_EXTRA_SPACE:virtclass-mcextend-strace = "1524288"
+IMAGE_ROOTFS_EXTRA_SPACE:virtclass-mcextend-lttng-tools = "1524288"
+
+# tar-ptest in particular needs more space
+IMAGE_ROOTFS_EXTRA_SPACE:virtclass-mcextend-tar = "1524288"
+
+# ptests need more memory than standard to avoid the OOM killer
+QB_MEM = "-m 1024"
+QB_MEM:virtclass-mcextend-lttng-tools = "-m 4096"
+QB_MEM:virtclass-mcextend-python3 = "-m 2048"
+QB_MEM:virtclass-mcextend-python3-cryptography = "-m 5100"
+
+TEST_SUITES = "ping ssh parselogs ptest"
+
+# Sadly at the moment the full set of ptests is not robust enough and sporadically fails in random places
+PTEST_EXPECT_FAILURE = "1"
+
+python () {
+ if not d.getVar("MCNAME"):
+ raise bb.parse.SkipRecipe("No class extension set")
+}
diff --git a/meta/recipes-core/images/core-image-tiny-initramfs.bb b/meta/recipes-core/images/core-image-tiny-initramfs.bb
index a1883de0eb..7a71d55b1e 100644
--- a/meta/recipes-core/images/core-image-tiny-initramfs.bb
+++ b/meta/recipes-core/images/core-image-tiny-initramfs.bb
@@ -1,4 +1,5 @@
# Simple initramfs image artifact generation for tiny images.
+SUMMARY = "Tiny image capable of booting a device."
DESCRIPTION = "Tiny image capable of booting a device. The kernel includes \
the Minimal RAM-based Initial Root Filesystem (initramfs), which finds the \
first 'init' program more efficiently. core-image-tiny-initramfs doesn't \
@@ -12,7 +13,6 @@ PACKAGE_INSTALL = "initramfs-live-boot-tiny packagegroup-core-boot dropbear ${VI
# Do not pollute the initrd image with rootfs features
IMAGE_FEATURES = ""
-export IMAGE_BASENAME = "core-image-tiny-initramfs"
IMAGE_NAME_SUFFIX ?= ""
IMAGE_LINGUAS = ""
@@ -39,6 +39,6 @@ python tinyinitrd () {
init.write(newinit)
}
-IMAGE_PREPROCESS_COMMAND += "tinyinitrd;"
+IMAGE_PREPROCESS_COMMAND += "tinyinitrd"
QB_KERNEL_CMDLINE_APPEND += "debugshell=3 init=/bin/busybox sh init"