All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH 0/5] Kernel artifacts naming changes
@ 2017-11-20 20:11 Martin Jansa
  2017-11-20 20:11 ` [RFC][PATCH 1/5] kernel-devicetree.bbclass: Use lowercase names for shell variables Martin Jansa
                   ` (5 more replies)
  0 siblings, 6 replies; 30+ messages in thread
From: Martin Jansa @ 2017-11-20 20:11 UTC (permalink / raw)
  To: openembedded-core

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



^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2018-07-09 15:04 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-20 20:11 [RFC][PATCH 0/5] Kernel artifacts naming changes Martin Jansa
2017-11-20 20:11 ` [RFC][PATCH 1/5] kernel-devicetree.bbclass: Use lowercase names for shell variables Martin Jansa
2017-11-20 20:11 ` [RFC][PATCH 2/5] kernel-devicetree.bbclass: Fix and simplify instalation of DTB files Martin Jansa
2017-11-20 20:11 ` [RFC][PATCH 3/5] kernel-devicetree.bbclass: build DTBs with make dtbs Martin Jansa
2017-11-20 20:11 ` [RFC][PATCH 4/5] kernel.bbclass: use the consistent naming schema for initramfs Martin Jansa
2017-11-20 20:11 ` [RFC][PATCH 5/5] kernel.bbclass: move variables for kernel artifacts names to separate bbclass Martin Jansa
2017-11-21 11:58 ` [RFC][PATCH 0/5] Kernel artifacts naming changes Otavio Salvador
2018-07-02 14:16   ` Martin Jansa
2018-07-02 16:56     ` Otavio Salvador
2018-07-02 22:07     ` [PATCHv2 1/4] kernel-devicetree.bbclass: Use lowercase names for shell variables Martin Jansa
2018-07-02 22:07       ` [PATCHv2 2/4] kernel-devicetree.bbclass: Fix and simplify instalation of DTB files Martin Jansa
2018-07-02 22:07       ` [PATCHv2 3/4] kernel.bbclass: use the consistent naming schema for initramfs Martin Jansa
2018-07-02 22:07       ` [PATCHv2 4/4] kernel.bbclass: move variables for kernel artifacts names to separate bbclass Martin Jansa
2018-07-04  7:59     ` [PATCHv3 1/4] kernel-devicetree.bbclass: Use lowercase names for shell variables Martin Jansa
2018-07-04  7:59       ` [PATCHv3 2/4] kernel-devicetree.bbclass: Fix and simplify instalation of DTB files Martin Jansa
2018-07-04  8:54         ` Paulo Neves
2018-07-04  9:18           ` Martin Jansa
2018-07-04  7:59       ` [PATCHv3 3/4] kernel.bbclass: use the consistent naming schema for initramfs Martin Jansa
2018-07-04  7:59       ` [PATCHv3 4/4] kernel.bbclass: move variables for kernel artifacts names to separate bbclass Martin Jansa
2018-07-05  8:21       ` [PATCHv3 1/4] kernel-devicetree.bbclass: Use lowercase names for shell variables Richard Purdie
2018-07-09 15:04         ` Martin Jansa
2018-07-09 15:04           ` [PATCHv4 " Martin Jansa
2018-07-09 15:04             ` [PATCHv4 2/4] kernel-devicetree.bbclass: Fix and simplify instalation of DTB files Martin Jansa
2018-07-09 15:04             ` [PATCHv4 3/4] kernel.bbclass: use the consistent naming schema for initramfs Martin Jansa
2018-07-09 15:05             ` [PATCHv4 4/4] kernel.bbclass: move variables for kernel artifacts names to separate bbclass Martin Jansa
2018-07-04 20:06     ` [PATCH] Revert "kernel-devicetree: Corrected normalize_dtb" Martin Jansa
2018-07-05  7:15       ` Nicolas Dechesne
2018-07-05  8:23         ` Richard Purdie
2018-07-05  8:38           ` Martin Jansa
2018-07-05 10:37             ` Richard Purdie

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.