From d0ad50984b1b758d7b4e24bd7aad356a19f198fd Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 31 May 2024 02:32:07 +0100 Subject: [PATCH] phase1: remove kmods in target packages if archive is enabled OPKG gets confused if kmod packages are present in both, target packages as well as kernel version specific folder. Remove them from target packages to make opkg pick the kmods from kmod archive folder only. Also add an additional step to remove any kmod entry from sha256sums. Signed-off-by: Daniel Golle [ rework implementation, sha256sumsclean + --remove-source-files ] Signed-off-by: Christian Marangi --- phase1/master.cfg | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/phase1/master.cfg b/phase1/master.cfg index f869dfc..7202908 100644 --- a/phase1/master.cfg +++ b/phase1/master.cfg @@ -1303,10 +1303,11 @@ def prepareFactory(target): factory.addStep( ShellCommand( name="kmodprepare", - description="Preparing kmod archive", + description="Preparing kmod archive (move kmods)", descriptionDone="Kmod archive prepared", command=[ "rsync", + "--remove-source-files", "--include=/kmod-*.ipk", "--include=/kmod-*.apk", "--exclude=*", @@ -1350,6 +1351,26 @@ def prepareFactory(target): ) ) + factory.addStep( + ShellCommand( + name="sha256sumsclean", + description="Removing kmods from sha256sums", + descriptionDone="Kmods removed", + command=[ + "sed", + "-i", + r "\# *packages/kmod-.*$#d", + Interpolate( + "bin/targets/%(kw:target)s/%(kw:subtarget)s%(prop:libc)s/sha256sums", + target=target, + subtarget=subtarget, + ), + ], + haltOnFailure=True, + doStepIf=IsKmodArchiveEnabled, + ) + ) + # sign factory.addStep( MasterShellCommand(