summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Bronder <jsbronder@cold-front.org>2024-12-16 14:51:32 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-12-17 11:41:53 +0000
commit4593b142d5d0dc7c8ef369e2a42e9a4c805b8a51 (patch)
treeb3397bb838a90eda7e634a15f0ca35113981c316
parenta3c5179414410ba8ccf40c7ec168ffbbf73a9096 (diff)
downloadpoky-4593b142d5d0dc7c8ef369e2a42e9a4c805b8a51.tar.gz
scripts: wrap lz4c and convert to lz4
Commit fe167e082cbde1c6d186ecdda531abef610ac2ac switched to requiring lz4 instead of lz4c which allows us to support distros dropping lz4c. However, it wasn't only OE that was still using the legacy lz4c, there's a number of upstreams as well. For instance, it's only in the 6.13 kernel that CONFIG_KERNEL_LZ4 makes the switch from lz4c to lz4. So, while this all gets ironed out, simply intercept calls to lz4c and convert them to use lz4. This was picked instead of adding lz4c to HOSTTOOLS_NONFATAL due to concerns about builds becoming non-deterministic and failing late: https://lore.kernel.org/openembedded-core/9c3143ebb7f9e17cfbd318ef0e17994aae7264be.camel@linuxfoundation.org/ (From OE-Core rev: c10b94d82d10058a9e26f7d6919a0d6d721a7c75) Signed-off-by: Justin Bronder <jsbronder@cold-front.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/lz4c26
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/lz4c b/scripts/lz4c
new file mode 100755
index 0000000000..466fc349e0
--- /dev/null
+++ b/scripts/lz4c
@@ -0,0 +1,26 @@
1#!/usr/bin/env bash
2
3# Wrapper to intercept legacy lz4c arguments and convert to lz4.
4args=()
5while [ $# -ne 0 ]; do
6 case ${1} in
7 -c0)
8 args+=(-0)
9 ;;
10 -c1)
11 args+=(-9)
12 ;;
13 -c2|-hc)
14 args+=(-12)
15 ;;
16 -y)
17 args+=(--force)
18 ;;
19 *)
20 args+=("${1}")
21 ;;
22 esac
23 shift
24done
25
26exec lz4 "${args[@]}"