View | Details | Raw Unified
Collapse All | Expand All

(-) gen_compile.sh (-11 / +11 lines)
 Lines 427-440    Link Here 
}
}
compile_busybox() {
compile_busybox() {
	# Delete cache if stored config's MD5 does not match one to be used
	# Delete cache if config is newer
	if [ -f "${BUSYBOX_BINCACHE}" -a -f "${BUSYBOX_CONFIG}" ]
	if [ \
		-f "${BUSYBOX_BINCACHE}" -a \
		-f "${BUSYBOX_CONFIG}" -a \
		"${BUSYBOX_BINCACHE}" -ot "${BUSYBOX_CONFIG}" ]
	then
	then
		rm -rf "${BUSYBOX_BINCACHE}"
		oldconfig_md5=$(tar -xjf "${BUSYBOX_BINCACHE}" -O .config | md5sum)
		newconfig_md5=$(md5sum < "${BUSYBOX_CONFIG}")
		if [ "${oldconfig_md5}" != "${newconfig_md5}" ]
		then
			print_info 1 "busybox: >> Removing stale cache..."
			rm -rf "${BUSYBOX_BINCACHE}"
		fi
	fi
	fi
	if [ ! -f "${BUSYBOX_BINCACHE}" ]
	if [ ! -f "${BUSYBOX_BINCACHE}" ]
 Lines 461-470    Link Here 
			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}" ||
			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
(-) gen_initrd.sh (-3 / +3 lines)
 Lines 80-89    Link Here 
		chmod +x "${TEMP}/initrd-temp/bin/blkid"
		chmod +x "${TEMP}/initrd-temp/bin/blkid"
	fi
	fi
	cp "${BUSYBOX_BINCACHE}" "${TEMP}/initrd-temp/bin/busybox.bz2" ||
	cp "${BUSYBOX_BINCACHE}" "${TEMP}/initrd-temp/bin/busybox.tar.bz2" ||
		gen_die 'Could not copy busybox from bincache!'
		gen_die 'Could not copy busybox from bincache!'
	bunzip2 "${TEMP}/initrd-temp/bin/busybox.bz2" ||
	tar -xjf "${TEMP}/initrd-temp/bin/busybox.tar.bz2" -C "${TEMP}/initrd-temp/bin/busybox.tar.bz2" busybox ||
		gen_die 'Could not uncompress busybox!'
		gen_die 'Could not extract busybox bincache!'
	chmod +x "${TEMP}/initrd-temp/bin/busybox"
	chmod +x "${TEMP}/initrd-temp/bin/busybox"
	if [ "${NOINITRDMODULES}" = '' ]
	if [ "${NOINITRDMODULES}" = '' ]
(-) genkernel.conf (-1 / +1 lines)
 Lines 75-81    Link Here 
BUSYBOX_VER="1.1.3+gentoo"
BUSYBOX_VER="1.1.3+gentoo"
# Busybox bin-cache location, to store pre-compiled busybox
# Busybox bin-cache location, to store pre-compiled busybox
# binary is just a bzip2 busybox executable
# binary is just a bzip2 busybox executable
BUSYBOX_BINCACHE="%%CACHE%%/busybox-${BUSYBOX_VER}-%%ARCH%%.bz2"
BUSYBOX_BINCACHE="%%CACHE%%/busybox-${BUSYBOX_VER}-%%ARCH%%.tar.bz2"
# Location of BusyBox source tarball
# Location of BusyBox source tarball
BUSYBOX_SRCTAR="${GK_SHARE}/pkg/busybox-${BUSYBOX_VER}.tar.bz2"
BUSYBOX_SRCTAR="${GK_SHARE}/pkg/busybox-${BUSYBOX_VER}.tar.bz2"
# Directory created after busybox tarball is extracted
# Directory created after busybox tarball is extracted
(-) gen_initramfs.sh (-3 / +3 lines)
 Lines 50-59    Link Here 
	cp "${GK_SHARE}/generic/udhcpc.scripts" ${TEMP}/initramfs-busybox-temp/bin/
	cp "${GK_SHARE}/generic/udhcpc.scripts" ${TEMP}/initramfs-busybox-temp/bin/
	chmod +x "${TEMP}/initramfs-busybox-temp/bin/udhcpc.scripts"
	chmod +x "${TEMP}/initramfs-busybox-temp/bin/udhcpc.scripts"
	cp "${BUSYBOX_BINCACHE}" "${TEMP}/initramfs-busybox-temp/bin/busybox.bz2" ||
	cp "${BUSYBOX_BINCACHE}" "${TEMP}/initramfs-busybox-temp/bin/busybox.tar.bz2" ||
		gen_die 'Could not copy busybox from bincache!'
		gen_die 'Could not copy busybox from bincache!'
	bunzip2 "${TEMP}/initramfs-busybox-temp/bin/busybox.bz2" ||
	tar -xjf "${TEMP}/initramfs-busybox-temp/bin/busybox.tar.bz2" -C "${TEMP}/initramfs-busybox-temp/bin/busybox.tar.bz2" busybox ||
		gen_die 'Could not uncompress busybox!'
		gen_die 'Could not extract busybox bincache!'
	chmod +x "${TEMP}/initramfs-busybox-temp/bin/busybox"
	chmod +x "${TEMP}/initramfs-busybox-temp/bin/busybox"
	# down devfsd we use with dietlibc
	# down devfsd we use with dietlibc