Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 159251 Details for
Bug 193514
[patch] add support for v86d in genkernel
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
genkernel v86d patch
genkernel-v86d.patch (text/plain), 13.50 KB, created by
Ambroz Bizjak
on 2008-07-02 09:46:54 UTC
(
hide
)
Description:
genkernel v86d patch
Filename:
MIME Type:
Creator:
Ambroz Bizjak
Created:
2008-07-02 09:46:54 UTC
Size:
13.50 KB
patch
obsolete
>diff -urN genkernel-3.4.10.orig/gen_cmdline.sh genkernel-3.4.10/gen_cmdline.sh >--- genkernel-3.4.10.orig/gen_cmdline.sh 2008-07-02 01:40:00.000000000 +0200 >+++ genkernel-3.4.10/gen_cmdline.sh 2008-07-02 01:41:21.000000000 +0200 >@@ -501,6 +501,10 @@ > CMD_INTEGRATED_INITRAMFS=1 > print_info 2 "CMD_INTEGRATED_INITRAMFS=${CMD_INTEGRATED_INITRAMFS}" > ;; >+ --v86d) >+ CMD_V86D=1 >+ print_info 2 "CMD_V86D: ${CMD_V86D}" >+ ;; > all) > BUILD_KERNEL=1 > BUILD_MODULES=1 >diff -urN genkernel-3.4.10.orig/gen_compile.sh genkernel-3.4.10/gen_compile.sh >--- genkernel-3.4.10.orig/gen_compile.sh 2008-07-02 01:40:00.000000000 +0200 >+++ genkernel-3.4.10/gen_compile.sh 2008-07-02 11:16:49.000000000 +0200 >@@ -555,3 +555,97 @@ > rm -rf "${E2FSPROGS_DIR}" > /dev/null > fi > } >+ >+compile_v86d() { >+ if [ ! -f "${V86D_BINCACHE}" ] >+ then >+ local myARCH="${ARCH}" myABI="${ABI}" >+ >+ if [ -z "$(grep V86D ${KERNEL_DIR}/include/linux/connector.h)" ]; then >+ eerror "You a kernel tree patched with uvesafb for v86d." >+ die "Kernel not patched with uvesafb." >+ fi >+ >+ case ${ARCH} in >+ amd64) a=x86_64 ;; >+ mips) gen_die 'TODO: Use the $ABI' ;; >+ x86) a=i386 ;; >+ *) a=${ARCH} ;; >+ esac >+ KLIBCARCH=${a} >+ >+ case ${ARCH} in >+ # Merged arches >+ x86|amd64) a=x86 ;; >+ ppc*) a=powerpc ;; >+ # Non-merged >+ alpha|arm|ia64|m68k|mips|sh|sparc*) a=${ARCH} ;; >+ *) gen_die "TODO: Update the code for your asm-ARCH symlink" ;; >+ esac >+ KLIBCASMARCH=${a} >+ >+ unset ABI ARCH KBUILD_OUTPUT >+ >+ # klibc >+ print_info 1 'v86d: >> Unpacking klibc...' >+ [ ! -f "${KLIBC_SRCTAR}" ] && >+ gen_die "Could not find klibc source tarball: ${KLIBC_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!" >+ rm -rf "${KLIBC_DIR}" >+ tar -xpf "${KLIBC_SRCTAR}" >+ [ ! -d "${KLIBC_DIR}" ] && >+ gen_die "klibc directory ${KLIBC_DIR} invalid" >+ cd "${KLIBC_DIR}" >+ # point klibc to kernel sourse >+ ln -snf "${KERNEL_DIR}" linux >+ apply_patches klibc ${KLIBC_VER} >+ # compile klibc >+ print_info 1 'v86d: >> Compiling klibc...' >+ ${UTILS_MAKE} \ >+ EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \ >+ EXTRA_KLIBCLDFLAGS="-z,noexecstack" \ >+ HOSTCC="${UTILS_CC}" CC="${UTILS_CC}" \ >+ LD="${UTILS_LD}" AS="${UTILS_AS}" \ >+ INSTALLDIR="${TEMP}/klibc-install" \ >+ KLIBCARCH=${KLIBCARCH} \ >+ KLIBCASMARCH=${KLIBCASMARCH} \ >+ SHLIBDIR="${TEMP}/klibc-install/lib" \ >+ libdir="${TEMP}/klibc-install/lib" \ >+ bindir="${TEMP}/klibc-install/bin" \ >+ mandir="${TEMP}/klibc-install/usr/share/man" install >> ${LOGFILE} 2>&1 || gen_die "Failed to compile klibc" >+ linkname="${TEMP}/klibc-install/include/asm" >+ if [ -L "${linkname}" ] && [ ! -e "${linkname}" ]; then >+ ln -snf asm-${KLIBCASMARCH} "${linkname}" >+ fi >+ >+ # v86d >+ print_info 1 'v86d: >> Unpacking v86d...' >+ [ ! -f "${V86D_SRCTAR}" ] && >+ gen_die "Could not find v86d source tarball: ${E2FSPROGS_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!" >+ cd "${TEMP}" >+ rm -rf "${V86D_DIR}" >+ tar -xpf "${V86D_SRCTAR}" >+ [ ! -d "${V86D_DIR}" ] && >+ gen_die "v86d directory ${V86D_DIR} invalid" >+ cd "${V86D_DIR}" >+ apply_patches v86d ${V86D_VER} >+ print_info 1 'v86d: >> Configuring...' >+ ./configure --with-klibc >> ${LOGFILE} 2>&1 || >+ gen_die 'Configuring v86d failed!' >+ print_info 1 'v86d: >> Compiling...' >+ ${UTILS_MAKE} KDIR="${KERNEL_DIR}" CC="${TEMP}/klibc-install/bin/klcc" >> ${LOGFILE} 2>&1 || >+ gen_die 'Compiling v86d failed!' >+ print_info 1 'v86d: >> Copying to cache...' >+ [ -f "v86d" ] || >+ gen_die 'v86d executable does not exist!' >+ strip "v86d" || >+ gen_die 'Could not strip v86d binary!' >+ bzip2 "v86d" || >+ gen_die 'bzip2 compression of v86d failed!' >+ mv "v86d.bz2" "${V86D_BINCACHE}" || >+ gen_die 'Could not copy the v86d binary to the package directory, does the directory exist?' >+ cd .. >+ rm -rf "${V86D_DIR}" >+ >+ ARCH="${myARCH}" ABI="${myABI}" >+ fi >+} >diff -urN genkernel-3.4.10.orig/gen_determineargs.sh genkernel-3.4.10/gen_determineargs.sh >--- genkernel-3.4.10.orig/gen_determineargs.sh 2008-07-02 01:40:00.000000000 +0200 >+++ genkernel-3.4.10/gen_determineargs.sh 2008-07-02 01:41:13.000000000 +0200 >@@ -120,6 +120,7 @@ > set_config_with_override 1 GENZIMAGE CMD_GENZIMAGE > set_config_with_override 1 KEYMAP CMD_KEYMAP "yes" > set_config_with_override 1 DOKEYMAPAUTO CMD_DOKEYMAPAUTO >+ set_config_with_override 1 V86D CMD_V86D > > BOOTDIR=`arch_replace "${BOOTDIR}"` > BOOTDIR=${BOOTDIR%/} # Remove any trailing slash >@@ -130,6 +131,7 @@ > LVM_BINCACHE=`cache_replace "${LVM_BINCACHE}"` > DMRAID_BINCACHE=`cache_replace "${DMRAID_BINCACHE}"` > BLKID_BINCACHE=`cache_replace "${BLKID_BINCACHE}"` >+ V86D_BINCACHE=`cache_replace "${V86D_BINCACHE}"` > > DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"` > BUSYBOX_CONFIG=`arch_replace "${BUSYBOX_CONFIG}"` >@@ -138,6 +140,7 @@ > LVM_BINCACHE=`arch_replace "${LVM_BINCACHE}"` > DMRAID_BINCACHE=`arch_replace "${DMRAID_BINCACHE}"` > BLKID_BINCACHE=`arch_replace "${BLKID_BINCACHE}"` >+ V86D_BINCACHE=`arch_replace "${V86D_BINCACHE}"` > > > if [ "${CMD_BOOTLOADER}" != '' ] >diff -urN genkernel-3.4.10.orig/gen_initramfs.sh genkernel-3.4.10/gen_initramfs.sh >--- genkernel-3.4.10.orig/gen_initramfs.sh 2008-07-02 01:40:00.000000000 +0200 >+++ genkernel-3.4.10/gen_initramfs.sh 2008-07-02 02:33:21.000000000 +0200 >@@ -28,6 +28,8 @@ > mknod -m 660 console c 5 1 > mknod -m 660 null c 1 3 > mknod -m 600 tty1 c 4 1 >+ mknod -m 666 zero c 1 5 >+ mknod -m 600 mem c 1 1 > cd "${TEMP}/initramfs-base-temp/" > find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" > rm -rf "${TEMP}/initramfs-base-temp" > /dev/null >@@ -72,6 +74,21 @@ > rm -rf "${TEMP}/initramfs-blkid-temp" > /dev/null > } > >+append_v86d(){ >+ if [ -d "${TEMP}/initramfs-v86d-temp" ] >+ then >+ rm -r "${TEMP}/initramfs-v86d-temp/" >+ fi >+ cd ${TEMP} >+ mkdir -p "${TEMP}/initramfs-v86d-temp/sbin/" >+ [ "${V86D}" -eq '1' ] && { /bin/bzip2 -dc "${V86D_BINCACHE}" > "${TEMP}/initramfs-v86d-temp/sbin/v86d" || >+ gen_die "Could not extract v86d binary cache!"; } >+ chmod a+x "${TEMP}/initramfs-v86d-temp/sbin/v86d" >+ cd "${TEMP}/initramfs-v86d-temp/" >+ find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" >+ rm -rf "${TEMP}/initramfs-v86d-temp" > /dev/null >+} >+ > #append_suspend(){ > # if [ -d "${TEMP}/initramfs-suspend-temp" ]; > # then >@@ -477,6 +494,7 @@ > > append_data 'blkid' "${DISKLABEL}" > append_data 'splash' "${SPLASH}" >+ append_data 'v86d' "${V86D}" > > if isTrue "${FIRMWARE}" && [ -n "${FIRMWARE_DIR}" ] > then >diff -urN genkernel-3.4.10.orig/gen_initrd.sh genkernel-3.4.10/gen_initrd.sh >--- genkernel-3.4.10.orig/gen_initrd.sh 2008-07-02 01:40:00.000000000 +0200 >+++ genkernel-3.4.10/gen_initrd.sh 2008-07-02 01:41:04.000000000 +0200 >@@ -61,6 +61,14 @@ > chmod +x "${TEMP}/initrd-temp/bin/blkid" > fi > >+ if [ "${V86D}" -eq '1' ]; then >+ cp "${V86D_BINCACHE}" "${TEMP}/initrd-temp/sbin/v86d.bz2" || >+ gen_die 'Could not copy v86d from bincache!' >+ bunzip2 "${TEMP}/initrd-temp/sbin/v86d.bz2" || >+ gen_die 'Could not uncompress v86d!' >+ chmod +x "${TEMP}/initrd-temp/sbin/v86d" >+ fi >+ > tar -xjf "${BUSYBOX_BINCACHE}" -C "${TEMP}/initrd-temp/bin" busybox || > gen_die 'Could not extract busybox bincache!' > chmod +x "${TEMP}/initrd-temp/bin/busybox" >diff -urN genkernel-3.4.10.orig/genkernel genkernel-3.4.10/genkernel >--- genkernel-3.4.10.orig/genkernel 2008-07-02 01:40:00.000000000 +0200 >+++ genkernel-3.4.10/genkernel 2008-07-02 02:47:58.000000000 +0200 >@@ -300,6 +300,7 @@ > if [ "${BUILD_INITRD}" -eq '1' ] > then > [ "${DISKLABEL}" -eq '1' ] && compile_e2fsprogs >+ [ "${V86D}" -eq '1' ] && compile_v86d > > if [ "${KERN_24}" != '1' ] > then >diff -urN genkernel-3.4.10.orig/genkernel.conf genkernel-3.4.10/genkernel.conf >--- genkernel-3.4.10.orig/genkernel.conf 2008-07-02 01:40:00.000000000 +0200 >+++ genkernel-3.4.10/genkernel.conf 2008-07-02 10:58:47.000000000 +0200 >@@ -165,3 +165,11 @@ > E2FSPROGS_SRCTAR="${DISTDIR}/e2fsprogs-${E2FSPROGS_VER}.tar.gz" > BLKID_BINCACHE="%%CACHE%%/blkid-${E2FSPROGS_VER}-%%ARCH%%.bz2" > >+ >+KLIBC_VER="VERSION_KLIBC" >+KLIBC_SRCTAR="${DISTDIR}/klibc-${KLIBC_VER}.tar.bz2" >+KLIBC_DIR="klibc-${KLIBC_VER}" >+V86D_VER="VERSION_V86D" >+V86D_SRCTAR="${DISTDIR}/v86d-${V86D_VER}.tar.bz2" >+V86D_DIR="v86d-${V86D_VER}" >+V86D_BINCACHE="%%CACHE%%/v86d-${V86D_VER}-%%ARCH%%.bz2" >diff -urN genkernel-3.4.10.orig/patches/klibc/1.5.8/klibc-1.4.11-interp-flags.patch genkernel-3.4.10/patches/klibc/1.5.8/klibc-1.4.11-interp-flags.patch >--- genkernel-3.4.10.orig/patches/klibc/1.5.8/klibc-1.4.11-interp-flags.patch 1970-01-01 01:00:00.000000000 +0100 >+++ genkernel-3.4.10/patches/klibc/1.5.8/klibc-1.4.11-interp-flags.patch 2008-07-01 23:12:55.000000000 +0200 >@@ -0,0 +1,13 @@ >+diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild >+index c2bfd2f..8066bda 100644 >+--- a/usr/klibc/Kbuild >++++ b/usr/klibc/Kbuild >+@@ -152,7 +152,7 @@ # build interp.o >+ targets += interp.o >+ >+ quiet_cmd_interp = BUILD $@ >+- cmd_interp = $(KLIBCCC) $(klibccflags) -D__ASSEMBLY__ \ >++ cmd_interp = $(KLIBCCC) $(klibccflags) $(EXTRA_KLIBCAFLAGS) -D__ASSEMBLY__ \ >+ -DLIBDIR=\"$(SHLIBDIR)\" \ >+ -DSOHASH=\"$(SOLIBHASH)\" \ >+ -c -o $@ $< >diff -urN genkernel-3.4.10.orig/patches/klibc/1.5.8/klibc-1.5.7-strip-fix-dash-s.patch genkernel-3.4.10/patches/klibc/1.5.8/klibc-1.5.7-strip-fix-dash-s.patch >--- genkernel-3.4.10.orig/patches/klibc/1.5.8/klibc-1.5.7-strip-fix-dash-s.patch 1970-01-01 01:00:00.000000000 +0100 >+++ genkernel-3.4.10/patches/klibc/1.5.8/klibc-1.5.7-strip-fix-dash-s.patch 2008-07-01 23:12:55.000000000 +0200 >@@ -0,0 +1,12 @@ >+diff -Naurp klibc-1.5.7-orig/klcc/klcc.in klibc-1.5.7/klcc/klcc.in >+--- klibc-1.5.7-orig/klcc/klcc.in 2007-12-03 01:17:26.000000000 +0100 >++++ klibc-1.5.7/klcc/klcc.in 2007-12-03 01:18:39.000000000 +0100 >+@@ -259,7 +259,7 @@ if ( $operation ne '' ) { >+ unlink(@rmobjs); >+ >+ if ( $strip && !$rv ) { >+- $rv = mysystem($STRIP, @STRIPFLAGS, $output); >++ $rv = mysystem($STRIP, @STRIPFLAGS, $output || 'a.out'); >+ } >+ } >+ >diff -urN genkernel-3.4.10.orig/patches/klibc/1.5.8/klibc-1.5-klibcasmarch.patch genkernel-3.4.10/patches/klibc/1.5.8/klibc-1.5-klibcasmarch.patch >--- genkernel-3.4.10.orig/patches/klibc/1.5.8/klibc-1.5-klibcasmarch.patch 1970-01-01 01:00:00.000000000 +0100 >+++ genkernel-3.4.10/patches/klibc/1.5.8/klibc-1.5-klibcasmarch.patch 2008-07-01 23:12:55.000000000 +0200 >@@ -0,0 +1,25 @@ >+--- a/scripts/Kbuild.install 2007-03-04 02:52:10.000000000 +0100 >++++ b/scripts/Kbuild.install 2007-11-04 15:43:28.000000000 +0100 >+@@ -84,6 +84,13 @@ >+ # 1) Create directories, install headers and man pages >+ # 2) Tell that we now install binaries >+ # 3) Install binaries by descending >++ >++# Arch specific definitions for klibc >++include $(KLIBCSRC)/arch/$(KLIBCARCHDIR)/MCONFIG >++ >++# include/asm-* architecture >++KLIBCASMARCH ?= $(KLIBCARCH) >++ >+ .PHONY: header footer descend >+ header: >+ $(Q)echo " INSTALL headers + man pages to $(INSTALLROOT)$(INSTALLDIR)" >+@@ -95,7 +102,7 @@ >+ $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include >+ $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)lib >+ $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)bin >+- $(Q)set -e ; for d in linux scsi asm-$(KLIBCARCH) asm-generic $(ASMKLIBCARCH); do \ >++ $(Q)set -e ; for d in linux scsi asm-$(KLIBCASMARCH) asm-generic $(ASMKLIBCARCH); do \ >+ mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KLIBCCROSS)include/$$d ; \ >+ for r in $(KLIBCKERNELSRC)/include $(KLIBCKERNELOBJ)/include \ >+ $(KLIBCKERNELOBJ)/include2 ; do \ >diff -urN genkernel-3.4.10.orig/patches/klibc/1.5.8/klibc-1.5-sigaction.patch genkernel-3.4.10/patches/klibc/1.5.8/klibc-1.5-sigaction.patch >--- genkernel-3.4.10.orig/patches/klibc/1.5.8/klibc-1.5-sigaction.patch 1970-01-01 01:00:00.000000000 +0100 >+++ genkernel-3.4.10/patches/klibc/1.5.8/klibc-1.5-sigaction.patch 2008-07-01 23:12:55.000000000 +0200 >@@ -0,0 +1,37 @@ >+--- >+ usr/include/arch/ppc/klibc/archsignal.h | 6 ++++++ >+ usr/include/arch/sparc/klibc/archsignal.h | 7 ------- >+ 2 files changed, 6 insertions(+), 7 deletions(-) >+ >+--- a/usr/include/arch/ppc/klibc/archsignal.h >++++ b/usr/include/arch/ppc/klibc/archsignal.h >+@@ -8,7 +8,13 @@ >+ #ifndef _KLIBC_ARCHSIGNAL_H >+ #define _KLIBC_ARCHSIGNAL_H >+ >++#ifdef _SIGNAL_H >++#undef _SIGNAL_H >+ #include <asm/signal.h> >++#define _SIGNAL_H >++#else >++#include <asm/signal.h> >++#endif >+ /* No special stuff for this architecture */ >+ >+ #endif >+--- a/usr/include/arch/sparc/klibc/archsignal.h >++++ b/usr/include/arch/sparc/klibc/archsignal.h >+@@ -11,13 +11,6 @@ >+ #define __WANT_POSIX1B_SIGNALS__ >+ #include <asm/signal.h> >+ >+-struct sigaction { >+- __sighandler_t sa_handler; >+- unsigned long sa_flags; >+- void (*sa_restorer)(void); /* Not used by Linux/SPARC */ >+- sigset_t sa_mask; >+-}; >+- >+ /* Not actually used by the kernel... */ >+ #define SA_RESTORER 0x80000000 >+ >diff -urN genkernel-3.4.10.orig/patches/v86d/0.1.3/v86d-0.1.3-custom-cc.patch genkernel-3.4.10/patches/v86d/0.1.3/v86d-0.1.3-custom-cc.patch >--- genkernel-3.4.10.orig/patches/v86d/0.1.3/v86d-0.1.3-custom-cc.patch 1970-01-01 01:00:00.000000000 +0100 >+++ genkernel-3.4.10/patches/v86d/0.1.3/v86d-0.1.3-custom-cc.patch 2008-07-02 00:48:01.000000000 +0200 >@@ -0,0 +1,14 @@ >+diff -urN v86d-0.1.3.orig/Makefile v86d-0.1.3/Makefile >+--- v86d-0.1.3.orig/Makefile 2008-07-02 00:44:56.000000000 +0200 >++++ v86d-0.1.3/Makefile 2008-07-02 00:46:10.000000000 +0200 >+@@ -5,9 +5,7 @@ >+ INSTALL = install >+ KDIR ?= /lib/modules/$(shell uname -r)/source >+ >+-ifeq ($(call config_opt,CONFIG_KLIBC),true) >+- export CC = klcc >+-endif >++export CC = $(CC) >+ >+ CFLAGS ?= -Wall -g -O2 >+ CFLAGS += -I$(KDIR)/include
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 193514
:
131688
|
159251
|
159253
|
159255
|
160140
|
160151
|
175271
|
175274
|
180833
|
180834