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

Collapse All | Expand All

(-)genkernel-3.4.10.903/gen_cmdline.sh (+4 lines)
Lines 524-529 Link Here
524
		--config=*)
524
		--config=*)
525
			print_info 2 "CMD_GK_CONFIG: `parse_opt "$*"`"
525
			print_info 2 "CMD_GK_CONFIG: `parse_opt "$*"`"
526
			;;
526
			;;
527
		--v86d)
528
			CMD_V86D=1
529
			print_info 2 "CMD_V86D: ${CMD_V86D}"
530
			;;
527
		all)
531
		all)
528
			BUILD_KERNEL=1
532
			BUILD_KERNEL=1
529
			BUILD_MODULES=1
533
			BUILD_MODULES=1
(-)genkernel-3.4.10.903/gen_compile.sh (+94 lines)
Lines 611-613 Link Here
611
		rm -rf "${UNIONFS_FUSE_DIR}" > /dev/null
611
		rm -rf "${UNIONFS_FUSE_DIR}" > /dev/null
612
	fi
612
	fi
613
}
613
}
614
615
compile_v86d() {
616
	if [ ! -f "${V86D_BINCACHE}" ]
617
	then
618
		local myARCH="${ARCH}" myABI="${ABI}"
619
620
		if [ -z "$(grep V86D ${KERNEL_DIR}/include/linux/connector.h)" ]; then
621
			gen_die "You a kernel tree patched with uvesafb for v86d. Kernel not patched with uvesafb."
622
		fi
623
624
		case ${ARCH} in
625
			amd64) a=x86_64 ;;
626
			mips) gen_die 'TODO: Use the $ABI' ;;
627
			x86) a=i386 ;;
628
			*) a=${ARCH} ;;
629
		esac
630
		KLIBCARCH=${a}
631
632
		case ${ARCH} in
633
			# Merged arches
634
			x86|x86_64) a=x86 ;;
635
			ppc*) a=powerpc ;;
636
			# Non-merged
637
			alpha|arm|ia64|m68k|mips|sh|sparc*) a=${ARCH} ;;
638
			*) gen_die "TODO: Update the code for your asm-ARCH symlink" ;;
639
		esac
640
		KLIBCASMARCH=${a}
641
642
		unset ABI ARCH KBUILD_OUTPUT
643
644
		# klibc
645
		print_info 1 'v86d: >> Unpacking klibc...'
646
		[ ! -f "${KLIBC_SRCTAR}" ] &&
647
			gen_die "Could not find klibc source tarball: ${KLIBC_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
648
		cd "${TEMP}"
649
		rm -rf "${KLIBC_DIR}"
650
		tar -xpf "${KLIBC_SRCTAR}"
651
		[ ! -d "${KLIBC_DIR}" ] &&
652
			gen_die "klibc directory ${KLIBC_DIR} invalid"
653
		cd "${KLIBC_DIR}"
654
		# point klibc to kernel sourse
655
		ln -snf "${KERNEL_DIR}" linux
656
		apply_patches klibc ${KLIBC_VER}
657
		# compile klibc
658
		print_info 1 'v86d: >> Compiling klibc...'
659
		${UTILS_MAKE} \
660
			EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
661
			EXTRA_KLIBCLDFLAGS="-z,noexecstack" \
662
			HOSTCC="${UTILS_CC}" CC="${UTILS_CC}" \
663
			LD="${UTILS_LD}" AS="${UTILS_AS}" \
664
			INSTALLDIR="${TEMP}/klibc-install" \
665
			KLIBCARCH=${KLIBCARCH} \
666
			KLIBCASMARCH=${KLIBCASMARCH} \
667
			SHLIBDIR="${TEMP}/klibc-install/lib" \
668
			libdir="${TEMP}/klibc-install/lib" \
669
			bindir="${TEMP}/klibc-install/bin" \
670
			mandir="${TEMP}/klibc-install/usr/share/man" install >> ${LOGFILE} 2>&1 || gen_die "Failed to compile klibc"
671
		linkname="${TEMP}/klibc-install/include/asm"
672
		if [ -L "${linkname}" ] && [ ! -e "${linkname}" ]; then
673
			ln -snf asm-${KLIBCASMARCH} "${linkname}"
674
		fi
675
676
		# v86d
677
		print_info 1 'v86d: >> Unpacking v86d...'
678
		[ ! -f "${V86D_SRCTAR}" ] &&
679
			gen_die "Could not find v86d source tarball: ${V86D_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
680
		cd "${TEMP}"
681
		rm -rf "${V86D_DIR}"
682
		tar -xpf "${V86D_SRCTAR}"
683
		[ ! -d "${V86D_DIR}" ] &&
684
			gen_die "v86d directory ${V86D_DIR} invalid"
685
		cd "${V86D_DIR}"
686
		apply_patches v86d ${V86D_VER}
687
		print_info 1 'v86d: >> Configuring...'
688
		./configure --with-klibc --with-x86emu >> ${LOGFILE} 2>&1 ||
689
			gen_die 'Configuring v86d failed!'
690
		print_info 1 'v86d: >> Compiling...'
691
		${UTILS_MAKE} KDIR="${KERNEL_DIR}" CC="${TEMP}/klibc-install/bin/klcc" >> ${LOGFILE} 2>&1 ||
692
			gen_die 'Compiling v86d failed!'
693
		print_info 1 'v86d: >> Copying to cache...'
694
		[ -f "v86d" ] ||
695
			gen_die 'v86d executable does not exist!'
696
		strip "v86d" ||
697
			gen_die 'Could not strip v86d binary!'
698
		bzip2 "v86d" ||
699
			gen_die 'bzip2 compression of v86d failed!'
700
		mv "v86d.bz2" "${V86D_BINCACHE}" ||
701
			gen_die 'Could not copy the v86d binary to the package directory, does the directory exist?'
702
		cd ..
703
		rm -rf "${V86D_DIR}"
704
705
		ARCH="${myARCH}" ABI="${myABI}"
706
	fi
707
}
(-)genkernel-3.4.10.903/gen_determineargs.sh (+3 lines)
Lines 117-122 Link Here
117
	set_config_with_override 1 KEYMAP               CMD_KEYMAP               "yes"
117
	set_config_with_override 1 KEYMAP               CMD_KEYMAP               "yes"
118
	set_config_with_override 1 DOKEYMAPAUTO         CMD_DOKEYMAPAUTO
118
	set_config_with_override 1 DOKEYMAPAUTO         CMD_DOKEYMAPAUTO
119
	set_config_with_override 2 BUSYBOX_CONFIG       CMD_BUSYBOX_CONFIG
119
	set_config_with_override 2 BUSYBOX_CONFIG       CMD_BUSYBOX_CONFIG
120
	set_config_with_override 1 V86D                 CMD_V86D
120
121
121
	BOOTDIR=`arch_replace "${BOOTDIR}"`
122
	BOOTDIR=`arch_replace "${BOOTDIR}"`
122
	BOOTDIR=${BOOTDIR%/}    # Remove any trailing slash
123
	BOOTDIR=${BOOTDIR%/}    # Remove any trailing slash
Lines 129-134 Link Here
129
	BLKID_BINCACHE=`cache_replace "${BLKID_BINCACHE}"`
130
	BLKID_BINCACHE=`cache_replace "${BLKID_BINCACHE}"`
130
	FUSE_BINCACHE=`cache_replace "${FUSE_BINCACHE}"`
131
	FUSE_BINCACHE=`cache_replace "${FUSE_BINCACHE}"`
131
	UNIONFS_FUSE_BINCACHE=`cache_replace "${UNIONFS_FUSE_BINCACHE}"`
132
	UNIONFS_FUSE_BINCACHE=`cache_replace "${UNIONFS_FUSE_BINCACHE}"`
133
	V86D_BINCACHE=`cache_replace "${V86D_BINCACHE}"`
132
  
134
  
133
	DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"`
135
	DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"`
134
	BUSYBOX_CONFIG=`arch_replace "${BUSYBOX_CONFIG}"`
136
	BUSYBOX_CONFIG=`arch_replace "${BUSYBOX_CONFIG}"`
Lines 139-144 Link Here
139
	BLKID_BINCACHE=`arch_replace "${BLKID_BINCACHE}"`
141
	BLKID_BINCACHE=`arch_replace "${BLKID_BINCACHE}"`
140
	FUSE_BINCACHE=`arch_replace "${FUSE_BINCACHE}"`
142
	FUSE_BINCACHE=`arch_replace "${FUSE_BINCACHE}"`
141
	UNIONFS_FUSE_BINCACHE=`arch_replace "${UNIONFS_FUSE_BINCACHE}"`
143
	UNIONFS_FUSE_BINCACHE=`arch_replace "${UNIONFS_FUSE_BINCACHE}"`
144
	V86D_BINCACHE=`arch_replace "${V86D_BINCACHE}"`
142
145
143
	if [ -n "${CMD_BOOTLOADER}" ]
146
	if [ -n "${CMD_BOOTLOADER}" ]
144
	then
147
	then
(-)genkernel-3.4.10.903/gen_initramfs.sh (+18 lines)
Lines 29-34 Link Here
29
	mknod -m 660 console c 5 1
29
	mknod -m 660 console c 5 1
30
	mknod -m 660 null c 1 3
30
	mknod -m 660 null c 1 3
31
	mknod -m 600 tty1 c 4 1
31
	mknod -m 600 tty1 c 4 1
32
	mknod -m 666 zero c 1 5
33
	mknod -m 600 mem c 1 1
32
34
33
	date '+%Y%m%d' > ${TEMP}/initramfs-base-temp/etc/build_date
35
	date '+%Y%m%d' > ${TEMP}/initramfs-base-temp/etc/build_date
34
36
Lines 107-112 Link Here
107
	rm -rf "${TEMP}/initramfs-unionfs-fuse-temp" > /dev/null
109
	rm -rf "${TEMP}/initramfs-unionfs-fuse-temp" > /dev/null
108
}
110
}
109
111
112
append_v86d(){
113
	if [ -d "${TEMP}/initramfs-v86d-temp" ]
114
	then
115
		rm -r "${TEMP}/initramfs-v86d-temp/"
116
	fi
117
	cd ${TEMP}
118
	mkdir -p "${TEMP}/initramfs-v86d-temp/sbin/"
119
	bzip2 -dc "${V86D_BINCACHE}" > "${TEMP}/initramfs-v86d-temp/sbin/v86d" ||
120
		gen_die "Could not extract v86d binary cache!";
121
	chmod a+x "${TEMP}/initramfs-v86d-temp/sbin/v86d"
122
	cd "${TEMP}/initramfs-v86d-temp/"
123
	find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
124
	rm -rf "${TEMP}/initramfs-v86d-temp" > /dev/null
125
}
126
110
#append_suspend(){
127
#append_suspend(){
111
#	if [ -d "${TEMP}/initramfs-suspend-temp" ];
128
#	if [ -d "${TEMP}/initramfs-suspend-temp" ];
112
#	then
129
#	then
Lines 548-553 Link Here
548
	append_data 'unionfs_fuse' "${UNIONFS}"
565
	append_data 'unionfs_fuse' "${UNIONFS}"
549
566
550
	append_data 'splash' "${SPLASH}"
567
	append_data 'splash' "${SPLASH}"
568
	append_data 'v86d' "${V86D}"
551
569
552
	if isTrue "${FIRMWARE}" && [ -n "${FIRMWARE_DIR}" ]
570
	if isTrue "${FIRMWARE}" && [ -n "${FIRMWARE_DIR}" ]
553
	then
571
	then
(-)genkernel-3.4.10.903/genkernel (+1 lines)
Lines 296-301 Link Here
296
if [ "${BUILD_RAMDISK}" -eq '1' ]
296
if [ "${BUILD_RAMDISK}" -eq '1' ]
297
then
297
then
298
	[ "${DISKLABEL}" -eq '1' ] && compile_e2fsprogs
298
	[ "${DISKLABEL}" -eq '1' ] && compile_e2fsprogs
299
	[ "${V86D}" -eq '1' ] && compile_v86d
299
300
300
	if [ "${BUSYBOX}" -eq '1' ]
301
	if [ "${BUSYBOX}" -eq '1' ]
301
	then
302
	then
(-)genkernel-3.4.10.903/genkernel.conf (+10 lines)
Lines 168-170 Link Here
168
UNIONFS_FUSE_DIR="unionfs-fuse-${UNIONFS_FUSE_VER}"
168
UNIONFS_FUSE_DIR="unionfs-fuse-${UNIONFS_FUSE_VER}"
169
UNIONFS_FUSE_SRCTAR="${DISTDIR}/unionfs-fuse-${UNIONFS_FUSE_VER}.tar.bz2"
169
UNIONFS_FUSE_SRCTAR="${DISTDIR}/unionfs-fuse-${UNIONFS_FUSE_VER}.tar.bz2"
170
UNIONFS_FUSE_BINCACHE="%%CACHE%%/unionfs-fuse-${UNIONFS_FUSE_VER}-%%ARCH%%.bz2"
170
UNIONFS_FUSE_BINCACHE="%%CACHE%%/unionfs-fuse-${UNIONFS_FUSE_VER}-%%ARCH%%.bz2"
171
172
KLIBC_VER="VERSION_KLIBC"
173
KLIBC_SRCTAR="${DISTDIR}/klibc-${KLIBC_VER}.tar.bz2"
174
KLIBC_DIR="klibc-${KLIBC_VER}"
175
176
V86D_VER="VERSION_V86D"
177
V86D_SRCTAR="${DISTDIR}/v86d-${V86D_VER}.tar.bz2"
178
V86D_DIR="v86d-${V86D_VER}"
179
V86D_BINCACHE="%%CACHE%%/v86d-${V86D_VER}-%%ARCH%%.bz2"
180

Return to bug 193514