blob: 3124de8140eb7656de36eca5c89b56f7e822b0eb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/bin/bash
fetch_source() {
if ! [ -d "src/.git" ]; then
git clone --depth 1 "${REQUIRED_GIT}" --branch "$REQUIRED_BRANCH" src || perror "Could not clone busybox git"
fi
cd src || perror "Could not cd to src"
# Patch image centering and background filling if not patched yet
if ! grep -q "bcenter_image" "miscutils/fbsplash.c"; then
git apply "${MODULE_DIR}/fbsplash-center.patch" || perror "Could not apply busybox patch for fbsplash image centering"
fi
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
if ! grep -q 'suspend.*"no"' "util-linux/rtcwake.c"; then
git apply "${MODULE_DIR}/rtcwake-mode-no.patch" || perror "Could not apply busybox patch for rtcwake 'no'-mode"
fi
if ! grep -q 'rtc0' "util-linux/rtcwake.c"; then
git apply "${MODULE_DIR}/rtcwake-default-rtc0.patch" || perror "Could not apply busybox patch for rtcwake default to rtc0"
fi
cd .. || perror "cd .. failed"
}
build() {
cp "${MODULE_DIR}/openslx-busybox-config" "src/.config"
cd src || perror "Could not cd to src"
yes '' | make oldconfig
pinfo "Running make (if this hangs, check for unset options, ie. when you increased the REQUIRED_BRANCH)"
make || perror "failed."
pinfo "Running make install"
make CONFIG_PREFIX="$MODULE_BUILD_DIR" install || perror "failed"
rm -f "$MODULE_BUILD_DIR/bin/mount" "$MODULE_BUILD_DIR/bin/umount" "$MODULE_BUILD_DIR/bin/bash"
cd - &> /dev/null
}
post_copy() {
:
}
|