Consistent naming scheme for deployed artifacts
cover Consistent naming scheme for deployed artifacts
This is the final part of changes for [YOCTO #12937].
I've run complete selftest with this and didn't see any failures.
Only these 4 fail once, but pass when re-executed (and the same is reproducible here with master):
pkgdata.OePkgdataUtilTests.test_lookup_recipe spdx.SPDXCheck.test_spdx_base_files esdk.oeSDKExtSelfTest.test_image_generation_binary_feeds esdk.oeSDKExtSelfTest.test_install_libraries_headers
runtime_test.TestImage.test_testimage_virgl_gtk_sdl and this one needs extra "xhost +local" otherwise fails with:
runqemu - ERROR - Failed to run qemu: Invalid MIT-MAGIC-COOKIE-1 key
qemu-system-x86_64: OpenGL is not supported by the display
The short description of these changes is that instead of symlinks it creates hardlinks in deploy dir and the kernel do_deploy creates the artifacts without version suffix and the do_deploy_links task adds those versioned hardlinks (this way do_deploy can be reused from sstate and only quick do_deploy_links is re-executed when the IMAGE_VERSION_SUFFIX changes - before that if you cannot re-use do_deploy from sstate due to different artifact filenames you had to re-run e.g. do_compile as well if you haven't built the same in the same TMPDIR before).
Here are some examples how the artifacts change with these changes. To shows more artifacts all 3 builds are executed with this in local.conf:
IMAGE_FSTYPES:append:pn-core-image-base = " ubi"MKUBIFS_ARGS = "-m 2048 -e 129024 -c 968 -x zlib"UBINIZE_ARGS = "-m 2048 -p 131072 -s 512"
IMAGE_GEN_DEBUGFS = "1"IMAGE_FSTYPES_DEBUGFS = "tar.bz2"
## RAM disk variables including load address and entrypoint for kernel and RAM disk IMAGE_FSTYPES += "cpio.gz"INITRAMFS_IMAGE = "core-image-minimal"
## core-image-minimal is used as initramfs here, drop the rootfs suffix IMAGE_NAME_SUFFIX:pn-core-image-minimal = ""
MACHINE = "qemuarm"UBOOT_MACHINE = "am57xx_evm_defconfig"SPL_BINARY = "MLO"
# Enable creation of the U-Boot fitImageUBOOT_FITIMAGE_ENABLE = "1"
# (U-boot) fitImage propertiesUBOOT_LOADADDRESS = "0x80080000"UBOOT_ENTRYPOINT = "0x80080000"UBOOT_FIT_DESC = "A model description"
# Enable creation of Kernel fitImageKERNEL_IMAGETYPES += " fitImage "KERNEL_CLASSES = " kernel-fitimage"UBOOT_SIGN_ENABLE = "1"FIT_GENERATE_KEYS = "1"UBOOT_SIGN_KEYDIR = "${TOPDIR}/signing-keys"UBOOT_SIGN_IMG_KEYNAME = "img-oe-selftest"UBOOT_SIGN_KEYNAME = "cfg-oe-selftest"FIT_SIGN_INDIVIDUAL = "1"
And in all 4 cases I'm building:
bitbake -k core-image-base virtual/bootloader
1) current state without these changes (poky master 4d6c63a56c50536806b21cbe72416d8f1b84f589):
$ ls -lai tmp/deploy/images/qemuarm/ total 953640 50382661 drwxr-xr-x 2 martin martin 4096 Nov 21 21:09 . 50343736 drwxr-xr-x 3 martin martin 4096 Nov 21 18:38 .. 55399695 lrwxrwxrwx 2 martin martin 22 Nov 21 21:06 MLO -> MLO-qemuarm-2023.10-r0 55399694 lrwxrwxrwx 2 martin martin 22 Nov 21 21:06 MLO-qemuarm -> MLO-qemuarm-2023.10-r0 55399696 -rw-r--r-- 2 martin martin 127376 Nov 21 21:06 MLO-qemuarm-2023.10-r0 56663681 -rw-r--r-- 2 martin martin 27929206 Nov 21 21:09 core-image-base-qemuarm.rootfs-20231121200800.cpio.gz 56663745 -rw-r--r-- 2 martin martin 68956160 Nov 21 21:09 core-image-base-qemuarm.rootfs-20231121200800.ext4 56653281 -rw-r--r-- 2 martin martin 3902 Nov 21 21:08 core-image-base-qemuarm.rootfs-20231121200800.manifest 56653982 -rw-r--r-- 2 martin martin 1855 Nov 21 21:08 core-image-base-qemuarm.rootfs-20231121200800.qemuboot.conf 56653221 -rw-r--r-- 2 martin martin 412044 Nov 21 21:08 core-image-base-qemuarm.rootfs-20231121200800.spdx.tar.zst 56664021 -rw-r--r-- 2 martin martin 27268823 Nov 21 21:09 core-image-base-qemuarm.rootfs-20231121200800.tar.bz2 56653314 -rw-r--r-- 2 martin martin 263900 Nov 21 21:08 core-image-base-qemuarm.rootfs-20231121200800.testdata.json 56663665 -rw-r--r-- 2 martin martin 34209792 Nov 21 21:09 core-image-base-qemuarm.rootfs-20231121200800.ubi 56653782 -rw-r--r-- 2 martin martin 33417216 Nov 21 21:09 core-image-base-qemuarm.rootfs-20231121200800.ubifs 56664023 -rw-r--r-- 2 martin martin 381871540 Nov 21 21:09 core-image-base-qemuarm.rootfs-dbg-20231121200800-dbg.tar.bz2 56653980 lrwxrwxrwx 2 martin martin 61 Nov 21 21:09 core-image-base-qemuarm.rootfs-dbg.tar.bz2 -> core-image-base-qemuarm.rootfs-dbg-20231121200800-dbg.tar.bz2 56663713 lrwxrwxrwx 2 martin martin 53 Nov 21 21:09 core-image-base-qemuarm.rootfs.cpio.gz -> core-image-base-qemuarm.rootfs-20231121200800.cpio.gz 56663729 lrwxrwxrwx 2 martin martin 50 Nov 21 21:09 core-image-base-qemuarm.rootfs.ext4 -> core-image-base-qemuarm.rootfs-20231121200800.ext4 56653265 lrwxrwxrwx 2 martin martin 54 Nov 21 21:08 core-image-base-qemuarm.rootfs.manifest -> core-image-base-qemuarm.rootfs-20231121200800.manifest 56653981 lrwxrwxrwx 2 martin martin 59 Nov 21 21:08 core-image-base-qemuarm.rootfs.qemuboot.conf -> core-image-base-qemuarm.rootfs-20231121200800.qemuboot.conf 56653214 lrwxrwxrwx 2 martin martin 58 Nov 21 21:08 core-image-base-qemuarm.rootfs.spdx.tar.zst -> core-image-base-qemuarm.rootfs-20231121200800.spdx.tar.zst 56664022 lrwxrwxrwx 2 martin martin 53 Nov 21 21:09 core-image-base-qemuarm.rootfs.tar.bz2 -> core-image-base-qemuarm.rootfs-20231121200800.tar.bz2 56653302 lrwxrwxrwx 2 martin martin 59 Nov 21 21:08 core-image-base-qemuarm.rootfs.testdata.json -> core-image-base-qemuarm.rootfs-20231121200800.testdata.json 56663649 lrwxrwxrwx 2 martin martin 49 Nov 21 21:09 core-image-base-qemuarm.rootfs.ubi -> core-image-base-qemuarm.rootfs-20231121200800.ubi 56664020 lrwxrwxrwx 2 martin martin 51 Nov 21 21:09 core-image-base-qemuarm.rootfs.ubifs -> core-image-base-qemuarm.rootfs-20231121200800.ubifs 55403633 -rw-r--r-- 2 martin martin 4246096 Nov 21 21:06 core-image-minimal-qemuarm-20231121200604.cpio.gz 55403425 -rw-r--r-- 2 martin martin 13312000 Nov 21 21:06 core-image-minimal-qemuarm-20231121200604.ext4 55399673 -rw-r--r-- 2 martin martin 1100 Nov 21 21:06 core-image-minimal-qemuarm-20231121200604.manifest 55388983 -rw-r--r-- 2 martin martin 1853 Nov 21 21:06 core-image-minimal-qemuarm-20231121200604.qemuboot.conf 55399650 -rw-r--r-- 2 martin martin 121444 Nov 21 21:06 core-image-minimal-qemuarm-20231121200604.spdx.tar.zst 55402991 -rw-r--r-- 2 martin martin 4051489 Nov 21 21:06 core-image-minimal-qemuarm-20231121200604.tar.bz2 55399657 -rw-r--r-- 2 martin martin 264570 Nov 21 21:06 core-image-minimal-qemuarm-20231121200604.testdata.json 55402853 -rw-r--r-- 2 martin martin 320490408 Nov 21 21:06 core-image-minimal-qemuarm-dbg-20231121200604-dbg.tar.bz2 55402737 lrwxrwxrwx 2 martin martin 57 Nov 21 21:06 core-image-minimal-qemuarm-dbg.tar.bz2 -> core-image-minimal-qemuarm-dbg-20231121200604-dbg.tar.bz2 55403601 lrwxrwxrwx 2 martin martin 49 Nov 21 21:06 core-image-minimal-qemuarm.cpio.gz -> core-image-minimal-qemuarm-20231121200604.cpio.gz 55403441 lrwxrwxrwx 2 martin martin 46 Nov 21 21:06 core-image-minimal-qemuarm.ext4 -> core-image-minimal-qemuarm-20231121200604.ext4 55399672 lrwxrwxrwx 2 martin martin 50 Nov 21 21:06 core-image-minimal-qemuarm.manifest -> core-image-minimal-qemuarm-20231121200604.manifest 55388981 lrwxrwxrwx 2 martin martin 55 Nov 21 21:06 core-image-minimal-qemuarm.qemuboot.conf -> core-image-minimal-qemuarm-20231121200604.qemuboot.conf 55399649 lrwxrwxrwx 2 martin martin 54 Nov 21 21:06 core-image-minimal-qemuarm.spdx.tar.zst -> core-image-minimal-qemuarm-20231121200604.spdx.tar.zst 55402961 lrwxrwxrwx 2 martin martin 49 Nov 21 21:06 core-image-minimal-qemuarm.tar.bz2 -> core-image-minimal-qemuarm-20231121200604.tar.bz2 55399656 lrwxrwxrwx 2 martin martin 55 Nov 21 21:06 core-image-minimal-qemuarm.testdata.json -> core-image-minimal-qemuarm-20231121200604.testdata.json 55345065 lrwxrwxrwx 2 martin martin 73 Nov 21 20:41 fitImage -> fitImage--6.5.10+git0+e4aaaaddfa_eb2eba60c7-r0-qemuarm-20231121193746.bin 55345068 -rw-r--r-- 2 martin martin 7151161 Nov 21 20:41 fitImage--6.5.10+git0+e4aaaaddfa_eb2eba60c7-r0-qemuarm-20231121193746.bin 55345081 -rw-r--r-- 2 martin martin 11398625 Nov 21 20:41 fitImage-core-image-minimal-qemuarm--6.5.10+git0+e4aaaaddfa_eb2eba60c7-r0-qemuarm-20231121193746.bin 55345054 lrwxrwxrwx 2 martin martin 100 Nov 21 20:41 fitImage-core-image-minimal-qemuarm-qemuarm -> fitImage-core-image-minimal-qemuarm--6.5.10+git0+e4aaaaddfa_eb2eba60c7-r0-qemuarm-20231121193746.bin 55345084 -rw-r--r-- 2 martin martin 1638 Nov 21 20:41 fitImage-its--6.5.10+git0+e4aaaaddfa_eb2eba60c7-r0-qemuarm-20231121193746.its 55345052 -rw-r--r-- 2 martin martin 2425 Nov 21 20:41 fitImage-its-core-image-minimal-qemuarm--6.5.10+git0+e4aaaaddfa_eb2eba60c7-r0-qemuarm-20231121193746.its 55345056 lrwxrwxrwx 2 martin martin 104 Nov 21 20:41 fitImage-its-core-image-minimal-qemuarm-qemuarm -> fitImage-its-core-image-minimal-qemuarm--6.5.10+git0+e4aaaaddfa_eb2eba60c7-r0-qemuarm-20231121193746.its 55345063 lrwxrwxrwx 2 martin martin 77 Nov 21 20:41 fitImage-its-qemuarm -> fitImage-its--6.5.10+git0+e4aaaaddfa_eb2eba60c7-r0-qemuarm-20231121193746.its 55345058 -rw-r--r-- 2 martin martin 7149168 Nov 21 20:41 fitImage-linux.bin--6.5.10+git0+e4aaaaddfa_eb2eba60c7-r0-qemuarm-20231121193746.bin 55345059 lrwxrwxrwx 2 martin martin 83 Nov 21 20:41 fitImage-linux.bin-qemuarm -> fitImage-linux.bin--6.5.10+git0+e4aaaaddfa_eb2eba60c7-r0-qemuarm-20231121193746.bin 55345053 lrwxrwxrwx 2 martin martin 73 Nov 21 20:41 fitImage-qemuarm.bin -> fitImage--6.5.10+git0+e4aaaaddfa_eb2eba60c7-r0-qemuarm-20231121193746.bin 55345089 -rw-r--r-- 2 martin martin 45290074 Nov 21 20:41 modules--6.5.10+git0+e4aaaaddfa_eb2eba60c7-r0-qemuarm-20231121193746.tgz 55345086 lrwxrwxrwx 2 martin martin 72 Nov 21 20:41 modules-qemuarm.tgz -> modules--6.5.10+git0+e4aaaaddfa_eb2eba60c7-r0-qemuarm-20231121193746.tgz 55399706 lrwxrwxrwx 2 martin martin 34 Nov 21 21:06 u-boot-fitImage -> u-boot-fitImage-qemuarm-2023.10-r0 55399705 lrwxrwxrwx 2 martin martin 34 Nov 21 21:06 u-boot-fitImage-qemuarm -> u-boot-fitImage-qemuarm-2023.10-r0 55399719 -rw-r--r-- 2 martin martin 786682 Nov 21 21:06 u-boot-fitImage-qemuarm-2023.10-r0 55399697 lrwxrwxrwx 2 martin martin 37 Nov 21 21:06 u-boot-initial-env -> u-boot-initial-env-qemuarm-2023.10-r0 55399698 lrwxrwxrwx 2 martin martin 37 Nov 21 21:06 u-boot-initial-env-qemuarm -> u-boot-initial-env-qemuarm-2023.10-r0 55399699 -rw-r--r-- 2 martin martin 12284 Nov 21 21:06 u-boot-initial-env-qemuarm-2023.10-r0 55399707 lrwxrwxrwx 2 martin martin 29 Nov 21 21:06 u-boot-its-qemuarm -> u-boot-its-qemuarm-2023.10-r0 55399714 -rw-r--r-- 2 martin martin 805 Nov 21 21:06 u-boot-its-qemuarm-2023.10-r0 55399715 -rw-r--r-- 2 martin martin 645864 Nov 21 21:06 u-boot-nodtb-qemuarm-2023.10-r0.bin 55399710 lrwxrwxrwx 2 martin martin 35 Nov 21 21:06 u-boot-nodtb-qemuarm.bin -> u-boot-nodtb-qemuarm-2023.10-r0.bin 55399709 lrwxrwxrwx 2 martin martin 35 Nov 21 21:06 u-boot-nodtb.bin -> u-boot-nodtb-qemuarm-2023.10-r0.bin 55399704 -rw-r--r-- 2 martin martin 785024 Nov 21 21:06 u-boot-qemuarm-2023.10-r0.bin 55399716 -rw-r--r-- 2 martin martin 139160 Nov 21 21:06 u-boot-qemuarm-2023.10-r0.dtb 55399700 lrwxrwxrwx 2 martin martin 34 Nov 21 21:06 u-boot-qemuarm.bin -> u-boot-fitImage-qemuarm-2023.10-r0 55399711 lrwxrwxrwx 2 martin martin 29 Nov 21 21:06 u-boot-qemuarm.dtb -> u-boot-qemuarm-2023.10-r0.dtb 55399693 lrwxrwxrwx 2 martin martin 34 Nov 21 21:06 u-boot.bin -> u-boot-fitImage-qemuarm-2023.10-r0 55399713 lrwxrwxrwx 2 martin martin 29 Nov 21 21:06 u-boot.dtb -> u-boot-qemuarm-2023.10-r0.dtb 55399708 lrwxrwxrwx 2 martin martin 29 Nov 21 21:06 u-boot.its -> u-boot-its-qemuarm-2023.10-r0 36783108 -rw-r--r-- 2 martin martin 261 Nov 21 21:09 ubinize-core-image-base-qemuarm.rootfs-20231121200800.cfg 55345074 lrwxrwxrwx 2 martin martin 71 Nov 21 20:41 zImage -> zImage--6.5.10+git0+e4aaaaddfa_eb2eba60c7-r0-qemuarm-20231121193746.bin 55345061 -rw-r--r-- 2 martin martin 7149168 Nov 21 20:41 zImage--6.5.10+git0+e4aaaaddfa_eb2eba60c7-r0-qemuarm-20231121193746.bin 55345077 lrwxrwxrwx 2 martin martin 71 Nov 21 20:41 zImage-qemuarm.bin -> zImage--6.5.10+git0+e4aaaaddfa_eb2eba60c7-r0-qemuarm-20231121193746.bin
2) with these changes:
$ ls -lai tmp/deploy/images/qemuarm/ total 1909580 50382661 drwxr-xr-x 2 martin martin 4096 Nov 21 21:16 . 50343736 drwxr-xr-x 3 martin martin 4096 Nov 21 18:38 .. 55400346 -rw-r--r-- 6 martin martin 127376 Nov 21 21:15 MLO 55400346 -rw-r--r-- 6 martin martin 127376 Nov 21 21:15 MLO-qemuarm 55400346 -rw-r--r-- 6 martin martin 127376 Nov 21 21:15 MLO-qemuarm-1-2023.10-r0-20231002143959 56664035 -rw-r--r-- 4 martin martin 27929209 Nov 21 21:16 core-image-base-qemuarm.rootfs--1.0-r0-20110405230000.cpio.gz 56653965 -rw-r--r-- 4 martin martin 68956160 Nov 21 21:16 core-image-base-qemuarm.rootfs--1.0-r0-20110405230000.ext4 56653974 -rw-r--r-- 4 martin martin 3902 Nov 21 21:16 core-image-base-qemuarm.rootfs--1.0-r0-20110405230000.manifest 56653966 -rw-r--r-- 4 martin martin 1863 Nov 21 21:16 core-image-base-qemuarm.rootfs--1.0-r0-20110405230000.qemuboot.conf 56653972 -rw-r--r-- 4 martin martin 411979 Nov 21 21:16 core-image-base-qemuarm.rootfs--1.0-r0-20110405230000.spdx.tar.zst 56653502 -rw-r--r-- 4 martin martin 27269124 Nov 21 21:16 core-image-base-qemuarm.rootfs--1.0-r0-20110405230000.tar.bz2 56653980 -rw-r--r-- 4 martin martin 263127 Nov 21 21:16 core-image-base-qemuarm.rootfs--1.0-r0-20110405230000.testdata.json 56653504 -rw-r--r-- 4 martin martin 34209792 Nov 21 21:16 core-image-base-qemuarm.rootfs--1.0-r0-20110405230000.ubi 56653745 -rw-r--r-- 4 martin martin 33417216 Nov 21 21:16 core-image-base-qemuarm.rootfs--1.0-r0-20110405230000.ubifs 56653601 -rw-r--r-- 4 martin martin 381865904 Nov 21 21:16 core-image-base-qemuarm.rootfs-dbg--1.0-r0-20110405230000.tar.bz2 56653601 -rw-r--r-- 4 martin martin 381865904 Nov 21 21:16 core-image-base-qemuarm.rootfs-dbg.tar.bz2 56664035 -rw-r--r-- 4 martin martin 27929209 Nov 21 21:16 core-image-base-qemuarm.rootfs.cpio.gz 56653965 -rw-r--r-- 4 martin martin 68956160 Nov 21 21:16 core-image-base-qemuarm.rootfs.ext4 56653974 -rw-r--r-- 4 martin martin 3902 Nov 21 21:16 core-image-base-qemuarm.rootfs.manifest 56653966 -rw-r--r-- 4 martin martin 1863 Nov 21 21:16 core-image-base-qemuarm.rootfs.qemuboot.conf 56653972 -rw-r--r-- 4 martin martin 411979 Nov 21 21:16 core-image-base-qemuarm.rootfs.spdx.tar.zst 56653502 -rw-r--r-- 4 martin martin 27269124 Nov 21 21:16 core-image-base-qemuarm.rootfs.tar.bz2 56653980 -rw-r--r-- 4 martin martin 263127 Nov 21 21:16 core-image-base-qemuarm.rootfs.testdata.json 56653504 -rw-r--r-- 4 martin martin 34209792 Nov 21 21:16 core-image-base-qemuarm.rootfs.ubi 56653745 -rw-r--r-- 4 martin martin 33417216 Nov 21 21:16 core-image-base-qemuarm.rootfs.ubifs 55410186 -rw-r--r-- 4 martin martin 4246097 Nov 21 21:16 core-image-minimal-qemuarm--1.0-r0-20110405230000.cpio.gz 55410200 -rw-r--r-- 4 martin martin 13312000 Nov 21 21:16 core-image-minimal-qemuarm--1.0-r0-20110405230000.ext4 55400439 -rw-r--r-- 4 martin martin 1100 Nov 21 21:16 core-image-minimal-qemuarm--1.0-r0-20110405230000.manifest 55389154 -rw-r--r-- 4 martin martin 1861 Nov 21 21:16 core-image-minimal-qemuarm--1.0-r0-20110405230000.qemuboot.conf 55400421 -rw-r--r-- 4 martin martin 121444 Nov 21 21:16 core-image-minimal-qemuarm--1.0-r0-20110405230000.spdx.tar.zst 55410228 -rw-r--r-- 4 martin martin 4052845 Nov 21 21:16 core-image-minimal-qemuarm--1.0-r0-20110405230000.tar.bz2 55400426 -rw-r--r-- 4 martin martin 263797 Nov 21 21:16 core-image-minimal-qemuarm--1.0-r0-20110405230000.testdata.json 55410236 -rw-r--r-- 4 martin martin 320483523 Nov 21 21:16 core-image-minimal-qemuarm-dbg--1.0-r0-20110405230000.tar.bz2 55410236 -rw-r--r-- 4 martin martin 320483523 Nov 21 21:16 core-image-minimal-qemuarm-dbg.tar.bz2 55410186 -rw-r--r-- 4 martin martin 4246097 Nov 21 21:16 core-image-minimal-qemuarm.cpio.gz 55410200 -rw-r--r-- 4 martin martin 13312000 Nov 21 21:16 core-image-minimal-qemuarm.ext4 55400439 -rw-r--r-- 4 martin martin 1100 Nov 21 21:16 core-image-minimal-qemuarm.manifest 55389154 -rw-r--r-- 4 martin martin 1861 Nov 21 21:16 core-image-minimal-qemuarm.qemuboot.conf 55400421 -rw-r--r-- 4 martin martin 121444 Nov 21 21:16 core-image-minimal-qemuarm.spdx.tar.zst 55410228 -rw-r--r-- 4 martin martin 4052845 Nov 21 21:16 core-image-minimal-qemuarm.tar.bz2 55400426 -rw-r--r-- 4 martin martin 263797 Nov 21 21:16 core-image-minimal-qemuarm.testdata.json 55342817 lrwxrwxrwx 2 martin martin 20 Nov 21 18:38 fitImage -> fitImage-qemuarm.bin 55342785 -rw-r--r-- 3 martin martin 11398629 Nov 21 18:38 fitImage-core-image-minimal-qemuarm-qemuarm--6.5.10+git0+e4aaaaddfa_eb2eba60c7-r0-20110405230000.bin 55342785 -rw-r--r-- 3 martin martin 11398629 Nov 21 18:38 fitImage-core-image-minimal-qemuarm-qemuarm.bin 55342721 -rw-r--r-- 3 martin martin 2425 Nov 21 18:38 fitImage-its-core-image-minimal-qemuarm-qemuarm--6.5.10+git0+e4aaaaddfa_eb2eba60c7-r0-20110405230000.its 55342721 -rw-r--r-- 3 martin martin 2425 Nov 21 18:38 fitImage-its-core-image-minimal-qemuarm-qemuarm.its 55342801 -rw-r--r-- 3 martin martin 1638 Nov 21 18:38 fitImage-its-qemuarm--6.5.10+git0+e4aaaaddfa_eb2eba60c7-r0-20110405230000.its 55342801 -rw-r--r-- 3 martin martin 1638 Nov 21 18:38 fitImage-its-qemuarm.its 55342737 -rw-r--r-- 3 martin martin 7149168 Nov 21 18:38 fitImage-linux-qemuarm--6.5.10+git0+e4aaaaddfa_eb2eba60c7-r0-20110405230000.bin 55342737 -rw-r--r-- 3 martin martin 7149168 Nov 21 18:38 fitImage-linux-qemuarm.bin 55342833 -rw-r--r-- 3 martin martin 7151161 Nov 21 18:38 fitImage-qemuarm--6.5.10+git0+e4aaaaddfa_eb2eba60c7-r0-20110405230000.bin 55342833 -rw-r--r-- 3 martin martin 7151161 Nov 21 18:38 fitImage-qemuarm.bin 55342705 -rw-r--r-- 3 martin martin 45290074 Nov 21 18:38 modules-qemuarm--6.5.10+git0+e4aaaaddfa_eb2eba60c7-r0-20110405230000.tgz 55342705 -rw-r--r-- 3 martin martin 45290074 Nov 21 18:38 modules-qemuarm.tgz 55400356 -rw-r--r-- 10 martin martin 786682 Nov 21 21:15 u-boot-fitImage 55400356 -rw-r--r-- 10 martin martin 786682 Nov 21 21:15 u-boot-fitImage-qemuarm 55400356 -rw-r--r-- 10 martin martin 786682 Nov 21 21:15 u-boot-fitImage-qemuarm-1-2023.10-r0-20231002143959 55400348 -rw-r--r-- 4 martin martin 12284 Nov 21 21:15 u-boot-initial-env-qemuarm 55400348 -rw-r--r-- 4 martin martin 12284 Nov 21 21:15 u-boot-initial-env-qemuarm-1-2023.10-r0-20231002143959 55400355 -rw-r--r-- 6 martin martin 805 Nov 21 21:15 u-boot-its-qemuarm 55400355 -rw-r--r-- 6 martin martin 805 Nov 21 21:15 u-boot-its-qemuarm-1-2023.10-r0-20231002143959 55400358 -rw-r--r-- 6 martin martin 645864 Nov 21 21:15 u-boot-nodtb-qemuarm-1-2023.10-r0-20231002143959.bin 55400358 -rw-r--r-- 6 martin martin 645864 Nov 21 21:15 u-boot-nodtb-qemuarm.bin 55400358 -rw-r--r-- 6 martin martin 645864 Nov 21 21:15 u-boot-nodtb.bin 55400356 -rw-r--r-- 10 martin martin 786682 Nov 21 21:15 u-boot-qemuarm-1-2023.10-r0-20231002143959.bin 55400359 -rw-r--r-- 6 martin martin 139160 Nov 21 21:15 u-boot-qemuarm-1-2023.10-r0-20231002143959.dtb 55400351 -rw-r--r-- 2 martin martin 785024 Nov 21 21:15 u-boot-qemuarm.bin 55400359 -rw-r--r-- 6 martin martin 139160 Nov 21 21:15 u-boot-qemuarm.dtb 55400356 -rw-r--r-- 10 martin martin 786682 Nov 21 21:15 u-boot.bin 55400359 -rw-r--r-- 6 martin martin 139160 Nov 21 21:15 u-boot.dtb 55400355 -rw-r--r-- 6 martin martin 805 Nov 21 21:15 u-boot.its 36783110 -rw-r--r-- 2 martin martin 246 Nov 21 21:16 ubinize-core-image-base-qemuarm.rootfs.cfg 55342769 lrwxrwxrwx 2 martin martin 18 Nov 21 18:38 zImage -> zImage-qemuarm.bin 55342753 -rw-r--r-- 3 martin martin 7149168 Nov 21 18:38 zImage-qemuarm--6.5.10+git0+e4aaaaddfa_eb2eba60c7-r0-20110405230000.bin 55342753 -rw-r--r-- 3 martin martin 7149168 Nov 21 18:38 zImage-qemuarm.bin
3) with "release" version IMAGE_VERSION_SUFFIX = "-V1":
$ ls -lai tmp/deploy/images/qemuarm/ total 1909556 51150241 drwxr-xr-x 2 martin martin 4096 Nov 21 22:22 . 50343736 drwxr-xr-x 3 martin martin 4096 Nov 21 22:22 .. 55362504 -rw-r--r-- 6 martin martin 127376 Nov 21 22:22 MLO 55362504 -rw-r--r-- 6 martin martin 127376 Nov 21 22:22 MLO-qemuarm 55362504 -rw-r--r-- 6 martin martin 127376 Nov 21 22:22 MLO-qemuarm-V1 56625100 -rw-r--r-- 4 martin martin 27929207 Nov 21 22:22 core-image-base-qemuarm.rootfs-V1.cpio.gz 56628289 -rw-r--r-- 4 martin martin 68956160 Nov 21 22:22 core-image-base-qemuarm.rootfs-V1.ext4 56624965 -rw-r--r-- 4 martin martin 3902 Nov 21 22:22 core-image-base-qemuarm.rootfs-V1.manifest 56628401 -rw-r--r-- 4 martin martin 1843 Nov 21 22:22 core-image-base-qemuarm.rootfs-V1.qemuboot.conf 56624784 -rw-r--r-- 4 martin martin 412033 Nov 21 22:22 core-image-base-qemuarm.rootfs-V1.spdx.tar.zst 56628225 -rw-r--r-- 4 martin martin 27268318 Nov 21 22:22 core-image-base-qemuarm.rootfs-V1.tar.bz2 56632632 -rw-r--r-- 4 martin martin 263083 Nov 21 22:22 core-image-base-qemuarm.rootfs-V1.testdata.json 56628209 -rw-r--r-- 4 martin martin 34209792 Nov 21 22:22 core-image-base-qemuarm.rootfs-V1.ubi 56628273 -rw-r--r-- 4 martin martin 33417216 Nov 21 22:22 core-image-base-qemuarm.rootfs-V1.ubifs 56628241 -rw-r--r-- 4 martin martin 381864544 Nov 21 22:22 core-image-base-qemuarm.rootfs-dbg-V1.tar.bz2 56628241 -rw-r--r-- 4 martin martin 381864544 Nov 21 22:22 core-image-base-qemuarm.rootfs-dbg.tar.bz2 56625100 -rw-r--r-- 4 martin martin 27929207 Nov 21 22:22 core-image-base-qemuarm.rootfs.cpio.gz 56628289 -rw-r--r-- 4 martin martin 68956160 Nov 21 22:22 core-image-base-qemuarm.rootfs.ext4 56624965 -rw-r--r-- 4 martin martin 3902 Nov 21 22:22 core-image-base-qemuarm.rootfs.manifest 56628401 -rw-r--r-- 4 martin martin 1843 Nov 21 22:22 core-image-base-qemuarm.rootfs.qemuboot.conf 56624784 -rw-r--r-- 4 martin martin 412033 Nov 21 22:22 core-image-base-qemuarm.rootfs.spdx.tar.zst 56628225 -rw-r--r-- 4 martin martin 27268318 Nov 21 22:22 core-image-base-qemuarm.rootfs.tar.bz2 56632632 -rw-r--r-- 4 martin martin 263083 Nov 21 22:22 core-image-base-qemuarm.rootfs.testdata.json 56628209 -rw-r--r-- 4 martin martin 34209792 Nov 21 22:22 core-image-base-qemuarm.rootfs.ubi 56628273 -rw-r--r-- 4 martin martin 33417216 Nov 21 22:22 core-image-base-qemuarm.rootfs.ubifs 51138044 -rw-r--r-- 4 martin martin 4246092 Nov 21 22:22 core-image-minimal-qemuarm-V1.cpio.gz 51138052 -rw-r--r-- 4 martin martin 13312000 Nov 21 22:22 core-image-minimal-qemuarm-V1.ext4 51137094 -rw-r--r-- 4 martin martin 1100 Nov 21 22:22 core-image-minimal-qemuarm-V1.manifest 51138053 -rw-r--r-- 4 martin martin 1841 Nov 21 22:22 core-image-minimal-qemuarm-V1.qemuboot.conf 51138054 -rw-r--r-- 4 martin martin 121496 Nov 21 22:22 core-image-minimal-qemuarm-V1.spdx.tar.zst 51138046 -rw-r--r-- 4 martin martin 4052033 Nov 21 22:22 core-image-minimal-qemuarm-V1.tar.bz2 51138056 -rw-r--r-- 4 martin martin 263753 Nov 21 22:22 core-image-minimal-qemuarm-V1.testdata.json 51138047 -rw-r--r-- 4 martin martin 320499203 Nov 21 22:22 core-image-minimal-qemuarm-dbg-V1.tar.bz2 51138047 -rw-r--r-- 4 martin martin 320499203 Nov 21 22:22 core-image-minimal-qemuarm-dbg.tar.bz2 51138044 -rw-r--r-- 4 martin martin 4246092 Nov 21 22:22 core-image-minimal-qemuarm.cpio.gz 51138052 -rw-r--r-- 4 martin martin 13312000 Nov 21 22:22 core-image-minimal-qemuarm.ext4 51137094 -rw-r--r-- 4 martin martin 1100 Nov 21 22:22 core-image-minimal-qemuarm.manifest 51138053 -rw-r--r-- 4 martin martin 1841 Nov 21 22:22 core-image-minimal-qemuarm.qemuboot.conf 51138054 -rw-r--r-- 4 martin martin 121496 Nov 21 22:22 core-image-minimal-qemuarm.spdx.tar.zst 51138046 -rw-r--r-- 4 martin martin 4052033 Nov 21 22:22 core-image-minimal-qemuarm.tar.bz2 51138056 -rw-r--r-- 4 martin martin 263753 Nov 21 22:22 core-image-minimal-qemuarm.testdata.json 51143764 lrwxrwxrwx 2 martin martin 20 Nov 21 22:22 fitImage -> fitImage-qemuarm.bin 51143844 -rw-r--r-- 3 martin martin 11398621 Nov 21 22:22 fitImage-core-image-minimal-qemuarm-qemuarm-V1.bin 51143844 -rw-r--r-- 3 martin martin 11398621 Nov 21 22:22 fitImage-core-image-minimal-qemuarm-qemuarm.bin 51143828 -rw-r--r-- 3 martin martin 2425 Nov 21 22:22 fitImage-its-core-image-minimal-qemuarm-qemuarm-V1.its 51143828 -rw-r--r-- 3 martin martin 2425 Nov 21 22:22 fitImage-its-core-image-minimal-qemuarm-qemuarm.its 51143796 -rw-r--r-- 3 martin martin 1638 Nov 21 22:22 fitImage-its-qemuarm-V1.its 51143796 -rw-r--r-- 3 martin martin 1638 Nov 21 22:22 fitImage-its-qemuarm.its 51143812 -rw-r--r-- 3 martin martin 7149168 Nov 21 22:22 fitImage-linux-qemuarm-V1.bin 51143812 -rw-r--r-- 3 martin martin 7149168 Nov 21 22:22 fitImage-linux-qemuarm.bin 51143748 -rw-r--r-- 3 martin martin 7151161 Nov 21 22:22 fitImage-qemuarm-V1.bin 51143748 -rw-r--r-- 3 martin martin 7151161 Nov 21 22:22 fitImage-qemuarm.bin 51143780 -rw-r--r-- 3 martin martin 45290074 Nov 21 22:22 modules-qemuarm-V1.tgz 51143780 -rw-r--r-- 3 martin martin 45290074 Nov 21 22:22 modules-qemuarm.tgz 55362520 -rw-r--r-- 10 martin martin 786682 Nov 21 22:22 u-boot-fitImage 55362520 -rw-r--r-- 10 martin martin 786682 Nov 21 22:22 u-boot-fitImage-qemuarm 55362520 -rw-r--r-- 10 martin martin 786682 Nov 21 22:22 u-boot-fitImage-qemuarm-V1 55362507 -rw-r--r-- 4 martin martin 12284 Nov 21 22:22 u-boot-initial-env-qemuarm 55362507 -rw-r--r-- 4 martin martin 12284 Nov 21 22:22 u-boot-initial-env-qemuarm-V1 55362518 -rw-r--r-- 6 martin martin 805 Nov 21 22:22 u-boot-its-qemuarm 55362518 -rw-r--r-- 6 martin martin 805 Nov 21 22:22 u-boot-its-qemuarm-V1 55362521 -rw-r--r-- 6 martin martin 645864 Nov 21 22:22 u-boot-nodtb-qemuarm-V1.bin 55362521 -rw-r--r-- 6 martin martin 645864 Nov 21 22:22 u-boot-nodtb-qemuarm.bin 55362521 -rw-r--r-- 6 martin martin 645864 Nov 21 22:22 u-boot-nodtb.bin 55362520 -rw-r--r-- 10 martin martin 786682 Nov 21 22:22 u-boot-qemuarm-V1.bin 55362522 -rw-r--r-- 6 martin martin 139160 Nov 21 22:22 u-boot-qemuarm-V1.dtb 55362511 -rw-r--r-- 2 martin martin 785024 Nov 21 22:22 u-boot-qemuarm.bin 55362522 -rw-r--r-- 6 martin martin 139160 Nov 21 22:22 u-boot-qemuarm.dtb 55362520 -rw-r--r-- 10 martin martin 786682 Nov 21 22:22 u-boot.bin 55362522 -rw-r--r-- 6 martin martin 139160 Nov 21 22:22 u-boot.dtb 55362518 -rw-r--r-- 6 martin martin 805 Nov 21 22:22 u-boot.its 36738385 -rw-r--r-- 2 martin martin 246 Nov 21 22:22 ubinize-core-image-base-qemuarm.rootfs.cfg 51143732 lrwxrwxrwx 2 martin martin 18 Nov 21 22:22 zImage -> zImage-qemuarm.bin 51143716 -rw-r--r-- 3 martin martin 7149168 Nov 21 22:22 zImage-qemuarm-V1.bin 51143716 -rw-r--r-- 3 martin martin 7149168 Nov 21 22:22 zImage-qemuarm.bin
4) without various suffixes in filenames (if you prefer to fetch just the whole MACHINE named folder and don't care about artifact names):
IMAGE_MACHINE_SUFFIX = "" # remove -${MACHINE} from artifact names
IMAGE_NAME_SUFFIX = "" # remove .rootfs from artifact names
IMAGE_VERSION_SUFFIX = "" # remove version suffix (disables creating additional links)$ ls -lai tmp/deploy/images/qemuarm/ total 953620 55386418 drwxr-xr-x 2 martin martin 4096 Nov 21 22:00 . 50343736 drwxr-xr-x 3 martin martin 4096 Nov 21 21:19 .. 55394328 -rw-r--r-- 2 martin martin 127376 Nov 21 21:59 MLO 56551946 -rw-r--r-- 2 martin martin 381870727 Nov 21 21:59 core-image-base-dbg.tar.bz2 56551971 -rw-r--r-- 2 martin martin 27929207 Nov 21 22:00 core-image-base.cpio.gz 56551957 -rw-r--r-- 2 martin martin 68956160 Nov 21 21:59 core-image-base.ext4 56551844 -rw-r--r-- 2 martin martin 3902 Nov 21 21:59 core-image-base.manifest 56551851 -rw-r--r-- 2 martin martin 1810 Nov 21 21:59 core-image-base.qemuboot.conf 56551846 -rw-r--r-- 2 martin martin 411780 Nov 21 21:59 core-image-base.spdx.tar.zst 56551954 -rw-r--r-- 2 martin martin 27268304 Nov 21 21:59 core-image-base.tar.bz2 56551838 -rw-r--r-- 2 martin martin 262158 Nov 21 21:59 core-image-base.testdata.json 56551965 -rw-r--r-- 2 martin martin 34209792 Nov 21 21:59 core-image-base.ubi 56551945 -rw-r--r-- 2 martin martin 33417216 Nov 21 21:59 core-image-base.ubifs 55388091 -rw-r--r-- 2 martin martin 320496929 Nov 21 21:59 core-image-minimal-dbg.tar.bz2 55388035 -rw-r--r-- 2 martin martin 4246092 Nov 21 21:59 core-image-minimal.cpio.gz 55388059 -rw-r--r-- 2 martin martin 13312000 Nov 21 21:59 core-image-minimal.ext4 55388330 -rw-r--r-- 2 martin martin 1100 Nov 21 21:59 core-image-minimal.manifest 55388232 -rw-r--r-- 2 martin martin 1822 Nov 21 21:59 core-image-minimal.qemuboot.conf 55388251 -rw-r--r-- 2 martin martin 121406 Nov 21 21:59 core-image-minimal.spdx.tar.zst 55388163 -rw-r--r-- 2 martin martin 4052081 Nov 21 21:59 core-image-minimal.tar.bz2 55389029 -rw-r--r-- 2 martin martin 263255 Nov 21 21:59 core-image-minimal.testdata.json 55387973 lrwxrwxrwx 2 martin martin 12 Nov 21 21:59 fitImage -> fitImage.bin 55387964 -rw-r--r-- 2 martin martin 11398621 Nov 21 21:59 fitImage-core-image-minimal.bin 55387965 -rw-r--r-- 2 martin martin 2417 Nov 21 21:59 fitImage-its-core-image-minimal.its 55387968 -rw-r--r-- 2 martin martin 1638 Nov 21 21:59 fitImage-its.its 55387966 -rw-r--r-- 2 martin martin 7149168 Nov 21 21:59 fitImage-linux.bin 55386185 -rw-r--r-- 2 martin martin 7151161 Nov 21 21:59 fitImage.bin 55387972 -rw-r--r-- 2 martin martin 45290074 Nov 21 21:59 modules.tgz 55394322 -rw-r--r-- 4 martin martin 786682 Nov 21 21:59 u-boot-fitImage 55394327 -rw-r--r-- 2 martin martin 12284 Nov 21 21:59 u-boot-initial-env 55394325 -rw-r--r-- 4 martin martin 805 Nov 21 21:59 u-boot-its 55394319 -rw-r--r-- 2 martin martin 645864 Nov 21 21:59 u-boot-nodtb.bin 55394322 -rw-r--r-- 4 martin martin 786682 Nov 21 21:59 u-boot.bin 55386290 -rw-r--r-- 2 martin martin 139160 Nov 21 21:59 u-boot.dtb 55394325 -rw-r--r-- 4 martin martin 805 Nov 21 21:59 u-boot.its 36783106 -rw-r--r-- 2 martin martin 231 Nov 21 21:59 ubinize-core-image-base.cfg 55342465 lrwxrwxrwx 2 martin martin 10 Nov 21 21:59 zImage -> zImage.bin 55342449 -rw-r--r-- 2 martin martin 7149168 Nov 21 21:59 zImage.bin
The following changes since commit faa32bbb35e92a14b8064715c12e1007fd106b34:
ffmpeg: Upgrade 6.0 -> 6.1 (2023-11-20 15:30:46 +0000)
are available in the Git repository at:
https://git.openembedded.org/openembedded-core-contrib jansa/artifacts
https://git.openembedded.org/openembedded-core-contrib/log/?h=jansa/artifacts
Martin Jansa (21):
image*.bbclass, kernel*.bbclass: create version-less artifacts and
versioned hard links
create-spdx-2.2.bbclass: use hardlink as well
image, kernel: allow to disable creating the hardlinks by setting
*LINK_NAME variables to empty
kernel: move the leading dash into KERNEL_ARTIFACT_NAME kernel-fitimage.bbclass: avoid duplicate .bin extension kernel-fitimage.bbclass: add .its extension also to links
uboot: use ${IMAGE_MACHINE_SUFFIX} instead of -${MACHINE} and use
hardlinks
image.bbclass: rename create_symlinks to create_hardlinks image-artifact-names.bbclass: add IMAGE_VERSION_SUFFIX_DATETIME which
uses SOURCE_DATE_EPOCH
oeqa: bbtests.BitbakeTests.test_image_manifest: use just isfile()
instead of islink()
oeqa: wic: use just isfile() instead of islink()
linux-dummy: add do_deploy_links task
kernel.bbclass: inherit KERNEL_CLASSES at the end image.bbclass: don't append -dbg suffix twice
oeqa: imagefeatures: append -dbg suffix at the end of IMAGE_NAME not
IMAGE_LINK_NAME
oeqa: gdbserver: append -dbg suffix at the end of IMAGE_NAME not
IMAGE_LINK_NAME
oeqa: fitimage: respect KERNEL_FIT_NAME
selftest: multiconfig-image-packager: use IMAGE_NAME instead of
IMAGE_LINK_NAME
image.bbclass: remove hardlinks as well populate_sdk_ext.bbclass: add *:do_shared_workdir to
BB_SETSCENE_ENFORCE_IGNORE_TASKS
u-boot.inc: don't replace the binary with symlink
.../multiconfig-image-packager_0.1.bb | 12 +- meta/classes-global/base.bbclass | 3 + .../image-artifact-names.bbclass | 18 +- meta/classes-recipe/image-live.bbclass | 2 +- meta/classes-recipe/image.bbclass | 25 ++- .../kernel-artifact-names.bbclass | 12 +- meta/classes-recipe/kernel-devicetree.bbclass | 41 ++-- meta/classes-recipe/kernel-fitimage.bbclass | 40 ++-- meta/classes-recipe/kernel.bbclass | 97 +++++---- meta/classes-recipe/populate_sdk_ext.bbclass | 2 +- meta/classes-recipe/qemuboot.bbclass | 2 +- .../rootfs-postcommands.bbclass | 4 +- meta/classes-recipe/uboot-config.bbclass | 22 +- meta/classes-recipe/uboot-sign.bbclass | 68 +++--- meta/classes/create-spdx-2.2.bbclass | 2 +- meta/classes/cve-check.bbclass | 14 +- meta/lib/oe/cve_check.py | 6 +- meta/lib/oeqa/selftest/cases/bbtests.py | 2 +- meta/lib/oeqa/selftest/cases/fitimage.py | 98 +++++---- meta/lib/oeqa/selftest/cases/gdbserver.py | 6 +- meta/lib/oeqa/selftest/cases/imagefeatures.py | 4 +- meta/lib/oeqa/selftest/cases/wic.py | 2 +- meta/recipes-bsp/u-boot/u-boot.inc | 200 +++++++++--------- meta/recipes-kernel/linux/linux-dummy.bb | 5 + 24 files changed, 368 insertions(+), 319 deletions(-)
Signature · 1 line
2.43.0
PATCH 1/21 image*.bbclass, kernel*.bbclass: create version-less artifacts and versioned hard links
From: Martin Jansa <[email protected]>
* instead of versioned artifacts and version-less symlinks
* We used to create the actual artifact files with some version in the filename and then created symlink without any version which was updated to point to the latest one created. In some scenarios it's useful to create all artifacts - typically rootfs and kernel images with the same version - like release build even when the kernel itself wasn't modified since the previous release.
If we include the release version in the regular _NAME variables then we'll need to re-run do_deploy and do_image which will cause kernel to be rebuilt and image to be re-created even when the only change since last build was the version number.
With this change we can re-use kernel and image from sstate when nothing was changed and run only very fast do_deploy_links task which just adds another hard link to existing artifact from sstate.
* This is already used by various LGE builds as do_webos_deploy_fixup()
https://github.com/webosose/meta-webosose/blob/master/meta-webos/classes/webos_deploy.bbclass
but injecting this task in all the right places is difficult and sometimes requires whole bbclass to be duplicated. Having simpler way of versioning artifacts directly in oe-core might be useful for others.
* move IMAGE_VERSION_SUFFIX from _NAME variables to _LINK_NAME that way e.g. kernel.do_deploy can be reused from sstate to provide "version-less" artifacts and then very fast do_deploy_links task just adds links with consistent suffixes (by default the version from the recipe but could be easily set to e.g. some release name when building some products).
* create hard links instead of symlinks, so that whatever version the filename says is really there
* some IMAGE_FSTYPES might need the "version-less" IMAGE_NAME file to be removed first or they might either append or update the content of the image instead of creating new image file from scratch - I have seen this only with one proprietary format we generate with our own tool, so hopefully this isn't very common
* this is basically the mechanism are using in webOS with WEBOS_IMAGE_NAME_SUFFIX which is for official builds set from jenkins job and then all artifacts (images as well as corresponding kernel files) have the same version string)
* without this, you can still easily set the variables to contain the version from jenkins job (excluded from sstate signature like DATETIME currently is to prevent rebuilding it everytime even when the content didn't change) but then when kernel is reused from sstate you can have version 1.0 used on kernel artifacts and 2.0 on image artifacts.
* if you don't exclude the version string with vardepsexclude, then you get the right version in the filenames but for cost of re-executing do_deploy every single time, which with rm_work will cause all kernel tasks to be re-executed (together with everything which depends on it like external modules etc).
* the implementation "from outside" is a bit tricky as shown in webOS OSE, because first you need to reverse the meaning of IMAGE_NAME and IMAGE_LINK_NAME like here, but also replace all symlinks with hardlinks and then adjust all recipes/bbclasses to depend on our do_deploy_fixup task instead of the original do_deploy
see the variable modifications:
https://github.com/webosose/meta-webosose/blob/a35e81622aae1066591e44a132d01297ff478248/meta-webos/conf/distro/include/webos.inc#L65
and then various bbclasses to hook do_webos_deploy_fixup task creating the hardlinks for possible artifacts:
https://github.com/webosose/meta-webosose/blob/a35e81622aae1066591e44a132d01297ff478248/meta-webos/classes/webos_deploy.bbclass
https://github.com/webosose/meta-webosose/blob/a35e81622aae1066591e44a132d01297ff478248/meta-webos/classes/kernel.bbclass
https://github.com/webosose/meta-webosose/blob/a35e81622aae1066591e44a132d01297ff478248/meta-webos/classes/image.bbclass
so hopefully with all these changes in oe-core other project can achieve the same just by setting one variable IMAGE_VERSION_SUFFIX
* drop ${PKGE}-${PKGV}-${PR} from kernel artifacts names (this is the latest build) and add it only in hardlinks created in do_deploy_links so that we can use PKGR there again (because these links are generally used only by human operators and they don't have their own TASKHASH or the IMAGE_VERSION_SUFFIX might be set to some release name which they do understand
* this allows to drop package_get_auto_pr from kernel do_deploy as well, leaving only 2 EXTENDPRAUTO bumps for each kernel build (do_package and do_deploy_links, unfortunatelly these will still have different value, so if you're looking for the exact kernel image in deploy directory based on kernel image package version seen on the device the EXTENDPRAUTO part of PR will be different).
[YOCTO #12937]
--- .../image-artifact-names.bbclass | 8 ++-- meta/classes-recipe/image.bbclass | 12 ++--- .../kernel-artifact-names.bbclass | 6 ++- meta/classes-recipe/kernel-devicetree.bbclass | 35 +++++++++----- meta/classes-recipe/kernel-fitimage.bbclass | 33 ++++++++----- meta/classes-recipe/kernel.bbclass | 47 ++++++++++++------- meta/classes-recipe/qemuboot.bbclass | 2 +- .../rootfs-postcommands.bbclass | 4 +- meta/classes/cve-check.bbclass | 14 +++--- meta/lib/oe/cve_check.py | 6 +-- 10 files changed, 100 insertions(+), 67 deletions(-)
meta/classes-recipe/image-artifact-names.bbclass +4 -4
@@ -9,12 +9,12 @@ ################################################################## IMAGE_BASENAME ?= "${PN}" -IMAGE_VERSION_SUFFIX ?= "-${DATETIME}" +IMAGE_VERSION_SUFFIX ?= "-${PKGE}-${PKGV}-${PKGR}-${DATETIME}" IMAGE_VERSION_SUFFIX[vardepsexclude] += "DATETIME SOURCE_DATE_EPOCH" -IMAGE_NAME ?= "${IMAGE_LINK_NAME}${IMAGE_VERSION_SUFFIX}" -IMAGE_LINK_NAME ?= "${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}${IMAGE_NAME_SUFFIX}" +IMAGE_NAME ?= "${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}${IMAGE_NAME_SUFFIX}" +IMAGE_LINK_NAME ?= "${IMAGE_NAME}${IMAGE_VERSION_SUFFIX}" -# This needs to stay in sync with IMAGE_LINK_NAME, but with INITRAMFS_IMAGE instead of IMAGE_BASENAME +# This needs to stay in sync with IMAGE_NAME, but with INITRAMFS_IMAGE instead of IMAGE_BASENAME # and without ${IMAGE_NAME_SUFFIX} which all initramfs images should set to empty INITRAMFS_IMAGE_NAME ?= "${@['${INITRAMFS_IMAGE}${IMAGE_MACHINE_SUFFIX}', ''][d.getVar('INITRAMFS_IMAGE') == '']}"
meta/classes-recipe/image.bbclass +6 -6
@@ -141,7 +141,7 @@ do_rootfs[vardeps] += "${@rootfs_variables(d)}" # This follows many common usecases and user expectations. # But if you are building an image which doesn't need the kernel image at all, # you can unset this variable manually. -KERNEL_DEPLOY_DEPEND ?= "virtual/kernel:do_deploy" +KERNEL_DEPLOY_DEPEND ?= "virtual/kernel:do_deploy_links" do_build[depends] += "${KERNEL_DEPLOY_DEPEND}"
@@ -599,14 +599,14 @@ python create_symlinks() { return for type in subimages: dst = os.path.join(deploy_dir, link_name + "." + type) - src = img_name + "." + type - if os.path.exists(os.path.join(deploy_dir, src)): - bb.note("Creating symlink: %s -> %s" % (dst, src)) + src = os.path.join(deploy_dir, img_name + "." + type) + if os.path.exists(src): + bb.note("Creating hardlink: %s -> %s" % (dst, src)) if os.path.islink(dst): os.remove(dst) - os.symlink(src, dst) + os.link(src, dst) else: - bb.note("Skipping symlink, source does not exist: %s -> %s" % (dst, src)) + bb.note("Skipping hardlink, source does not exist: %s -> %s" % (dst, src)) } MULTILIBRE_ALLOW_REP =. "${base_bindir}|${base_sbindir}|${bindir}|${sbindir}|${libexecdir}|${sysconfdir}|${nonarch_base_libdir}/udev|/lib/modules/[^/]*/modules.*|"
meta/classes-recipe/kernel-artifact-names.bbclass +4 -2
@@ -12,8 +12,10 @@ inherit image-artifact-names -KERNEL_ARTIFACT_NAME ?= "${PKGE}-${PKGV}-${PKGR}${IMAGE_MACHINE_SUFFIX}${IMAGE_VERSION_SUFFIX}" -KERNEL_ARTIFACT_LINK_NAME ?= "${MACHINE}" +KERNEL_VERSION_SUFFIX ?= "${IMAGE_VERSION_SUFFIX}" + +KERNEL_ARTIFACT_NAME ?= "${MACHINE}" +KERNEL_ARTIFACT_LINK_NAME ?= "${KERNEL_ARTIFACT_NAME}${KERNEL_VERSION_SUFFIX}" KERNEL_ARTIFACT_BIN_EXT ?= ".bin" KERNEL_IMAGE_NAME ?= "${KERNEL_ARTIFACT_NAME}"
meta/classes-recipe/kernel-devicetree.bbclass +22 -13
@@ -91,7 +91,7 @@ do_install:append() { done } -do_deploy:append() { +kernel_do_deploy:append() { for dtbf in ${KERNEL_DEVICETREE}; do dtb=`normalize_dtb "$dtbf"` dtb_ext=${dtb##*.}
@@ -102,10 +102,7 @@ do_deploy:append() { fi install -m 0644 ${D}/${KERNEL_DTBDEST}/$dtb $deployDir/$dtb_base_name.$dtb_ext if [ -n "${KERNEL_DTB_NAME}" ] ; then - ln -sf $dtb_base_name.$dtb_ext $deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext - fi - if [ -n "${KERNEL_DTB_LINK_NAME}" ] ; then - ln -sf $dtb_base_name.$dtb_ext $deployDir/$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext + ln -vf $deployDir/$dtb_base_name.$dtb_ext $deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext fi for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do if [ "$type" = "zImage" ] && [ "${KERNEL_DEVICETREE_BUNDLE}" = "1" ]; then
@@ -116,10 +113,6 @@ do_deploy:append() { ln -sf $type-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ $deployDir/$type-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} fi - if [ -n "${KERNEL_DTB_LINK_NAME}" ]; then - ln -sf $type-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ - $deployDir/$type-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} - fi if [ -e "${KERNEL_OUTPUT_DIR}/${type}.initramfs" ]; then cat ${KERNEL_OUTPUT_DIR}/${type}.initramfs \ $deployDir/$dtb_base_name.$dtb_ext \
@@ -128,10 +121,26 @@ do_deploy:append() { ln -sf ${type}-${INITRAMFS_NAME}-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} fi - if [ -n "${KERNEL_DTB_LINK_NAME}" ]; then - ln -sf ${type}-${INITRAMFS_NAME}-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ - $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} - fi + fi + fi + done + done +} +kernel_do_deploy_links:append() { + for dtbf in ${KERNEL_DEVICETREE}; do + dtb=`normalize_dtb "$dtbf"` + dtb_ext=${dtb##*.} + dtb_base_name=`basename $dtb .$dtb_ext` + if [ -n "${KERNEL_DTB_LINK_NAME}" ] ; then + ln -vf $deployDir/$dtb_base_name.$dtb_ext $deployDir/$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext + fi + for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do + if [ "$type" = "zImage" ] && [ "${KERNEL_DEVICETREE_BUNDLE}" = "1" ] && [ -n "${KERNEL_DTB_LINK_NAME}" ]; then + ln -vf $deployDir/$type-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ + $deployDir/$type-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} + if [ -e "${KERNEL_OUTPUT_DIR}/${type}.initramfs" ]; then + ln -vf $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ + $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} fi fi done
meta/classes-recipe/kernel-fitimage.bbclass +21 -12
@@ -837,7 +837,6 @@ do_kernel_generate_rsa_keys() { addtask kernel_generate_rsa_keys before do_assemble_fitimage after do_compile -kernel_do_deploy[vardepsexclude] = "DATETIME" kernel_do_deploy:append() { # Update deploy directory if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then
@@ -845,29 +844,39 @@ kernel_do_deploy:append() { if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then bbnote "Copying fit-image.its source file..." install -m 0644 ${B}/fit-image.its "$deployDir/fitImage-its-${KERNEL_FIT_NAME}.its" - if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then - ln -snf fitImage-its-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${KERNEL_FIT_LINK_NAME}" - fi - bbnote "Copying linux.bin file..." install -m 0644 ${B}/linux.bin $deployDir/fitImage-linux.bin-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} - if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then - ln -snf fitImage-linux.bin-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-linux.bin-${KERNEL_FIT_LINK_NAME}" - fi fi if [ -n "${INITRAMFS_IMAGE}" ]; then bbnote "Copying fit-image-${INITRAMFS_IMAGE}.its source file..." install -m 0644 ${B}/fit-image-${INITRAMFS_IMAGE}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.its" + if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then + bbnote "Copying fitImage-${INITRAMFS_IMAGE} file..." + install -m 0644 ${B}/${KERNEL_OUTPUT_DIR}/fitImage-${INITRAMFS_IMAGE} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT}" + fi + fi + fi +} +kernel_do_deploy_links:append() { + if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then + if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then + if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then + ln -vf $deployDir/fitImage-its-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${KERNEL_FIT_LINK_NAME}" + fi if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then - ln -snf fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" + ln -vf $deployDir/fitImage-linux.bin-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-linux.bin-${KERNEL_FIT_LINK_NAME}" + fi + fi + + if [ -n "${INITRAMFS_IMAGE}" ]; then + if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then + ln -vf $deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" fi if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then - bbnote "Copying fitImage-${INITRAMFS_IMAGE} file..." - install -m 0644 ${B}/${KERNEL_OUTPUT_DIR}/fitImage-${INITRAMFS_IMAGE} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT}" if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then - ln -snf fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" + ln -vf $deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" fi fi fi
meta/classes-recipe/kernel.bbclass +30 -17
71 lines not on this page · raw message
meta/classes-recipe/qemuboot.bbclass +1 -1
@@ -178,5 +178,5 @@ python do_write_qemuboot_conf() { if qemuboot_link and qemuboot_link != qemuboot: if os.path.lexists(qemuboot_link): os.remove(qemuboot_link) - os.symlink(os.path.basename(qemuboot), qemuboot_link) + os.link(qemuboot, qemuboot_link) }
meta/classes-recipe/rootfs-postcommands.bbclass +2 -2
@@ -396,7 +396,7 @@ python write_image_manifest () { if manifest_link != manifest_name: if os.path.lexists(manifest_link): os.remove(manifest_link) - os.symlink(os.path.basename(manifest_name), manifest_link) + os.link(manifest_name, manifest_link) } # Can be used to create /etc/timestamp during image construction to give a reasonably
@@ -469,7 +469,7 @@ python write_image_test_data() { if testdata_link != testdata_name: if os.path.lexists(testdata_link): os.remove(testdata_link) - os.symlink(os.path.basename(testdata_name), testdata_link) + os.link(testdata_name, testdata_link) } write_image_test_data[vardepsexclude] += "TOPDIR"
meta/classes/cve-check.bbclass +7 -7
@@ -125,7 +125,7 @@ python () { def generate_json_report(d, out_path, link_path): if os.path.exists(d.getVar("CVE_CHECK_SUMMARY_INDEX_PATH")): import json - from oe.cve_check import cve_check_merge_jsons, update_symlinks + from oe.cve_check import cve_check_merge_jsons, update_links bb.note("Generating JSON CVE summary") index_file = d.getVar("CVE_CHECK_SUMMARY_INDEX_PATH")
@@ -143,12 +143,12 @@ def generate_json_report(d, out_path, link_path): with open(out_path, "w") as f: json.dump(summary, f, indent=2) - update_symlinks(out_path, link_path) + update_links(out_path, link_path) python cve_save_summary_handler () { import shutil import datetime - from oe.cve_check import update_symlinks + from oe.cve_check import update_links cve_tmp_file = d.getVar("CVE_CHECK_TMP_FILE")
@@ -162,7 +162,7 @@ python cve_save_summary_handler () { if os.path.exists(cve_tmp_file): shutil.copyfile(cve_tmp_file, cve_summary_file) cvefile_link = os.path.join(cvelogpath, cve_summary_name) - update_symlinks(cve_summary_file, cvefile_link) + update_links(cve_summary_file, cvefile_link) bb.plain("Complete CVE report summary created at: %s" % cvefile_link) if d.getVar("CVE_CHECK_FORMAT_JSON") == "1":
@@ -219,7 +219,7 @@ python cve_check_write_rootfs_manifest () { import shutil import json from oe.rootfs import image_list_installed_packages - from oe.cve_check import cve_check_merge_jsons, update_symlinks + from oe.cve_check import cve_check_merge_jsons, update_links if d.getVar("CVE_CHECK_COPY_FILES") == "1": deploy_file = d.getVar("CVE_CHECK_RECIPE_FILE")
@@ -274,7 +274,7 @@ python cve_check_write_rootfs_manifest () { with open(manifest_name, "w") as f: f.write(text_data) - update_symlinks(manifest_name, link_path) + update_links(manifest_name, link_path) bb.plain("Image CVE report stored in: %s" % manifest_name) if enable_json:
@@ -284,7 +284,7 @@ python cve_check_write_rootfs_manifest () { with open(manifest_name, "w") as f: json.dump(json_data, f, indent=2) - update_symlinks(manifest_name, link_path) + update_links(manifest_name, link_path) bb.plain("Image CVE JSON report stored in: %s" % manifest_name) }
meta/lib/oe/cve_check.py +3 -3
@@ -178,15 +178,15 @@ def cve_check_merge_jsons(output, data): output["package"].append(data["package"][0]) -def update_symlinks(target_path, link_path): +def update_links(target_path, link_path): """ - Update a symbolic link link_path to point to target_path. + Update a link link_path to point to target_path. Remove the link and recreate it if exist and is different. """ if link_path != target_path and os.path.exists(target_path): if os.path.exists(os.path.realpath(link_path)): os.remove(link_path) - os.symlink(os.path.basename(target_path), link_path) + os.link(target_path, link_path) def convert_cve_version(version):
Signature · 1 line
2.43.0
PATCH 2/21 create-spdx-2.2.bbclass: use hardlink as well
In reply to Martin Jansa[YOCTO #12937]
--- meta/classes/create-spdx-2.2.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/create-spdx-2.2.bbclass +1 -1
@@ -967,7 +967,7 @@ python image_combine_spdx() { if image_link_name: link = imgdeploydir / (image_link_name + suffix) if link != target_path: - link.symlink_to(os.path.relpath(target_path, link.parent)) + os.link(target_path, link) spdx_tar_path = imgdeploydir / (image_name + ".spdx.tar.zst") make_image_link(spdx_tar_path, ".spdx.tar.zst")
Signature · 1 line
2.43.0
RE: [OE-core] [PATCH 02/21] create-spdx-2.2.bbclass: use hardlink as well
Quoted 6 lines
-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Martin Jansa
Sent: den 22 november 2023 13:45
To: [email protected]
Subject: [OE-core] [PATCH 02/21] create-spdx-2.2.bbclass: use hardlink as well
This commit message does not make much sense, unless you also read the one for the preceding commit, which you won't do if you run something like git log meta/classes/create-spdx-2.2.bbclass.
//Peter
Quoted 25 lines
[YOCTO #12937]
Signed-off-by Martin Jansa <[email protected]>--- meta/classes/create-spdx-2.2.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/classes/create- renamed from meta/classes/create-spdx-2.2.bbclass +0
-0spdx-2.2.bbclass
indexb0aef80db1..8c77f6b886100644meta/classes/create-spdx-2.2.bbclass +1
-1@@ -967,7 +967,7 @@ python image_combine_spdx() { if image_link_name: link = imgdeploydir / (image_link_name + suffix) if link != target_path: - link.symlink_to(os.path.relpath(target_path, link.parent)) + os.link(target_path, link) spdx_tar_path = imgdeploydir / (image_name + ".spdx.tar.zst")make_image_link(spdx_tar_path, ".spdx.tar.zst")--
2.43.0
PATCH 3/21 image, kernel: allow to disable creating the hardlinks by setting *LINK_NAME variables to empty
In reply to Martin JansaFrom: Martin Jansa <[email protected]>
* they can be disabled individually by setting *_LINK_NAME to empty or disable them all by setting IMAGE_VERSION_SUFFIX to empty (making them equal to *_NAME variables)
There are couple *_LINK_NAME variables:
IMAGE_LINK_NAME = ""KERNEL_IMAGE_LINK_NAME = ""KERNEL_DTB_LINK_NAME = ""KERNEL_FIT_LINK_NAME = ""MODULE_TARBALL_LINK_NAME = ""INITRAMFS_LINK_NAME = ""
or
IMAGE_MACHINE_SUFFIX = ""IMAGE_NAME_SUFFIX = ""IMAGE_VERSION_SUFFIX = ""
to have really the minimal filenames:
$ ls tmp/deploy/images/qemux86-64/ bzImage core-image-minimal.manifest core-image-minimal.tar.bz2 bzImage-qemux86-64.bin core-image-minimal.qemuboot.conf core-image-minimal.testdata.json core-image-minimal.ext4 core-image-minimal.spdx.tar.zst modules-qemux86-64.tgz
and to remove MACHINE name from kernel artifacts as well (if you prefer the MACHINE name in directory only), you can set:KERNEL_ARTIFACT_NAME = ""
[YOCTO #12937]
--- meta/classes-recipe/image.bbclass | 3 +- meta/classes-recipe/kernel-devicetree.bbclass | 32 +++++++++-------- meta/classes-recipe/kernel-fitimage.bbclass | 17 ++++----- meta/classes-recipe/kernel.bbclass | 36 ++++++++++++------- 4 files changed, 49 insertions(+), 39 deletions(-)
meta/classes-recipe/image.bbclass +2 -1
@@ -595,7 +595,8 @@ python create_symlinks() { taskname = d.getVar("BB_CURRENTTASK") subimages = (d.getVarFlag("do_" + taskname, 'subimages', False) or "").split() - if not link_name: + if not link_name or link_name == img_name: + bb.note("Not creating versioned hardlinks, because IMAGE_LINK_NAME is empty or identical to IMAGE_NAME") return for type in subimages: dst = os.path.join(deploy_dir, link_name + "." + type)
meta/classes-recipe/kernel-devicetree.bbclass +17 -15
@@ -127,22 +127,24 @@ kernel_do_deploy:append() { done } kernel_do_deploy_links:append() { - for dtbf in ${KERNEL_DEVICETREE}; do - dtb=`normalize_dtb "$dtbf"` - dtb_ext=${dtb##*.} - dtb_base_name=`basename $dtb .$dtb_ext` - if [ -n "${KERNEL_DTB_LINK_NAME}" ] ; then + if [ -z "${KERNEL_DTB_LINK_NAME}" -o "${KERNEL_DTB_LINK_NAME}" = "${KERNEL_DTB_NAME}" ] ; then + bbnote "Not creating versioned hardlinks, because KERNEL_DTB_LINK_NAME is empty or identical to KERNEL_DTB_NAME" + else + for dtbf in ${KERNEL_DEVICETREE}; do + dtb=`normalize_dtb "$dtbf"` + dtb_ext=${dtb##*.} + dtb_base_name=`basename $dtb .$dtb_ext` ln -vf $deployDir/$dtb_base_name.$dtb_ext $deployDir/$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext - fi - for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do - if [ "$type" = "zImage" ] && [ "${KERNEL_DEVICETREE_BUNDLE}" = "1" ] && [ -n "${KERNEL_DTB_LINK_NAME}" ]; then - ln -vf $deployDir/$type-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ - $deployDir/$type-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} - if [ -e "${KERNEL_OUTPUT_DIR}/${type}.initramfs" ]; then - ln -vf $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ - $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} + for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do + if [ "$type" = "zImage" ] && [ "${KERNEL_DEVICETREE_BUNDLE}" = "1" ] ; then + ln -vf $deployDir/$type-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ + $deployDir/$type-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} + if [ -e "${KERNEL_OUTPUT_DIR}/${type}.initramfs" ]; then + ln -vf $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ + $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} + fi fi - fi + done done - done + fi }
meta/classes-recipe/kernel-fitimage.bbclass +6 -11
@@ -860,22 +860,17 @@ kernel_do_deploy:append() { } kernel_do_deploy_links:append() { if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then - if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then - if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then + if [ -z "${KERNEL_FIT_LINK_NAME}" -o "${KERNEL_FIT_LINK_NAME}" = "${KERNEL_FIT_NAME}" ] ; then + bbnote "Not creating versioned hardlinks, because KERNEL_FIT_LINK_NAME is empty or identical to KERNEL_FIT_NAME" + else + if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then ln -vf $deployDir/fitImage-its-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${KERNEL_FIT_LINK_NAME}" - fi - if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then ln -vf $deployDir/fitImage-linux.bin-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-linux.bin-${KERNEL_FIT_LINK_NAME}" fi - fi - if [ -n "${INITRAMFS_IMAGE}" ]; then - if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then + if [ -n "${INITRAMFS_IMAGE}" ]; then ln -vf $deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" - fi - - if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then - if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then + if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then ln -vf $deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" fi fi
meta/classes-recipe/kernel.bbclass +24 -12
@@ -855,21 +855,33 @@ kernel_do_deploy_links() { mkdir "$deployDir" fi - for imageType in ${KERNEL_IMAGETYPES} ; do - ln -vf $deployDir/$imageType-${KERNEL_IMAGE_NAME}.bin $deployDir/$imageType-${KERNEL_IMAGE_LINK_NAME}${KERNEL_IMAGE_BIN_EXT} - done + if [ -z "${KERNEL_IMAGE_LINK_NAME}" -o "${KERNEL_IMAGE_LINK_NAME}" = "${KERNEL_IMAGE_NAME}" ] ; then + bbnote "Not creating versioned hardlinks for kernel images, because KERNEL_IMAGE_LINK_NAME is empty or identical to KERNEL_IMAGE_NAME" + else + for imageType in ${KERNEL_IMAGETYPES} ; do + ln -vf $deployDir/$imageType-${KERNEL_IMAGE_NAME}.bin $deployDir/$imageType-${KERNEL_IMAGE_LINK_NAME}${KERNEL_IMAGE_BIN_EXT} + done + fi - if [ ${MODULE_TARBALL_DEPLOY} = "1" -a -f $deployDir/modules-${MODULE_TARBALL_NAME}.tgz ] ; then - ln -vf $deployDir/modules-${MODULE_TARBALL_NAME}.tgz $deployDir/modules-${MODULE_TARBALL_LINK_NAME}.tgz + if [ -z "${MODULE_TARBALL_LINK_NAME}" -o "${MODULE_TARBALL_LINK_NAME}" = "${MODULE_TARBALL_NAME}" ] ; then + bbnote "Not creating versioned hardlinks for module tarball, because MODULE_TARBALL_LINK_NAME is empty or identical to MODULE_TARBALL_NAME" + else + if [ ${MODULE_TARBALL_DEPLOY} = "1" -a -f $deployDir/modules-${MODULE_TARBALL_NAME}.tgz ] ; then + ln -vf $deployDir/modules-${MODULE_TARBALL_NAME}.tgz $deployDir/modules-${MODULE_TARBALL_LINK_NAME}.tgz + fi fi - if [ ! -z "${INITRAMFS_IMAGE}" -a "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then - for imageType in ${KERNEL_IMAGETYPES} ; do - if [ "$imageType" = "fitImage" ] ; then - continue - fi - ln -vf $deployDir/$imageType-${INITRAMFS_NAME}.bin $deployDir/$imageType-${INITRAMFS_LINK_NAME}${KERNEL_IMAGE_BIN_EXT} - done + if [ -z "${INITRAMFS_LINK_NAME}" -o "${INITRAMFS_LINK_NAME}" = "${INITRAMFS_NAME}" ] ; then + bbnote "Not creating versioned hardlinks for initramfs image, because INITRAMFS_LINK_NAME is empty" + else + if [ ! -z "${INITRAMFS_IMAGE}" -a "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then + for imageType in ${KERNEL_IMAGETYPES} ; do + if [ "$imageType" = "fitImage" ] ; then + continue + fi + ln -vf $deployDir/$imageType-${INITRAMFS_NAME}.bin $deployDir/$imageType-${INITRAMFS_LINK_NAME}${KERNEL_IMAGE_BIN_EXT} + done + fi fi } do_deploy_links[prefuncs] += "read_subpackage_metadata"
Signature · 1 line
2.43.0
PATCH 4/21 kernel: move the leading dash into KERNEL_ARTIFACT_NAME
In reply to Martin Jansa* this matches how IMAGE_MACHINE_SUFFIX works and we can use that for the default value
* allows to set IMAGE_MACHINE_SUFFIX to empty for people who prefer to keep MACHINE name only in the directory name otherwise there would be a stray dash in:
lrwxrwxrwx 2 martin martin 12 Nov 18 13:25 bzImage -> bzImage-.bin
-rw-r--r-- 2 martin martin 12M Nov 18 13:25 bzImage-.bin -rw-r--r-- 2 martin martin 182M Nov 18 13:25 modules-.tgz if you set
KERNEL_ARTIFACT_NAME = ""
[YOCTO #12937]
--- .../classes-recipe/kernel-artifact-names.bbclass | 6 +++--- meta/classes-recipe/kernel-devicetree.bbclass | 12 ++++++------ meta/classes-recipe/kernel-fitimage.bbclass | 16 ++++++++-------- meta/classes-recipe/kernel.bbclass | 10 +++++----- 4 files changed, 22 insertions(+), 22 deletions(-)
meta/classes-recipe/kernel-artifact-names.bbclass +3 -3
@@ -14,7 +14,7 @@ inherit image-artifact-names KERNEL_VERSION_SUFFIX ?= "${IMAGE_VERSION_SUFFIX}" -KERNEL_ARTIFACT_NAME ?= "${MACHINE}" +KERNEL_ARTIFACT_NAME ?= "${IMAGE_MACHINE_SUFFIX}" KERNEL_ARTIFACT_LINK_NAME ?= "${KERNEL_ARTIFACT_NAME}${KERNEL_VERSION_SUFFIX}" KERNEL_ARTIFACT_BIN_EXT ?= ".bin"
@@ -35,5 +35,5 @@ MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}" MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" MODULE_TARBALL_DEPLOY ?= "1" -INITRAMFS_NAME ?= "initramfs-${KERNEL_ARTIFACT_NAME}" -INITRAMFS_LINK_NAME ?= "initramfs-${KERNEL_ARTIFACT_LINK_NAME}" +INITRAMFS_NAME ?= "initramfs${KERNEL_ARTIFACT_NAME}" +INITRAMFS_LINK_NAME ?= "initramfs${KERNEL_ARTIFACT_LINK_NAME}"
meta/classes-recipe/kernel-devicetree.bbclass +6 -6
@@ -102,7 +102,7 @@ kernel_do_deploy:append() { fi install -m 0644 ${D}/${KERNEL_DTBDEST}/$dtb $deployDir/$dtb_base_name.$dtb_ext if [ -n "${KERNEL_DTB_NAME}" ] ; then - ln -vf $deployDir/$dtb_base_name.$dtb_ext $deployDir/$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext + ln -vf $deployDir/$dtb_base_name.$dtb_ext $deployDir/$dtb_base_name${KERNEL_DTB_NAME}.$dtb_ext fi for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do if [ "$type" = "zImage" ] && [ "${KERNEL_DEVICETREE_BUNDLE}" = "1" ]; then
@@ -111,7 +111,7 @@ kernel_do_deploy:append() { > $deployDir/$type-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} if [ -n "${KERNEL_DTB_NAME}" ]; then ln -sf $type-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ - $deployDir/$type-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} + $deployDir/$type-$dtb_base_name${KERNEL_DTB_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} fi if [ -e "${KERNEL_OUTPUT_DIR}/${type}.initramfs" ]; then cat ${KERNEL_OUTPUT_DIR}/${type}.initramfs \
@@ -119,7 +119,7 @@ kernel_do_deploy:append() { > $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} if [ -n "${KERNEL_DTB_NAME}" ]; then ln -sf ${type}-${INITRAMFS_NAME}-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ - $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} + $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name${KERNEL_DTB_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} fi fi fi
@@ -134,14 +134,14 @@ kernel_do_deploy_links:append() { dtb=`normalize_dtb "$dtbf"` dtb_ext=${dtb##*.} dtb_base_name=`basename $dtb .$dtb_ext` - ln -vf $deployDir/$dtb_base_name.$dtb_ext $deployDir/$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext + ln -vf $deployDir/$dtb_base_name.$dtb_ext $deployDir/$dtb_base_name${KERNEL_DTB_LINK_NAME}.$dtb_ext for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do if [ "$type" = "zImage" ] && [ "${KERNEL_DEVICETREE_BUNDLE}" = "1" ] ; then ln -vf $deployDir/$type-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ - $deployDir/$type-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} + $deployDir/$type-$dtb_base_name${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} if [ -e "${KERNEL_OUTPUT_DIR}/${type}.initramfs" ]; then ln -vf $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name.$dtb_ext${KERNEL_DTB_BIN_EXT} \ - $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name-${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} + $deployDir/${type}-${INITRAMFS_NAME}-$dtb_base_name${KERNEL_DTB_LINK_NAME}.$dtb_ext${KERNEL_DTB_BIN_EXT} fi fi done
meta/classes-recipe/kernel-fitimage.bbclass +8 -8
@@ -843,17 +843,17 @@ kernel_do_deploy:append() { if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then bbnote "Copying fit-image.its source file..." - install -m 0644 ${B}/fit-image.its "$deployDir/fitImage-its-${KERNEL_FIT_NAME}.its" + install -m 0644 ${B}/fit-image.its "$deployDir/fitImage-its${KERNEL_FIT_NAME}.its" bbnote "Copying linux.bin file..." - install -m 0644 ${B}/linux.bin $deployDir/fitImage-linux.bin-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} + install -m 0644 ${B}/linux.bin $deployDir/fitImage-linux.bin${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} fi if [ -n "${INITRAMFS_IMAGE}" ]; then bbnote "Copying fit-image-${INITRAMFS_IMAGE}.its source file..." - install -m 0644 ${B}/fit-image-${INITRAMFS_IMAGE}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.its" + install -m 0644 ${B}/fit-image-${INITRAMFS_IMAGE}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}.its" if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then bbnote "Copying fitImage-${INITRAMFS_IMAGE} file..." - install -m 0644 ${B}/${KERNEL_OUTPUT_DIR}/fitImage-${INITRAMFS_IMAGE} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT}" + install -m 0644 ${B}/${KERNEL_OUTPUT_DIR}/fitImage-${INITRAMFS_IMAGE} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT}" fi fi fi
@@ -864,14 +864,14 @@ kernel_do_deploy_links:append() { bbnote "Not creating versioned hardlinks, because KERNEL_FIT_LINK_NAME is empty or identical to KERNEL_FIT_NAME" else if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then - ln -vf $deployDir/fitImage-its-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${KERNEL_FIT_LINK_NAME}" - ln -vf $deployDir/fitImage-linux.bin-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-linux.bin-${KERNEL_FIT_LINK_NAME}" + ln -vf $deployDir/fitImage-its${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its${KERNEL_FIT_LINK_NAME}" + ln -vf $deployDir/fitImage-linux.bin${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-linux.bin${KERNEL_FIT_LINK_NAME}" fi if [ -n "${INITRAMFS_IMAGE}" ]; then - ln -vf $deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" + ln -vf $deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_LINK_NAME}" if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then - ln -vf $deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}-${KERNEL_FIT_LINK_NAME}" + ln -vf $deployDir/fitImage-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_LINK_NAME}" fi fi fi
meta/classes-recipe/kernel.bbclass +5 -5
@@ -813,7 +813,7 @@ kernel_do_deploy() { fi for imageType in ${KERNEL_IMAGETYPES} ; do - baseName=$imageType-${KERNEL_IMAGE_NAME} + baseName=$imageType${KERNEL_IMAGE_NAME} if [ -s ${KERNEL_OUTPUT_DIR}/$imageType.stripped ] ; then install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType.stripped $deployDir/$baseName${KERNEL_IMAGE_BIN_EXT}
@@ -833,7 +833,7 @@ kernel_do_deploy() { TAR_ARGS="" fi TAR_ARGS="$TAR_ARGS --owner=0 --group=0" - tar $TAR_ARGS -cv -C ${D}${root_prefix} lib | gzip -9n > $deployDir/modules-${MODULE_TARBALL_NAME}.tgz + tar $TAR_ARGS -cv -C ${D}${root_prefix} lib | gzip -9n > $deployDir/modules${MODULE_TARBALL_NAME}.tgz fi if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
@@ -859,15 +859,15 @@ kernel_do_deploy_links() { bbnote "Not creating versioned hardlinks for kernel images, because KERNEL_IMAGE_LINK_NAME is empty or identical to KERNEL_IMAGE_NAME" else for imageType in ${KERNEL_IMAGETYPES} ; do - ln -vf $deployDir/$imageType-${KERNEL_IMAGE_NAME}.bin $deployDir/$imageType-${KERNEL_IMAGE_LINK_NAME}${KERNEL_IMAGE_BIN_EXT} + ln -vf $deployDir/$imageType${KERNEL_IMAGE_NAME}.bin $deployDir/$imageType${KERNEL_IMAGE_LINK_NAME}${KERNEL_IMAGE_BIN_EXT} done fi if [ -z "${MODULE_TARBALL_LINK_NAME}" -o "${MODULE_TARBALL_LINK_NAME}" = "${MODULE_TARBALL_NAME}" ] ; then bbnote "Not creating versioned hardlinks for module tarball, because MODULE_TARBALL_LINK_NAME is empty or identical to MODULE_TARBALL_NAME" else - if [ ${MODULE_TARBALL_DEPLOY} = "1" -a -f $deployDir/modules-${MODULE_TARBALL_NAME}.tgz ] ; then - ln -vf $deployDir/modules-${MODULE_TARBALL_NAME}.tgz $deployDir/modules-${MODULE_TARBALL_LINK_NAME}.tgz + if [ ${MODULE_TARBALL_DEPLOY} = "1" -a -f $deployDir/modules${MODULE_TARBALL_NAME}.tgz ] ; then + ln -vf $deployDir/modules${MODULE_TARBALL_NAME}.tgz $deployDir/modules${MODULE_TARBALL_LINK_NAME}.tgz fi fi
Signature · 1 line
2.43.0
PATCH 5/21 kernel-fitimage.bbclass: avoid duplicate .bin extension
In reply to Martin Jansa* the linux.bin was deployed as:
fitImage-linux.bin${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} where KERNEL_FIT_BIN_EXT is the 2nd ".bin"
* add the${KERNEL_FIT_BIN_EXT} also to corresponding links:
fitImage-linux${KERNEL_FIT_LINK_NAME}${KERNEL_FIT_BIN_EXT}
[YOCTO #12937]
--- meta/classes-recipe/kernel-fitimage.bbclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
meta/classes-recipe/kernel-fitimage.bbclass +3 -3
@@ -845,7 +845,7 @@ kernel_do_deploy:append() { bbnote "Copying fit-image.its source file..." install -m 0644 ${B}/fit-image.its "$deployDir/fitImage-its${KERNEL_FIT_NAME}.its" bbnote "Copying linux.bin file..." - install -m 0644 ${B}/linux.bin $deployDir/fitImage-linux.bin${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} + install -m 0644 ${B}/linux.bin $deployDir/fitImage-linux${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} fi if [ -n "${INITRAMFS_IMAGE}" ]; then
@@ -865,13 +865,13 @@ kernel_do_deploy_links:append() { else if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then ln -vf $deployDir/fitImage-its${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its${KERNEL_FIT_LINK_NAME}" - ln -vf $deployDir/fitImage-linux.bin${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-linux.bin${KERNEL_FIT_LINK_NAME}" + ln -vf $deployDir/fitImage-linux${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-linux${KERNEL_FIT_LINK_NAME}${KERNEL_FIT_BIN_EXT}" fi if [ -n "${INITRAMFS_IMAGE}" ]; then ln -vf $deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_LINK_NAME}" if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then - ln -vf $deployDir/fitImage-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_LINK_NAME}" + ln -vf $deployDir/fitImage-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_LINK_NAME}${KERNEL_FIT_BIN_EXT}" fi fi fi
Signature · 1 line
2.43.0
PATCH 6/21 kernel-fitimage.bbclass: add .its extension also to links
In reply to Martin Jansa* for consistency with the names
[YOCTO #12937]
--- meta/classes-recipe/kernel-artifact-names.bbclass | 2 ++ meta/classes-recipe/kernel-fitimage.bbclass | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-)
meta/classes-recipe/kernel-artifact-names.bbclass +2 -0
@@ -31,6 +31,8 @@ KERNEL_FIT_NAME ?= "${KERNEL_ARTIFACT_NAME}" KERNEL_FIT_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" KERNEL_FIT_BIN_EXT ?= "${KERNEL_ARTIFACT_BIN_EXT}" +KERNEL_FIT_ITS_EXT ?= ".its" + MODULE_TARBALL_NAME ?= "${KERNEL_ARTIFACT_NAME}" MODULE_TARBALL_LINK_NAME ?= "${KERNEL_ARTIFACT_LINK_NAME}" MODULE_TARBALL_DEPLOY ?= "1"
meta/classes-recipe/kernel-fitimage.bbclass +4 -4
@@ -843,14 +843,14 @@ kernel_do_deploy:append() { if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then bbnote "Copying fit-image.its source file..." - install -m 0644 ${B}/fit-image.its "$deployDir/fitImage-its${KERNEL_FIT_NAME}.its" + install -m 0644 ${B}/fit-image.its "$deployDir/fitImage-its${KERNEL_FIT_NAME}${KERNEL_FIT_ITS_EXT}" bbnote "Copying linux.bin file..." install -m 0644 ${B}/linux.bin $deployDir/fitImage-linux${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} fi if [ -n "${INITRAMFS_IMAGE}" ]; then bbnote "Copying fit-image-${INITRAMFS_IMAGE}.its source file..." - install -m 0644 ${B}/fit-image-${INITRAMFS_IMAGE}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}.its" + install -m 0644 ${B}/fit-image-${INITRAMFS_IMAGE}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}${KERNEL_FIT_ITS_EXT}" if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then bbnote "Copying fitImage-${INITRAMFS_IMAGE} file..." install -m 0644 ${B}/${KERNEL_OUTPUT_DIR}/fitImage-${INITRAMFS_IMAGE} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT}"
@@ -864,12 +864,12 @@ kernel_do_deploy_links:append() { bbnote "Not creating versioned hardlinks, because KERNEL_FIT_LINK_NAME is empty or identical to KERNEL_FIT_NAME" else if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then - ln -vf $deployDir/fitImage-its${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its${KERNEL_FIT_LINK_NAME}" + ln -vf $deployDir/fitImage-its${KERNEL_FIT_NAME}${KERNEL_FIT_ITS_EXT} "$deployDir/fitImage-its${KERNEL_FIT_LINK_NAME}${KERNEL_FIT_ITS_EXT}" ln -vf $deployDir/fitImage-linux${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-linux${KERNEL_FIT_LINK_NAME}${KERNEL_FIT_BIN_EXT}" fi if [ -n "${INITRAMFS_IMAGE}" ]; then - ln -vf $deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_LINK_NAME}" + ln -vf $deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}${KERNEL_FIT_ITS_EXT} "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_LINK_NAME}${KERNEL_FIT_ITS_EXT}" if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then ln -vf $deployDir/fitImage-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} "$deployDir/fitImage-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_LINK_NAME}${KERNEL_FIT_BIN_EXT}" fi
Signature · 1 line
2.43.0
PATCH 7/21 uboot: use ${IMAGE_MACHINE_SUFFIX} instead of -${MACHINE} and use hardlinks
In reply to Martin Jansa* rename variables to match the conventions used in kernel and image recipes
* use versioned hardlinks as kernel and image recipes, but don't split the do_deploy_links task (can be split later).
[YOCTO #12937]
--- meta/classes-recipe/uboot-config.bbclass | 22 ++- meta/classes-recipe/uboot-sign.bbclass | 68 ++++----- meta/recipes-bsp/u-boot/u-boot.inc | 177 +++++++++++------------ 3 files changed, 129 insertions(+), 138 deletions(-)
meta/classes-recipe/uboot-config.bbclass +14 -8
@@ -19,6 +19,12 @@ def removesuffix(s, suffix): return s[:-len(suffix)] return s +inherit kernel-artifact-names + +UBOOT_VERSION_SUFFIX ?= "${IMAGE_VERSION_SUFFIX}" +UBOOT_ARTIFACT_NAME ?= "${IMAGE_MACHINE_SUFFIX}" +UBOOT_ARTIFACT_LINK_NAME ?= "${UBOOT_ARTIFACT_NAME}${UBOOT_VERSION_SUFFIX}" + UBOOT_ENTRYPOINT ?= "20008000" UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}"
@@ -27,8 +33,8 @@ UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}" UBOOT_SUFFIX ??= "bin" UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}" UBOOT_BINARYNAME ?= "${@os.path.splitext(d.getVar("UBOOT_BINARY"))[0]}" -UBOOT_IMAGE ?= "${UBOOT_BINARYNAME}-${MACHINE}-${PV}-${PR}.${UBOOT_SUFFIX}" -UBOOT_SYMLINK ?= "${UBOOT_BINARYNAME}-${MACHINE}.${UBOOT_SUFFIX}" +UBOOT_IMAGE ?= "${UBOOT_BINARYNAME}${UBOOT_ARTIFACT_NAME}.${UBOOT_SUFFIX}" +UBOOT_LINK ?= "${UBOOT_BINARYNAME}${UBOOT_ARTIFACT_LINK_NAME}.${UBOOT_SUFFIX}" UBOOT_MAKE_TARGET ?= "all" # Output the ELF generated. Some platforms can use the ELF file and directly
@@ -38,7 +44,7 @@ UBOOT_ELF ?= "" UBOOT_ELF_SUFFIX ?= "elf" UBOOT_ELF_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}" UBOOT_ELF_BINARY ?= "u-boot.${UBOOT_ELF_SUFFIX}" -UBOOT_ELF_SYMLINK ?= "u-boot-${MACHINE}.${UBOOT_ELF_SUFFIX}" +UBOOT_ELF_LINK ?= "u-boot${UBOOT_ARTIFACT_LINK_NAME}.${UBOOT_ELF_SUFFIX}" # Some versions of u-boot build an SPL (Second Program Loader) image that # should be packaged along with the u-boot binary as well as placed in the
@@ -49,8 +55,8 @@ SPL_BINARY ?= "" SPL_DELIMITER ?= "${@'.' if d.getVar("SPL_SUFFIX") else ''}" SPL_BINARYFILE ?= "${@os.path.basename(d.getVar("SPL_BINARY"))}" SPL_BINARYNAME ?= "${@removesuffix(d.getVar("SPL_BINARYFILE"), "." + d.getVar("SPL_SUFFIX"))}" -SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX}" -SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}${SPL_DELIMITER}${SPL_SUFFIX}" +SPL_IMAGE ?= "${SPL_BINARYNAME}${UBOOT_ARTIFACT_NAME}${SPL_DELIMITER}${SPL_SUFFIX}" +SPL_LINK ?= "${SPL_BINARYNAME}${UBOOT_ARTIFACT_LINK_NAME}${SPL_DELIMITER}${SPL_SUFFIX}" # Additional environment variables or a script can be installed alongside # u-boot to be used automatically on boot. This file, typically 'uEnv.txt'
@@ -62,8 +68,8 @@ UBOOT_ENV ?= "" UBOOT_ENV_SRC_SUFFIX ?= "cmd" UBOOT_ENV_SRC ?= "${UBOOT_ENV}.${UBOOT_ENV_SRC_SUFFIX}" UBOOT_ENV_BINARY ?= "${UBOOT_ENV}.${UBOOT_ENV_SUFFIX}" -UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}-${MACHINE}-${PV}-${PR}.${UBOOT_ENV_SUFFIX}" -UBOOT_ENV_SYMLINK ?= "${UBOOT_ENV}-${MACHINE}.${UBOOT_ENV_SUFFIX}" +UBOOT_ENV_IMAGE ?= "${UBOOT_ENV}${UBOOT_ARTIFACT_NAME}.${UBOOT_ENV_SUFFIX}" +UBOOT_ENV_LINK ?= "${UBOOT_ENV}${UBOOT_ARTIFACT_LINK_NAME}.${UBOOT_ENV_SUFFIX}" # Default name of u-boot initial env, but enable individual recipes to change # this value.
@@ -73,7 +79,7 @@ UBOOT_INITIAL_ENV ?= "${PN}-initial-env" # to find EXTLINUX conf file. UBOOT_EXTLINUX_INSTALL_DIR ?= "/boot/extlinux" UBOOT_EXTLINUX_CONF_NAME ?= "extlinux.conf" -UBOOT_EXTLINUX_SYMLINK ?= "${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE}-${PR}" +UBOOT_EXTLINUX_CONF_LINK ?= "${UBOOT_EXTLINUX_CONF_NAME}${UBOOT_ARTIFACT_LINK_NAME}" # Options for the device tree compiler passed to mkimage '-D' feature: UBOOT_MKIMAGE_DTCOPTS ??= ""
meta/classes-recipe/uboot-sign.bbclass +34 -34
136 lines not on this page · raw message
meta/recipes-bsp/u-boot/u-boot.inc +81 -96
300 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH 8/21 image.bbclass: rename create_symlinks to create_hardlinks
In reply to Martin Jansa* to make it more clear what this postfunc does now
[YOCTO #12937]
--- meta/classes-recipe/image-live.bbclass | 2 +- meta/classes-recipe/image.bbclass | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
meta/classes-recipe/image-live.bbclass +1 -1
@@ -257,7 +257,7 @@ python do_bootimg() { bb.build.exec_func('build_efi_cfg', d) bb.build.exec_func('build_hddimg', d) bb.build.exec_func('build_iso', d) - bb.build.exec_func('create_symlinks', d) + bb.build.exec_func('create_hardlinks', d) } do_bootimg[subimages] = "hddimg iso"
meta/classes-recipe/image.bbclass +3 -3
@@ -508,7 +508,7 @@ python () { d.setVarFlag(task, 'fakeroot', '1') d.appendVarFlag(task, 'prefuncs', ' ' + debug + ' set_image_size') - d.prependVarFlag(task, 'postfuncs', 'create_symlinks ') + d.prependVarFlag(task, 'postfuncs', 'create_hardlinks ') d.appendVarFlag(task, 'subimages', ' ' + ' '.join(subimages)) d.appendVarFlag(task, 'vardeps', ' ' + ' '.join(vardeps)) d.appendVarFlag(task, 'vardepsexclude', ' DATETIME DATE ' + ' '.join(vardepsexclude))
@@ -584,9 +584,9 @@ python set_image_size () { } # -# Create symlinks to the newly created image +# Create hardlinks to the newly created image # -python create_symlinks() { +python create_hardlinks() { deploy_dir = d.getVar('IMGDEPLOYDIR') img_name = d.getVar('IMAGE_NAME')
Signature · 1 line
2.43.0
PATCH 9/21 image-artifact-names.bbclass: add IMAGE_VERSION_SUFFIX_DATETIME which uses SOURCE_DATE_EPOCH
In reply to Martin Jansa* since https://git.openembedded.org/openembedded-core/diff/meta/classes/image-artifact-names.bbclass?id=abb0671d2cebfd7e8df94796404bbe9c7f961058
which removed the
bb.data.inherits_class('reproducible_build', d)
condition this was already applied in all the builds which used DATETIME, so we
can move it to the default value directly and DISTRO configs than can choose
to use IMAGE_VERSION_SUFFIX_DATETIME as they want
[YOCTO #12937]
--- meta/classes-global/base.bbclass | 3 +++ meta/classes-recipe/image-artifact-names.bbclass | 12 +++--------- 2 files changed, 6 insertions(+), 9 deletions(-)
meta/classes-global/base.bbclass +3 -0
@@ -207,6 +207,9 @@ do_unpack[postfuncs] += "create_source_date_epoch_stamp" def get_source_date_epoch_value(d): return oe.reproducible.epochfile_read(d.getVar('SDE_FILE'), d) +def get_source_date_epoch_value_datetime(d): + import datetime + return datetime.datetime.fromtimestamp(int(get_source_date_epoch_value(d)), datetime.timezone.utc).strftime('%Y%m%d%H%M%S') def get_layers_branch_rev(d): revisions = oe.buildcfg.get_layer_revisions(d)
meta/classes-recipe/image-artifact-names.bbclass +3 -9
@@ -9,8 +9,9 @@ ################################################################## IMAGE_BASENAME ?= "${PN}" -IMAGE_VERSION_SUFFIX ?= "-${PKGE}-${PKGV}-${PKGR}-${DATETIME}" -IMAGE_VERSION_SUFFIX[vardepsexclude] += "DATETIME SOURCE_DATE_EPOCH" +IMAGE_VERSION_SUFFIX_DATETIME = "${@get_source_date_epoch_value_datetime(d)}" +IMAGE_VERSION_SUFFIX_DATETIME[vardepvalue] = "" +IMAGE_VERSION_SUFFIX ?= "-${PKGE}-${PKGV}-${PKGR}-${IMAGE_VERSION_SUFFIX_DATETIME}" IMAGE_NAME ?= "${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}${IMAGE_NAME_SUFFIX}" IMAGE_LINK_NAME ?= "${IMAGE_NAME}${IMAGE_VERSION_SUFFIX}"
@@ -32,10 +33,3 @@ IMAGE_MACHINE_SUFFIX ??= "-${MACHINE}" # by default) followed by additional suffices which describe the format (.ext4, # .ext4.xz, etc.). IMAGE_NAME_SUFFIX ??= ".rootfs" - -python () { - if bb.data.inherits_class('deploy', d) and d.getVar("IMAGE_VERSION_SUFFIX") == "-${DATETIME}": - import datetime - d.setVar("IMAGE_VERSION_SUFFIX", "-" + datetime.datetime.fromtimestamp(int(d.getVar("SOURCE_DATE_EPOCH")), datetime.timezone.utc).strftime('%Y%m%d%H%M%S')) - d.setVarFlag("IMAGE_VERSION_SUFFIX", "vardepvalue", "") -}
Signature · 1 line
2.43.0
PATCH 10/21 oeqa: bbtests.BitbakeTests.test_image_manifest: use just isfile() instead of islink()
In reply to Martin Jansa* with [YOCTO #12937] changes the manifest is hardlink not symlink
* fixes:
2023-11-16 00:16:33,967 - oe-selftest - INFO - test_image_manifest (bbtests.BitbakeTests.test_image_manifest)
2023-11-16 00:19:05,060 - oe-selftest - INFO - ... FAIL
2023-11-16 00:19:05,060 - oe-selftest - INFO - Traceback (most recent call last):
File "/OE/build/poky/meta/lib/oeqa/selftest/cases/bbtests.py", line 139, in test_image_manifest
self.assertTrue(os.path.islink(manifest), msg="No manifest file created for image. It should have been created in %s" % manifest)
AssertionError: False is not true : No manifest file created for image. It should have been created in /OE/build/poky/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs--1.0-r0-20110405230000.manifest[YOCTO #12937]
--- meta/lib/oeqa/selftest/cases/bbtests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oeqa/selftest/cases/bbtests.py +1 -1
@@ -136,7 +136,7 @@ class BitbakeTests(OESelftestTestCase): deploydir = bb_vars["DEPLOY_DIR_IMAGE"] imagename = bb_vars["IMAGE_LINK_NAME"] manifest = os.path.join(deploydir, imagename + ".manifest") - self.assertTrue(os.path.islink(manifest), msg="No manifest file created for image. It should have been created in %s" % manifest) + self.assertTrue(os.path.isfile(manifest), msg="No manifest file created for image. It should have been created in %s" % manifest) def test_invalid_recipe_src_uri(self): data = 'SRC_URI = "file://invalid"'
Signature · 1 line
2.43.0
PATCH 11/21 oeqa: wic: use just isfile() instead of islink()
In reply to Martin Jansa* with [YOCTO #12937] changes the manifest is hardlink not symlink
* fixes:
2023-11-18 23:48:55,695 - oe-selftest - INFO - ... FAIL
2023-11-18 23:48:55,696 - oe-selftest - INFO - Traceback (most recent call last):
File "/OE/build/poky/meta/lib/oeqa/core/decorator/__init__.py", line 35, in wrapped_f
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/OE/build/poky/meta/lib/oeqa/selftest/cases/wic.py", line 836, in test_wic_image_type
self.assertTrue(os.path.islink(path), msg="Link %s wasn't generated as expected" % path)
AssertionError: False is not true : Link tmp/deploy/images/qemux86-64/wic-image-minimal-qemux86-64.rootfs--1.0-r0-20110405230000.wic wasn't generated as expected
---
meta/lib/oeqa/selftest/cases/wic.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)meta/lib/oeqa/selftest/cases/wic.py +1 -1
@@ -833,7 +833,7 @@ class Wic2(WicTestCase): # pointing to existing files for suffix in ('wic', 'manifest'): path = prefix + suffix - self.assertTrue(os.path.islink(path), msg="Link %s wasn't generated as expected" % path) + self.assertTrue(os.path.isfile(path), msg="Link %s wasn't generated as expected" % path) self.assertTrue(os.path.isfile(os.path.realpath(path)), msg="File linked to by %s wasn't generated as expected" % path) # TODO this should work on aarch64
Signature · 1 line
2.43.0
PATCH 12/21 linux-dummy: add do_deploy_links task
In reply to Martin Jansa* fixes containerimage.ContainerImageTests.test_expected_files oeqa test failing with:
Initialising tasks...ERROR: Task do_build in /OE/build/poky/build-st/meta-selftest/recipes-test/container-image/container-test-image.bb depends upon non-existent task do_deploy_links in /OE/build/poky/meta/recipes-kernel/linux/linux-dummy.bb
[YOCTO #12937]
--- meta/recipes-kernel/linux/linux-dummy.bb | 5 +++++ 1 file changed, 5 insertions(+)
meta/recipes-kernel/linux/linux-dummy.bb +5 -0
@@ -60,7 +60,12 @@ do_deploy() { : } +do_deploy_links() { + : +} + addtask bundle_initramfs after do_install before do_deploy addtask deploy after do_install +addtask deploy_links after do_deploy addtask shared_workdir after do_compile before do_install addtask compile_kernelmodules
Signature · 1 line
2.43.0
PATCH 13/21 kernel.bbclass: inherit KERNEL_CLASSES at the end
In reply to Martin Jansa* after defining deploy-links task, so that e.g. kernel-fitimage can append to it like kernel-devicetree.bbclass
[YOCTO #12937]
--- meta/classes-recipe/kernel.bbclass | 34 +++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-)
meta/classes-recipe/kernel.bbclass +17 -17
@@ -156,23 +156,6 @@ set -e d.appendVarFlag('do_configure', 'depends', ' ${INITRAMFS_TASK}') } -# Here we pull in all various kernel image types which we support. -# -# In case you're wondering why kernel.bbclass inherits the other image -# types instead of the other way around, the reason for that is to -# maintain compatibility with various currently existing meta-layers. -# By pulling in the various kernel image types here, we retain the -# original behavior of kernel.bbclass, so no meta-layers should get -# broken. -# -# KERNEL_CLASSES by default pulls in kernel-uimage.bbclass, since this -# used to be the default behavior when only uImage was supported. This -# variable can be appended by users who implement support for new kernel -# image types. - -KERNEL_CLASSES ?= " kernel-uimage " -inherit ${KERNEL_CLASSES} - # Old style kernels may set ${S} = ${WORKDIR}/git for example # We need to move these over to STAGING_KERNEL_DIR. We can't just # create the symlink in advance as the git fetcher can't cope with
@@ -892,3 +875,20 @@ EXPORT_FUNCTIONS do_deploy do_deploy_links # Add using Device Tree support inherit kernel-devicetree + +# Here we pull in all various kernel image types which we support. +# +# In case you're wondering why kernel.bbclass inherits the other image +# types instead of the other way around, the reason for that is to +# maintain compatibility with various currently existing meta-layers. +# By pulling in the various kernel image types here, we retain the +# original behavior of kernel.bbclass, so no meta-layers should get +# broken. +# +# KERNEL_CLASSES by default pulls in kernel-uimage.bbclass, since this +# used to be the default behavior when only uImage was supported. This +# variable can be appended by users who implement support for new kernel +# image types. + +KERNEL_CLASSES ?= " kernel-uimage " +inherit ${KERNEL_CLASSES}
Signature · 1 line
2.43.0
PATCH 14/21 image.bbclass: don't append -dbg suffix twice
In reply to Martin Jansa* now with IMAGE_LINK_NAME defined based on IMAGE_NAME we don't want to append -dbg to IMAGE_NAME and then again to IMAGE_LINK_NAME
* this resulted in filename like:
core-image-minimal-qemux86-64.rootfs-dbg--1.0-r0-20110405230000-dbg.tar.bz2
[YOCTO #12937]
--- meta/classes-recipe/image.bbclass | 2 -- 1 file changed, 2 deletions(-)
meta/classes-recipe/image.bbclass +0 -2
@@ -338,8 +338,6 @@ addtask do_image_qa_setscene def setup_debugfs_variables(d): d.appendVar('IMAGE_ROOTFS', '-dbg') - if d.getVar('IMAGE_LINK_NAME'): - d.appendVar('IMAGE_LINK_NAME', '-dbg') d.appendVar('IMAGE_NAME','-dbg') d.setVar('IMAGE_BUILDING_DEBUGFS', 'true') debugfs_image_fstypes = d.getVar('IMAGE_FSTYPES_DEBUGFS')
Signature · 1 line
2.43.0
PATCH 15/21 oeqa: imagefeatures: append -dbg suffix at the end of IMAGE_NAME not IMAGE_LINK_NAME
In reply to Martin Jansa* the filename is constructed as:
meta/classes-recipe/image.bbclass: d.appendVar('IMAGE_NAME','-dbg')
and IMAGE_LINK_NAME adds ${IMAGE_VERSION_SUFFIX} _after_ this
[YOCTO #12937]
--- meta/lib/oeqa/selftest/cases/imagefeatures.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/lib/oeqa/selftest/cases/imagefeatures.py +2 -2
@@ -288,9 +288,9 @@ SKIP_RECIPE[busybox] = "Don't build this" self.write_config(features) bitbake(image) - bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_LINK_NAME'], image) + bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_NAME'], image) - dbg_tar_file = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s-dbg.%s" % (bb_vars['IMAGE_LINK_NAME'], image_fstypes_debugfs)) + dbg_tar_file = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s-dbg.%s" % (bb_vars['IMAGE_NAME'], image_fstypes_debugfs)) self.assertTrue(os.path.exists(dbg_tar_file), 'debug filesystem not generated at %s' % dbg_tar_file) result = runCmd('cd %s; tar xvf %s' % (bb_vars['DEPLOY_DIR_IMAGE'], dbg_tar_file)) self.assertEqual(result.status, 0, msg='Failed to extract %s: %s' % (dbg_tar_file, result.output))
Signature · 1 line
2.43.0
PATCH 16/21 oeqa: gdbserver: append -dbg suffix at the end of IMAGE_NAME not IMAGE_LINK_NAME
In reply to Martin Jansa* the filename is constructed as:
meta/classes-recipe/image.bbclass: d.appendVar('IMAGE_NAME','-dbg')
and IMAGE_LINK_NAME adds ${IMAGE_VERSION_SUFFIX} _after_ this
[YOCTO #12937]
--- meta/lib/oeqa/selftest/cases/gdbserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
meta/lib/oeqa/selftest/cases/gdbserver.py +3 -3
@@ -34,12 +34,12 @@ CORE_IMAGE_EXTRA_INSTALL = "gdbserver" self.assertEqual(r.status, 0) self.assertIn("GNU gdb", r.output) image = 'core-image-minimal' - bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_LINK_NAME'], image) + bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_NAME'], image) with tempfile.TemporaryDirectory(prefix="debugfs-") as debugfs: - filename = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s-dbg.tar.bz2" % bb_vars['IMAGE_LINK_NAME']) + filename = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s-dbg.tar.bz2" % bb_vars['IMAGE_NAME']) shutil.unpack_archive(filename, debugfs) - filename = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s.tar.bz2" % bb_vars['IMAGE_LINK_NAME']) + filename = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s.tar.bz2" % bb_vars['IMAGE_NAME']) shutil.unpack_archive(filename, debugfs) with runqemu("core-image-minimal", runqemuparams="nographic") as qemu:
Signature · 1 line
2.43.0
PATCH 17/21 oeqa: fitimage: respect KERNEL_FIT_NAME
In reply to Martin Jansa* avoid couple of get_bb_var calls and use get_bb_vars instead
* use KERNEL_FIT_LINK_NAME instead of assuming it's MACHINE as e.g.:
machine = get_bb_var('MACHINE')
fitimage_its_path = os.path.join(deploy_dir_image,
"fitImage-its-%s-%s-%s" % (image_type, machine, machine))
* be aware that KERNEL_FIT_LINK_NAME can still be set to empty and then this oeqa check would fail again, because this hardlink:
ln -vf $deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_NAME}.its "$deployDir/fitImage-its-${INITRAMFS_IMAGE_NAME}${KERNEL_FIT_LINK_NAME}" wouldn't be created and also with KERNEL_FIT_LINK_NAME the PKGV in kernel recipe looks differently in the final kernel artifact and KERNEL_FIT_LINK_NAME e.g.:
AssertionError: False is not true:
tmp/deploy/images/beaglebone-yocto/fitImage-its-core-image-minimal-initramfs-beaglebone-yocto-beaglebone-yocto--6.1.20+git-r0-20230318024804 image tree source doesn't exist
because it's actually named with SRCPV expanded:
tmp/deploy/images/beaglebone-yocto/fitImage-its-core-image-minimal-initramfs-beaglebone-yocto-beaglebone-yocto--6.1.20+git0+29ec3dc6f4_423e199669-r0-20230318024804
Use KERNEL_FIT_NAME instead of KERNEL_FIT_LINK_NAME but then we would need to add .its extension to expected filenames as well, but in previous commit I've added KERNEL_FIT_ITS_EXT variable and used it for links as well. But this doesn't apply for u-boot-its* files which don't use any extension.
[YOCTO #12937]
--- meta/lib/oeqa/selftest/cases/fitimage.py | 98 ++++++++++++------------ 1 file changed, 48 insertions(+), 50 deletions(-)
meta/lib/oeqa/selftest/cases/fitimage.py +48 -50
@@ -5,7 +5,7 @@ # from oeqa.selftest.case import OESelftestTestCase -from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars +from oeqa.utils.commands import runCmd, bitbake, get_bb_vars import os import re
@@ -46,12 +46,12 @@ FIT_DESC = "A model description" # fitImage is created as part of linux recipe image = "virtual/kernel" bitbake(image) - bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'INITRAMFS_IMAGE_NAME', 'KERNEL_FIT_LINK_NAME'], image) + bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'INITRAMFS_IMAGE_NAME', 'KERNEL_FIT_NAME', 'KERNEL_FIT_ITS_EXT', 'KERNEL_FIT_BIN_EXT'], image) fitimage_its_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], - "fitImage-its-%s-%s" % (bb_vars['INITRAMFS_IMAGE_NAME'], bb_vars['KERNEL_FIT_LINK_NAME'])) + "fitImage-its-%s%s%s" % (bb_vars['INITRAMFS_IMAGE_NAME'], bb_vars['KERNEL_FIT_NAME'], bb_vars['KERNEL_FIT_ITS_EXT'])) fitimage_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], - "fitImage-%s-%s" % (bb_vars['INITRAMFS_IMAGE_NAME'], bb_vars['KERNEL_FIT_LINK_NAME'])) + "fitImage-%s%s%s" % (bb_vars['INITRAMFS_IMAGE_NAME'], bb_vars['KERNEL_FIT_NAME'], bb_vars['KERNEL_FIT_BIN_EXT'])) self.assertTrue(os.path.exists(fitimage_its_path), "%s image tree source doesn't exist" % (fitimage_its_path))
@@ -126,12 +126,12 @@ UBOOT_MKIMAGE_SIGN_ARGS = "-c 'a smart comment'" # fitImage is created as part of linux recipe image = "virtual/kernel" bitbake(image) - bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'KERNEL_FIT_LINK_NAME'], image) + bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'KERNEL_FIT_NAME', 'KERNEL_FIT_ITS_EXT', 'KERNEL_FIT_BIN_EXT'], image) fitimage_its_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], - "fitImage-its-%s" % (bb_vars['KERNEL_FIT_LINK_NAME'])) + "fitImage-its%s%s" % (bb_vars['KERNEL_FIT_NAME'], bb_vars['KERNEL_FIT_ITS_EXT'])) fitimage_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], - "fitImage-%s.bin" % (bb_vars['KERNEL_FIT_LINK_NAME'])) + "fitImage%s%s" % (bb_vars['KERNEL_FIT_NAME'], bb_vars['KERNEL_FIT_BIN_EXT'])) self.assertTrue(os.path.exists(fitimage_its_path), "%s image tree source doesn't exist" % (fitimage_its_path))
@@ -278,14 +278,14 @@ FIT_SIGN_INDIVIDUAL = "1" self.write_config(config) # The U-Boot fitImage is created as part of the U-Boot recipe - bitbake("virtual/bootloader") + image = "virtual/bootloader" + bitbake(image) + bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'KERNEL_FIT_NAME'], image) - deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE') - machine = get_bb_var('MACHINE') - fitimage_its_path = os.path.join(deploy_dir_image, - "u-boot-its-%s" % (machine,)) - fitimage_path = os.path.join(deploy_dir_image, - "u-boot-fitImage-%s" % (machine,)) + fitimage_its_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], + "u-boot-its%s" % (bb_vars['KERNEL_FIT_NAME'])) + fitimage_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], + "u-boot-fitImage%s" % (bb_vars['KERNEL_FIT_NAME'])) self.assertTrue(os.path.exists(fitimage_its_path), "%s image tree source doesn't exist" % (fitimage_its_path))
@@ -363,14 +363,14 @@ UBOOT_MKIMAGE_SIGN_ARGS = "-c 'a smart U-Boot comment'" self.write_config(config) # The U-Boot fitImage is created as part of the U-Boot recipe - bitbake("virtual/bootloader") + image = "virtual/bootloader" + bitbake(image) + bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'KERNEL_FIT_NAME'], image) - deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE') - machine = get_bb_var('MACHINE') - fitimage_its_path = os.path.join(deploy_dir_image, - "u-boot-its-%s" % (machine,)) - fitimage_path = os.path.join(deploy_dir_image, - "u-boot-fitImage-%s" % (machine,)) + fitimage_its_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], + "u-boot-its%s" % (bb_vars['KERNEL_FIT_NAME'])) + fitimage_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], + "u-boot-fitImage%s" % (bb_vars['KERNEL_FIT_NAME'])) self.assertTrue(os.path.exists(fitimage_its_path), "%s image tree source doesn't exist" % (fitimage_its_path))
@@ -454,15 +454,14 @@ UBOOT_FIT_HASH_ALG = "sha256" self.write_config(config) # The U-Boot fitImage is created as part of the U-Boot recipe - bitbake("virtual/bootloader") + image = "virtual/bootloader" + bitbake(image) + bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'KERNEL_FIT_NAME'], image) - image_type = "core-image-minimal" - deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE') - machine = get_bb_var('MACHINE') - fitimage_its_path = os.path.join(deploy_dir_image, - "u-boot-its-%s" % (machine,)) - fitimage_path = os.path.join(deploy_dir_image, - "u-boot-fitImage-%s" % (machine,)) + fitimage_its_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], + "u-boot-its%s" % (bb_vars['KERNEL_FIT_NAME'])) + fitimage_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], + "u-boot-fitImage%s" % (bb_vars['KERNEL_FIT_NAME'])) self.assertTrue(os.path.exists(fitimage_its_path), "%s image tree source doesn't exist" % (fitimage_its_path))
@@ -609,15 +608,14 @@ FIT_SIGN_INDIVIDUAL = "1" self.write_config(config) # The U-Boot fitImage is created as part of the U-Boot recipe - bitbake("virtual/bootloader") + image = "virtual/bootloader" + bitbake(image) + bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'KERNEL_FIT_NAME'], image) - image_type = "core-image-minimal" - deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE') - machine = get_bb_var('MACHINE') - fitimage_its_path = os.path.join(deploy_dir_image, - "u-boot-its-%s" % (machine,)) - fitimage_path = os.path.join(deploy_dir_image, - "u-boot-fitImage-%s" % (machine,)) + fitimage_its_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], + "u-boot-its%s" % (bb_vars['KERNEL_FIT_NAME'])) + fitimage_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], + "u-boot-fitImage%s" % (bb_vars['KERNEL_FIT_NAME'])) self.assertTrue(os.path.exists(fitimage_its_path), "%s image tree source doesn't exist" % (fitimage_its_path))
@@ -753,26 +751,26 @@ FIT_HASH_ALG = "sha256" self.write_config(config) # fitImage is created as part of linux recipe - bitbake("virtual/kernel") + image = "virtual/kernel" + bitbake(image) + bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'INITRAMFS_IMAGE_NAME', 'KERNEL_FIT_NAME', 'KERNEL_FIT_ITS_EXT', 'KERNEL_FIT_BIN_EXT'], image) - image_type = get_bb_var('INITRAMFS_IMAGE') - deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE') - machine = get_bb_var('MACHINE') - fitimage_its_path = os.path.join(deploy_dir_image, - "fitImage-its-%s-%s-%s" % (image_type, machine, machine)) - fitimage_path = os.path.join(deploy_dir_image,"fitImage") + fitimage_its_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], + "fitImage-its-%s%s%s" % (bb_vars['INITRAMFS_IMAGE_NAME'], bb_vars['KERNEL_FIT_NAME'], bb_vars['KERNEL_FIT_ITS_EXT'])) + fitimage_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "fitImage") self.assertTrue(os.path.exists(fitimage_its_path), "%s image tree source doesn't exist" % (fitimage_its_path)) self.assertTrue(os.path.exists(fitimage_path), "%s FIT image doesn't exist" % (fitimage_path)) - kernel_load = str(get_bb_var('UBOOT_LOADADDRESS')) - kernel_entry = str(get_bb_var('UBOOT_ENTRYPOINT')) - kernel_type = str(get_bb_var('UBOOT_MKIMAGE_KERNEL_TYPE')) - kernel_compression = str(get_bb_var('FIT_KERNEL_COMP_ALG')) - uboot_arch = str(get_bb_var('UBOOT_ARCH')) - fit_hash_alg = str(get_bb_var('FIT_HASH_ALG')) + bb_vars = get_bb_vars(['UBOOT_LOADADDRESS', 'UBOOT_ENTRYPOINT', 'UBOOT_MKIMAGE_KERNEL_TYPE', 'FIT_KERNEL_COMP_ALG', 'UBOOT_ARCH', 'FIT_HASH_ALG'], image) + kernel_load = str(bb_vars['UBOOT_LOADADDRESS']) + kernel_entry = str(bb_vars['UBOOT_ENTRYPOINT']) + kernel_type = str(bb_vars['UBOOT_MKIMAGE_KERNEL_TYPE']) + kernel_compression = str(bb_vars['FIT_KERNEL_COMP_ALG']) + uboot_arch = str(bb_vars['UBOOT_ARCH']) + fit_hash_alg = str(bb_vars['FIT_HASH_ALG']) its_file = open(fitimage_its_path)
Signature · 1 line
2.43.0
PATCH 18/21 selftest: multiconfig-image-packager: use IMAGE_NAME instead of IMAGE_LINK_NAME
In reply to Martin Jansa* the IMAGE_LINK_NAME now contains PKGV, PKGR in the filename, but the multiconfig-image-packager and MC_DEPLOY_IMAGE_BASENAME (e.g. core-image-minimal) has different PKGV value causing:
| DEBUG: Executing shell function do_install
| install: cannot stat 'tmp-mc-musl/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs--0.1-r0-20110405230000.ext4': No such file or directory
...
| install: cannot stat 'tmp-mc-tiny/deploy/images/qemux86/core-image-minimal-qemux86.rootfs--0.1-r0-20110405230000.cpio.gz': No such file or directory
because the actual filenames are:
tmp-mc-musl/deploy/images/qemux86-64/core-image-minimal-qemux86-64.rootfs--1.0-r0-20110405230000.ext4 tmp-mc-tiny/deploy/images/qemux86/core-image-minimal-qemux86.rootfs--1.0-r0-20110405230000.ext4
[YOCTO #12937]
--- .../multiconfig/multiconfig-image-packager_0.1.bb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb +6 -6
@@ -13,11 +13,11 @@ do_install[mcdepends] += "mc::${MCNAME}:core-image-minimal:do_image_complete mc: do_install () { install -d ${D}/var/lib/machines/${MCNAME} - install ${MC_DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME_CORE_IMAGE_MINIMAL}.${MCIMGTYPE} ${D}/var/lib/machines/${MCNAME}/${MC_DEPLOY_IMAGE_BASENAME}.${MCIMGTYPE} + install ${MC_DEPLOY_DIR_IMAGE}/${IMAGE_NAME_CORE_IMAGE_MINIMAL}.${MCIMGTYPE} ${D}/var/lib/machines/${MCNAME}/${MC_DEPLOY_IMAGE_BASENAME}.${MCIMGTYPE} install ${MC_DEPLOY_DIR_IMAGE}/bzImage ${D}/var/lib/machines/${MCNAME} } -# for IMAGE_LINK_NAME, IMAGE_BASENAME +# for IMAGE_NAME, IMAGE_BASENAME inherit image-artifact-names python () {
@@ -31,14 +31,14 @@ python () { # these will most likely start with my BPN multiconfig-image-packager, but I want them from core-image-minimal # as there is no good way to query core-image-minimal's context lets assume that there are no overrides # and that we can just replace IMAGE_BASENAME - image_link_name = d.getVar('IMAGE_LINK_NAME') + image_name = d.getVar('IMAGE_NAME') image_basename = d.getVar('IMAGE_BASENAME') machine = d.getVar('MACHINE') mcmachine = d.getVar('MCMACHINE') image_to_deploy = d.getVar('MC_DEPLOY_IMAGE_BASENAME') - image_link_name_to_deploy = image_link_name.replace(image_basename, image_to_deploy).replace(machine, mcmachine) - bb.warn('%s: assuming that "%s" built for "%s" has IMAGE_LINK_NAME "%s"' % (d.getVar('PN'), mcmachine, image_to_deploy, image_link_name_to_deploy)) - d.setVar('IMAGE_LINK_NAME_CORE_IMAGE_MINIMAL', image_link_name_to_deploy) + image_name_to_deploy = image_name.replace(image_basename, image_to_deploy).replace(machine, mcmachine) + bb.warn('%s: assuming that "%s" built for "%s" has IMAGE_NAME "%s"' % (d.getVar('PN'), mcmachine, image_to_deploy, image_name_to_deploy)) + d.setVar('IMAGE_NAME_CORE_IMAGE_MINIMAL', image_name_to_deploy) } BBCLASSEXTEND = "mcextend:tiny mcextend:musl"
Signature · 1 line
2.43.0
PATCH 19/21 image.bbclass: remove hardlinks as well
In reply to Martin Jansa* it was removing only destination symlinks, but sometimes hardlink might be regenerated as well, e.g. in oeqa test wic.Wic.test_permissions which was failing with:
NOTE: recipe core-image-minimal-1.0-r0: task do_image_wic: Started
ERROR: core-image-minimal-1.0-r0 do_image_wic: Error executing a python function in exec_func_python() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:create_hardlinks(d)
0003:
File: '/OE/build/poky/meta/classes-recipe/image.bbclass', lineno: 606, function: create_hardlinks
0602: if os.path.exists(src):
0603: bb.note("Creating hardlink: %s -> %s" % (dst, src))
0604: if os.path.islink(dst):
0605: os.remove(dst)
*** 0606: os.link(src, dst)
0607: else:
0608: bb.note("Skipping hardlink, source does not exist: %s -> %s" % (dst, src))
0609:}
0610:Exception: FileExistsError: [Errno 17] File exists: 'tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/deploy-core-image-minimal-image-complete/core-image-minimal-qemux86-64.rootfs.wic' -> 'tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/deploy-core-image-minimal-image-complete/core-image-minimal-qemux86-64.rootfs--1.0-r0-20110405230000.wic'
[YOCTO #12937]
--- meta/classes-recipe/image.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes-recipe/image.bbclass +1 -1
@@ -601,7 +601,7 @@ python create_hardlinks() { src = os.path.join(deploy_dir, img_name + "." + type) if os.path.exists(src): bb.note("Creating hardlink: %s -> %s" % (dst, src)) - if os.path.islink(dst): + if os.path.isfile(dst): os.remove(dst) os.link(src, dst) else:
Signature · 1 line
2.43.0
PATCH 20/21 populate_sdk_ext.bbclass: add *:do_shared_workdir to BB_SETSCENE_ENFORCE_IGNORE_TASKS
In reply to Martin Jansa* otherwise populate_sdk_ext task will fail as shown e.g. with:
bitbake core-image-minimal -c populate_sdk_ext esdk.oeSDKExtSelfTest.test_image_generation_binary_feeds esdk.oeSDKExtSelfTest.test_install_libraries_headers:
ERROR: Task linux-yocto.do_deploy_links attempted to execute unexpectedly
Task tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/sdk-ext/image/tmp-renamed-sdk/layers/poky/meta/recipes-core/images/core-image-minimal.bb:do_image_qa, unihash 9d177d4c6ca34e68e19b1bc23deec58c3eabe5f9d5808f90402161163a73f22f, taskhash 9d177d4c6ca34e68e19b1bc23deec58c3eabe5f9d5808f90402161163a73f22f Task tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/sdk-ext/image/tmp-renamed-sdk/layers/poky/meta/recipes-core/images/core-image-minimal.bb:do_image_complete, unihash 0aff4dcbdb3c5ca68e0ebb39457fbe86beb3482986ddfe0b0b6fc0386807edbf, taskhash 0aff4dcbdb3c5ca68e0ebb39457fbe86beb3482986ddfe0b0b6fc0386807edbf This is usually due to missing setscene tasks. Those missing in this build were: {'tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/sdk-ext/image/tmp-renamed-sdk/layers/poky/meta/recipes-core/images/core-image-minimal.bb:do_image_complete',
'tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/sdk-ext/image/tmp-renamed-sdk/layers/poky/meta/recipes-core/images/core-image-minimal.bb:do_image_qa'}
ERROR: Task (tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/sdk-ext/image/tmp-renamed-sdk/layers/poky/meta/recipes-kernel/linux/linux-yocto_6.5.bb:do_deploy_links) failed with exit code 'setscene ignore_tasks'
NOTE: Tasks Summary: Attempted 4975 tasks of which 4971 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/sdk-ext/image/tmp-renamed-sdk/layers/poky/meta/recipes-kernel/linux/linux-yocto_6.5.bb:do_deploy_links
Summary: There was 1 WARNING message.
Summary: There was 1 ERROR message, returning a non-zero exit code.
ERROR: Logfile of failure stored in: tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/temp/log.do_populate_sdk_ext.2280835
NOTE: recipe core-image-minimal-1.0-r0: task do_populate_sdk_ext: Failed
ERROR: Task (/OE/build/poky/meta/recipes-core/images/core-image-minimal.bb:do_populate_sdk_ext) failed with exit code '1'
NOTE: Tasks Summary: Attempted 6211 tasks of which 6147 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/OE/build/poky/meta/recipes-core/images/core-image-minimal.bb:do_populate_sdk_ext
Summary: There was 1 ERROR message, returning a non-zero exit code.
[YOCTO #12937]
--- meta/classes-recipe/populate_sdk_ext.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes-recipe/populate_sdk_ext.bbclass +1 -1
@@ -366,7 +366,7 @@ def write_local_conf(d, baseoutpath, derivative, core_meta_subdir, uninative_che f.write('BB_HASHCONFIG_IGNORE_VARS:append = " SIGGEN_UNLOCKED_RECIPES"\n\n') # Set up which tasks are ignored for run on install - f.write('BB_SETSCENE_ENFORCE_IGNORE_TASKS = "%:* *:do_shared_workdir *:do_rm_work wic-tools:* *:do_addto_recipe_sysroot"\n\n') + f.write('BB_SETSCENE_ENFORCE_IGNORE_TASKS = "%:* *:do_shared_workdir *:do_rm_work *:do_deploy_links wic-tools:* *:do_addto_recipe_sysroot"\n\n') # Hide the config information from bitbake output (since it's fixed within the SDK) f.write('BUILDCFG_HEADER = ""\n\n')
Signature · 1 line
2.43.0
Re: [OE-core] [PATCH 20/21] populate_sdk_ext.bbclass: add *:do_shared_workdir to BB_SETSCENE_ENFORCE_IGNORE_TASKS
Quoted 8 lines · Martin Jansa
meta/classes-recipe/populate_sdk_ext.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/classes-recipe/populate_sdk_ext.bbclass +0
-0
meta/classes-recipe/populate_sdk_ext.bbclass def write_local_conf(d, baseoutpath, derivative, core_meta_subdir, uninative_che · line 372
Quoted 8 lines
meta/classes-recipe/populate_sdk_ext.bbclass +1
-1@@ -366,7 +366,7 @@ def write_local_conf(d, baseoutpath, derivative, core_meta_subdir, uninative_che f.write('BB_HASHCONFIG_IGNORE_VARS:append = " SIGGEN_UNLOCKED_RECIPES"\n\n') # Set up which tasks are ignored for run on install - f.write('BB_SETSCENE_ENFORCE_IGNORE_TASKS = "%:* *:do_shared_workdir *:do_rm_work wic-tools:* *:do_addto_recipe_sysroot"\n\n') + f.write('BB_SETSCENE_ENFORCE_IGNORE_TASKS = "%:* *:do_shared_workdir *:do_rm_work *:do_deploy_links wic-tools:* *:do_addto_recipe_sysroot"\n\n') # Hide the config information from bitbake output (since it's fixed within the SDK) f.write('BUILDCFG_HEADER = ""\n\n')
The subject says "add do_shared_workdir" but the code change is actually "add do_deploy_links".
This caught my eye in my inbox as the shared_workdir task can be painful!
Cheers,
Richard
PATCH 21/21 u-boot.inc: don't replace the binary with symlink
In reply to Martin Jansa* when UBOOT_ARTIFACT_NAME and UBOOT_ARTIFACT_LINK_NAME are empty the UBOOT_BINARYNAME and UBOOT_IMAGE might be indentical and the binary gets overwritten by the symlink to itself (similarly for SPL_*)
$ ls -lah /OE/build/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/u-boot/2023.10/package/boot total 8.0K drwxr-xr-x 2 martin martin 4.0K Nov 21 21:23 . drwxr-xr-x 4 martin martin 4.0K Nov 21 21:23 .. lrwxrwxrwx 1 martin martin 3 Nov 21 21:23 MLO -> MLO lrwxrwxrwx 1 martin martin 10 Nov 21 21:23 u-boot.bin -> u-boot.bin
* which causes:
ERROR: u-boot-1_2023.10-r0 do_package: Error executing a python function in exec_func_python() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:do_package(d)
0003:
File: '/OE/build/poky/meta/classes-global/package.bbclass', lineno: 536, function: do_package
0532: bb.build.exec_func("package_prepare_pkgdata", d)
0533: bb.build.exec_func("perform_packagecopy", d)
0534: for f in (d.getVar('PACKAGE_PREPROCESS_FUNCS') or '').split():
0535: bb.build.exec_func(f, d)
*** 0536: oe.package.process_split_and_strip_files(d)
0537: oe.package.fixup_perms(d)
0538:
0539: ###########################################################################
0540: # Split up PKGD into PKGDEST
File: '/OE/build/poky/meta/lib/oe/package.py', lineno: 1073, function: process_split_and_strip_files
1069: staticlibs.append(file)
1070: continue
1071:
1072: try: *** 1073: ltarget = cpath.realpath(file, dvar, False)
1074: s = cpath.lstat(ltarget)
1075: except OSError as e:
1076: (err, strerror) = e.args
1077: if err != errno.ENOENT:
File: '/OE/build/poky/meta/lib/oe/cachedpath.py', lineno: 231, function: realpath
0227: if e.errno == errno.ELOOP:
0228: # make ELOOP more readable; without catching it, there will
0229: # be printed a backtrace with 100s of OSError exceptions
0230: # else
*** 0231: raise OSError(errno.ELOOP,
0232: "too much recursions while resolving '%s'; loop in '%s'" %
0233: (file, e.strerror))
0234:
0235: raise
Exception: OSError: [Errno 40] too much recursions while resolving '/OE/build/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/u-boot/2023.10/package/boot/MLO'; loop in '/OE/build/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/u-boot/2023.10/package/boot/MLO'
ERROR: Logfile of failure stored in: /OE/build/poky/build/tmp/work/qemuarm-poky-linux-gnueabi/u-boot/2023.10/temp/log.do_package.3990391
[YOCTO #12937]
--- meta/classes-recipe/uboot-sign.bbclass | 24 ++++++++++----------- meta/recipes-bsp/u-boot/u-boot.inc | 29 +++++++++++++++++++------- 2 files changed, 34 insertions(+), 19 deletions(-)
meta/classes-recipe/uboot-sign.bbclass +12 -12
@@ -420,24 +420,24 @@ do_deploy:prepend() { fi if [ "${UBOOT_SIGN_ENABLE}" = "1" -a -n "${UBOOT_DTB_BINARY}" ] ; then - ln -vf ${DEPLOYDIR}/${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${UBOOT_DTB_BINARY} - ln -vf ${DEPLOYDIR}/${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${UBOOT_DTB_LINK} - ln -vf ${DEPLOYDIR}/${UBOOT_NODTB_IMAGE} ${DEPLOYDIR}/${UBOOT_NODTB_LINK} - ln -vf ${DEPLOYDIR}/${UBOOT_NODTB_IMAGE} ${DEPLOYDIR}/${UBOOT_NODTB_BINARY} + [ "${UBOOT_DTB_IMAGE}" != "${UBOOT_DTB_BINARY}" ] && ln -vf ${DEPLOYDIR}/${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${UBOOT_DTB_BINARY} + [ "${UBOOT_DTB_IMAGE}" != "${UBOOT_DTB_LINK}" ] && ln -vf ${DEPLOYDIR}/${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${UBOOT_DTB_LINK} + [ "${UBOOT_NODTB_IMAGE}" != "${UBOOT_NODTB_LINK}" ] && ln -vf ${DEPLOYDIR}/${UBOOT_NODTB_IMAGE} ${DEPLOYDIR}/${UBOOT_NODTB_LINK} + [ "${UBOOT_NODTB_IMAGE}" != "${UBOOT_NODTB_BINARY}" ] && ln -vf ${DEPLOYDIR}/${UBOOT_NODTB_IMAGE} ${DEPLOYDIR}/${UBOOT_NODTB_BINARY} fi if [ "${UBOOT_FITIMAGE_ENABLE}" = "1" ] ; then - ln -vf ${DEPLOYDIR}/${UBOOT_ITS_IMAGE} ${DEPLOYDIR}/${UBOOT_ITS} - ln -vf ${DEPLOYDIR}/${UBOOT_ITS_IMAGE} ${DEPLOYDIR}/${UBOOT_ITS_LINK} - ln -vf ${DEPLOYDIR}/${UBOOT_FITIMAGE_IMAGE} ${DEPLOYDIR}/${UBOOT_FITIMAGE_BINARY} - ln -vf ${DEPLOYDIR}/${UBOOT_FITIMAGE_IMAGE} ${DEPLOYDIR}/${UBOOT_FITIMAGE_LINK} + [ "${UBOOT_ITS_IMAGE}" != "${UBOOT_ITS}" ] && ln -vf ${DEPLOYDIR}/${UBOOT_ITS_IMAGE} ${DEPLOYDIR}/${UBOOT_ITS} + [ "${UBOOT_ITS_IMAGE}" != "${UBOOT_ITS_LINK}" ] && ln -vf ${DEPLOYDIR}/${UBOOT_ITS_IMAGE} ${DEPLOYDIR}/${UBOOT_ITS_LINK} + [ "${UBOOT_FITIMAGE_IMAGE}" != "${UBOOT_FITIMAGE_BINARY}" ] && ln -vf ${DEPLOYDIR}/${UBOOT_FITIMAGE_IMAGE} ${DEPLOYDIR}/${UBOOT_FITIMAGE_BINARY} + [ "${UBOOT_FITIMAGE_IMAGE}" != "${UBOOT_FITIMAGE_LINK}" ] && ln -vf ${DEPLOYDIR}/${UBOOT_FITIMAGE_IMAGE} ${DEPLOYDIR}/${UBOOT_FITIMAGE_LINK} fi if [ "${SPL_SIGN_ENABLE}" = "1" -a -n "${SPL_DTB_BINARY}" ] ; then - ln -vf ${DEPLOYDIR}/${SPL_DTB_IMAGE} ${DEPLOYDIR}/${SPL_DTB_LINK} - ln -vf ${DEPLOYDIR}/${SPL_DTB_IMAGE} ${DEPLOYDIR}/${SPL_DTB_BINARY} - ln -vf ${DEPLOYDIR}/${SPL_NODTB_IMAGE} ${DEPLOYDIR}/${SPL_NODTB_LINK} - ln -vf ${DEPLOYDIR}/${SPL_NODTB_IMAGE} ${DEPLOYDIR}/${SPL_NODTB_BINARY} + [ "${SPL_DTB_IMAGE}" != "${SPL_DTB_LINK}" ] && ln -vf ${DEPLOYDIR}/${SPL_DTB_IMAGE} ${DEPLOYDIR}/${SPL_DTB_LINK} + [ "${SPL_DTB_IMAGE}" != "${SPL_DTB_BINARY}" ] && ln -vf ${DEPLOYDIR}/${SPL_DTB_IMAGE} ${DEPLOYDIR}/${SPL_DTB_BINARY} + [ "${SPL_NODTB_IMAGE}" != "${SPL_NODTB_LINK}" ] && ln -vf ${DEPLOYDIR}/${SPL_NODTB_IMAGE} ${DEPLOYDIR}/${SPL_NODTB_LINK} + [ "${SPL_NODTB_IMAGE}" != "${SPL_NODTB_BINARY}" ] && ln -vf ${DEPLOYDIR}/${SPL_NODTB_IMAGE} ${DEPLOYDIR}/${SPL_NODTB_BINARY} fi }
meta/recipes-bsp/u-boot/u-boot.inc +22 -7
@@ -113,7 +113,9 @@ do_install () { unset i else install -D -m 644 ${B}/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE} - ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY} + if [ "${UBOOT_IMAGE}" != "${UBOOT_BINARY}" ]; then + ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY} + fi # Install the uboot-initial-env if [ -n "${UBOOT_INITIAL_ENV}" ]; then
@@ -140,7 +142,9 @@ do_install () { unset i else install -m 644 ${B}/${UBOOT_ELF} ${D}/boot/${UBOOT_ELF_IMAGE} - ln -sf ${UBOOT_ELF_IMAGE} ${D}/boot/${UBOOT_ELF_BINARY} + if [ "${UBOOT_ELF_IMAGE}" != "${UBOOT_ELF_BINARY}" ]; then + ln -sf ${UBOOT_ELF_IMAGE} ${D}/boot/${UBOOT_ELF_BINARY} + fi fi fi
@@ -158,6 +162,7 @@ do_install () { if [ $j -eq $i ]; then install -m 644 ${B}/${config}/${SPL_BINARY} ${D}/boot/${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${D}/boot/${SPL_BINARYFILE}-${type} +sd ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${D}/boot/${SPL_BINARYFILE} fi done
@@ -166,13 +171,17 @@ do_install () { unset i else install -m 644 ${B}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE} - ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARYFILE} + if [ "${SPL_IMAGE}" != "${SPL_BINARYFILE}" ]; then + ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARYFILE} + fi fi fi if [ -n "${UBOOT_ENV}" ]; then install -m 644 ${WORKDIR}/${UBOOT_ENV_BINARY} ${D}/boot/${UBOOT_ENV_IMAGE} - ln -sf ${UBOOT_ENV_IMAGE} ${D}/boot/${UBOOT_ENV_BINARY} + if [ "${UBOOT_ENV_IMAGE}" != "${UBOOT_ENV_BINARY}" ]; then + ln -sf ${UBOOT_ENV_IMAGE} ${D}/boot/${UBOOT_ENV_BINARY} + fi fi if [ "${UBOOT_EXTLINUX}" = "1" ]; then
@@ -225,7 +234,9 @@ do_deploy () { unset i else install -D -m 644 ${B}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE} - ln -vf ${DEPLOYDIR}/${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY} + if [ "${UBOOT_IMAGE}" != "${UBOOT_BINARY}" ]; then + ln -vf ${DEPLOYDIR}/${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY} + fi if [ -n "${UBOOT_LINK}" -a "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then ln -vf ${DEPLOYDIR}/${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_LINK}
@@ -296,7 +307,9 @@ do_deploy () { unset i else install -m 644 ${B}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE} - ln -vf ${DEPLOYDIR}/${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARYNAME} + if [ "${SPL_IMAGE}" != "${SPL_BINARYNAME}" ]; then + ln -vf ${DEPLOYDIR}/${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARYNAME} + fi if [ -n "${SPL_LINK}" -a "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then ln -vf ${DEPLOYDIR}/${SPL_IMAGE} ${DEPLOYDIR}/${SPL_LINK} fi
@@ -305,7 +318,9 @@ do_deploy () { if [ -n "${UBOOT_ENV}" ]; then install -m 644 ${WORKDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_IMAGE} - ln -vf ${DEPLOYDIR}${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_BINARY} + if [ "${UBOOT_ENV_IMAGE}" != "${UBOOT_ENV_BINARY}" ]; then + ln -vf ${DEPLOYDIR}${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_BINARY} + fi if [ -n "${UBOOT_ENV_LINK}" -a "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then ln -vf ${DEPLOYDIR}${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_LINK} fi
Signature · 1 line
2.43.0
Quoted 16 lines · Martin Jansa
This is the final part of changes for [YOCTO #12937].
I've run complete selftest with this and didn't see any failures.
Only these 4 fail once, but pass when re-executed (and the same is reproducible here with master):
pkgdata.OePkgdataUtilTests.test_lookup_recipe spdx.SPDXCheck.test_spdx_base_files esdk.oeSDKExtSelfTest.test_image_generation_binary_feeds esdk.oeSDKExtSelfTest.test_install_libraries_headersruntime_test.TestImage.test_testimage_virgl_gtk_sdl and this one needs extra "xhost +local" otherwise fails with:
runqemu - ERROR - Failed to run qemu: Invalid MIT-MAGIC-COOKIE-1 key
qemu-system-x86_64: OpenGL is not supported by the display
Quoted 9 lines
The short description of these changes is that instead of symlinks it creates hardlinks in deploy dir and the kernel
do_deploycreates the artifacts without version suffix and thedo_deploy_linkstask adds those versioned hardlinks (this waydo_deploycan be reused from sstate and only quickdo_deploy_linksis re-executed when theIMAGE_VERSION_SUFFIXchanges - before that if you cannot re-usedo_deployfrom sstate due to different artifact filenames you had to re-run e.g.do_compileas well if you haven't built the same in the same TMPDIR before).
I am a bit worried about this change since there were uses for having the symlinks present and this unconditionally moves everything over to hardlinks.
With the symlink, you can see the pointer quite clearly, with hardlinks, it is unclear which files are duplicates of each other withouth diving into comparing inodes.
Part of the reasoning was due to the way OE used to work where it would stack images, each build would add a new one and it would update the end symlink to point at the latest. Once sstate started removing old entries, that became less needed but the pointers still help runqemu and other tooling find the latest.
This change is trying make the code do something different and it to change versioning and do that in a way which allows maximal reuse from sstate.
Both are valid usages so we gain some things with the change but lose others. I'm not sure how users in general are going to find things overall :/.
Cheers,
Richard
Quoted 27 lines · Richard Purdie
Quoted 16 lines · Martin Jansa
This is the final part of changes for [YOCTO #12937].
I've run complete selftest with this and didn't see any failures.
Only these 4 fail once, but pass when re-executed (and the same is reproducible here with master):
pkgdata.OePkgdataUtilTests.test_lookup_recipe spdx.SPDXCheck.test_spdx_base_files esdk.oeSDKExtSelfTest.test_image_generation_binary_feeds esdk.oeSDKExtSelfTest.test_install_libraries_headersruntime_test.TestImage.test_testimage_virgl_gtk_sdl and this one needs extra "xhost +local" otherwise fails with:
runqemu - ERROR - Failed to run qemu: Invalid MIT-MAGIC-COOKIE-1 key
qemu-system-x86_64: OpenGL is not supported by the displayQuoted 9 lines
The short description of these changes is that instead of symlinks it creates hardlinks in deploy dir and the kernel
do_deploycreates the artifacts without version suffix and thedo_deploy_linkstask adds those versioned hardlinks (this waydo_deploycan be reused from sstate and only quickdo_deploy_linksis re-executed when theIMAGE_VERSION_SUFFIXchanges - before that if you cannot re-usedo_deployfrom sstate due to different artifact filenames you had to re-run e.g.do_compileas well if you haven't built the same in the same TMPDIR before).
Quoted 8 lines
I am a bit worried about this change since there were uses for having the symlinks present and this unconditionally moves everything over to hardlinks.
With the symlink, you can see the pointer quite clearly, with hardlinks, it is unclear which files are duplicates of each other withouth diving into comparing inodes.
Yes, it's definitely disadvantage of hardlinks (especially if someone forgets to preserve hardlinks when cp or rsync the deploy directory). But having the version in symlink would be even worse (as it could point to different artifact already).
And having the version in the artifact itself requires do_deploy to re-run and without prior build it would re-run do_compile for kernel, bootloader and other artifacts as well.
This is also why I've made sure you can set IMAGE_VERSION_SUFFIX to empty to prevent all of these hardlinks to be created, if all you care is just whatever is latest to be in the deploy directory.
It might be interesting to have the versioned and version-less artifacts in different directories, so that you always cp/rsync only one set of them, but I fear that it would require even more oeqa changes and this area is already a bit too complicated I think.
FWIW: we're using this for webOS builds since 2015 with webos_deploy task mentioned in the first patch, but to do this from "outside" is a bit difficult to maintain as webos_deploy needs to know about all possible artifacts other layers might create and also to inject dependency on webos_deploy task from all the right places.
Thanks for review Richard, lets hope that someone else will also share an opinion about this.
Cheers,
Part of the reasoning was due to the way OE used to work where it would
Quoted 19 lines
stack images, each build would add a new one and it would update the end symlink to point at the latest. Once sstate started removing old entries, that became less needed but the pointers still help runqemu and other tooling find the latest.
This change is trying make the code do something different and it to change versioning and do that in a way which allows maximal reuse from sstate.
Both are valid usages so we gain some things with the change but lose others. I'm not sure how users in general are going to find things overall :/.
Cheers,
Richard