Re: [OE-core][mickledore 26/26] image-artifact-names: include ${IMAGE_NAME_SUFFIX} directly in both ${IMAGE_NAME} and ${IMAGE_LINK_NAME}

2023-07-17 Thread Steve Sakoman
On Sun, Jul 16, 2023 at 11:23 PM Richard Purdie
 wrote:
>
> On Mon, 2023-07-17 at 10:38 +0200, Martin Jansa wrote:
> > This isn't backwards compatible and various BSP might need small
> > adjustment to work correctly with this.
> >
> > Please don't backport this one.
>
> Agreed and 25/26 probably isn't needed either.

Thanks for the review!  I've dropped both patches.

Steve

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184472): 
https://lists.openembedded.org/g/openembedded-core/message/184472
Mute This Topic: https://lists.openembedded.org/mt/100151266/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][mickledore 26/26] image-artifact-names: include ${IMAGE_NAME_SUFFIX} directly in both ${IMAGE_NAME} and ${IMAGE_LINK_NAME}

2023-07-17 Thread Richard Purdie
On Mon, 2023-07-17 at 10:38 +0200, Martin Jansa wrote:
> This isn't backwards compatible and various BSP might need small
> adjustment to work correctly with this.
> 
> Please don't backport this one.

Agreed and 25/26 probably isn't needed either.

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#184456): 
https://lists.openembedded.org/g/openembedded-core/message/184456
Mute This Topic: https://lists.openembedded.org/mt/100151266/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][mickledore 26/26] image-artifact-names: include ${IMAGE_NAME_SUFFIX} directly in both ${IMAGE_NAME} and ${IMAGE_LINK_NAME}

2023-07-17 Thread Martin Jansa
This isn't backwards compatible and various BSP might need small adjustment
to work correctly with this.

Please don't backport this one.

On Sat, Jul 15, 2023 at 12:34 AM Steve Sakoman  wrote:

> From: Martin Jansa 
>
> * ${IMAGE_NAME}${IMAGE_NAME_SUFFIX} is almost always used together already
>   and when they aren't it's usually because of hardcoded '.rootfs' suffix
>
> * it's a bit strange, because ${IMAGE_NAME_SUFFIX} is applied after the
>   version from ${IMAGE_VERSION_SUFFIX}, if we move it to ${IMAGE_LINK_NAME}
>   then it will be applied before the version and ${IMAGE_LINK_NAME}
>   will be just the version-less symlink to latest built version.
>
> * it's not added to INITRAMFS_IMAGE_NAME as it assumes that all
>   images used as initramfs will set IMAGE_NAME_SUFFIX to empty.
>   Many already do as shown bellow, but you might need to extend
>   this list in your layer.
>
> * this also allows to drop support for imgsuffix varflag, recipes which
>   don't want to have .rootfs suffix can just set IMAGE_NAME_SUFFIX to
>   empty and it will be consistently respected by both IMAGE_NAME and
> IMAGE_LINK_NAME
>
> * imgsuffix = d.getVarFlag("do_" + taskname, 'imgsuffix') or
> d.expand("${IMAGE_NAME_SUFFIX}.")
>   is kind of terrible, notice trailing '.' after ${IMAGE_NAME_SUFFIX}
>   while this dot was in imgsuffix in:
>   do_bootimg[imgsuffix] = "."
>
>   but in both cases it's not really part of the imgsuffix, but the
>   "extension" type separator as in dst variable:
>
>  dst = os.path.join(deploy_dir, link_name + "." + type)
> -src = img_name + imgsuffix + type
> +src = img_name + "." + type
>
> * for ubifs volumes move vname after IMAGE_NAME_SUFFIX
>
> * to better document these changes here is an example with default poky
>   configuration with just:
>   IMAGE_FSTYPES:append:pn-core-image-minimal = " live wic wic.vmdk ubi"
>   MKUBIFS_ARGS = "-m 2048 -e 129024 -c 968 -x zlib"
>   UBINIZE_ARGS = "-m 2048 -p 131072 -s 512"
>   added in local.conf, so that deploy_dir has also some initramfs and more
>   IMAGE_FSTYPES
>
> * "ls -lahi tmp/deploy/images/qemux86-64/"
>   output after "bitbake core-image-minimal"
>
>   And deploy-dir is cleaned between runs with:
>   bitbake -c clean core-image-minimal core-image-minimal-initramfs
> virtual/kernel grub-efi systemd-boot
>
>   The output confirms that the only change is ".rootfs" added not only
>   in ext4 and manifest files, but also for hddimg, iso, qemuboot.conf
>   testdata.json for both the actual artifacts as well as the symlinks
>   while core-image-minimal-initramfs doesn't have them as IMAGE_NAME_SUFFIX
>   was already set to empty there:
> meta/classes-recipe/baremetal-image.bbclass:IMAGE_NAME_SUFFIX ?= ""
> meta/recipes-core/images/core-image-minimal-initramfs.bb:IMAGE_NAME_SUFFIX
> ?= ""
> meta/recipes-core/images/core-image-tiny-initramfs.bb:IMAGE_NAME_SUFFIX
> ?= ""
> meta/recipes-extended/baremetal-example/baremetal-helloworld_git.bb:IMAGE_NAME_SUFFIX
> ?= ""
> meta/recipes-extended/images/core-image-testcontroller-initramfs.bb:IMAGE_NAME_SUFFIX
> ?= ""
>
>   before these changes:
> total 297M
> 31269162 drwxr-xr-x 2 martin martin 4.0K Mar  7 19:19 .
> 31263942 drwxr-xr-x 3 martin martin 4.0K Mar  7 12:53 ..
> 35845703 lrwxrwxrwx 2 martin martin   77 Mar  7 12:27 bzImage ->
> bzImage--6.1.14+git0+e8d08fc4c0_b05ca3429c-r0.0-qemux86-64-20230307112110.bin
> 35845704 -rw-r--r-- 2 martin martin  11M Mar  7 12:27
> bzImage--6.1.14+git0+e8d08fc4c0_b05ca3429c-r0.0-qemux86-64-20230307112110.bin
> 35845702 lrwxrwxrwx 2 martin martin   77 Mar  7 12:27
> bzImage-qemux86-64.bin ->
> bzImage--6.1.14+git0+e8d08fc4c0_b05ca3429c-r0.0-qemux86-64-20230307112110.bin
> 40236967 -rw-r--r-- 2 martin martin  13M Mar  7 19:19
> core-image-minimal-initramfs-qemux86-64-20230307181808.cpio.gz
> 40203232 -rw-r--r-- 2 martin martin 1.1K Mar  7 19:19
> core-image-minimal-initramfs-qemux86-64-20230307181808.manifest
> 40212700 -rw-r--r-- 2 martin martin 1.6K Mar  7 19:19
> core-image-minimal-initramfs-qemux86-64-20230307181808.qemuboot.conf
> 40211556 -rw-r--r-- 2 martin martin 211K Mar  7 19:19
> core-image-minimal-initramfs-qemux86-64-20230307181808.testdata.json
> 40236964 lrwxrwxrwx 2 martin martin   62 Mar  7 19:19
> core-image-minimal-initramfs-qemux86-64.cpio.gz ->
> core-image-minimal-initramfs-qemux86-64-20230307181808.cpio.gz
> 40203235 lrwxrwxrwx 2 martin martin   63 Mar  7 19:19
> core-image-minimal-initramfs-qemux86-64.manifest ->
> core-image-minimal-initramfs-qemux86-64-20230307181808.manifest
> 40212690 lrwxrwxrwx 2 martin martin   68 Mar  7 19:19
> core-image-minimal-initramfs-qemux86-64.qemuboot.conf ->
> core-image-minimal-initramfs-qemux86-64-20230307181808.qemuboot.conf
> 40211560 lrwxrwxrwx 2 martin martin   68 Mar  7 19:19
> core-image-minimal-initramfs-qemux86-64.testdata.json ->
> core-image-minimal-initramfs-qemux86-64-20230307181808.testdata.json
> 40237307 -rw-r--r-- 2 martin martin  57M Mar  7 19:19
> core-image-minimal-qem

[OE-core][mickledore 26/26] image-artifact-names: include ${IMAGE_NAME_SUFFIX} directly in both ${IMAGE_NAME} and ${IMAGE_LINK_NAME}

2023-07-14 Thread Steve Sakoman
From: Martin Jansa 

* ${IMAGE_NAME}${IMAGE_NAME_SUFFIX} is almost always used together already
  and when they aren't it's usually because of hardcoded '.rootfs' suffix

* it's a bit strange, because ${IMAGE_NAME_SUFFIX} is applied after the
  version from ${IMAGE_VERSION_SUFFIX}, if we move it to ${IMAGE_LINK_NAME}
  then it will be applied before the version and ${IMAGE_LINK_NAME}
  will be just the version-less symlink to latest built version.

* it's not added to INITRAMFS_IMAGE_NAME as it assumes that all
  images used as initramfs will set IMAGE_NAME_SUFFIX to empty.
  Many already do as shown bellow, but you might need to extend
  this list in your layer.

* this also allows to drop support for imgsuffix varflag, recipes which
  don't want to have .rootfs suffix can just set IMAGE_NAME_SUFFIX to
  empty and it will be consistently respected by both IMAGE_NAME and 
IMAGE_LINK_NAME

* imgsuffix = d.getVarFlag("do_" + taskname, 'imgsuffix') or 
d.expand("${IMAGE_NAME_SUFFIX}.")
  is kind of terrible, notice trailing '.' after ${IMAGE_NAME_SUFFIX}
  while this dot was in imgsuffix in:
  do_bootimg[imgsuffix] = "."

  but in both cases it's not really part of the imgsuffix, but the
  "extension" type separator as in dst variable:

 dst = os.path.join(deploy_dir, link_name + "." + type)
-src = img_name + imgsuffix + type
+src = img_name + "." + type

* for ubifs volumes move vname after IMAGE_NAME_SUFFIX

* to better document these changes here is an example with default poky
  configuration with just:
  IMAGE_FSTYPES:append:pn-core-image-minimal = " live wic wic.vmdk ubi"
  MKUBIFS_ARGS = "-m 2048 -e 129024 -c 968 -x zlib"
  UBINIZE_ARGS = "-m 2048 -p 131072 -s 512"
  added in local.conf, so that deploy_dir has also some initramfs and more
  IMAGE_FSTYPES

* "ls -lahi tmp/deploy/images/qemux86-64/"
  output after "bitbake core-image-minimal"

  And deploy-dir is cleaned between runs with:
  bitbake -c clean core-image-minimal core-image-minimal-initramfs 
virtual/kernel grub-efi systemd-boot

  The output confirms that the only change is ".rootfs" added not only
  in ext4 and manifest files, but also for hddimg, iso, qemuboot.conf
  testdata.json for both the actual artifacts as well as the symlinks
  while core-image-minimal-initramfs doesn't have them as IMAGE_NAME_SUFFIX
  was already set to empty there:
meta/classes-recipe/baremetal-image.bbclass:IMAGE_NAME_SUFFIX ?= ""
meta/recipes-core/images/core-image-minimal-initramfs.bb:IMAGE_NAME_SUFFIX ?= ""
meta/recipes-core/images/core-image-tiny-initramfs.bb:IMAGE_NAME_SUFFIX ?= ""
meta/recipes-extended/baremetal-example/baremetal-helloworld_git.bb:IMAGE_NAME_SUFFIX
 ?= ""
meta/recipes-extended/images/core-image-testcontroller-initramfs.bb:IMAGE_NAME_SUFFIX
 ?= ""

  before these changes:
total 297M
31269162 drwxr-xr-x 2 martin martin 4.0K Mar  7 19:19 .
31263942 drwxr-xr-x 3 martin martin 4.0K Mar  7 12:53 ..
35845703 lrwxrwxrwx 2 martin martin   77 Mar  7 12:27 bzImage -> 
bzImage--6.1.14+git0+e8d08fc4c0_b05ca3429c-r0.0-qemux86-64-20230307112110.bin
35845704 -rw-r--r-- 2 martin martin  11M Mar  7 12:27 
bzImage--6.1.14+git0+e8d08fc4c0_b05ca3429c-r0.0-qemux86-64-20230307112110.bin
35845702 lrwxrwxrwx 2 martin martin   77 Mar  7 12:27 bzImage-qemux86-64.bin -> 
bzImage--6.1.14+git0+e8d08fc4c0_b05ca3429c-r0.0-qemux86-64-20230307112110.bin
40236967 -rw-r--r-- 2 martin martin  13M Mar  7 19:19 
core-image-minimal-initramfs-qemux86-64-20230307181808.cpio.gz
40203232 -rw-r--r-- 2 martin martin 1.1K Mar  7 19:19 
core-image-minimal-initramfs-qemux86-64-20230307181808.manifest
40212700 -rw-r--r-- 2 martin martin 1.6K Mar  7 19:19 
core-image-minimal-initramfs-qemux86-64-20230307181808.qemuboot.conf
40211556 -rw-r--r-- 2 martin martin 211K Mar  7 19:19 
core-image-minimal-initramfs-qemux86-64-20230307181808.testdata.json
40236964 lrwxrwxrwx 2 martin martin   62 Mar  7 19:19 
core-image-minimal-initramfs-qemux86-64.cpio.gz -> 
core-image-minimal-initramfs-qemux86-64-20230307181808.cpio.gz
40203235 lrwxrwxrwx 2 martin martin   63 Mar  7 19:19 
core-image-minimal-initramfs-qemux86-64.manifest -> 
core-image-minimal-initramfs-qemux86-64-20230307181808.manifest
40212690 lrwxrwxrwx 2 martin martin   68 Mar  7 19:19 
core-image-minimal-initramfs-qemux86-64.qemuboot.conf -> 
core-image-minimal-initramfs-qemux86-64-20230307181808.qemuboot.conf
40211560 lrwxrwxrwx 2 martin martin   68 Mar  7 19:19 
core-image-minimal-initramfs-qemux86-64.testdata.json -> 
core-image-minimal-initramfs-qemux86-64-20230307181808.testdata.json
40237307 -rw-r--r-- 2 martin martin  57M Mar  7 19:19 
core-image-minimal-qemux86-64-20230307181808.hddimg
40237329 -rw-r--r-- 2 martin martin  56M Mar  7 19:19 
core-image-minimal-qemux86-64-20230307181808.iso
40220347 -rw-r--r-- 2 martin martin 1.6K Mar  7 19:19 
core-image-minimal-qemux86-64-20230307181808.qemuboot.conf
40236942 -rw-r--r-- 2 martin martin  34M Mar  7 19:19 
core-image-minimal-qemux86-64-20230307181808.rootfs.ex