summaryrefslogtreecommitdiffstats
path: root/core/modules/busybox/module.build
diff options
context:
space:
mode:
authorSimon Rettberg2020-08-26 15:36:04 +0200
committerSimon Rettberg2020-08-26 15:36:04 +0200
commit784b6581d9478ce2cc73f47317350a596bb08cc3 (patch)
tree904019bf87ab35dab0a85f4c6086b6e87a7f7d63 /core/modules/busybox/module.build
parent[run-virt] Fix load order of includes (diff)
downloadmltk-784b6581d9478ce2cc73f47317350a596bb08cc3.tar.gz
mltk-784b6581d9478ce2cc73f47317350a596bb08cc3.tar.xz
mltk-784b6581d9478ce2cc73f47317350a596bb08cc3.zip
[busybox] Fix rtcwake patch, add timeout backwars compat patch
Diffstat (limited to 'core/modules/busybox/module.build')
-rw-r--r--core/modules/busybox/module.build17
1 files changed, 12 insertions, 5 deletions
diff --git a/core/modules/busybox/module.build b/core/modules/busybox/module.build
index fc4a28d0..9b83e1e7 100644
--- a/core/modules/busybox/module.build
+++ b/core/modules/busybox/module.build
@@ -5,15 +5,22 @@ fetch_source() {
git clone --depth 1 "${REQUIRED_GIT}" --branch "$REQUIRED_BRANCH" src || perror "Could not clone busybox git"
fi
cde src
- git apply "${MODULE_DIR}/1_31_1-stime.patch" || perror "Could not apply stime patch for 1.31.1"
+ # Needed for newer glibc
+ if ! grep -q 'OPT_SET.*clock_settime.*CLOCK_REALTIME' "coreutils/date.c"; then
+ git apply "${MODULE_DIR}/1_31_1-stime.patch" || perror "Could not apply stime patch for 1.31.1"
+ fi
+ # Hack for backwards compat to old busybox which required -t (timeout -t [SECS] [PROG...])
+ if ! grep -q 'getopt32.*"t"' "coreutils/timeout.c"; then
+ git apply "${MODULE_DIR}/timeout-compat.patch" || perror "Could not apply timeout backwards compat patch"
+ fi
# Patch background filling if not patched yet
if ! grep -q "bfill_background" "miscutils/fbsplash.c"; then
git apply "${MODULE_DIR}/fbsplash-fillbg.patch" || perror "Could not apply busybox patch for fbsplash background filling"
fi
- # TODO fix this patch
- #if ! grep -q 'suspend.*"no"' "util-linux/rtcwake.c"; then
- # git apply "${MODULE_DIR}/rtcwake-compat.patch" || perror "Could not apply busybox patch for rtcwake compat with util-linux"
- #fi
+ # Add support for just manipulating alarm, without any standby/hibernation
+ if ! grep -q 'suspend.*"no"' "util-linux/rtcwake.c"; then
+ git apply "${MODULE_DIR}/rtcwake-compat.patch" || perror "Could not apply busybox patch for rtcwake compat with util-linux"
+ fi
# make sure Makefile allows a preset CC
if [ -n "$CC" ]; then
sed -i -r 's/^CC\s*=\s*(\S)/CC ?= \1/' Makefile || perror "Could not patch Makefile"