[OE-core] [RFC][PATCH 0/5] Kernel artifacts naming changes

Martin Jansa martin.jansa at gmail.com
Mon Nov 20 20:11:00 UTC 2017


This is only RFC, because it wasn't tested in all possible combinations
people might use.

I did some limited testing with raspberrypi3 and raspberrypi3-64 with
default configuration and also our modified naming where rpi builds
were failing and we had to use our own sdcard_image-rpi.bbclass to
work around it.

Basically all our build artifacts from jenkins jobs contain values like
product version, type of build, build number (or just release name for
"release" jobs).

For that we modify variables like:
IMAGE_NAME, IMAGE_LINK_NAME, INITRAMFS_IMAGE_NAME, KERNEL_IMAGE_BASE_NAME,
KERNEL_IMAGE_SYMLINK_NAME, MODULE_IMAGE_BASE_NAME, MODULE_IMAGE_SYMLINK_NAME
and it works OK, but only until some other bbclasses are assuming that
these variables are still using default value (e.g. -${MACHINE} in
KERNEL_IMAGE_SYMLINK_NAME.

Things are actually a bit worse, we want to use the same version suffix
across all artifacts, even when some of them were actually reused from sstate
- e.g. if build number 6 reuses kernel.do_deploy sstate archive created in
build number 5, then kernel artifacts would be named with -5 and image with -6.

So we cannot use vardepsexclude for the build number (like the default
values do for DATETIME). But that would require reexecuting actual kernel
do_deploy task every single build (and as it depends on tasks like kernel.do_install
it's not just relativey fast do_deploy, but whole kernel build).

Instead we changed the variables to create the artifacts without any version
in sstate covered tasks (so kernel.do_deploy produces just files without any
version (like default KERNEL_IMAGE_SYMLINK_NAME) and then we execute separate
very fast do_kernel_fixup task, which adds versioned _hard_ link (instead of
symlink, so that we can update or remove the file without version and the
versioned file is still usable).

And that's still not enough, few found that some tools which we use in do_rootfs
sometimes modify instead of overwrite the file in deploy (so that the file
with versioned name was modified during the next build through the file without
the version).

And as a last step we also had to update many task dependencies, where the task
was depending on do_deploy and we actually needed the task to depend on
do_deploy_fixup.

This RFC doesn't implement it all, but it makes naming all the artifacts in
consistent way a bit easier. If there is an agreement that OE should support
the naming scenario described above, I'll submit the rest of the changes.

Regards,

The following changes since commit a17f3ec910366e9e7551fa24fbc07929b9584341:

  dhcp: fix build issue with libxml2 support (2017-11-10 14:44:31 +0000)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib jansa/kernel
  http://cgit.openembedded.org/openembedded-core-contrib/log/?h=jansa/kernel

Martin Jansa (5):
  kernel-devicetree.bbclass: Use lowercase names for shell variables
  kernel-devicetree.bbclass: Fix and simplify instalation of DTB files
  kernel-devicetree.bbclass: build DTBs with make dtbs
  kernel.bbclass: use the consistent naming schema for initramfs
  kernel.bbclass: move variables for kernel artifacts names to separate
    bbclass

 meta/classes/kernel-artifact-names.bbclass | 19 +++++++
 meta/classes/kernel-devicetree.bbclass     | 89 ++++++++++++------------------
 meta/classes/kernel.bbclass                | 26 ++-------
 3 files changed, 60 insertions(+), 74 deletions(-)
 create mode 100644 meta/classes/kernel-artifact-names.bbclass

-- 
2.7.4




More information about the Openembedded-core mailing list