diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2022-04-28 09:47:53 -0400 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-09-28 08:02:10 +0100 |
| commit | d696edd8d12d6feb32f698bba7bfa16b8f43932e (patch) | |
| tree | 221e517d19c0814f86845f2b3e4e657dc9f818e1 /meta | |
| parent | 49f308a41449b28e753eedbf2d9aedc6fa557ea2 (diff) | |
| download | poky-d696edd8d12d6feb32f698bba7bfa16b8f43932e.tar.gz | |
kernel-yocto: allow patch author date to be commit date
In situations where a buid needs to be reproducible, it is
sometimes desireable to use a patches author date, versus the
time when it is applied. This generates a consistent hash
between different patch applications.
We leverage the existing KERNEL_DEBUG_TIMESTAMPS to trigger
the use of a new option to kgit-s2q. This allows us to use
the author date in a reproducible configuration, but disable
it if we need the current time/date.
(From OE-Core rev: 8dbce9b13960acfd6889567c11456e3c73a783b5)
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit ebe2411ce78d5e4ea49b9b4cb732b461ecc32ca6)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/classes/kernel-yocto.bbclass | 6 | ||||
| -rw-r--r-- | meta/recipes-kernel/kern-tools/kern-tools-native_git.bb | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index afccffcf17..e8046bb8f6 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass | |||
| @@ -322,7 +322,11 @@ do_patch() { | |||
| 322 | meta_dir=$(kgit --meta) | 322 | meta_dir=$(kgit --meta) |
| 323 | (cd ${meta_dir}; ln -sf patch.queue series) | 323 | (cd ${meta_dir}; ln -sf patch.queue series) |
| 324 | if [ -f "${meta_dir}/series" ]; then | 324 | if [ -f "${meta_dir}/series" ]; then |
| 325 | kgit-s2q --gen -v --patches .kernel-meta/ | 325 | kgit_extra_args="" |
| 326 | if [ "${KERNEL_DEBUG_TIMESTAMPS}" != "1" ]; then | ||
| 327 | kgit_extra_args="--commit-sha author" | ||
| 328 | fi | ||
| 329 | kgit-s2q --gen -v $kgit_extra_args --patches .kernel-meta/ | ||
| 326 | if [ $? -ne 0 ]; then | 330 | if [ $? -ne 0 ]; then |
| 327 | bberror "Could not apply patches for ${KMACHINE}." | 331 | bberror "Could not apply patches for ${KMACHINE}." |
| 328 | bbfatal_log "Patch failures can be resolved in the linux source directory ${S})" | 332 | bbfatal_log "Patch failures can be resolved in the linux source directory ${S})" |
diff --git a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb index a6ab9ca56d..11613ab3b6 100644 --- a/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb +++ b/meta/recipes-kernel/kern-tools/kern-tools-native_git.bb | |||
| @@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "\ | |||
| 11 | 11 | ||
| 12 | DEPENDS = "git-native" | 12 | DEPENDS = "git-native" |
| 13 | 13 | ||
| 14 | SRCREV = "90598a5fae1172e3f7782a1b02f7b7518efd32c8" | 14 | SRCREV = "f70b1d52f4706a263ae22e2c61039ccd875e97b6" |
| 15 | PV = "0.3+git${SRCPV}" | 15 | PV = "0.3+git${SRCPV}" |
| 16 | 16 | ||
| 17 | inherit native | 17 | inherit native |
