Skip to content

Commit 920a220

Browse files
committed
fix(ci): wrap depmod to strip unsupported -d flag
1 parent d367532 commit 920a220

4 files changed

Lines changed: 48 additions & 0 deletions

File tree

.github/workflows/build-ksu-next.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,18 @@ jobs:
411411
echo 'override KBUILD_HOSTLDFLAGS += --sysroot=/' >> common/tools/bpf/resolve_btfids/Makefile
412412
echo 'override LDFLAGS += --sysroot=/' >> common/tools/bpf/resolve_btfids/Makefile
413413
fi
414+
# Fix depmod -d flag unsupported on older kmod
415+
mkdir -p "$HOME/bin"
416+
cat > "$HOME/bin/depmod" << 'DEPMOD_WRAPPER'
417+
#!/bin/sh
418+
args=""
419+
for arg in "$@"; do
420+
case "$arg" in -d) continue ;; *) args="$args $arg" ;; esac
421+
done
422+
exec /usr/sbin/depmod $args
423+
DEPMOD_WRAPPER
424+
chmod +x "$HOME/bin/depmod"
425+
export PATH="$HOME/bin:$PATH"
414426
tools/bazel build --config=fast --lto=$LTO_MODE --defconfig_fragment=//common:arch/arm64/configs/sukisu_gki.fragment //common:kernel_aarch64_dist || BUILD_RC=$?
415427
fi
416428
if [ "$BUILD_RC" -ne 0 ]; then

.github/workflows/build-resukisu.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,18 @@ jobs:
408408
echo 'override KBUILD_HOSTLDFLAGS += --sysroot=/' >> common/tools/bpf/resolve_btfids/Makefile
409409
echo 'override LDFLAGS += --sysroot=/' >> common/tools/bpf/resolve_btfids/Makefile
410410
fi
411+
# Fix depmod -d flag unsupported on older kmod
412+
mkdir -p "$HOME/bin"
413+
cat > "$HOME/bin/depmod" << 'DEPMOD_WRAPPER'
414+
#!/bin/sh
415+
args=""
416+
for arg in "$@"; do
417+
case "$arg" in -d) continue ;; *) args="$args $arg" ;; esac
418+
done
419+
exec /usr/sbin/depmod $args
420+
DEPMOD_WRAPPER
421+
chmod +x "$HOME/bin/depmod"
422+
export PATH="$HOME/bin:$PATH"
411423
tools/bazel build --config=fast --lto=$LTO_MODE --defconfig_fragment=//common:arch/arm64/configs/sukisu_gki.fragment //common:kernel_aarch64_dist || BUILD_RC=$?
412424
fi
413425
if [ "$BUILD_RC" -ne 0 ]; then

.github/workflows/build-sukisu.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,18 @@ jobs:
408408
echo 'override KBUILD_HOSTLDFLAGS += --sysroot=/' >> common/tools/bpf/resolve_btfids/Makefile
409409
echo 'override LDFLAGS += --sysroot=/' >> common/tools/bpf/resolve_btfids/Makefile
410410
fi
411+
# Fix depmod -d flag unsupported on older kmod
412+
mkdir -p "$HOME/bin"
413+
cat > "$HOME/bin/depmod" << 'DEPMOD_WRAPPER'
414+
#!/bin/sh
415+
args=""
416+
for arg in "$@"; do
417+
case "$arg" in -d) continue ;; *) args="$args $arg" ;; esac
418+
done
419+
exec /usr/sbin/depmod $args
420+
DEPMOD_WRAPPER
421+
chmod +x "$HOME/bin/depmod"
422+
export PATH="$HOME/bin:$PATH"
411423
tools/bazel build --config=fast --lto=$LTO_MODE --defconfig_fragment=//common:arch/arm64/configs/sukisu_gki.fragment //common:kernel_aarch64_dist || BUILD_RC=$?
412424
fi
413425
if [ "$BUILD_RC" -ne 0 ]; then

.github/workflows/build-wksu.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,18 @@ jobs:
409409
echo 'override KBUILD_HOSTLDFLAGS += --sysroot=/' >> common/tools/bpf/resolve_btfids/Makefile
410410
echo 'override LDFLAGS += --sysroot=/' >> common/tools/bpf/resolve_btfids/Makefile
411411
fi
412+
# Fix depmod -d flag unsupported on older kmod
413+
mkdir -p "$HOME/bin"
414+
cat > "$HOME/bin/depmod" << 'DEPMOD_WRAPPER'
415+
#!/bin/sh
416+
args=""
417+
for arg in "$@"; do
418+
case "$arg" in -d) continue ;; *) args="$args $arg" ;; esac
419+
done
420+
exec /usr/sbin/depmod $args
421+
DEPMOD_WRAPPER
422+
chmod +x "$HOME/bin/depmod"
423+
export PATH="$HOME/bin:$PATH"
412424
tools/bazel build --config=fast --lto=$LTO_MODE --defconfig_fragment=//common:arch/arm64/configs/wild_gki.fragment //common:kernel_aarch64_dist || BUILD_RC=$?
413425
fi
414426
if [ "$BUILD_RC" -ne 0 ]; then

0 commit comments

Comments
 (0)