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.orig/gen_cmdline.sh (+4 lines)
Lines 501-506 Link Here
501
			CMD_INTEGRATED_INITRAMFS=1
501
			CMD_INTEGRATED_INITRAMFS=1
502
			print_info 2 "CMD_INTEGRATED_INITRAMFS=${CMD_INTEGRATED_INITRAMFS}"
502
			print_info 2 "CMD_INTEGRATED_INITRAMFS=${CMD_INTEGRATED_INITRAMFS}"
503
			;;
503
			;;
504
		--v86d)
505
			CMD_V86D=1
506
			print_info 2 "CMD_V86D: ${CMD_V86D}"
507
			;;
504
		all)
508
		all)
505
			BUILD_KERNEL=1
509
			BUILD_KERNEL=1
506
			BUILD_MODULES=1
510
			BUILD_MODULES=1
(-)genkernel-3.4.10.orig/gen_compile.sh (+94 lines)
Lines 555-557 Link Here
555
		rm -rf "${E2FSPROGS_DIR}" > /dev/null
555
		rm -rf "${E2FSPROGS_DIR}" > /dev/null
556
	fi
556
	fi
557
}
557
}
558
559
compile_v86d() {
560
	if [ ! -f "${V86D_BINCACHE}" ]
561
	then
562
		local myARCH="${ARCH}" myABI="${ABI}"
563
564
		if [ -z "$(grep V86D ${KERNEL_DIR}/include/linux/connector.h)" ]; then
565
			gen_die "You a kernel tree patched with uvesafb for v86d. Kernel not patched with uvesafb."
566
		fi
567
568
		case ${ARCH} in
569
			amd64) a=x86_64 ;;
570
			mips) gen_die 'TODO: Use the $ABI' ;;
571
			x86) a=i386 ;;
572
			*) a=${ARCH} ;;
573
		esac
574
		KLIBCARCH=${a}
575
576
		case ${ARCH} in
577
			# Merged arches
578
			x86|amd64) a=x86 ;;
579
			ppc*) a=powerpc ;;
580
			# Non-merged
581
			alpha|arm|ia64|m68k|mips|sh|sparc*) a=${ARCH} ;;
582
			*) gen_die "TODO: Update the code for your asm-ARCH symlink" ;;
583
		esac
584
		KLIBCASMARCH=${a}
585
586
		unset ABI ARCH KBUILD_OUTPUT
587
588
		# klibc
589
		print_info 1 'v86d: >> Unpacking klibc...'
590
		[ ! -f "${KLIBC_SRCTAR}" ] &&
591
			gen_die "Could not find klibc source tarball: ${KLIBC_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
592
		cd "${TEMP}"
593
		rm -rf "${KLIBC_DIR}"
594
		tar -xpf "${KLIBC_SRCTAR}"
595
		[ ! -d "${KLIBC_DIR}" ] &&
596
			gen_die "klibc directory ${KLIBC_DIR} invalid"
597
		cd "${KLIBC_DIR}"
598
		# point klibc to kernel sourse
599
		ln -snf "${KERNEL_DIR}" linux
600
		apply_patches klibc ${KLIBC_VER}
601
		# compile klibc
602
		print_info 1 'v86d: >> Compiling klibc...'
603
		${UTILS_MAKE} \
604
			EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \
605
			EXTRA_KLIBCLDFLAGS="-z,noexecstack" \
606
			HOSTCC="${UTILS_CC}" CC="${UTILS_CC}" \
607
			LD="${UTILS_LD}" AS="${UTILS_AS}" \
608
			INSTALLDIR="${TEMP}/klibc-install" \
609
			KLIBCARCH=${KLIBCARCH} \
610
			KLIBCASMARCH=${KLIBCASMARCH} \
611
			SHLIBDIR="${TEMP}/klibc-install/lib" \
612
			libdir="${TEMP}/klibc-install/lib" \
613
			bindir="${TEMP}/klibc-install/bin" \
614
			mandir="${TEMP}/klibc-install/usr/share/man" install >> ${LOGFILE} 2>&1 || gen_die "Failed to compile klibc"
615
		linkname="${TEMP}/klibc-install/include/asm"
616
		if [ -L "${linkname}" ] && [ ! -e "${linkname}" ]; then
617
			ln -snf asm-${KLIBCASMARCH} "${linkname}"
618
		fi
619
620
		# v86d
621
		print_info 1 'v86d: >> Unpacking v86d...'
622
		[ ! -f "${V86D_SRCTAR}" ] &&
623
			gen_die "Could not find v86d source tarball: ${V86D_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!"
624
		cd "${TEMP}"
625
		rm -rf "${V86D_DIR}"
626
		tar -xpf "${V86D_SRCTAR}"
627
		[ ! -d "${V86D_DIR}" ] &&
628
			gen_die "v86d directory ${V86D_DIR} invalid"
629
		cd "${V86D_DIR}"
630
		apply_patches v86d ${V86D_VER}
631
		print_info 1 'v86d: >> Configuring...'
632
		./configure --with-klibc >> ${LOGFILE} 2>&1 ||
633
			gen_die 'Configuring v86d failed!'
634
		print_info 1 'v86d: >> Compiling...'
635
		${UTILS_MAKE} KDIR="${KERNEL_DIR}" CC="${TEMP}/klibc-install/bin/klcc" >> ${LOGFILE} 2>&1 ||
636
			gen_die 'Compiling v86d failed!'
637
		print_info 1 'v86d: >> Copying to cache...'
638
		[ -f "v86d" ] ||
639
			gen_die 'v86d executable does not exist!'
640
		strip "v86d" ||
641
			gen_die 'Could not strip v86d binary!'
642
		bzip2 "v86d" ||
643
			gen_die 'bzip2 compression of v86d failed!'
644
		mv "v86d.bz2" "${V86D_BINCACHE}" ||
645
			gen_die 'Could not copy the v86d binary to the package directory, does the directory exist?'
646
		cd ..
647
		rm -rf "${V86D_DIR}"
648
649
		ARCH="${myARCH}" ABI="${myABI}"
650
	fi
651
}
(-)genkernel-3.4.10.orig/gen_determineargs.sh (+3 lines)
Lines 120-125 Link Here
120
	set_config_with_override 1 GENZIMAGE            CMD_GENZIMAGE
120
	set_config_with_override 1 GENZIMAGE            CMD_GENZIMAGE
121
	set_config_with_override 1 KEYMAP               CMD_KEYMAP               "yes"
121
	set_config_with_override 1 KEYMAP               CMD_KEYMAP               "yes"
122
	set_config_with_override 1 DOKEYMAPAUTO         CMD_DOKEYMAPAUTO
122
	set_config_with_override 1 DOKEYMAPAUTO         CMD_DOKEYMAPAUTO
123
	set_config_with_override 1 V86D                 CMD_V86D
123
124
124
	BOOTDIR=`arch_replace "${BOOTDIR}"`
125
	BOOTDIR=`arch_replace "${BOOTDIR}"`
125
	BOOTDIR=${BOOTDIR%/}    # Remove any trailing slash
126
	BOOTDIR=${BOOTDIR%/}    # Remove any trailing slash
Lines 130-135 Link Here
130
	LVM_BINCACHE=`cache_replace "${LVM_BINCACHE}"`
131
	LVM_BINCACHE=`cache_replace "${LVM_BINCACHE}"`
131
	DMRAID_BINCACHE=`cache_replace "${DMRAID_BINCACHE}"`
132
	DMRAID_BINCACHE=`cache_replace "${DMRAID_BINCACHE}"`
132
	BLKID_BINCACHE=`cache_replace "${BLKID_BINCACHE}"`
133
	BLKID_BINCACHE=`cache_replace "${BLKID_BINCACHE}"`
134
	V86D_BINCACHE=`cache_replace "${V86D_BINCACHE}"`
133
  
135
  
134
	DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"`
136
	DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"`
135
	BUSYBOX_CONFIG=`arch_replace "${BUSYBOX_CONFIG}"`
137
	BUSYBOX_CONFIG=`arch_replace "${BUSYBOX_CONFIG}"`
Lines 138-143 Link Here
138
	LVM_BINCACHE=`arch_replace "${LVM_BINCACHE}"`
140
	LVM_BINCACHE=`arch_replace "${LVM_BINCACHE}"`
139
	DMRAID_BINCACHE=`arch_replace "${DMRAID_BINCACHE}"`
141
	DMRAID_BINCACHE=`arch_replace "${DMRAID_BINCACHE}"`
140
	BLKID_BINCACHE=`arch_replace "${BLKID_BINCACHE}"`
142
	BLKID_BINCACHE=`arch_replace "${BLKID_BINCACHE}"`
143
	V86D_BINCACHE=`arch_replace "${V86D_BINCACHE}"`
141
	
144
	
142
145
143
	if [ "${CMD_BOOTLOADER}" != '' ]
146
	if [ "${CMD_BOOTLOADER}" != '' ]
(-)genkernel-3.4.10.orig/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 72-77 Link Here
72
	rm -rf "${TEMP}/initramfs-blkid-temp" > /dev/null
74
	rm -rf "${TEMP}/initramfs-blkid-temp" > /dev/null
73
}
75
}
74
76
77
append_v86d(){
78
	if [ -d "${TEMP}/initramfs-v86d-temp" ]
79
	then
80
		rm -r "${TEMP}/initramfs-v86d-temp/"
81
	fi
82
	cd ${TEMP}
83
	mkdir -p "${TEMP}/initramfs-v86d-temp/sbin/"
84
	[ "${V86D}" -eq '1' ] && { /bin/bzip2 -dc "${V86D_BINCACHE}" > "${TEMP}/initramfs-v86d-temp/sbin/v86d" ||
85
		gen_die "Could not extract v86d binary cache!"; }
86
	chmod a+x "${TEMP}/initramfs-v86d-temp/sbin/v86d"
87
	cd "${TEMP}/initramfs-v86d-temp/"
88
	find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
89
	rm -rf "${TEMP}/initramfs-v86d-temp" > /dev/null
90
}
91
75
#append_suspend(){
92
#append_suspend(){
76
#	if [ -d "${TEMP}/initramfs-suspend-temp" ];
93
#	if [ -d "${TEMP}/initramfs-suspend-temp" ];
77
#	then
94
#	then
Lines 477-482 Link Here
477
494
478
	append_data 'blkid' "${DISKLABEL}"
495
	append_data 'blkid' "${DISKLABEL}"
479
	append_data 'splash' "${SPLASH}"
496
	append_data 'splash' "${SPLASH}"
497
	append_data 'v86d' "${V86D}"
480
498
481
	if isTrue "${FIRMWARE}" && [ -n "${FIRMWARE_DIR}" ]
499
	if isTrue "${FIRMWARE}" && [ -n "${FIRMWARE_DIR}" ]
482
	then
500
	then
(-)genkernel-3.4.10.orig/gen_initrd.sh (+8 lines)
Lines 61-66 Link Here
61
		chmod +x "${TEMP}/initrd-temp/bin/blkid"
61
		chmod +x "${TEMP}/initrd-temp/bin/blkid"
62
	fi
62
	fi
63
63
64
	if [ "${V86D}" -eq '1' ]; then
65
		cp "${V86D_BINCACHE}" "${TEMP}/initrd-temp/sbin/v86d.bz2" ||
66
			gen_die 'Could not copy v86d from bincache!'
67
		bunzip2 "${TEMP}/initrd-temp/sbin/v86d.bz2" ||
68
			gen_die 'Could not uncompress v86d!'
69
		chmod +x "${TEMP}/initrd-temp/sbin/v86d"
70
	fi
71
64
	tar -xjf "${BUSYBOX_BINCACHE}" -C "${TEMP}/initrd-temp/bin" busybox ||
72
	tar -xjf "${BUSYBOX_BINCACHE}" -C "${TEMP}/initrd-temp/bin" busybox ||
65
		gen_die 'Could not extract busybox bincache!'
73
		gen_die 'Could not extract busybox bincache!'
66
	chmod +x "${TEMP}/initrd-temp/bin/busybox"
74
	chmod +x "${TEMP}/initrd-temp/bin/busybox"
(-)genkernel-3.4.10.orig/genkernel (+1 lines)
Lines 300-305 Link Here
300
if [ "${BUILD_INITRD}" -eq '1' ]
300
if [ "${BUILD_INITRD}" -eq '1' ]
301
then
301
then
302
	[ "${DISKLABEL}" -eq '1' ] && compile_e2fsprogs
302
	[ "${DISKLABEL}" -eq '1' ] && compile_e2fsprogs
303
	[ "${V86D}" -eq '1' ] && compile_v86d
303
304
304
	if [ "${KERN_24}" != '1' ]
305
	if [ "${KERN_24}" != '1' ]
305
	then
306
	then
(-)genkernel-3.4.10.orig/genkernel.conf (+8 lines)
Lines 165-167 Link Here
165
E2FSPROGS_SRCTAR="${DISTDIR}/e2fsprogs-${E2FSPROGS_VER}.tar.gz"
165
E2FSPROGS_SRCTAR="${DISTDIR}/e2fsprogs-${E2FSPROGS_VER}.tar.gz"
166
BLKID_BINCACHE="%%CACHE%%/blkid-${E2FSPROGS_VER}-%%ARCH%%.bz2"
166
BLKID_BINCACHE="%%CACHE%%/blkid-${E2FSPROGS_VER}-%%ARCH%%.bz2"
167
167
168
169
KLIBC_VER="VERSION_KLIBC"
170
KLIBC_SRCTAR="${DISTDIR}/klibc-${KLIBC_VER}.tar.bz2"
171
KLIBC_DIR="klibc-${KLIBC_VER}"
172
V86D_VER="VERSION_V86D"
173
V86D_SRCTAR="${DISTDIR}/v86d-${V86D_VER}.tar.bz2"
174
V86D_DIR="v86d-${V86D_VER}"
175
V86D_BINCACHE="%%CACHE%%/v86d-${V86D_VER}-%%ARCH%%.bz2"
(-)genkernel-3.4.10.orig/patches/klibc/1.5.8/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 $@ $<
(-)genkernel-3.4.10.orig/patches/klibc/1.5.8/klibc-1.5-klibcasmarch.patch (+27 lines)
Line 0 Link Here
1
diff -Naurp klibc-1.5.7-orig/klcc/klcc.in klibc-1.5.7/klcc/klcc.in
2
--- klibc-1.5.7-orig/klcc/klcc.in	2007-12-03 01:17:26.000000000 +0100
Line 0 Link Here
1
--- a/scripts/Kbuild.install	2007-03-04 02:52:10.000000000 +0100
2
+++ b/scripts/Kbuild.install    2007-11-04 15:43:28.000000000 +0100
3
@@ -84,6 +84,13 @@
4
 # 1) Create directories, install headers and man pages
5
 # 2) Tell that we now install binaries
6
 # 3) Install binaries by descending
7
+
8
+# Arch specific definitions for klibc
9
+include $(KLIBCSRC)/arch/$(KLIBCARCHDIR)/MCONFIG
10
+
11
+# include/asm-* architecture
12
+KLIBCASMARCH      ?= $(KLIBCARCH)
13
+
14
 .PHONY: header footer descend
15
 header:
16
 	$(Q)echo "  INSTALL headers + man pages to $(INSTALLROOT)$(INSTALLDIR)"
17
@@ -95,7 +102,7 @@
18
 	$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
19
 	$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)lib
20
 	$(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)bin
21
-	$(Q)set -e ; for d in linux scsi asm-$(KLIBCARCH) asm-generic $(ASMKLIBCARCH); do \
22
+	$(Q)set -e ; for d in linux scsi asm-$(KLIBCASMARCH) asm-generic $(ASMKLIBCARCH); do \
23
 	  mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KLIBCCROSS)include/$$d ; \
24
 	  for r in $(KLIBCKERNELSRC)/include $(KLIBCKERNELOBJ)/include \
25
 	           $(KLIBCKERNELOBJ)/include2 ; do \
(-)genkernel-3.4.10.orig/patches/klibc/1.5.8/klibc-1.5-sigaction.patch (+37 lines)
Line 0 Link Here
1
---
2
 usr/include/arch/ppc/klibc/archsignal.h   |    6 ++++++
3
 usr/include/arch/sparc/klibc/archsignal.h |    7 -------
4
 2 files changed, 6 insertions(+), 7 deletions(-)
5
6
--- a/usr/include/arch/ppc/klibc/archsignal.h
7
+++ b/usr/include/arch/ppc/klibc/archsignal.h
8
@@ -8,7 +8,13 @@
9
 #ifndef _KLIBC_ARCHSIGNAL_H
10
 #define _KLIBC_ARCHSIGNAL_H
11
 
12
+#ifdef _SIGNAL_H
13
+#undef _SIGNAL_H
14
 #include <asm/signal.h>
15
+#define _SIGNAL_H
16
+#else
17
+#include <asm/signal.h>
18
+#endif
19
 /* No special stuff for this architecture */
20
 
21
 #endif
22
--- a/usr/include/arch/sparc/klibc/archsignal.h
23
+++ b/usr/include/arch/sparc/klibc/archsignal.h
24
@@ -11,13 +11,6 @@
25
 #define __WANT_POSIX1B_SIGNALS__
26
 #include <asm/signal.h>
27
 
28
-struct sigaction {
29
-	__sighandler_t	sa_handler;
30
-	unsigned long	sa_flags;
31
-	void		(*sa_restorer)(void);	/* Not used by Linux/SPARC */
32
-	sigset_t	sa_mask;
33
-};
34
-
35
 /* Not actually used by the kernel... */
36
 #define SA_RESTORER	0x80000000
37
 

Return to bug 193514