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.902/gen_cmdline.sh (+4 lines)
Lines 504-509 Link Here
504
		--config=*)
504
		--config=*)
505
			print_info 2 "CMD_GK_CONFIG: `parse_opt "$*"`"
505
			print_info 2 "CMD_GK_CONFIG: `parse_opt "$*"`"
506
			;;
506
			;;
507
		--v86d)
508
			CMD_V86D=1
509
			print_info 2 "CMD_V86D: ${CMD_V86D}"
510
			;;
507
		all)
511
		all)
508
			BUILD_KERNEL=1
512
			BUILD_KERNEL=1
509
			BUILD_MODULES=1
513
			BUILD_MODULES=1
(-)genkernel-3.4.10.902/gen_compile.sh (+94 lines)
Lines 586-588 Link Here
586
		rm -rf "${UNIONFS_FUSE_DIR}" > /dev/null
586
		rm -rf "${UNIONFS_FUSE_DIR}" > /dev/null
587
	fi
587
	fi
588
}
588
}
589
590
compile_v86d() {
591
	if [ ! -f "${V86D_BINCACHE}" ]
592
	then
593
		local myARCH="${ARCH}" myABI="${ABI}"
594
595
		if [ -z "$(grep V86D ${KERNEL_DIR}/include/linux/connector.h)" ]; then
596
			gen_die "You a kernel tree patched with uvesafb for v86d. Kernel not patched with uvesafb."
597
		fi
598
599
		case ${ARCH} in
600
			amd64) a=x86_64 ;;
601
			mips) gen_die 'TODO: Use the $ABI' ;;
602
			x86) a=i386 ;;
603
			*) a=${ARCH} ;;
604
		esac
605
		KLIBCARCH=${a}
606
607
		case ${ARCH} in
608
			# Merged arches
609
			x86|x86_64) a=x86 ;;
610
			ppc*) a=powerpc ;;
611
			# Non-merged
612
			alpha|arm|ia64|m68k|mips|sh|sparc*) a=${ARCH} ;;
613
			*) gen_die "TODO: Update the code for your asm-ARCH symlink" ;;
614
		esac
615
		KLIBCASMARCH=${a}
616
617
		unset ABI ARCH KBUILD_OUTPUT
618
619
		# klibc
620
		print_info 1 'v86d: >> Unpacking klibc...'
621
		[ ! -f "${KLIBC_SRCTAR}" ] &&
622
			gen_die "Could not find klibc source tarball: ${KLIBC_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
623
		cd "${TEMP}"
624
		rm -rf "${KLIBC_DIR}"
625
		tar -xpf "${KLIBC_SRCTAR}"
626
		[ ! -d "${KLIBC_DIR}" ] &&
627
			gen_die "klibc directory ${KLIBC_DIR} invalid"
628
		cd "${KLIBC_DIR}"
629
		# point klibc to kernel sourse
630
		ln -snf "${KERNEL_DIR}" linux
631
		apply_patches klibc ${KLIBC_VER}
632
		# compile klibc
633
		print_info 1 'v86d: >> Compiling klibc...'
634
		${UTILS_MAKE} \
635
			EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
636
			EXTRA_KLIBCLDFLAGS="-z,noexecstack" \
637
			HOSTCC="${UTILS_CC}" CC="${UTILS_CC}" \
638
			LD="${UTILS_LD}" AS="${UTILS_AS}" \
639
			INSTALLDIR="${TEMP}/klibc-install" \
640
			KLIBCARCH=${KLIBCARCH} \
641
			KLIBCASMARCH=${KLIBCASMARCH} \
642
			SHLIBDIR="${TEMP}/klibc-install/lib" \
643
			libdir="${TEMP}/klibc-install/lib" \
644
			bindir="${TEMP}/klibc-install/bin" \
645
			mandir="${TEMP}/klibc-install/usr/share/man" install >> ${LOGFILE} 2>&1 || gen_die "Failed to compile klibc"
646
		linkname="${TEMP}/klibc-install/include/asm"
647
		if [ -L "${linkname}" ] && [ ! -e "${linkname}" ]; then
648
			ln -snf asm-${KLIBCASMARCH} "${linkname}"
649
		fi
650
651
		# v86d
652
		print_info 1 'v86d: >> Unpacking v86d...'
653
		[ ! -f "${V86D_SRCTAR}" ] &&
654
			gen_die "Could not find v86d source tarball: ${V86D_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
655
		cd "${TEMP}"
656
		rm -rf "${V86D_DIR}"
657
		tar -xpf "${V86D_SRCTAR}"
658
		[ ! -d "${V86D_DIR}" ] &&
659
			gen_die "v86d directory ${V86D_DIR} invalid"
660
		cd "${V86D_DIR}"
661
		apply_patches v86d ${V86D_VER}
662
		print_info 1 'v86d: >> Configuring...'
663
		./configure --with-klibc --with-x86emu >> ${LOGFILE} 2>&1 ||
664
			gen_die 'Configuring v86d failed!'
665
		print_info 1 'v86d: >> Compiling...'
666
		${UTILS_MAKE} KDIR="${KERNEL_DIR}" CC="${TEMP}/klibc-install/bin/klcc" >> ${LOGFILE} 2>&1 ||
667
			gen_die 'Compiling v86d failed!'
668
		print_info 1 'v86d: >> Copying to cache...'
669
		[ -f "v86d" ] ||
670
			gen_die 'v86d executable does not exist!'
671
		strip "v86d" ||
672
			gen_die 'Could not strip v86d binary!'
673
		bzip2 "v86d" ||
674
			gen_die 'bzip2 compression of v86d failed!'
675
		mv "v86d.bz2" "${V86D_BINCACHE}" ||
676
			gen_die 'Could not copy the v86d binary to the package directory, does the directory exist?'
677
		cd ..
678
		rm -rf "${V86D_DIR}"
679
680
		ARCH="${myARCH}" ABI="${myABI}"
681
	fi
682
}
(-)genkernel-3.4.10.902/gen_determineargs.sh (+3 lines)
Lines 114-119 Link Here
114
	set_config_with_override 1 GENZIMAGE            CMD_GENZIMAGE
114
	set_config_with_override 1 GENZIMAGE            CMD_GENZIMAGE
115
	set_config_with_override 1 KEYMAP               CMD_KEYMAP               "yes"
115
	set_config_with_override 1 KEYMAP               CMD_KEYMAP               "yes"
116
	set_config_with_override 1 DOKEYMAPAUTO         CMD_DOKEYMAPAUTO
116
	set_config_with_override 1 DOKEYMAPAUTO         CMD_DOKEYMAPAUTO
117
	set_config_with_override 1 V86D                 CMD_V86D
117
118
118
	BOOTDIR=`arch_replace "${BOOTDIR}"`
119
	BOOTDIR=`arch_replace "${BOOTDIR}"`
119
	BOOTDIR=${BOOTDIR%/}    # Remove any trailing slash
120
	BOOTDIR=${BOOTDIR%/}    # Remove any trailing slash
Lines 126-131 Link Here
126
	BLKID_BINCACHE=`cache_replace "${BLKID_BINCACHE}"`
127
	BLKID_BINCACHE=`cache_replace "${BLKID_BINCACHE}"`
127
	FUSE_BINCACHE=`cache_replace "${FUSE_BINCACHE}"`
128
	FUSE_BINCACHE=`cache_replace "${FUSE_BINCACHE}"`
128
	UNIONFS_FUSE_BINCACHE=`cache_replace "${UNIONFS_FUSE_BINCACHE}"`
129
	UNIONFS_FUSE_BINCACHE=`cache_replace "${UNIONFS_FUSE_BINCACHE}"`
130
	V86D_BINCACHE=`cache_replace "${V86D_BINCACHE}"`
129
  
131
  
130
	DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"`
132
	DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"`
131
	BUSYBOX_CONFIG=`arch_replace "${BUSYBOX_CONFIG}"`
133
	BUSYBOX_CONFIG=`arch_replace "${BUSYBOX_CONFIG}"`
Lines 136-141 Link Here
136
	BLKID_BINCACHE=`arch_replace "${BLKID_BINCACHE}"`
138
	BLKID_BINCACHE=`arch_replace "${BLKID_BINCACHE}"`
137
	FUSE_BINCACHE=`arch_replace "${FUSE_BINCACHE}"`
139
	FUSE_BINCACHE=`arch_replace "${FUSE_BINCACHE}"`
138
	UNIONFS_FUSE_BINCACHE=`arch_replace "${UNIONFS_FUSE_BINCACHE}"`
140
	UNIONFS_FUSE_BINCACHE=`arch_replace "${UNIONFS_FUSE_BINCACHE}"`
141
	V86D_BINCACHE=`arch_replace "${V86D_BINCACHE}"`
139
	
142
	
140
	if [ "${NO_KERNEL_SOURCES}" != "1" ]
143
	if [ "${NO_KERNEL_SOURCES}" != "1" ]
141
	then
144
	then
(-)genkernel-3.4.10.902/gen_initramfs.sh (+18 lines)
Lines 28-33 Link Here
28
	mknod -m 660 console c 5 1
28
	mknod -m 660 console c 5 1
29
	mknod -m 660 null c 1 3
29
	mknod -m 660 null c 1 3
30
	mknod -m 600 tty1 c 4 1
30
	mknod -m 600 tty1 c 4 1
31
	mknod -m 666 zero c 1 5
32
	mknod -m 600 mem c 1 1
31
	cd "${TEMP}/initramfs-base-temp/"
33
	cd "${TEMP}/initramfs-base-temp/"
32
	find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
34
	find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
33
	rm -rf "${TEMP}/initramfs-base-temp" > /dev/null
35
	rm -rf "${TEMP}/initramfs-base-temp" > /dev/null
Lines 100-105 Link Here
100
	rm -rf "${TEMP}/initramfs-unionfs-fuse-temp" > /dev/null
102
	rm -rf "${TEMP}/initramfs-unionfs-fuse-temp" > /dev/null
101
}
103
}
102
104
105
append_v86d(){
106
	if [ -d "${TEMP}/initramfs-v86d-temp" ]
107
	then
108
		rm -r "${TEMP}/initramfs-v86d-temp/"
109
	fi
110
	cd ${TEMP}
111
	mkdir -p "${TEMP}/initramfs-v86d-temp/sbin/"
112
	bzip2 -dc "${V86D_BINCACHE}" > "${TEMP}/initramfs-v86d-temp/sbin/v86d" ||
113
		gen_die "Could not extract v86d binary cache!";
114
	chmod a+x "${TEMP}/initramfs-v86d-temp/sbin/v86d"
115
	cd "${TEMP}/initramfs-v86d-temp/"
116
	find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
117
	rm -rf "${TEMP}/initramfs-v86d-temp" > /dev/null
118
}
119
103
#append_suspend(){
120
#append_suspend(){
104
#	if [ -d "${TEMP}/initramfs-suspend-temp" ];
121
#	if [ -d "${TEMP}/initramfs-suspend-temp" ];
105
#	then
122
#	then
Lines 522-527 Link Here
522
	append_data 'unionfs_fuse' "${UNIONFS}"
539
	append_data 'unionfs_fuse' "${UNIONFS}"
523
540
524
	append_data 'splash' "${SPLASH}"
541
	append_data 'splash' "${SPLASH}"
542
	append_data 'v86d' "${V86D}"
525
543
526
	if isTrue "${FIRMWARE}" && [ -n "${FIRMWARE_DIR}" ]
544
	if isTrue "${FIRMWARE}" && [ -n "${FIRMWARE_DIR}" ]
527
	then
545
	then
(-)genkernel-3.4.10.902/genkernel (+1 lines)
Lines 295-300 Link Here
295
if [ "${BUILD_RAMDISK}" -eq '1' ]
295
if [ "${BUILD_RAMDISK}" -eq '1' ]
296
then
296
then
297
	[ "${DISKLABEL}" -eq '1' ] && compile_e2fsprogs
297
	[ "${DISKLABEL}" -eq '1' ] && compile_e2fsprogs
298
	[ "${V86D}" -eq '1' ] && compile_v86d
298
299
299
	if [ "${BUSYBOX}" -eq '1' ]
300
	if [ "${BUSYBOX}" -eq '1' ]
300
	then
301
	then
(-)genkernel-3.4.10.902/genkernel.conf (+10 lines)
Lines 171-173 Link Here
171
UNIONFS_FUSE_DIR="unionfs-fuse-${UNIONFS_FUSE_VER}"
171
UNIONFS_FUSE_DIR="unionfs-fuse-${UNIONFS_FUSE_VER}"
172
UNIONFS_FUSE_SRCTAR="${DISTDIR}/unionfs-fuse-${UNIONFS_FUSE_VER}.tar.bz2"
172
UNIONFS_FUSE_SRCTAR="${DISTDIR}/unionfs-fuse-${UNIONFS_FUSE_VER}.tar.bz2"
173
UNIONFS_FUSE_BINCACHE="%%CACHE%%/unionfs-fuse-${UNIONFS_FUSE_VER}-%%ARCH%%.bz2"
173
UNIONFS_FUSE_BINCACHE="%%CACHE%%/unionfs-fuse-${UNIONFS_FUSE_VER}-%%ARCH%%.bz2"
174
175
KLIBC_VER="VERSION_KLIBC"
176
KLIBC_SRCTAR="${DISTDIR}/klibc-${KLIBC_VER}.tar.bz2"
177
KLIBC_DIR="klibc-${KLIBC_VER}"
178
179
V86D_VER="VERSION_V86D"
180
V86D_SRCTAR="${DISTDIR}/v86d-${V86D_VER}.tar.bz2"
181
V86D_DIR="v86d-${V86D_VER}"
182
V86D_BINCACHE="%%CACHE%%/v86d-${V86D_VER}-%%ARCH%%.bz2"
183

Return to bug 193514