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

Collapse All | Expand All

(-)genkernel-3.4.22.1-vanilla/gen_cmdline.sh (+6 lines)
Lines 107-112 Link Here
107
  echo "	--no-gpg		Exclude GPG-armored LUKS key support"
107
  echo "	--no-gpg		Exclude GPG-armored LUKS key support"
108
  echo "	--busybox		Include busybox"
108
  echo "	--busybox		Include busybox"
109
  echo "	--no-busybox	Exclude busybox"
109
  echo "	--no-busybox	Exclude busybox"
110
  echo "	--v86d			Include uvesafb helper (v86d)"
111
  echo "	--no-v86d	Exclude uvesafb helper (v86d)"
110
  echo "	--unionfs		Include support for unionfs"
112
  echo "	--unionfs		Include support for unionfs"
111
  echo "	--no-unionfs	Exclude support for unionfs"
113
  echo "	--no-unionfs	Exclude support for unionfs"
112
  echo "	--netboot		Create a self-contained env in the initramfs"
114
  echo "	--netboot		Create a self-contained env in the initramfs"
Lines 272-277 Link Here
272
			CMD_BUSYBOX=`parse_optbool "$*"`
274
			CMD_BUSYBOX=`parse_optbool "$*"`
273
			print_info 2 "CMD_BUSYBOX: ${CMD_BUSYBOX}"
275
			print_info 2 "CMD_BUSYBOX: ${CMD_BUSYBOX}"
274
			;;
276
			;;
277
		--v86d|--no-v86d)
278
			CMD_V86D=`parse_optbool "$*"`
279
			print_info 2 "CMD_V86D: ${CMD_V86D}"
280
			;;
275
		--unionfs|--no-unionfs)
281
		--unionfs|--no-unionfs)
276
			CMD_UNIONFS=`parse_optbool "$*"`
282
			CMD_UNIONFS=`parse_optbool "$*"`
277
			print_info 2 "CMD_UNIONFS: ${CMD_UNIONFS}"
283
			print_info 2 "CMD_UNIONFS: ${CMD_UNIONFS}"
(-)genkernel-3.4.22.1-vanilla/gen_compile.sh (+125 lines)
Lines 775-777 Link Here
775
		rm -rf "${GPG_DIR}" > /dev/null
775
		rm -rf "${GPG_DIR}" > /dev/null
776
	fi
776
	fi
777
}
777
}
778
779
compile_klibc() {
780
	if [ -f "${KLIBC_BINCACHE}" ]
781
	then
782
		print_info 1 "klibc: >> Using cache"
783
	else
784
		local myARCH="${ARCH}" myABI="${ABI}"
785
786
		case ${ARCH} in
787
			amd64) a=x86_64 ;;
788
			mips) gen_die 'TODO: Use the $ABI' ;;
789
			x86) a=i386 ;;
790
			*) a=${ARCH} ;;
791
		esac
792
		KLIBCARCH=${a}
793
794
		case ${ARCH} in
795
			x86|x86_64) a=x86 ;;
796
			ppc*) a=powerpc ;;
797
			alpha|arm|ia64|m68k|mips|sh|sparc*) a=${ARCH} ;;
798
			*) gen_die "TODO: Update the code for your asm-ARCH symlink" ;;
799
		esac
800
		KLIBCASMARCH=${a}
801
802
		unset ABI ARCH KBUILD_OUTPUT
803
804
		print_info 1 'klibc: >> Unpacking klibc...'
805
		[ ! -f "${KLIBC_SRCTAR}" ] &&
806
			gen_die "Could not find klibc source tarball: ${KLIBC_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
807
		cd "${TEMP}"
808
		rm -rf "${KLIBC_DIR}"
809
		tar -xpf "${KLIBC_SRCTAR}"
810
		[ ! -d "${KLIBC_DIR}" ] &&
811
			gen_die "klibc directory ${KLIBC_DIR} invalid"
812
		cd "${KLIBC_DIR}"
813
		ln -snf "${KERNEL_DIR}" linux
814
		apply_patches klibc ${KLIBC_VER}
815
		print_info 1 'klibc: >> Compiling klibc...'
816
		compile_generic "all install" "utils" \
817
			EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
818
			EXTRA_KLIBCLDFLAGS="-z,noexecstack" \
819
			HOSTCC="${UTILS_CC}" \
820
			CC="${UTILS_CC}" \
821
			LD="${UTILS_LD}" \
822
			AS="${UTILS_AS}" \
823
			INSTALLDIR="${TEMP}/klibc-install" \
824
			KLIBCARCH=${KLIBCARCH} \
825
			KLIBCASMARCH=${KLIBCASMARCH} \
826
			SHLIBDIR="${TEMP}/klibc-install/lib" \
827
			libdir="${TEMP}/klibc-install/lib" \
828
			bindir="${TEMP}/klibc-install/bin" \
829
			mandir="${TEMP}/klibc-install/man"
830
831
		linkname="${TEMP}/klibc-install/include/asm"
832
		if [ -L "${linkname}" ] && [ ! -e "${linkname}" ]; then
833
			ln -snf asm-${KLIBCASMARCH} "${linkname}"
834
		fi
835
836
		print_info 1 '      >> Copying to bincache...'
837
		cd ${TEMP}
838
		rm -rf ${TEMP}/klibc-install/man
839
		for BIN in ${TEMP}/klibc-install/bin/* ; do
840
			if [ ${BIN} != "${TEMP}/klibc-install/bin/klcc" ]
841
			then
842
				rm -f ${BIN}
843
			fi
844
		done
845
		/bin/tar -jcpf "${KLIBC_BINCACHE}" klibc-install ||
846
			gen_die 'Could not tar up the klibc binary!'
847
		[ -f "${KLIBC_BINCACHE}" ] ||
848
			gen_die 'klibc cache not created!'
849
		cd ${TEMP}
850
		rm -rf "${KLIBC_DIR}" > /dev/null
851
		rm -rf "${TEMP}/klibc-install" > /dev/null
852
	fi
853
}
854
855
compile_v86d() {
856
	compile_klibc
857
	if [ ! -f "${V86D_BINCACHE}" ]
858
	then
859
		if [ -z "$(grep V86D ${KERNEL_DIR}/include/linux/connector.h)" ]; then
860
			gen_die "You need a kernel tree patched with uvesafb for v86d. Kernel not patched with uvesafb."
861
		fi
862
		print_info 1 'v86d: >> Unpacking v86d...'
863
		[ -f "${V86D_SRCTAR}" ] ||
864
			gen_die "Could not find v86d source tarball: ${V86D_SRCTAR}! Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
865
		cd "${TEMP}"
866
		rm -rf ${V86D_DIR} > /dev/null
867
		/bin/tar -jxpf ${V86D_SRCTAR} ||
868
			gen_die 'Could not extract v86d source tarball!'
869
		[ -d "${V86D_DIR}" ] ||
870
			gen_die 'v86d directory ${V86D_DIR} is invalid!'
871
872
		rm -rf "${TEMP}/klibc-install" > /dev/null
873
		/bin/tar -jxpf "${KLIBC_BINCACHE}" -C "${TEMP}" ||
874
			gen_die "Could not extract klibc binary cache!";
875
		local myTEMP=`echo ${TEMP} | sed -e 's@/@\\/@g' -e 's@\.@\\.@g' -e 's@-@\\-@g'`
876
		sed ${TEMP}/klibc-install/bin/klcc -i -e 's@\\/var\\/tmp\\/genkernel\\/.*\\/klibc\\-install@'${myTEMP}'\\/klibc\\-install@g'
877
878
		cd "${V86D_DIR}"
879
		apply_patches v86d ${V86D_VER}
880
		print_info 1 'v86d: >> Configuring...'
881
882
		./configure \
883
			--with-klibc \
884
			--with-x86emu >> ${LOGFILE} 2>&1 ||
885
			gen_die 'Configure of v86d failed!'
886
887
		print_info 1 'v86d: >> Compiling...'
888
		compile_generic "" "utils" KDIR="${KERNEL_DIR}" CC="${TEMP}/klibc-install/bin/klcc" ||
889
			gen_die 'Compiling v86d failed'
890
		print_info 1 '      >> Copying to bincache...'
891
		[ -f "${TEMP}/${V86D_DIR}/v86d" ] ||
892
			gen_die 'v86d executable does not exist!'
893
		strip "${TEMP}/${V86D_DIR}/v86d" ||
894
			gen_die 'Could not strip v86d binary!'
895
		bzip2 -z -c "${TEMP}/${V86D_DIR}/v86d" > "${V86D_BINCACHE}" ||
896
			gen_die 'Could not copy the v86d binary to the package directory, does the directory exist?'
897
898
		cd "${TEMP}"
899
		rm -rf "${TEMP}/klibc-install" > /dev/null
900
		rm -rf "${V86D_DIR}"
901
	fi
902
}
(-)genkernel-3.4.22.1-vanilla/gen_determineargs.sh (+5 lines)
Lines 120-125 Link Here
120
	set_config_with_override BOOL   MDADM                CMD_MDADM
120
	set_config_with_override BOOL   MDADM                CMD_MDADM
121
	set_config_with_override STRING MDADM_CONFIG         CMD_MDADM_CONFIG
121
	set_config_with_override STRING MDADM_CONFIG         CMD_MDADM_CONFIG
122
	set_config_with_override BOOL   MULTIPATH            CMD_MULTIPATH
122
	set_config_with_override BOOL   MULTIPATH            CMD_MULTIPATH
123
	set_config_with_override BOOL   V86D                 CMD_V86D                 "no"
123
	set_config_with_override BOOL   FIRMWARE             CMD_FIRMWARE
124
	set_config_with_override BOOL   FIRMWARE             CMD_FIRMWARE
124
	set_config_with_override STRING FIRMWARE_DIR         CMD_FIRMWARE_DIR         "/lib/firmware"
125
	set_config_with_override STRING FIRMWARE_DIR         CMD_FIRMWARE_DIR         "/lib/firmware"
125
	set_config_with_override STRING FIRMWARE_FILES       CMD_FIRMWARE_FILES
126
	set_config_with_override STRING FIRMWARE_FILES       CMD_FIRMWARE_FILES
Lines 144-149 Link Here
144
	FUSE_BINCACHE=`cache_replace "${FUSE_BINCACHE}"`
145
	FUSE_BINCACHE=`cache_replace "${FUSE_BINCACHE}"`
145
	UNIONFS_FUSE_BINCACHE=`cache_replace "${UNIONFS_FUSE_BINCACHE}"`
146
	UNIONFS_FUSE_BINCACHE=`cache_replace "${UNIONFS_FUSE_BINCACHE}"`
146
	GPG_BINCACHE=`cache_replace "${GPG_BINCACHE}"`
147
	GPG_BINCACHE=`cache_replace "${GPG_BINCACHE}"`
148
	KLIBC_BINCACHE=`cache_replace "${KLIBC_BINCACHE}"`
149
	V86D_BINCACHE=`cache_replace "${V86D_BINCACHE}"`
147
150
148
	DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"`
151
	DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"`
149
	BUSYBOX_CONFIG=`arch_replace "${BUSYBOX_CONFIG}"`
152
	BUSYBOX_CONFIG=`arch_replace "${BUSYBOX_CONFIG}"`
Lines 157-162 Link Here
157
	FUSE_BINCACHE=`arch_replace "${FUSE_BINCACHE}"`
160
	FUSE_BINCACHE=`arch_replace "${FUSE_BINCACHE}"`
158
	UNIONFS_FUSE_BINCACHE=`arch_replace "${UNIONFS_FUSE_BINCACHE}"`
161
	UNIONFS_FUSE_BINCACHE=`arch_replace "${UNIONFS_FUSE_BINCACHE}"`
159
	GPG_BINCACHE=`arch_replace "${GPG_BINCACHE}"`
162
	GPG_BINCACHE=`arch_replace "${GPG_BINCACHE}"`
163
	KLIBC_BINCACHE=`arch_replace "${KLIBC_BINCACHE}"`
164
	V86D_BINCACHE=`arch_replace "${V86D_BINCACHE}"`
160
165
161
	if [ -n "${CMD_BOOTLOADER}" ]
166
	if [ -n "${CMD_BOOTLOADER}" ]
162
	then
167
	then
(-)genkernel-3.4.22.1-vanilla/gen_initramfs.sh (+22 lines)
Lines 38-43 Link Here
38
	mknod -m 600 tty0 c 4 0
38
	mknod -m 600 tty0 c 4 0
39
	mknod -m 600 tty1 c 4 1
39
	mknod -m 600 tty1 c 4 1
40
	mknod -m 600 ttyS0 c 4 64
40
	mknod -m 600 ttyS0 c 4 64
41
	mknod -m 600 mem c 1 1
41
42
42
	date -u '+%Y%m%d-%H%M%S' > ${TEMP}/initramfs-base-temp/etc/build_date
43
	date -u '+%Y%m%d-%H%M%S' > ${TEMP}/initramfs-base-temp/etc/build_date
43
44
Lines 343-348 Link Here
343
	rm -rf "${TEMP}/initramfs-mdadm-temp" > /dev/null
344
	rm -rf "${TEMP}/initramfs-mdadm-temp" > /dev/null
344
}
345
}
345
346
347
append_v86d(){
348
	if [ -d "${TEMP}/initramfs-v86d-temp" ]
349
	then
350
		rm -r "${TEMP}/initramfs-v86d-temp/"
351
	fi
352
	print_info 1 'v86d: Adding support (compiling binaries)...'
353
	compile_v86d
354
	cd ${TEMP}
355
	mkdir -p "${TEMP}/initramfs-v86d-temp/sbin/"
356
	[ "${V86D}" = '1' ] && { /bin/bzip2 -dc "${V86D_BINCACHE}" > "${TEMP}/initramfs-v86d-temp/sbin/v86d" ||
357
		gen_die "Could not extract v86d binary cache!"; }
358
	chmod a+x "${TEMP}/initramfs-v86d-temp/sbin/v86d"
359
	cd "${TEMP}/initramfs-v86d-temp/"
360
	find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \
361
			|| gen_die "compressing v86d cpio"
362
	cd "${TEMP}"
363
	rm -rf "${TEMP}/initramfs-v86d-temp" > /dev/null
364
}
365
346
append_splash(){
366
append_splash(){
347
	splash_geninitramfs=`which splash_geninitramfs 2>/dev/null`
367
	splash_geninitramfs=`which splash_geninitramfs 2>/dev/null`
348
	if [ -x "${splash_geninitramfs}" ]
368
	if [ -x "${splash_geninitramfs}" ]
Lines 662-667 Link Here
662
682
663
	append_data 'splash' "${SPLASH}"
683
	append_data 'splash' "${SPLASH}"
664
684
685
	append_data 'v86d' "${V86D}"
686
665
	if isTrue "${FIRMWARE}" && [ -n "${FIRMWARE_DIR}" ]
687
	if isTrue "${FIRMWARE}" && [ -n "${FIRMWARE_DIR}" ]
666
	then
688
	then
667
		append_data 'firmware'
689
		append_data 'firmware'
(-)genkernel-3.4.22.1-vanilla/genkernel.conf (+13 lines)
Lines 112-117 Link Here
112
# This supersedes the "SPLASH_THEME" option of /etc/conf.d/splash (in early space).
112
# This supersedes the "SPLASH_THEME" option of /etc/conf.d/splash (in early space).
113
# SPLASH_THEME="gentoo"
113
# SPLASH_THEME="gentoo"
114
114
115
# Enable uvesafb userspace helper (v86d). Default is "no"
116
# V86D="yes"
117
115
118
116
# =========Keymap Settings=========
119
# =========Keymap Settings=========
117
#
120
#
Lines 250-255 Link Here
250
GPG_SRCTAR="${DISTDIR}/gnupg-${GPG_VER}.tar.bz2"
253
GPG_SRCTAR="${DISTDIR}/gnupg-${GPG_VER}.tar.bz2"
251
GPG_BINCACHE="%%CACHE%%/gnupg-${GPG_VER}-%%ARCH%%.bz2"
254
GPG_BINCACHE="%%CACHE%%/gnupg-${GPG_VER}-%%ARCH%%.bz2"
252
255
256
KLIBC_VER="VERSION_KLIBC"
257
KLIBC_DIR="klibc-${KLIBC_VER}"
258
KLIBC_SRCTAR="${DISTDIR}/klibc-${KLIBC_VER}.tar.bz2"
259
KLIBC_BINCACHE="%%CACHE%%/klibc-${KLIBC_VER}-%%ARCH%%.tar.bz2"
260
261
V86D_VER="VERSION_V86D"
262
V86D_DIR="v86d-${V86D_VER}"
263
V86D_SRCTAR="${DISTDIR}/v86d-${V86D_VER}.tar.bz2"
264
V86D_BINCACHE="%%CACHE%%/v86d-${V86D_VER}-%%ARCH%%.bz2"
265
253
266
254
# =========MISC KERNEL CONFIGURATION============
267
# =========MISC KERNEL CONFIGURATION============
255
#
268
#
(-)genkernel-3.4.22.1-vanilla/patches/klibc/1.5.25/klibc-1.4.11-interp-flags.patch (+13 lines)
Line 0 Link Here
1
diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild
2
index c2bfd2f..8066bda 100644
3
--- a/usr/klibc/Kbuild
4
+++ b/usr/klibc/Kbuild
5
@@ -152,7 +152,7 @@ # build interp.o
6
 targets += interp.o
7
 
8
 quiet_cmd_interp = BUILD   $@
9
-      cmd_interp = $(KLIBCCC) $(klibccflags) -D__ASSEMBLY__     \
10
+      cmd_interp = $(KLIBCCC) $(klibccflags) $(EXTRA_KLIBCAFLAGS) -D__ASSEMBLY__     \
11
                              -DLIBDIR=\"$(SHLIBDIR)\"         \
12
 			     -DSOHASH=\"$(SOLIBHASH)\" \
13
 			     -c -o $@ $<

Return to bug 398473