|
|
@ -427,18 +427,6 @@ compile_unionfs_utils() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
compile_busybox() {
|
|
|
|
compile_busybox() {
|
|
|
|
|
|
|
|
|
|
|
|
# Delete cache if config is newer
|
|
|
|
|
|
|
|
if [ \
|
|
|
|
|
|
|
|
-f "${BUSYBOX_BINCACHE}" -a \
|
|
|
|
|
|
|
|
-f "${BUSYBOX_CONFIG}" -a \
|
|
|
|
|
|
|
|
"${BUSYBOX_BINCACHE}" -ot "${BUSYBOX_CONFIG}" ]
|
|
|
|
|
|
|
|
then
|
|
|
|
|
|
|
|
rm -rf "${BUSYBOX_BINCACHE}"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -f "${BUSYBOX_BINCACHE}" ]
|
|
|
|
|
|
|
|
then
|
|
|
|
|
|
|
|
[ -f "${BUSYBOX_SRCTAR}" ] ||
|
|
|
|
[ -f "${BUSYBOX_SRCTAR}" ] ||
|
|
|
|
gen_die "Could not find busybox source tarball: ${BUSYBOX_SRCTAR}!"
|
|
|
|
gen_die "Could not find busybox source tarball: ${BUSYBOX_SRCTAR}!"
|
|
|
|
[ -f "${BUSYBOX_CONFIG}" ] ||
|
|
|
|
[ -f "${BUSYBOX_CONFIG}" ] ||
|
|
|
@ -454,6 +442,23 @@ compile_busybox() {
|
|
|
|
cd "${BUSYBOX_DIR}"
|
|
|
|
cd "${BUSYBOX_DIR}"
|
|
|
|
print_info 1 'busybox: >> Configuring...'
|
|
|
|
print_info 1 'busybox: >> Configuring...'
|
|
|
|
yes '' 2>/dev/null | compile_generic oldconfig utils
|
|
|
|
yes '' 2>/dev/null | compile_generic oldconfig utils
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Delete cache if stored config's MD5 does not match one to be used
|
|
|
|
|
|
|
|
if [ -f "${BUSYBOX_BINCACHE}" -a -f "${BUSYBOX_CONFIG}" ]
|
|
|
|
|
|
|
|
then
|
|
|
|
|
|
|
|
oldconfig_md5=$(tar -xjf "${BUSYBOX_BINCACHE}" -O .config | md5sum)
|
|
|
|
|
|
|
|
newconfig_md5=$(md5sum < .config)
|
|
|
|
|
|
|
|
if [ "${oldconfig_md5}" != "${newconfig_md5}" ]
|
|
|
|
|
|
|
|
then
|
|
|
|
|
|
|
|
print_info 1 "busybox: >> Removing stale cache..."
|
|
|
|
|
|
|
|
rm -rf "${BUSYBOX_BINCACHE}"
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
print_info 1 "busybox: >> Using cache"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -f "${BUSYBOX_BINCACHE}" ]
|
|
|
|
|
|
|
|
then
|
|
|
|
print_info 1 'busybox: >> Compiling...'
|
|
|
|
print_info 1 'busybox: >> Compiling...'
|
|
|
|
compile_generic all utils
|
|
|
|
compile_generic all utils
|
|
|
|
print_info 1 'busybox: >> Copying to cache...'
|
|
|
|
print_info 1 'busybox: >> Copying to cache...'
|
|
|
@ -461,14 +466,12 @@ compile_busybox() {
|
|
|
|
gen_die 'Busybox executable does not exist!'
|
|
|
|
gen_die 'Busybox executable does not exist!'
|
|
|
|
strip "${TEMP}/${BUSYBOX_DIR}/busybox" ||
|
|
|
|
strip "${TEMP}/${BUSYBOX_DIR}/busybox" ||
|
|
|
|
gen_die 'Could not strip busybox binary!'
|
|
|
|
gen_die 'Could not strip busybox binary!'
|
|
|
|
bzip2 "${TEMP}/${BUSYBOX_DIR}/busybox" ||
|
|
|
|
tar -cj -C "${TEMP}/${BUSYBOX_DIR}" -f "${BUSYBOX_BINCACHE}" busybox .config ||
|
|
|
|
gen_die 'bzip2 compression of busybox failed!'
|
|
|
|
gen_die 'Could not create the busybox bincache!'
|
|
|
|
mv "${TEMP}/${BUSYBOX_DIR}/busybox.bz2" "${BUSYBOX_BINCACHE}" ||
|
|
|
|
fi
|
|
|
|
gen_die 'Could not copy the busybox binary to the package directory, does the directory exist?'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cd "${TEMP}"
|
|
|
|
cd "${TEMP}"
|
|
|
|
rm -rf "${BUSYBOX_DIR}" > /dev/null
|
|
|
|
rm -rf "${BUSYBOX_DIR}" > /dev/null
|
|
|
|
fi
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
compile_lvm2() {
|
|
|
|
compile_lvm2() {
|
|
|
|