Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 180211 | Differences between
and this patch

Collapse All | Expand All

(-)gen_compile.sh (-11 / +11 lines)
Lines 427-440 Link Here
427
}
427
}
428
428
429
compile_busybox() {
429
compile_busybox() {
430
430
	# Delete cache if stored config's MD5 does not match one to be used
431
	# Delete cache if config is newer
431
	if [ -f "${BUSYBOX_BINCACHE}" -a -f "${BUSYBOX_CONFIG}" ]
432
	if [ \
433
		-f "${BUSYBOX_BINCACHE}" -a \
434
		-f "${BUSYBOX_CONFIG}" -a \
435
		"${BUSYBOX_BINCACHE}" -ot "${BUSYBOX_CONFIG}" ]
436
	then
432
	then
437
		rm -rf "${BUSYBOX_BINCACHE}"
433
		oldconfig_md5=$(tar -xjf "${BUSYBOX_BINCACHE}" -O .config | md5sum)
434
		newconfig_md5=$(md5sum < "${BUSYBOX_CONFIG}")
435
		if [ "${oldconfig_md5}" != "${newconfig_md5}" ]
436
		then
437
			print_info 1 "busybox: >> Removing stale cache..."
438
			rm -rf "${BUSYBOX_BINCACHE}"
439
		fi
438
	fi
440
	fi
439
441
440
	if [ ! -f "${BUSYBOX_BINCACHE}" ]
442
	if [ ! -f "${BUSYBOX_BINCACHE}" ]
Lines 461-470 Link Here
461
			gen_die 'Busybox executable does not exist!'
463
			gen_die 'Busybox executable does not exist!'
462
		strip "${TEMP}/${BUSYBOX_DIR}/busybox" ||
464
		strip "${TEMP}/${BUSYBOX_DIR}/busybox" ||
463
			gen_die 'Could not strip busybox binary!'
465
			gen_die 'Could not strip busybox binary!'
464
		bzip2 "${TEMP}/${BUSYBOX_DIR}/busybox" ||
466
		tar -cj -C "${TEMP}/${BUSYBOX_DIR}" -f "${BUSYBOX_BINCACHE}" busybox .config ||
465
			gen_die 'bzip2 compression of busybox failed!'
467
			gen_die 'Could not create the busybox bincache!'
466
		mv "${TEMP}/${BUSYBOX_DIR}/busybox.bz2" "${BUSYBOX_BINCACHE}" ||
467
			gen_die 'Could not copy the busybox binary to the package directory, does the directory exist?'
468
468
469
		cd "${TEMP}"
469
		cd "${TEMP}"
470
		rm -rf "${BUSYBOX_DIR}" > /dev/null
470
		rm -rf "${BUSYBOX_DIR}" > /dev/null
(-)gen_initrd.sh (-3 / +3 lines)
Lines 80-89 Link Here
80
		chmod +x "${TEMP}/initrd-temp/bin/blkid"
80
		chmod +x "${TEMP}/initrd-temp/bin/blkid"
81
	fi
81
	fi
82
82
83
	cp "${BUSYBOX_BINCACHE}" "${TEMP}/initrd-temp/bin/busybox.bz2" ||
83
	cp "${BUSYBOX_BINCACHE}" "${TEMP}/initrd-temp/bin/busybox.tar.bz2" ||
84
		gen_die 'Could not copy busybox from bincache!'
84
		gen_die 'Could not copy busybox from bincache!'
85
	bunzip2 "${TEMP}/initrd-temp/bin/busybox.bz2" ||
85
	tar -xjf "${TEMP}/initrd-temp/bin/busybox.tar.bz2" -C "${TEMP}/initrd-temp/bin/busybox.tar.bz2" busybox ||
86
		gen_die 'Could not uncompress busybox!'
86
		gen_die 'Could not extract busybox bincache!'
87
	chmod +x "${TEMP}/initrd-temp/bin/busybox"
87
	chmod +x "${TEMP}/initrd-temp/bin/busybox"
88
88
89
	if [ "${NOINITRDMODULES}" = '' ]
89
	if [ "${NOINITRDMODULES}" = '' ]
(-)genkernel.conf (-1 / +1 lines)
Lines 75-81 Link Here
75
BUSYBOX_VER="1.1.3+gentoo"
75
BUSYBOX_VER="1.1.3+gentoo"
76
# Busybox bin-cache location, to store pre-compiled busybox
76
# Busybox bin-cache location, to store pre-compiled busybox
77
# binary is just a bzip2 busybox executable
77
# binary is just a bzip2 busybox executable
78
BUSYBOX_BINCACHE="%%CACHE%%/busybox-${BUSYBOX_VER}-%%ARCH%%.bz2"
78
BUSYBOX_BINCACHE="%%CACHE%%/busybox-${BUSYBOX_VER}-%%ARCH%%.tar.bz2"
79
# Location of BusyBox source tarball
79
# Location of BusyBox source tarball
80
BUSYBOX_SRCTAR="${GK_SHARE}/pkg/busybox-${BUSYBOX_VER}.tar.bz2"
80
BUSYBOX_SRCTAR="${GK_SHARE}/pkg/busybox-${BUSYBOX_VER}.tar.bz2"
81
# Directory created after busybox tarball is extracted
81
# Directory created after busybox tarball is extracted
(-)gen_initramfs.sh (-3 / +3 lines)
Lines 50-59 Link Here
50
50
51
	cp "${GK_SHARE}/generic/udhcpc.scripts" ${TEMP}/initramfs-busybox-temp/bin/
51
	cp "${GK_SHARE}/generic/udhcpc.scripts" ${TEMP}/initramfs-busybox-temp/bin/
52
	chmod +x "${TEMP}/initramfs-busybox-temp/bin/udhcpc.scripts"
52
	chmod +x "${TEMP}/initramfs-busybox-temp/bin/udhcpc.scripts"
53
	cp "${BUSYBOX_BINCACHE}" "${TEMP}/initramfs-busybox-temp/bin/busybox.bz2" ||
53
	cp "${BUSYBOX_BINCACHE}" "${TEMP}/initramfs-busybox-temp/bin/busybox.tar.bz2" ||
54
		gen_die 'Could not copy busybox from bincache!'
54
		gen_die 'Could not copy busybox from bincache!'
55
	bunzip2 "${TEMP}/initramfs-busybox-temp/bin/busybox.bz2" ||
55
	tar -xjf "${TEMP}/initramfs-busybox-temp/bin/busybox.tar.bz2" -C "${TEMP}/initramfs-busybox-temp/bin/busybox.tar.bz2" busybox ||
56
		gen_die 'Could not uncompress busybox!'
56
		gen_die 'Could not extract busybox bincache!'
57
	chmod +x "${TEMP}/initramfs-busybox-temp/bin/busybox"
57
	chmod +x "${TEMP}/initramfs-busybox-temp/bin/busybox"
58
58
59
	# down devfsd we use with dietlibc
59
	# down devfsd we use with dietlibc

Return to bug 180211