|
|
@ -360,27 +360,12 @@ compile_busybox() {
|
|
|
|
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}" ] ||
|
|
|
|
gen_die "Cound not find busybox config file: ${BUSYBOX_CONFIG}!"
|
|
|
|
gen_die "Cound not find busybox config file: ${BUSYBOX_CONFIG}!"
|
|
|
|
cd "${TEMP}"
|
|
|
|
|
|
|
|
rm -rf "${BUSYBOX_DIR}" > /dev/null
|
|
|
|
|
|
|
|
/bin/tar -jxpf ${BUSYBOX_SRCTAR} ||
|
|
|
|
|
|
|
|
gen_die 'Could not extract busybox source tarball!'
|
|
|
|
|
|
|
|
[ -d "${BUSYBOX_DIR}" ] ||
|
|
|
|
|
|
|
|
gen_die 'Busybox directory ${BUSYBOX_DIR} is invalid!'
|
|
|
|
|
|
|
|
cp "${BUSYBOX_CONFIG}" "${BUSYBOX_DIR}/.config"
|
|
|
|
|
|
|
|
# sed -i ${BUSYBOX_DIR}/.config -e 's/#\? \?CONFIG_FEATURE_INSTALLER[ =].*/CONFIG_FEATURE_INSTALLER=y/g'
|
|
|
|
|
|
|
|
cd "${BUSYBOX_DIR}"
|
|
|
|
|
|
|
|
# patch -p1 < "${GK_SHARE}/pkg/busybox-1.1.3+gentoo-mdadm.patch"
|
|
|
|
|
|
|
|
# patch -p1 < "${GK_SHARE}/pkg/busybox-1.1.3+gentoo-mdadm2.patch"
|
|
|
|
|
|
|
|
# patch -p1 < "${GK_SHARE}/pkg/busybox-1.1.3+gentoo-mdadm3.patch"
|
|
|
|
|
|
|
|
apply_patches busybox ${BUSYBOX_VER}
|
|
|
|
|
|
|
|
print_info 1 'busybox: >> Configuring...'
|
|
|
|
|
|
|
|
yes '' 2>/dev/null | compile_generic oldconfig utils
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Delete cache if stored config's MD5 does not match one to be used
|
|
|
|
# Delete cache if stored config's MD5 does not match one to be used
|
|
|
|
if [ -f "${BUSYBOX_BINCACHE}" -a -f "${BUSYBOX_CONFIG}" ]
|
|
|
|
if [ -f "${BUSYBOX_BINCACHE}" ]
|
|
|
|
then
|
|
|
|
then
|
|
|
|
oldconfig_md5=$(tar -xjf "${BUSYBOX_BINCACHE}" -O .config | md5sum)
|
|
|
|
oldconfig_md5=$(tar -xjf "${BUSYBOX_BINCACHE}" -O .config.gk_orig 2>/dev/null | md5sum)
|
|
|
|
newconfig_md5=$(md5sum < .config)
|
|
|
|
newconfig_md5=$(md5sum < "${BUSYBOX_CONFIG}")
|
|
|
|
if [ "${oldconfig_md5}" != "${newconfig_md5}" ]
|
|
|
|
if [ "${oldconfig_md5}" != "${newconfig_md5}" ]
|
|
|
|
then
|
|
|
|
then
|
|
|
|
print_info 1 "busybox: >> Removing stale cache..."
|
|
|
|
print_info 1 "busybox: >> Removing stale cache..."
|
|
|
@ -392,6 +377,19 @@ compile_busybox() {
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -f "${BUSYBOX_BINCACHE}" ]
|
|
|
|
if [ ! -f "${BUSYBOX_BINCACHE}" ]
|
|
|
|
then
|
|
|
|
then
|
|
|
|
|
|
|
|
cd "${TEMP}"
|
|
|
|
|
|
|
|
rm -rf "${BUSYBOX_DIR}" > /dev/null
|
|
|
|
|
|
|
|
/bin/tar -jxpf ${BUSYBOX_SRCTAR} ||
|
|
|
|
|
|
|
|
gen_die 'Could not extract busybox source tarball!'
|
|
|
|
|
|
|
|
[ -d "${BUSYBOX_DIR}" ] ||
|
|
|
|
|
|
|
|
gen_die 'Busybox directory ${BUSYBOX_DIR} is invalid!'
|
|
|
|
|
|
|
|
cp "${BUSYBOX_CONFIG}" "${BUSYBOX_DIR}/.config"
|
|
|
|
|
|
|
|
cp "${BUSYBOX_CONFIG}" "${BUSYBOX_DIR}/.config.gk_orig"
|
|
|
|
|
|
|
|
cd "${BUSYBOX_DIR}"
|
|
|
|
|
|
|
|
apply_patches busybox ${BUSYBOX_VER}
|
|
|
|
|
|
|
|
print_info 1 'busybox: >> Configuring...'
|
|
|
|
|
|
|
|
yes '' 2>/dev/null | compile_generic oldconfig utils
|
|
|
|
|
|
|
|
|
|
|
|
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...'
|
|
|
@ -399,12 +397,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!'
|
|
|
|
tar -cj -C "${TEMP}/${BUSYBOX_DIR}" -f "${BUSYBOX_BINCACHE}" busybox .config ||
|
|
|
|
tar -cj -C "${TEMP}/${BUSYBOX_DIR}" -f "${BUSYBOX_BINCACHE}" busybox .config .config.gk_orig ||
|
|
|
|
gen_die 'Could not create the busybox bincache!'
|
|
|
|
gen_die 'Could not create the busybox bincache!'
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cd "${TEMP}"
|
|
|
|
cd "${TEMP}"
|
|
|
|
rm -rf "${BUSYBOX_DIR}" > /dev/null
|
|
|
|
rm -rf "${BUSYBOX_DIR}" > /dev/null
|
|
|
|
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
compile_lvm() {
|
|
|
|
compile_lvm() {
|
|
|
|