Yocto 2.5
Move OpenBMC to Yocto 2.5(sumo)
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I5c5ad6904a16e14c1c397f0baf10c9d465594a78
diff --git a/import-layers/yocto-poky/meta/classes/image.bbclass b/import-layers/yocto-poky/meta/classes/image.bbclass
index d88ce5c..2247b30 100644
--- a/import-layers/yocto-poky/meta/classes/image.bbclass
+++ b/import-layers/yocto-poky/meta/classes/image.bbclass
@@ -17,7 +17,7 @@
INHIBIT_DEFAULT_DEPS = "1"
-TESTIMAGECLASS = "${@base_conditional('TEST_IMAGE', '1', 'testimage-auto', '', d)}"
+TESTIMAGECLASS = "${@oe.utils.conditional('TEST_IMAGE', '1', 'testimage-auto', '', d)}"
inherit ${TESTIMAGECLASS}
# IMAGE_FEATURES may contain any available package group
@@ -289,7 +289,7 @@
SSTATE_SKIP_CREATION_task-image-complete = '1'
do_image_complete[sstate-inputdirs] = "${IMGDEPLOYDIR}"
do_image_complete[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"
-do_image_complete[stamp-extra-info] = "${MACHINE}"
+do_image_complete[stamp-extra-info] = "${MACHINE_ARCH}"
addtask do_image_complete after do_image before do_build
python do_image_complete_setscene () {
sstate_setscene(d)
@@ -536,21 +536,29 @@
output = subprocess.check_output(['du', '-ks',
d.getVar('IMAGE_ROOTFS')])
size_kb = int(output.split()[0])
- base_size = size_kb * overhead_factor
- base_size = max(base_size, rootfs_req_size) + rootfs_extra_space
+ base_size = size_kb * overhead_factor
+ bb.debug(1, '%f = %d * %f' % (base_size, size_kb, overhead_factor))
+ base_size2 = max(base_size, rootfs_req_size) + rootfs_extra_space
+ bb.debug(1, '%f = max(%f, %d)[%f] + %d' % (base_size2, base_size, rootfs_req_size, max(base_size, rootfs_req_size), overhead_factor))
+
+ base_size = base_size2
if base_size != int(base_size):
base_size = int(base_size + 1)
else:
base_size = int(base_size)
+ bb.debug(1, '%f = int(%f)' % (base_size, base_size2))
+ base_size_saved = base_size
base_size += rootfs_alignment - 1
base_size -= base_size % rootfs_alignment
+ bb.debug(1, '%d = aligned(%d)' % (base_size, base_size_saved))
# Do not check image size of the debugfs image. This is not supposed
# to be deployed, etc. so it doesn't make sense to limit the size
# of the debug.
if (d.getVar('IMAGE_BUILDING_DEBUGFS') or "") == "true":
+ bb.debug(1, 'returning debugfs size %d' % (base_size))
return base_size
# Check the rootfs size against IMAGE_ROOTFS_MAXSIZE (if set)
@@ -568,6 +576,8 @@
(base_size, initramfs_maxsize_int))
bb.error("You can set INITRAMFS_MAXSIZE a larger value. Usually, it should")
bb.fatal("be less than 1/2 of ram size, or you may fail to boot it.\n")
+
+ bb.debug(1, 'returning %d' % (base_size))
return base_size
python set_image_size () {
@@ -617,9 +627,9 @@
do_package[noexec] = "1"
deltask do_package_qa
do_packagedata[noexec] = "1"
-do_package_write_ipk[noexec] = "1"
-do_package_write_deb[noexec] = "1"
-do_package_write_rpm[noexec] = "1"
+deltask do_package_write_ipk
+deltask do_package_write_deb
+deltask do_package_write_rpm
# Prepare the root links to point to the /usr counterparts.
create_merged_usr_symlinks() {
@@ -654,7 +664,7 @@
POPULATE_SDK_PRE_TARGET_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'create_merged_usr_symlinks_sdk; ', '',d)}"
reproducible_final_image_task () {
- if [ "$BUILD_REPRODUCIBLE_BINARIES" = "1" ]; then
+ if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ]; then
if [ "$REPRODUCIBLE_TIMESTAMP_ROOTFS" = "" ]; then
REPRODUCIBLE_TIMESTAMP_ROOTFS=`git log -1 --pretty=%ct`
fi
@@ -664,3 +674,5 @@
fi
}
IMAGE_PREPROCESS_COMMAND_append = " reproducible_final_image_task; "
+
+CVE_PRODUCT = ""