* [PATCH 00/21] Consistent naming scheme for deployed artifacts
@ 2023-11-22 12:44 Martin Jansa
2023-11-22 12:44 ` [PATCH 01/21] image*.bbclass, kernel*.bbclass: create version-less artifacts and versioned hard links Martin Jansa
` (21 more replies)
0 siblings, 22 replies; 26+ messages in thread
From: Martin Jansa @ 2023-11-22 12:44 UTC (permalink / raw)
To: openembedded-core
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 fitImage
UBOOT_FITIMAGE_ENABLE = "1"
# (U-boot) fitImage properties
UBOOT_LOADADDRESS = "0x80080000"
UBOOT_ENTRYPOINT = "0x80080000"
UBOOT_FIT_DESC = "A model description"
# Enable creation of Kernel fitImage
KERNEL_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(-)
--
2.43.0
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 01/21] image*.bbclass, kernel*.bbclass: create version-less artifacts and versioned hard links
2023-11-22 12:44 [PATCH 00/21] Consistent naming scheme for deployed artifacts Martin Jansa
@ 2023-11-22 12:44 ` Martin Jansa
2023-11-22 12:44 ` [PATCH 02/21] create-spdx-2.2.bbclass: use hardlink as well Martin Jansa
` (20 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Martin Jansa @ 2023-11-22 12:44 UTC (permalink / raw)
To: openembedded-core
From: Martin Jansa <Martin.Jansa@gmail.com>
* 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]
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
.../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(-)
diff --git a/meta/classes-recipe/image-artifact-names.bbclass b/meta/classes-recipe/image-artifact-names.bbclass
index bc76ff0e16..d0f1b0dc55 100644
--- a/meta/classes-recipe/image-artifact-names.bbclass
+++ b/meta/classes-recipe/image-artifact-names.bbclass
@@ -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') == '']}"
diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass
index 7231fad940..2dd004d312 100644
--- a/meta/classes-recipe/image.bbclass
+++ b/meta/classes-recipe/image.bbclass
@@ -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.*|"
diff --git a/meta/classes-recipe/kernel-artifact-names.bbclass b/meta/classes-recipe/kernel-artifact-names.bbclass
index 1a7611a15e..186c6bc5b9 100644
--- a/meta/classes-recipe/kernel-artifact-names.bbclass
+++ b/meta/classes-recipe/kernel-artifact-names.bbclass
@@ -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}"
diff --git a/meta/classes-recipe/kernel-devicetree.bbclass b/meta/classes-recipe/kernel-devicetree.bbclass
index eff052b402..cbfaa5c183 100644
--- a/meta/classes-recipe/kernel-devicetree.bbclass
+++ b/meta/classes-recipe/kernel-devicetree.bbclass
@@ -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
diff --git a/meta/classes-recipe/kernel-fitimage.bbclass b/meta/classes-recipe/kernel-fitimage.bbclass
index 7e30a5d47e..0ad200d9db 100644
--- a/meta/classes-recipe/kernel-fitimage.bbclass
+++ b/meta/classes-recipe/kernel-fitimage.bbclass
@@ -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
diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass
index 9ff37f5c38..db289d776f 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -820,9 +820,6 @@ kernel_do_deploy() {
else
install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType $deployDir/$baseName${KERNEL_IMAGE_BIN_EXT}
fi
- if [ -n "${KERNEL_IMAGE_LINK_NAME}" ] ; then
- ln -sf $baseName${KERNEL_IMAGE_BIN_EXT} $deployDir/$imageType-${KERNEL_IMAGE_LINK_NAME}${KERNEL_IMAGE_BIN_EXT}
- fi
if [ "${KERNEL_IMAGETYPE_SYMLINK}" = "1" ] ; then
ln -sf $baseName${KERNEL_IMAGE_BIN_EXT} $deployDir/$imageType
fi
@@ -837,10 +834,6 @@ kernel_do_deploy() {
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
-
- if [ -n "${MODULE_TARBALL_LINK_NAME}" ] ; then
- ln -sf modules-${MODULE_TARBALL_NAME}.tgz $deployDir/modules-${MODULE_TARBALL_LINK_NAME}.tgz
- fi
fi
if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
@@ -848,22 +841,42 @@ kernel_do_deploy() {
if [ "$imageType" = "fitImage" ] ; then
continue
fi
- initramfsBaseName=$imageType-${INITRAMFS_NAME}
- install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType.initramfs $deployDir/$initramfsBaseName${KERNEL_IMAGE_BIN_EXT}
- if [ -n "${INITRAMFS_LINK_NAME}" ] ; then
- ln -sf $initramfsBaseName${KERNEL_IMAGE_BIN_EXT} $deployDir/$imageType-${INITRAMFS_LINK_NAME}${KERNEL_IMAGE_BIN_EXT}
- fi
+ install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType.initramfs $deployDir/$imageType-${INITRAMFS_NAME}${KERNEL_IMAGE_BIN_EXT}
done
fi
}
-# We deploy to filenames that include PKGV and PKGR, read the saved data to
-# ensure we get the right values for both
-do_deploy[prefuncs] += "read_subpackage_metadata"
-
addtask deploy after do_populate_sysroot do_packagedata
-EXPORT_FUNCTIONS do_deploy
+kernel_do_deploy_links() {
+ deployDir="${DEPLOY_DIR_IMAGE}"
+ if [ -n "${KERNEL_DEPLOYSUBDIR}" ]; then
+ deployDir="${DEPLOY_DIR_IMAGE}/${KERNEL_DEPLOYSUBDIR}"
+ 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 [ ${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
+
+ 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
+}
+do_deploy_links[prefuncs] += "read_subpackage_metadata"
+
+addtask deploy_links after do_deploy before do_build
+
+EXPORT_FUNCTIONS do_deploy do_deploy_links
# Add using Device Tree support
inherit kernel-devicetree
diff --git a/meta/classes-recipe/qemuboot.bbclass b/meta/classes-recipe/qemuboot.bbclass
index ff32aac902..0ee4008a65 100644
--- a/meta/classes-recipe/qemuboot.bbclass
+++ b/meta/classes-recipe/qemuboot.bbclass
@@ -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)
}
diff --git a/meta/classes-recipe/rootfs-postcommands.bbclass b/meta/classes-recipe/rootfs-postcommands.bbclass
index 29ee74932a..a8173c32bc 100644
--- a/meta/classes-recipe/rootfs-postcommands.bbclass
+++ b/meta/classes-recipe/rootfs-postcommands.bbclass
@@ -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"
diff --git a/meta/classes/cve-check.bbclass b/meta/classes/cve-check.bbclass
index 5191d04303..b87d565755 100644
--- a/meta/classes/cve-check.bbclass
+++ b/meta/classes/cve-check.bbclass
@@ -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)
}
diff --git a/meta/lib/oe/cve_check.py b/meta/lib/oe/cve_check.py
index 3fa77bf9a7..0e56589a03 100644
--- a/meta/lib/oe/cve_check.py
+++ b/meta/lib/oe/cve_check.py
@@ -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):
--
2.43.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 02/21] create-spdx-2.2.bbclass: use hardlink as well
2023-11-22 12:44 [PATCH 00/21] Consistent naming scheme for deployed artifacts Martin Jansa
2023-11-22 12:44 ` [PATCH 01/21] image*.bbclass, kernel*.bbclass: create version-less artifacts and versioned hard links Martin Jansa
@ 2023-11-22 12:44 ` Martin Jansa
2023-11-22 17:17 ` [OE-core] " Peter Kjellerstedt
2023-11-22 12:44 ` [PATCH 03/21] image, kernel: allow to disable creating the hardlinks by setting *LINK_NAME variables to empty Martin Jansa
` (19 subsequent siblings)
21 siblings, 1 reply; 26+ messages in thread
From: Martin Jansa @ 2023-11-22 12:44 UTC (permalink / raw)
To: openembedded-core
[YOCTO #12937]
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
meta/classes/create-spdx-2.2.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/create-spdx-2.2.bbclass b/meta/classes/create-spdx-2.2.bbclass
index b0aef80db1..8c77f6b886 100644
--- a/meta/classes/create-spdx-2.2.bbclass
+++ b/meta/classes/create-spdx-2.2.bbclass
@@ -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
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 03/21] image, kernel: allow to disable creating the hardlinks by setting *LINK_NAME variables to empty
2023-11-22 12:44 [PATCH 00/21] Consistent naming scheme for deployed artifacts Martin Jansa
2023-11-22 12:44 ` [PATCH 01/21] image*.bbclass, kernel*.bbclass: create version-less artifacts and versioned hard links Martin Jansa
2023-11-22 12:44 ` [PATCH 02/21] create-spdx-2.2.bbclass: use hardlink as well Martin Jansa
@ 2023-11-22 12:44 ` Martin Jansa
2023-11-22 12:44 ` [PATCH 04/21] kernel: move the leading dash into KERNEL_ARTIFACT_NAME Martin Jansa
` (18 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Martin Jansa @ 2023-11-22 12:44 UTC (permalink / raw)
To: openembedded-core
From: Martin Jansa <Martin.Jansa@gmail.com>
* 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]
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
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(-)
diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass
index 2dd004d312..48dc70b8fc 100644
--- a/meta/classes-recipe/image.bbclass
+++ b/meta/classes-recipe/image.bbclass
@@ -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)
diff --git a/meta/classes-recipe/kernel-devicetree.bbclass b/meta/classes-recipe/kernel-devicetree.bbclass
index cbfaa5c183..1fde90f023 100644
--- a/meta/classes-recipe/kernel-devicetree.bbclass
+++ b/meta/classes-recipe/kernel-devicetree.bbclass
@@ -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
}
diff --git a/meta/classes-recipe/kernel-fitimage.bbclass b/meta/classes-recipe/kernel-fitimage.bbclass
index 0ad200d9db..50d89a4383 100644
--- a/meta/classes-recipe/kernel-fitimage.bbclass
+++ b/meta/classes-recipe/kernel-fitimage.bbclass
@@ -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
diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass
index db289d776f..7963b6cc17 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -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"
--
2.43.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 04/21] kernel: move the leading dash into KERNEL_ARTIFACT_NAME
2023-11-22 12:44 [PATCH 00/21] Consistent naming scheme for deployed artifacts Martin Jansa
` (2 preceding siblings ...)
2023-11-22 12:44 ` [PATCH 03/21] image, kernel: allow to disable creating the hardlinks by setting *LINK_NAME variables to empty Martin Jansa
@ 2023-11-22 12:44 ` Martin Jansa
2023-11-22 12:44 ` [PATCH 05/21] kernel-fitimage.bbclass: avoid duplicate .bin extension Martin Jansa
` (17 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Martin Jansa @ 2023-11-22 12:44 UTC (permalink / raw)
To: openembedded-core
* 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]
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
.../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(-)
diff --git a/meta/classes-recipe/kernel-artifact-names.bbclass b/meta/classes-recipe/kernel-artifact-names.bbclass
index 186c6bc5b9..023ce61de5 100644
--- a/meta/classes-recipe/kernel-artifact-names.bbclass
+++ b/meta/classes-recipe/kernel-artifact-names.bbclass
@@ -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}"
diff --git a/meta/classes-recipe/kernel-devicetree.bbclass b/meta/classes-recipe/kernel-devicetree.bbclass
index 1fde90f023..2cd8588304 100644
--- a/meta/classes-recipe/kernel-devicetree.bbclass
+++ b/meta/classes-recipe/kernel-devicetree.bbclass
@@ -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
diff --git a/meta/classes-recipe/kernel-fitimage.bbclass b/meta/classes-recipe/kernel-fitimage.bbclass
index 50d89a4383..266680ffa8 100644
--- a/meta/classes-recipe/kernel-fitimage.bbclass
+++ b/meta/classes-recipe/kernel-fitimage.bbclass
@@ -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
diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass
index 7963b6cc17..e38784a320 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -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
--
2.43.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 05/21] kernel-fitimage.bbclass: avoid duplicate .bin extension
2023-11-22 12:44 [PATCH 00/21] Consistent naming scheme for deployed artifacts Martin Jansa
` (3 preceding siblings ...)
2023-11-22 12:44 ` [PATCH 04/21] kernel: move the leading dash into KERNEL_ARTIFACT_NAME Martin Jansa
@ 2023-11-22 12:44 ` Martin Jansa
2023-11-22 12:44 ` [PATCH 06/21] kernel-fitimage.bbclass: add .its extension also to links Martin Jansa
` (16 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Martin Jansa @ 2023-11-22 12:44 UTC (permalink / raw)
To: openembedded-core
* 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]
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
meta/classes-recipe/kernel-fitimage.bbclass | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/classes-recipe/kernel-fitimage.bbclass b/meta/classes-recipe/kernel-fitimage.bbclass
index 266680ffa8..25a33123a6 100644
--- a/meta/classes-recipe/kernel-fitimage.bbclass
+++ b/meta/classes-recipe/kernel-fitimage.bbclass
@@ -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
--
2.43.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 06/21] kernel-fitimage.bbclass: add .its extension also to links
2023-11-22 12:44 [PATCH 00/21] Consistent naming scheme for deployed artifacts Martin Jansa
` (4 preceding siblings ...)
2023-11-22 12:44 ` [PATCH 05/21] kernel-fitimage.bbclass: avoid duplicate .bin extension Martin Jansa
@ 2023-11-22 12:44 ` Martin Jansa
2023-11-22 12:44 ` [PATCH 07/21] uboot: use ${IMAGE_MACHINE_SUFFIX} instead of -${MACHINE} and use hardlinks Martin Jansa
` (15 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Martin Jansa @ 2023-11-22 12:44 UTC (permalink / raw)
To: openembedded-core
* 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(-)
diff --git a/meta/classes-recipe/kernel-artifact-names.bbclass b/meta/classes-recipe/kernel-artifact-names.bbclass
index 023ce61de5..1117a5b61f 100644
--- a/meta/classes-recipe/kernel-artifact-names.bbclass
+++ b/meta/classes-recipe/kernel-artifact-names.bbclass
@@ -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"
diff --git a/meta/classes-recipe/kernel-fitimage.bbclass b/meta/classes-recipe/kernel-fitimage.bbclass
index 25a33123a6..ee2496fedc 100644
--- a/meta/classes-recipe/kernel-fitimage.bbclass
+++ b/meta/classes-recipe/kernel-fitimage.bbclass
@@ -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
--
2.43.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 07/21] uboot: use ${IMAGE_MACHINE_SUFFIX} instead of -${MACHINE} and use hardlinks
2023-11-22 12:44 [PATCH 00/21] Consistent naming scheme for deployed artifacts Martin Jansa
` (5 preceding siblings ...)
2023-11-22 12:44 ` [PATCH 06/21] kernel-fitimage.bbclass: add .its extension also to links Martin Jansa
@ 2023-11-22 12:44 ` Martin Jansa
2023-11-22 12:44 ` [PATCH 08/21] image.bbclass: rename create_symlinks to create_hardlinks Martin Jansa
` (14 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Martin Jansa @ 2023-11-22 12:44 UTC (permalink / raw)
To: openembedded-core
* 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]
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
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(-)
diff --git a/meta/classes-recipe/uboot-config.bbclass b/meta/classes-recipe/uboot-config.bbclass
index 9be1d64d3e..a3c875e762 100644
--- a/meta/classes-recipe/uboot-config.bbclass
+++ b/meta/classes-recipe/uboot-config.bbclass
@@ -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 ??= ""
diff --git a/meta/classes-recipe/uboot-sign.bbclass b/meta/classes-recipe/uboot-sign.bbclass
index ad04c82378..e89c8214d3 100644
--- a/meta/classes-recipe/uboot-sign.bbclass
+++ b/meta/classes-recipe/uboot-sign.bbclass
@@ -34,27 +34,27 @@ UBOOT_FITIMAGE_ENABLE ?= "0"
SPL_SIGN_ENABLE ?= "0"
# Default value for deployment filenames.
-UBOOT_DTB_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.dtb"
+UBOOT_DTB_IMAGE ?= "u-boot${UBOOT_ARTIFACT_NAME}.dtb"
UBOOT_DTB_BINARY ?= "u-boot.dtb"
UBOOT_DTB_SIGNED ?= "${UBOOT_DTB_BINARY}-signed"
-UBOOT_DTB_SYMLINK ?= "u-boot-${MACHINE}.dtb"
-UBOOT_NODTB_IMAGE ?= "u-boot-nodtb-${MACHINE}-${PV}-${PR}.bin"
+UBOOT_DTB_LINK ?= "u-boot${UBOOT_ARTIFACT_LINK_NAME}.dtb"
+UBOOT_NODTB_IMAGE ?= "u-boot-nodtb${UBOOT_ARTIFACT_NAME}.bin"
UBOOT_NODTB_BINARY ?= "u-boot-nodtb.bin"
-UBOOT_NODTB_SYMLINK ?= "u-boot-nodtb-${MACHINE}.bin"
-UBOOT_ITS_IMAGE ?= "u-boot-its-${MACHINE}-${PV}-${PR}"
+UBOOT_NODTB_LINK ?= "u-boot-nodtb${UBOOT_ARTIFACT_LINK_NAME}.bin"
+UBOOT_ITS_IMAGE ?= "u-boot-its${UBOOT_ARTIFACT_NAME}"
UBOOT_ITS ?= "u-boot.its"
-UBOOT_ITS_SYMLINK ?= "u-boot-its-${MACHINE}"
-UBOOT_FITIMAGE_IMAGE ?= "u-boot-fitImage-${MACHINE}-${PV}-${PR}"
+UBOOT_ITS_LINK ?= "u-boot-its${UBOOT_ARTIFACT_LINK_NAME}"
+UBOOT_FITIMAGE_IMAGE ?= "u-boot-fitImage${UBOOT_ARTIFACT_NAME}"
UBOOT_FITIMAGE_BINARY ?= "u-boot-fitImage"
-UBOOT_FITIMAGE_SYMLINK ?= "u-boot-fitImage-${MACHINE}"
+UBOOT_FITIMAGE_LINK ?= "u-boot-fitImage${UBOOT_ARTIFACT_LINK_NAME}"
SPL_DIR ?= "spl"
-SPL_DTB_IMAGE ?= "u-boot-spl-${MACHINE}-${PV}-${PR}.dtb"
+SPL_DTB_IMAGE ?= "u-boot-spl${UBOOT_ARTIFACT_NAME}.dtb"
SPL_DTB_BINARY ?= "u-boot-spl.dtb"
SPL_DTB_SIGNED ?= "${SPL_DTB_BINARY}-signed"
-SPL_DTB_SYMLINK ?= "u-boot-spl-${MACHINE}.dtb"
-SPL_NODTB_IMAGE ?= "u-boot-spl-nodtb-${MACHINE}-${PV}-${PR}.bin"
+SPL_DTB_LINK ?= "u-boot-spl${UBOOT_ARTIFACT_LINK_NAME}.dtb"
+SPL_NODTB_IMAGE ?= "u-boot-spl-nodtb${UBOOT_ARTIFACT_NAME}.bin"
SPL_NODTB_BINARY ?= "u-boot-spl-nodtb.bin"
-SPL_NODTB_SYMLINK ?= "u-boot-spl-nodtb-${MACHINE}.bin"
+SPL_NODTB_LINK ?= "u-boot-spl-nodtb${UBOOT_ARTIFACT_LINK_NAME}.bin"
# U-Boot fitImage description
UBOOT_FIT_DESC ?= "U-Boot fitImage for ${DISTRO_NAME}/${PV}/${MACHINE}"
@@ -148,14 +148,14 @@ deploy_dtb() {
if [ -e "${UBOOT_DTB_SIGNED}" ]; then
install -Dm644 ${UBOOT_DTB_SIGNED} ${DEPLOYDIR}/${uboot_dtb_binary}
if [ -n "${type}" ]; then
- ln -sf ${uboot_dtb_binary} ${DEPLOYDIR}/${UBOOT_DTB_IMAGE}
+ ln -vf ${DEPLOYDIR}/${uboot_dtb_binary} ${DEPLOYDIR}/${UBOOT_DTB_IMAGE}
fi
fi
if [ -f "${UBOOT_NODTB_BINARY}" ]; then
install -Dm644 ${UBOOT_NODTB_BINARY} ${DEPLOYDIR}/${uboot_nodtb_binary}
if [ -n "${type}" ]; then
- ln -sf ${uboot_nodtb_binary} ${DEPLOYDIR}/${UBOOT_NODTB_IMAGE}
+ ln -vf ${DEPLOYDIR}/${uboot_nodtb_binary} ${DEPLOYDIR}/${UBOOT_NODTB_IMAGE}
fi
fi
}
@@ -182,14 +182,14 @@ deploy_spl_dtb() {
if [ -e "${SPL_DIR}/${SPL_DTB_SIGNED}" ] ; then
install -Dm644 ${SPL_DIR}/${SPL_DTB_SIGNED} ${DEPLOYDIR}/${spl_dtb_binary}
if [ -n "${type}" ]; then
- ln -sf ${spl_dtb_binary} ${DEPLOYDIR}/${SPL_DTB_IMAGE}
+ ln -vf ${DEPLOYDIR}/${spl_dtb_binary} ${DEPLOYDIR}/${SPL_DTB_IMAGE}
fi
fi
if [ -f "${SPL_DIR}/${SPL_NODTB_BINARY}" ] ; then
install -Dm644 ${SPL_DIR}/${SPL_NODTB_BINARY} ${DEPLOYDIR}/${spl_nodtb_binary}
if [ -n "${type}" ]; then
- ln -sf ${spl_nodtb_binary} ${DEPLOYDIR}/${SPL_NODTB_IMAGE}
+ ln -vf ${DEPLOYDIR}/${spl_nodtb_binary} ${DEPLOYDIR}/${SPL_NODTB_IMAGE}
fi
fi
@@ -378,8 +378,8 @@ deploy_helper() {
if [ "${UBOOT_FITIMAGE_ENABLE}" = "1" -a -n "${SPL_DTB_BINARY}" ]; then
if [ -n "${type}" ]; then
- uboot_its_image="u-boot-its-${type}-${PV}-${PR}"
- uboot_fitimage_image="u-boot-fitImage-${type}-${PV}-${PR}"
+ uboot_its_image="u-boot-its-${type}${UBOOT_ARTIFACT_NAME}"
+ uboot_fitimage_image="u-boot-fitImage-${type}${UBOOT_ARTIFACT_NAME}"
else
uboot_its_image="${UBOOT_ITS_IMAGE}"
uboot_fitimage_image="${UBOOT_FITIMAGE_IMAGE}"
@@ -389,8 +389,8 @@ deploy_helper() {
install -Dm644 ${UBOOT_ITS} ${DEPLOYDIR}/$uboot_its_image
if [ -n "${type}" ]; then
- ln -sf $uboot_its_image ${DEPLOYDIR}/${UBOOT_ITS_IMAGE}
- ln -sf $uboot_fitimage_image ${DEPLOYDIR}/${UBOOT_FITIMAGE_IMAGE}
+ ln -vf ${DEPLOYDIR}/$uboot_its_image ${DEPLOYDIR}/${UBOOT_ITS_IMAGE}
+ ln -vf ${DEPLOYDIR}/$uboot_fitimage_image ${DEPLOYDIR}/${UBOOT_FITIMAGE_IMAGE}
fi
fi
@@ -420,24 +420,24 @@ do_deploy:prepend() {
fi
if [ "${UBOOT_SIGN_ENABLE}" = "1" -a -n "${UBOOT_DTB_BINARY}" ] ; then
- ln -sf ${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${UBOOT_DTB_BINARY}
- ln -sf ${UBOOT_DTB_IMAGE} ${DEPLOYDIR}/${UBOOT_DTB_SYMLINK}
- ln -sf ${UBOOT_NODTB_IMAGE} ${DEPLOYDIR}/${UBOOT_NODTB_SYMLINK}
- ln -sf ${UBOOT_NODTB_IMAGE} ${DEPLOYDIR}/${UBOOT_NODTB_BINARY}
+ 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}
fi
if [ "${UBOOT_FITIMAGE_ENABLE}" = "1" ] ; then
- ln -sf ${UBOOT_ITS_IMAGE} ${DEPLOYDIR}/${UBOOT_ITS}
- ln -sf ${UBOOT_ITS_IMAGE} ${DEPLOYDIR}/${UBOOT_ITS_SYMLINK}
- ln -sf ${UBOOT_FITIMAGE_IMAGE} ${DEPLOYDIR}/${UBOOT_FITIMAGE_BINARY}
- ln -sf ${UBOOT_FITIMAGE_IMAGE} ${DEPLOYDIR}/${UBOOT_FITIMAGE_SYMLINK}
+ 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}
fi
if [ "${SPL_SIGN_ENABLE}" = "1" -a -n "${SPL_DTB_BINARY}" ] ; then
- ln -sf ${SPL_DTB_IMAGE} ${DEPLOYDIR}/${SPL_DTB_SYMLINK}
- ln -sf ${SPL_DTB_IMAGE} ${DEPLOYDIR}/${SPL_DTB_BINARY}
- ln -sf ${SPL_NODTB_IMAGE} ${DEPLOYDIR}/${SPL_NODTB_SYMLINK}
- ln -sf ${SPL_NODTB_IMAGE} ${DEPLOYDIR}/${SPL_NODTB_BINARY}
+ 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}
fi
}
@@ -445,7 +445,7 @@ do_deploy:append() {
# If we're creating a u-boot fitImage, point u-boot.bin
# symlink since it might get used by image recipes
if [ "${UBOOT_FITIMAGE_ENABLE}" = "1" ] ; then
- ln -sf ${UBOOT_FITIMAGE_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY}
- ln -sf ${UBOOT_FITIMAGE_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK}
+ ln -vf ${DEPLOYDIR}/${UBOOT_FITIMAGE_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY}
+ ln -vf ${DEPLOYDIR}/${UBOOT_FITIMAGE_IMAGE} ${DEPLOYDIR}/${UBOOT_LINK}
fi
}
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index b3482dcef3..4ea0ed3cf4 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -42,21 +42,18 @@ do_compile () {
unset CFLAGS
unset CPPFLAGS
- if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]
- then
+ if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]; then
echo ${UBOOT_LOCALVERSION} > ${B}/.scmversion
echo ${UBOOT_LOCALVERSION} > ${S}/.scmversion
fi
- if [ -n "${UBOOT_CONFIG}" -o -n "${UBOOT_DELTA_CONFIG}" ]
- then
+ if [ -n "${UBOOT_CONFIG}" -o -n "${UBOOT_DELTA_CONFIG}" ]; then
unset i j k
for config in ${UBOOT_MACHINE}; do
i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
j=$(expr $j + 1);
- if [ $j -eq $i ]
- then
+ if [ $j -eq $i ]; then
oe_runmake -C ${S} O=${B}/${config} ${UBOOT_MAKE_TARGET}
for binary in ${UBOOT_BINARIES}; do
k=$(expr $k + 1);
@@ -86,21 +83,18 @@ do_compile () {
fi
fi
- if [ -n "${UBOOT_ENV}" ] && [ "${UBOOT_ENV_SUFFIX}" = "scr" ]
- then
+ if [ -n "${UBOOT_ENV}" ] && [ "${UBOOT_ENV_SUFFIX}" = "scr" ]; then
${UBOOT_MKIMAGE} -C none -A ${UBOOT_ARCH} -T script -d ${WORKDIR}/${UBOOT_ENV_SRC} ${WORKDIR}/${UBOOT_ENV_BINARY}
fi
}
do_install () {
- if [ -n "${UBOOT_CONFIG}" ]
- then
+ if [ -n "${UBOOT_CONFIG}" ]; then
for config in ${UBOOT_MACHINE}; do
i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
j=$(expr $j + 1);
- if [ $j -eq $i ]
- then
+ if [ $j -eq $i ]; then
install -D -m 644 ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type}
ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${D}/boot/${UBOOT_BINARY}
@@ -129,16 +123,13 @@ do_install () {
fi
fi
- if [ -n "${UBOOT_ELF}" ]
- then
- if [ -n "${UBOOT_CONFIG}" ]
- then
+ if [ -n "${UBOOT_ELF}" ]; then
+ if [ -n "${UBOOT_CONFIG}" ]; then
for config in ${UBOOT_MACHINE}; do
i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
j=$(expr $j + 1);
- if [ $j -eq $i ]
- then
+ if [ $j -eq $i ]; then
install -m 644 ${B}/${config}/${UBOOT_ELF} ${D}/boot/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY}-${type}
ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${D}/boot/${UBOOT_BINARY}
@@ -153,21 +144,18 @@ do_install () {
fi
fi
- if [ -e ${WORKDIR}/fw_env.config ] ; then
+ if [ -e ${WORKDIR}/fw_env.config ]; then
install -d ${D}${sysconfdir}
install -m 644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
fi
- if [ -n "${SPL_BINARY}" ]
- then
- if [ -n "${UBOOT_CONFIG}" ]
- then
+ if [ -n "${SPL_BINARY}" ]; then
+ if [ -n "${UBOOT_CONFIG}" ]; then
for config in ${UBOOT_MACHINE}; do
i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
j=$(expr $j + 1);
- if [ $j -eq $i ]
- then
+ 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}
ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${D}/boot/${SPL_BINARYFILE}
@@ -182,14 +170,12 @@ do_install () {
fi
fi
- if [ -n "${UBOOT_ENV}" ]
- then
+ 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}
fi
- if [ "${UBOOT_EXTLINUX}" = "1" ]
- then
+ if [ "${UBOOT_EXTLINUX}" = "1" ]; then
install -Dm 0644 ${UBOOT_EXTLINUX_CONFIG} ${D}/${UBOOT_EXTLINUX_INSTALL_DIR}/${UBOOT_EXTLINUX_CONF_NAME}
fi
}
@@ -211,27 +197,26 @@ FILES:${PN} = "/boot ${datadir}"
RDEPENDS:${PN} += "${PN}-env"
do_deploy () {
- if [ -n "${UBOOT_CONFIG}" ]
- then
+ if [ -n "${UBOOT_CONFIG}" ]; then
for config in ${UBOOT_MACHINE}; do
i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
j=$(expr $j + 1);
- if [ $j -eq $i ]
- then
- install -D -m 644 ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX}
- cd ${DEPLOYDIR}
- ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}-${type}
- ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_SYMLINK}
- ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}-${type}
- ln -sf ${UBOOT_BINARYNAME}-${type}-${PV}-${PR}.${UBOOT_SUFFIX} ${UBOOT_BINARY}
+ if [ $j -eq $i ]; then
+ install -D -m 644 ${B}/${config}/${UBOOT_BINARYNAME}-${type}.${UBOOT_SUFFIX} ${DEPLOYDIR}/${UBOOT_BINARYNAME}-${type}${UBOOT_ARTIFACT_NAME}.${UBOOT_SUFFIX}
+ ln -vf ${DEPLOYDIR}/${UBOOT_BINARYNAME}-${type}${UBOOT_ARTIFACT_NAME}.${UBOOT_SUFFIX} ${DEPLOYDIR}/${UBOOT_BINARY}-${type}
+ ln -vf ${DEPLOYDIR}/${UBOOT_BINARYNAME}-${type}${UBOOT_ARTIFACT_NAME}.${UBOOT_SUFFIX} ${DEPLOYDIR}/${UBOOT_BINARY}
+ if [ -n "${UBOOT_LINK}" -a "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then
+ ln -vf ${DEPLOYDIR}/${UBOOT_BINARYNAME}-${type}${UBOOT_ARTIFACT_NAME}.${UBOOT_SUFFIX} ${DEPLOYDIR}/${UBOOT_LINK}-${type}
+ ln -vf ${DEPLOYDIR}/${UBOOT_BINARYNAME}-${type}${UBOOT_ARTIFACT_NAME}.${UBOOT_SUFFIX} ${DEPLOYDIR}/${UBOOT_LINK}
+ fi
# Deploy the uboot-initial-env
if [ -n "${UBOOT_INITIAL_ENV}" ]; then
- install -D -m 644 ${B}/${config}/u-boot-initial-env-${type} ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR}
- cd ${DEPLOYDIR}
- ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR} ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}
- ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${type}-${PV}-${PR} ${UBOOT_INITIAL_ENV}-${type}
+ install -D -m 644 ${B}/${config}/u-boot-initial-env-${type} ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}-${type}${UBOOT_ARTIFACT_NAME}
+ if [ "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then
+ ln -vf ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}-${type}${UBOOT_ARTIFACT_NAME} ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}-${type}${UBOOT_ARTIFACT_LINK_NAME}
+ fi
fi
fi
done
@@ -240,43 +225,42 @@ do_deploy () {
unset i
else
install -D -m 644 ${B}/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
+ ln -vf ${DEPLOYDIR}/${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY}
- cd ${DEPLOYDIR}
- rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK}
- ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
- ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY}
+ if [ -n "${UBOOT_LINK}" -a "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then
+ ln -vf ${DEPLOYDIR}/${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_LINK}
+ fi
# Deploy the uboot-initial-env
if [ -n "${UBOOT_INITIAL_ENV}" ]; then
- install -D -m 644 ${B}/u-boot-initial-env ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR}
- cd ${DEPLOYDIR}
- ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR} ${UBOOT_INITIAL_ENV}-${MACHINE}
- ln -sf ${UBOOT_INITIAL_ENV}-${MACHINE}-${PV}-${PR} ${UBOOT_INITIAL_ENV}
+ install -D -m 644 ${B}/u-boot-initial-env ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}${UBOOT_ARTIFACT_NAME}
+ if [ "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then
+ ln -vf ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}${UBOOT_ARTIFACT_NAME} ${DEPLOYDIR}/${UBOOT_INITIAL_ENV}${UBOOT_ARTIFACT_LINK_NAME}
+ fi
fi
fi
- if [ -e ${WORKDIR}/fw_env.config ] ; then
- install -D -m 644 ${WORKDIR}/fw_env.config ${DEPLOYDIR}/fw_env.config-${MACHINE}-${PV}-${PR}
- cd ${DEPLOYDIR}
- ln -sf fw_env.config-${MACHINE}-${PV}-${PR} fw_env.config-${MACHINE}
- ln -sf fw_env.config-${MACHINE}-${PV}-${PR} fw_env.config
+ if [ -e ${WORKDIR}/fw_env.config ]; then
+ install -D -m 644 ${WORKDIR}/fw_env.config ${DEPLOYDIR}/fw_env.config${UBOOT_ARTIFACT_NAME}
+ if [ "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then
+ ln -vf ${DEPLOYDIR}/fw_env.config${UBOOT_ARTIFACT_NAME} ${DEPLOYDIR}/fw_env.config${UBOOT_ARTIFACT_LINK_NAME}
+ fi
fi
- if [ -n "${UBOOT_ELF}" ]
- then
- if [ -n "${UBOOT_CONFIG}" ]
- then
+ if [ -n "${UBOOT_ELF}" ]; then
+ if [ -n "${UBOOT_CONFIG}" ]; then
for config in ${UBOOT_MACHINE}; do
i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
j=$(expr $j + 1);
- if [ $j -eq $i ]
- then
- install -m 644 ${B}/${config}/${UBOOT_ELF} ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX}
- ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}-${type}
- ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}
- ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}-${type}
- ln -sf u-boot-${type}-${PV}-${PR}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}
+ if [ $j -eq $i ]; then
+ install -m 644 ${B}/${config}/${UBOOT_ELF} ${DEPLOYDIR}/u-boot-${type}${UBOOT_ARTIFACT_NAME}.${UBOOT_ELF_SUFFIX}
+ ln -vf ${DEPLOYDIR}/u-boot-${type}${UBOOT_ARTIFACT_NAME}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}-${type}
+ ln -vf ${DEPLOYDIR}/u-boot-${type}${UBOOT_ARTIFACT_NAME}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}
+ if [ -n "${UBOOT_ELF_LINK}" -a "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then
+ ln -vf ${DEPLOYDIR}/u-boot-${type}${UBOOT_ARTIFACT_NAME}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_LINK}-${type}
+ ln -vf ${DEPLOYDIR}/u-boot-${type}${UBOOT_ARTIFACT_NAME}.${UBOOT_ELF_SUFFIX} ${DEPLOYDIR}/${UBOOT_ELF_LINK}
+ fi
fi
done
unset j
@@ -284,28 +268,27 @@ do_deploy () {
unset i
else
install -m 644 ${B}/${UBOOT_ELF} ${DEPLOYDIR}/${UBOOT_ELF_IMAGE}
- ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}
- ln -sf ${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_SYMLINK}
+ ln -vf ${DEPLOYDIR}/${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_BINARY}
+ if [ -n "${UBOOT_ELF_LINK}" -a "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then
+ ln -vf ${DEPLOYDIR}/${UBOOT_ELF_IMAGE} ${DEPLOYDIR}/${UBOOT_ELF_LINK}
+ fi
fi
fi
-
- if [ -n "${SPL_BINARY}" ]
- then
- if [ -n "${UBOOT_CONFIG}" ]
- then
+ if [ -n "${SPL_BINARY}" ]; then
+ if [ -n "${UBOOT_CONFIG}" ]; then
for config in ${UBOOT_MACHINE}; do
i=$(expr $i + 1);
for type in ${UBOOT_CONFIG}; do
j=$(expr $j + 1);
- if [ $j -eq $i ]
- then
- install -m 644 ${B}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX}
- rm -f ${DEPLOYDIR}/${SPL_BINARYFILE} ${DEPLOYDIR}/${SPL_SYMLINK}
- ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_BINARYFILE}-${type}
- ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_BINARYFILE}
- ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
- ln -sf ${SPL_BINARYNAME}-${type}-${PV}-${PR}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_SYMLINK}
+ if [ $j -eq $i ]; then
+ install -m 644 ${B}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}${UBOOT_ARTIFACT_NAME}${SPL_DELIMITER}${SPL_SUFFIX}
+ ln -vf ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}${UBOOT_ARTIFACT_NAME}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_BINARYFILE}-${type}
+ ln -vf ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}${UBOOT_ARTIFACT_NAME}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_BINARYFILE}
+ if [ -n "${SPL_LINK}" -a "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then
+ ln -vf ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}${UBOOT_ARTIFACT_NAME}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_LINK}-${type}
+ ln -vf ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}${UBOOT_ARTIFACT_NAME}${SPL_DELIMITER}${SPL_SUFFIX} ${DEPLOYDIR}/${SPL_LINK}
+ fi
fi
done
unset j
@@ -313,28 +296,30 @@ do_deploy () {
unset i
else
install -m 644 ${B}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}
- ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARYNAME}
- ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK}
+ ln -vf ${DEPLOYDIR}/${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARYNAME}
+ if [ -n "${SPL_LINK}" -a "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then
+ ln -vf ${DEPLOYDIR}/${SPL_IMAGE} ${DEPLOYDIR}/${SPL_LINK}
+ fi
fi
fi
- if [ -n "${UBOOT_ENV}" ]
- then
+ if [ -n "${UBOOT_ENV}" ]; then
install -m 644 ${WORKDIR}/${UBOOT_ENV_BINARY} ${DEPLOYDIR}/${UBOOT_ENV_IMAGE}
- ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_BINARY}
- ln -sf ${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_SYMLINK}
+ ln -vf ${DEPLOYDIR}${UBOOT_ENV_IMAGE} ${DEPLOYDIR}/${UBOOT_ENV_BINARY}
+ 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
fi
- if [ "${UBOOT_EXTLINUX}" = "1" ]
- then
- install -m 644 ${UBOOT_EXTLINUX_CONFIG} ${DEPLOYDIR}/${UBOOT_EXTLINUX_SYMLINK}
- ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE}
- ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME}
+ if [ "${UBOOT_EXTLINUX}" = "1" ]; then
+ install -m 644 ${UBOOT_EXTLINUX_CONFIG} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME}${UBOOT_ARTIFACT_NAME}
+ if [ -n "${UBOOT_EXTLINUX_CONF_LINK}" -a "${UBOOT_ARTIFACT_NAME}" != "${UBOOT_ARTIFACT_LINK_NAME}" ]; then
+ ln -vf ${DEPLOYDIR}${UBOOT_EXTLINUX_CONF_NAME}${UBOOT_ARTIFACT_NAME} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_LINK}
+ fi
fi
- if [ -n "${UBOOT_DTB}" ]
- then
- install -m 644 ${B}/arch/${UBOOT_ARCH_DIR}/dts/${UBOOT_DTB_BINARY} ${DEPLOYDIR}/
+ if [ -n "${UBOOT_DTB}" ]; then
+ install -m 644 ${B}/arch/${UBOOT_ARCH_DIR}/dts/${UBOOT_DTB_BINARY} ${DEPLOYDIR}/${UBOOT_DTB_BINARY}${UBOOT_ARTIFACT_NAME}
fi
}
--
2.43.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 08/21] image.bbclass: rename create_symlinks to create_hardlinks
2023-11-22 12:44 [PATCH 00/21] Consistent naming scheme for deployed artifacts Martin Jansa
` (6 preceding siblings ...)
2023-11-22 12:44 ` [PATCH 07/21] uboot: use ${IMAGE_MACHINE_SUFFIX} instead of -${MACHINE} and use hardlinks Martin Jansa
@ 2023-11-22 12:44 ` Martin Jansa
2023-11-22 12:44 ` [PATCH 09/21] image-artifact-names.bbclass: add IMAGE_VERSION_SUFFIX_DATETIME which uses SOURCE_DATE_EPOCH Martin Jansa
` (13 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Martin Jansa @ 2023-11-22 12:44 UTC (permalink / raw)
To: openembedded-core
* to make it more clear what this postfunc does now
[YOCTO #12937]
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
meta/classes-recipe/image-live.bbclass | 2 +-
meta/classes-recipe/image.bbclass | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/meta/classes-recipe/image-live.bbclass b/meta/classes-recipe/image-live.bbclass
index 95dd44a8c0..4d926cb7a7 100644
--- a/meta/classes-recipe/image-live.bbclass
+++ b/meta/classes-recipe/image-live.bbclass
@@ -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"
diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass
index 48dc70b8fc..aa24a92245 100644
--- a/meta/classes-recipe/image.bbclass
+++ b/meta/classes-recipe/image.bbclass
@@ -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')
--
2.43.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 09/21] image-artifact-names.bbclass: add IMAGE_VERSION_SUFFIX_DATETIME which uses SOURCE_DATE_EPOCH
2023-11-22 12:44 [PATCH 00/21] Consistent naming scheme for deployed artifacts Martin Jansa
` (7 preceding siblings ...)
2023-11-22 12:44 ` [PATCH 08/21] image.bbclass: rename create_symlinks to create_hardlinks Martin Jansa
@ 2023-11-22 12:44 ` Martin Jansa
2023-11-22 12:44 ` [PATCH 10/21] oeqa: bbtests.BitbakeTests.test_image_manifest: use just isfile() instead of islink() Martin Jansa
` (12 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Martin Jansa @ 2023-11-22 12:44 UTC (permalink / raw)
To: openembedded-core
* 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]
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
meta/classes-global/base.bbclass | 3 +++
meta/classes-recipe/image-artifact-names.bbclass | 12 +++---------
2 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/meta/classes-global/base.bbclass b/meta/classes-global/base.bbclass
index ac84312a87..755d10106a 100644
--- a/meta/classes-global/base.bbclass
+++ b/meta/classes-global/base.bbclass
@@ -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)
diff --git a/meta/classes-recipe/image-artifact-names.bbclass b/meta/classes-recipe/image-artifact-names.bbclass
index d0f1b0dc55..2d18f34c9c 100644
--- a/meta/classes-recipe/image-artifact-names.bbclass
+++ b/meta/classes-recipe/image-artifact-names.bbclass
@@ -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", "")
-}
--
2.43.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 10/21] oeqa: bbtests.BitbakeTests.test_image_manifest: use just isfile() instead of islink()
2023-11-22 12:44 [PATCH 00/21] Consistent naming scheme for deployed artifacts Martin Jansa
` (8 preceding siblings ...)
2023-11-22 12:44 ` [PATCH 09/21] image-artifact-names.bbclass: add IMAGE_VERSION_SUFFIX_DATETIME which uses SOURCE_DATE_EPOCH Martin Jansa
@ 2023-11-22 12:44 ` Martin Jansa
2023-11-22 12:44 ` [PATCH 11/21] oeqa: wic: " Martin Jansa
` (11 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Martin Jansa @ 2023-11-22 12:44 UTC (permalink / raw)
To: openembedded-core
* 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]
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
meta/lib/oeqa/selftest/cases/bbtests.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py
index d242352ea2..4276a9ba91 100644
--- a/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -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"'
--
2.43.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 11/21] oeqa: wic: use just isfile() instead of islink()
2023-11-22 12:44 [PATCH 00/21] Consistent naming scheme for deployed artifacts Martin Jansa
` (9 preceding siblings ...)
2023-11-22 12:44 ` [PATCH 10/21] oeqa: bbtests.BitbakeTests.test_image_manifest: use just isfile() instead of islink() Martin Jansa
@ 2023-11-22 12:44 ` Martin Jansa
2023-11-22 12:44 ` [PATCH 12/21] linux-dummy: add do_deploy_links task Martin Jansa
` (10 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Martin Jansa @ 2023-11-22 12:44 UTC (permalink / raw)
To: openembedded-core
* 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(-)
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index b4866bcb32..fdff3e846e 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -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
--
2.43.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 12/21] linux-dummy: add do_deploy_links task
2023-11-22 12:44 [PATCH 00/21] Consistent naming scheme for deployed artifacts Martin Jansa
` (10 preceding siblings ...)
2023-11-22 12:44 ` [PATCH 11/21] oeqa: wic: " Martin Jansa
@ 2023-11-22 12:44 ` Martin Jansa
2023-11-22 12:44 ` [PATCH 13/21] kernel.bbclass: inherit KERNEL_CLASSES at the end Martin Jansa
` (9 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Martin Jansa @ 2023-11-22 12:44 UTC (permalink / raw)
To: openembedded-core
* 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]
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
meta/recipes-kernel/linux/linux-dummy.bb | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/meta/recipes-kernel/linux/linux-dummy.bb b/meta/recipes-kernel/linux/linux-dummy.bb
index 2396f46202..47a0d5e9da 100644
--- a/meta/recipes-kernel/linux/linux-dummy.bb
+++ b/meta/recipes-kernel/linux/linux-dummy.bb
@@ -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
--
2.43.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 13/21] kernel.bbclass: inherit KERNEL_CLASSES at the end
2023-11-22 12:44 [PATCH 00/21] Consistent naming scheme for deployed artifacts Martin Jansa
` (11 preceding siblings ...)
2023-11-22 12:44 ` [PATCH 12/21] linux-dummy: add do_deploy_links task Martin Jansa
@ 2023-11-22 12:44 ` Martin Jansa
2023-11-22 12:44 ` [PATCH 14/21] image.bbclass: don't append -dbg suffix twice Martin Jansa
` (8 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Martin Jansa @ 2023-11-22 12:44 UTC (permalink / raw)
To: openembedded-core
* after defining deploy-links task, so that e.g. kernel-fitimage can append to it
like kernel-devicetree.bbclass
[YOCTO #12937]
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
meta/classes-recipe/kernel.bbclass | 34 +++++++++++++++---------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/meta/classes-recipe/kernel.bbclass b/meta/classes-recipe/kernel.bbclass
index e38784a320..c5ff7453ff 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -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}
--
2.43.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 14/21] image.bbclass: don't append -dbg suffix twice
2023-11-22 12:44 [PATCH 00/21] Consistent naming scheme for deployed artifacts Martin Jansa
` (12 preceding siblings ...)
2023-11-22 12:44 ` [PATCH 13/21] kernel.bbclass: inherit KERNEL_CLASSES at the end Martin Jansa
@ 2023-11-22 12:44 ` Martin Jansa
2023-11-22 12:44 ` [PATCH 15/21] oeqa: imagefeatures: append -dbg suffix at the end of IMAGE_NAME not IMAGE_LINK_NAME Martin Jansa
` (7 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Martin Jansa @ 2023-11-22 12:44 UTC (permalink / raw)
To: openembedded-core
* 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]
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
meta/classes-recipe/image.bbclass | 2 --
1 file changed, 2 deletions(-)
diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass
index aa24a92245..e68b8034ea 100644
--- a/meta/classes-recipe/image.bbclass
+++ b/meta/classes-recipe/image.bbclass
@@ -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')
--
2.43.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 15/21] oeqa: imagefeatures: append -dbg suffix at the end of IMAGE_NAME not IMAGE_LINK_NAME
2023-11-22 12:44 [PATCH 00/21] Consistent naming scheme for deployed artifacts Martin Jansa
` (13 preceding siblings ...)
2023-11-22 12:44 ` [PATCH 14/21] image.bbclass: don't append -dbg suffix twice Martin Jansa
@ 2023-11-22 12:44 ` Martin Jansa
2023-11-22 12:44 ` [PATCH 16/21] oeqa: gdbserver: " Martin Jansa
` (6 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Martin Jansa @ 2023-11-22 12:44 UTC (permalink / raw)
To: openembedded-core
* 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]
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
meta/lib/oeqa/selftest/cases/imagefeatures.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py
index dc88c222bd..da510f0e8e 100644
--- a/meta/lib/oeqa/selftest/cases/imagefeatures.py
+++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py
@@ -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))
--
2.43.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 16/21] oeqa: gdbserver: append -dbg suffix at the end of IMAGE_NAME not IMAGE_LINK_NAME
2023-11-22 12:44 [PATCH 00/21] Consistent naming scheme for deployed artifacts Martin Jansa
` (14 preceding siblings ...)
2023-11-22 12:44 ` [PATCH 15/21] oeqa: imagefeatures: append -dbg suffix at the end of IMAGE_NAME not IMAGE_LINK_NAME Martin Jansa
@ 2023-11-22 12:44 ` Martin Jansa
2023-11-22 12:44 ` [PATCH 17/21] oeqa: fitimage: respect KERNEL_FIT_NAME Martin Jansa
` (5 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Martin Jansa @ 2023-11-22 12:44 UTC (permalink / raw)
To: openembedded-core
* 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]
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
meta/lib/oeqa/selftest/cases/gdbserver.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/lib/oeqa/selftest/cases/gdbserver.py b/meta/lib/oeqa/selftest/cases/gdbserver.py
index 9da97ae780..f441468861 100644
--- a/meta/lib/oeqa/selftest/cases/gdbserver.py
+++ b/meta/lib/oeqa/selftest/cases/gdbserver.py
@@ -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:
--
2.43.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 17/21] oeqa: fitimage: respect KERNEL_FIT_NAME
2023-11-22 12:44 [PATCH 00/21] Consistent naming scheme for deployed artifacts Martin Jansa
` (15 preceding siblings ...)
2023-11-22 12:44 ` [PATCH 16/21] oeqa: gdbserver: " Martin Jansa
@ 2023-11-22 12:44 ` Martin Jansa
2023-11-22 12:44 ` [PATCH 18/21] selftest: multiconfig-image-packager: use IMAGE_NAME instead of IMAGE_LINK_NAME Martin Jansa
` (4 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Martin Jansa @ 2023-11-22 12:44 UTC (permalink / raw)
To: openembedded-core
* 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]
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
meta/lib/oeqa/selftest/cases/fitimage.py | 98 ++++++++++++------------
1 file changed, 48 insertions(+), 50 deletions(-)
diff --git a/meta/lib/oeqa/selftest/cases/fitimage.py b/meta/lib/oeqa/selftest/cases/fitimage.py
index 9383d0c4db..170df1bea2 100644
--- a/meta/lib/oeqa/selftest/cases/fitimage.py
+++ b/meta/lib/oeqa/selftest/cases/fitimage.py
@@ -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)
--
2.43.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 18/21] selftest: multiconfig-image-packager: use IMAGE_NAME instead of IMAGE_LINK_NAME
2023-11-22 12:44 [PATCH 00/21] Consistent naming scheme for deployed artifacts Martin Jansa
` (16 preceding siblings ...)
2023-11-22 12:44 ` [PATCH 17/21] oeqa: fitimage: respect KERNEL_FIT_NAME Martin Jansa
@ 2023-11-22 12:44 ` Martin Jansa
2023-11-22 12:44 ` [PATCH 19/21] image.bbclass: remove hardlinks as well Martin Jansa
` (3 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Martin Jansa @ 2023-11-22 12:44 UTC (permalink / raw)
To: openembedded-core
* 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]
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
.../multiconfig/multiconfig-image-packager_0.1.bb | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb b/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb
index d7785cee2e..b53b6a4b26 100644
--- a/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb
+++ b/meta-selftest/recipes-test/multiconfig/multiconfig-image-packager_0.1.bb
@@ -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"
--
2.43.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 19/21] image.bbclass: remove hardlinks as well
2023-11-22 12:44 [PATCH 00/21] Consistent naming scheme for deployed artifacts Martin Jansa
` (17 preceding siblings ...)
2023-11-22 12:44 ` [PATCH 18/21] selftest: multiconfig-image-packager: use IMAGE_NAME instead of IMAGE_LINK_NAME Martin Jansa
@ 2023-11-22 12:44 ` Martin Jansa
2023-11-22 12:44 ` [PATCH 20/21] populate_sdk_ext.bbclass: add *:do_shared_workdir to BB_SETSCENE_ENFORCE_IGNORE_TASKS Martin Jansa
` (2 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Martin Jansa @ 2023-11-22 12:44 UTC (permalink / raw)
To: openembedded-core
* 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]
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
meta/classes-recipe/image.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes-recipe/image.bbclass b/meta/classes-recipe/image.bbclass
index e68b8034ea..081f1927fb 100644
--- a/meta/classes-recipe/image.bbclass
+++ b/meta/classes-recipe/image.bbclass
@@ -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:
--
2.43.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 20/21] populate_sdk_ext.bbclass: add *:do_shared_workdir to BB_SETSCENE_ENFORCE_IGNORE_TASKS
2023-11-22 12:44 [PATCH 00/21] Consistent naming scheme for deployed artifacts Martin Jansa
` (18 preceding siblings ...)
2023-11-22 12:44 ` [PATCH 19/21] image.bbclass: remove hardlinks as well Martin Jansa
@ 2023-11-22 12:44 ` Martin Jansa
2023-11-22 22:26 ` [OE-core] " Richard Purdie
2023-11-22 12:44 ` [PATCH 21/21] u-boot.inc: don't replace the binary with symlink Martin Jansa
2023-11-22 13:19 ` [OE-core] [PATCH 00/21] Consistent naming scheme for deployed artifacts Richard Purdie
21 siblings, 1 reply; 26+ messages in thread
From: Martin Jansa @ 2023-11-22 12:44 UTC (permalink / raw)
To: openembedded-core
* 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]
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
meta/classes-recipe/populate_sdk_ext.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes-recipe/populate_sdk_ext.bbclass b/meta/classes-recipe/populate_sdk_ext.bbclass
index f209becae1..5705140359 100644
--- a/meta/classes-recipe/populate_sdk_ext.bbclass
+++ b/meta/classes-recipe/populate_sdk_ext.bbclass
@@ -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')
--
2.43.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 21/21] u-boot.inc: don't replace the binary with symlink
2023-11-22 12:44 [PATCH 00/21] Consistent naming scheme for deployed artifacts Martin Jansa
` (19 preceding siblings ...)
2023-11-22 12:44 ` [PATCH 20/21] populate_sdk_ext.bbclass: add *:do_shared_workdir to BB_SETSCENE_ENFORCE_IGNORE_TASKS Martin Jansa
@ 2023-11-22 12:44 ` Martin Jansa
2023-11-22 13:19 ` [OE-core] [PATCH 00/21] Consistent naming scheme for deployed artifacts Richard Purdie
21 siblings, 0 replies; 26+ messages in thread
From: Martin Jansa @ 2023-11-22 12:44 UTC (permalink / raw)
To: openembedded-core
* 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]
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
meta/classes-recipe/uboot-sign.bbclass | 24 ++++++++++-----------
meta/recipes-bsp/u-boot/u-boot.inc | 29 +++++++++++++++++++-------
2 files changed, 34 insertions(+), 19 deletions(-)
diff --git a/meta/classes-recipe/uboot-sign.bbclass b/meta/classes-recipe/uboot-sign.bbclass
index e89c8214d3..d7de2c3bde 100644
--- a/meta/classes-recipe/uboot-sign.bbclass
+++ b/meta/classes-recipe/uboot-sign.bbclass
@@ -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
}
diff --git a/meta/recipes-bsp/u-boot/u-boot.inc b/meta/recipes-bsp/u-boot/u-boot.inc
index 4ea0ed3cf4..168f659acc 100644
--- a/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/meta/recipes-bsp/u-boot/u-boot.inc
@@ -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
--
2.43.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [OE-core] [PATCH 00/21] Consistent naming scheme for deployed artifacts
2023-11-22 12:44 [PATCH 00/21] Consistent naming scheme for deployed artifacts Martin Jansa
` (20 preceding siblings ...)
2023-11-22 12:44 ` [PATCH 21/21] u-boot.inc: don't replace the binary with symlink Martin Jansa
@ 2023-11-22 13:19 ` Richard Purdie
2023-11-22 13:43 ` Martin Jansa
21 siblings, 1 reply; 26+ messages in thread
From: Richard Purdie @ 2023-11-22 13:19 UTC (permalink / raw)
To: Martin Jansa, openembedded-core
On Wed, 2023-11-22 at 13:44 +0100, Martin Jansa wrote:
> 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).
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
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [OE-core] [PATCH 00/21] Consistent naming scheme for deployed artifacts
2023-11-22 13:19 ` [OE-core] [PATCH 00/21] Consistent naming scheme for deployed artifacts Richard Purdie
@ 2023-11-22 13:43 ` Martin Jansa
0 siblings, 0 replies; 26+ messages in thread
From: Martin Jansa @ 2023-11-22 13:43 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 3873 bytes --]
On Wed, Nov 22, 2023 at 2:19 PM Richard Purdie <
richard.purdie@linuxfoundation.org> wrote:
> On Wed, 2023-11-22 at 13:44 +0100, Martin Jansa wrote:
> > 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).
>
> 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
> 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
>
>
>
[-- Attachment #2: Type: text/html, Size: 4671 bytes --]
^ permalink raw reply [flat|nested] 26+ messages in thread
* RE: [OE-core] [PATCH 02/21] create-spdx-2.2.bbclass: use hardlink as well
2023-11-22 12:44 ` [PATCH 02/21] create-spdx-2.2.bbclass: use hardlink as well Martin Jansa
@ 2023-11-22 17:17 ` Peter Kjellerstedt
0 siblings, 0 replies; 26+ messages in thread
From: Peter Kjellerstedt @ 2023-11-22 17:17 UTC (permalink / raw)
To: Martin Jansa; +Cc: openembedded-core@lists.openembedded.org
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Martin Jansa
> Sent: den 22 november 2023 13:45
> To: openembedded-core@lists.openembedded.org
> 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
>
> [YOCTO #12937]
>
> Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
> ---
> meta/classes/create-spdx-2.2.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/create-spdx-2.2.bbclass b/meta/classes/create-
> spdx-2.2.bbclass
> index b0aef80db1..8c77f6b886 100644
> --- a/meta/classes/create-spdx-2.2.bbclass
> +++ b/meta/classes/create-spdx-2.2.bbclass
> @@ -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
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [OE-core] [PATCH 20/21] populate_sdk_ext.bbclass: add *:do_shared_workdir to BB_SETSCENE_ENFORCE_IGNORE_TASKS
2023-11-22 12:44 ` [PATCH 20/21] populate_sdk_ext.bbclass: add *:do_shared_workdir to BB_SETSCENE_ENFORCE_IGNORE_TASKS Martin Jansa
@ 2023-11-22 22:26 ` Richard Purdie
0 siblings, 0 replies; 26+ messages in thread
From: Richard Purdie @ 2023-11-22 22:26 UTC (permalink / raw)
To: Martin Jansa, openembedded-core
On Wed, 2023-11-22 at 13:44 +0100, Martin Jansa wrote:
> meta/classes-recipe/populate_sdk_ext.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes-recipe/populate_sdk_ext.bbclass b/meta/classes-recipe/populate_sdk_ext.bbclass
> index f209becae1..5705140359 100644
> --- a/meta/classes-recipe/populate_sdk_ext.bbclass
> +++ b/meta/classes-recipe/populate_sdk_ext.bbclass
> @@ -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
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2023-11-22 22:26 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-22 12:44 [PATCH 00/21] Consistent naming scheme for deployed artifacts Martin Jansa
2023-11-22 12:44 ` [PATCH 01/21] image*.bbclass, kernel*.bbclass: create version-less artifacts and versioned hard links Martin Jansa
2023-11-22 12:44 ` [PATCH 02/21] create-spdx-2.2.bbclass: use hardlink as well Martin Jansa
2023-11-22 17:17 ` [OE-core] " Peter Kjellerstedt
2023-11-22 12:44 ` [PATCH 03/21] image, kernel: allow to disable creating the hardlinks by setting *LINK_NAME variables to empty Martin Jansa
2023-11-22 12:44 ` [PATCH 04/21] kernel: move the leading dash into KERNEL_ARTIFACT_NAME Martin Jansa
2023-11-22 12:44 ` [PATCH 05/21] kernel-fitimage.bbclass: avoid duplicate .bin extension Martin Jansa
2023-11-22 12:44 ` [PATCH 06/21] kernel-fitimage.bbclass: add .its extension also to links Martin Jansa
2023-11-22 12:44 ` [PATCH 07/21] uboot: use ${IMAGE_MACHINE_SUFFIX} instead of -${MACHINE} and use hardlinks Martin Jansa
2023-11-22 12:44 ` [PATCH 08/21] image.bbclass: rename create_symlinks to create_hardlinks Martin Jansa
2023-11-22 12:44 ` [PATCH 09/21] image-artifact-names.bbclass: add IMAGE_VERSION_SUFFIX_DATETIME which uses SOURCE_DATE_EPOCH Martin Jansa
2023-11-22 12:44 ` [PATCH 10/21] oeqa: bbtests.BitbakeTests.test_image_manifest: use just isfile() instead of islink() Martin Jansa
2023-11-22 12:44 ` [PATCH 11/21] oeqa: wic: " Martin Jansa
2023-11-22 12:44 ` [PATCH 12/21] linux-dummy: add do_deploy_links task Martin Jansa
2023-11-22 12:44 ` [PATCH 13/21] kernel.bbclass: inherit KERNEL_CLASSES at the end Martin Jansa
2023-11-22 12:44 ` [PATCH 14/21] image.bbclass: don't append -dbg suffix twice Martin Jansa
2023-11-22 12:44 ` [PATCH 15/21] oeqa: imagefeatures: append -dbg suffix at the end of IMAGE_NAME not IMAGE_LINK_NAME Martin Jansa
2023-11-22 12:44 ` [PATCH 16/21] oeqa: gdbserver: " Martin Jansa
2023-11-22 12:44 ` [PATCH 17/21] oeqa: fitimage: respect KERNEL_FIT_NAME Martin Jansa
2023-11-22 12:44 ` [PATCH 18/21] selftest: multiconfig-image-packager: use IMAGE_NAME instead of IMAGE_LINK_NAME Martin Jansa
2023-11-22 12:44 ` [PATCH 19/21] image.bbclass: remove hardlinks as well Martin Jansa
2023-11-22 12:44 ` [PATCH 20/21] populate_sdk_ext.bbclass: add *:do_shared_workdir to BB_SETSCENE_ENFORCE_IGNORE_TASKS Martin Jansa
2023-11-22 22:26 ` [OE-core] " Richard Purdie
2023-11-22 12:44 ` [PATCH 21/21] u-boot.inc: don't replace the binary with symlink Martin Jansa
2023-11-22 13:19 ` [OE-core] [PATCH 00/21] Consistent naming scheme for deployed artifacts Richard Purdie
2023-11-22 13:43 ` Martin Jansa
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.