View | Details | Raw Unified
Collapse All | Expand All

(-) genkernel.orig/gen_compile.sh (-30 / +33 lines)
 Lines 427-459    Link Here 
}
}
compile_busybox() {
compile_busybox() {
	[ -f "${BUSYBOX_SRCTAR}" ] ||
	# Delete cache if config is newer
		gen_die "Could not find busybox source tarball: ${BUSYBOX_SRCTAR}!"
	if [ \
	[ -f "${BUSYBOX_CONFIG}" ] ||
		-f "${BUSYBOX_BINCACHE}" -a \
		gen_die "Cound not find busybox config file: ${BUSYBOX_CONFIG}!"
		-f "${BUSYBOX_CONFIG}" -a \
	cd "${TEMP}"
		"${BUSYBOX_BINCACHE}" -ot "${BUSYBOX_CONFIG}" ]
	rm -rf "${BUSYBOX_DIR}" > /dev/null
	then
	/bin/tar -jxpf ${BUSYBOX_SRCTAR} ||
		rm -rf "${BUSYBOX_BINCACHE}"
		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}"
	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
	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
	fi
	if [ ! -f "${BUSYBOX_BINCACHE}" ]
	if [ ! -f "${BUSYBOX_BINCACHE}" ]
	then
	then
		[ -f "${BUSYBOX_SRCTAR}" ] ||
			gen_die "Could not find busybox source tarball: ${BUSYBOX_SRCTAR}!"
		[ -f "${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}"
		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...'
 Lines 461-474    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}"
		rm -rf "${BUSYBOX_DIR}" > /dev/null
	fi
	fi
	cd "${TEMP}"
	rm -rf "${BUSYBOX_DIR}" > /dev/null
}
}
compile_lvm2() {
compile_lvm2() {
(-) genkernel.orig/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 ||
		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
(-) genkernel.orig/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 ||
		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.orig/genkernel.conf (-1 / +1 lines)
 Lines 77-83    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