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

Collapse All | Expand All

(-)a/gen_initramfs.sh (+31 lines)
Lines 796-801 create_initramfs() { Link Here
796
		append_data 'overlay'
796
		append_data 'overlay'
797
	fi
797
	fi
798
798
799
	# Finalize cpio by removing duplicate files and generating modules.dep.bb
800
	print_info 1 "        >> Finalizing cpio"
801
	local TDIR="${TEMP}/initramfs-final"
802
	mkdir -p "${TDIR}"
803
	cd "${TDIR}"
804
805
	cpio --quiet -i -F "${CPIO}" 2> /dev/null \
806
		|| gen_die "extracting cpio for finalization"
807
808
	# Remove unused modules.* files
809
	rm "${TDIR}/lib/modules/${KV}/modules."*
810
811
	# Hack to workaround broken `busybox depmod -b`
812
	touch "${TDIR}/proc/modules"
813
	if [ ${UID} -eq 0 ]
814
	then
815
		chroot "${TDIR}" /bin/busybox depmod "${KV}" \
816
			|| gen_die "generating busybox modules.dep"
817
818
	else
819
			fakechroot fakeroot chroot "${TDIR}" /bin/busybox depmod "${KV}" \
820
			|| gen_die "generating busybox modules.dep"
821
	fi
822
	rm "${TDIR}/proc/modules"
823
824
	find . -print | cpio ${CPIO_ARGS} -F "${CPIO}" 2>/dev/null \
825
		|| gen_die "recompressing cpio"
826
827
	cd "${TEMP}"
828
	rm -r "${TDIR}"
829
799
	if isTrue "${INTEGRATED_INITRAMFS}"
830
	if isTrue "${INTEGRATED_INITRAMFS}"
800
	then
831
	then
801
		# Explicitly do not compress if we are integrating into the kernel.
832
		# Explicitly do not compress if we are integrating into the kernel.

Return to bug 472312