Mercurial > hg > aboriginal
changeset 541:3abcea34485c
Allow USE_UNSTABLE=linux to build the 2.6.27 kernel.
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 16 Dec 2008 13:28:46 -0600 |
parents | d0b059fd91a8 |
children | 4d0e30fef4a6 |
files | sources/patches/alt-linux-fixppclink.patch sources/patches/alt-linux-noperl-yesreally.patch |
diffstat | 2 files changed, 102 insertions(+), 84 deletions(-) [+] |
line wrap: on
line diff
--- a/sources/patches/alt-linux-fixppclink.patch Sun Dec 14 04:13:44 2008 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ ---- linux-2.6.26/arch/powerpc/kernel/vmlinux.lds.S 2008-07-13 16:51:29.000000000 -0500 -+++ linux-2.6.27-rc2/arch/powerpc/kernel/vmlinux.lds.S 2008-08-05 23:49:54.000000000 -0500 -@@ -9,6 +9,25 @@ - - ENTRY(_stext) - -+PHDRS { -+ kernel PT_LOAD FLAGS(7); /* RWX */ -+ notes PT_NOTE FLAGS(0); -+ dummy PT_NOTE FLAGS(0); -+ -+ /* binutils < 2.18 has a bug that makes it misbehave when taking an -+ ELF file with all segments at load address 0 as input. This -+ happens when running "strip" on vmlinux, because of the AT() magic -+ in this linker script. People using GCC >= 4.2 won't run into -+ this problem, because the "build-id" support will put some data -+ into the "notes" segment (at a non-zero load address). -+ -+ To work around this, we force some data into both the "dummy" -+ segment and the kernel segment, so the dummy segment will get a -+ non-zero load address. It's not enough to always create the -+ "notes" segment, since if nothing gets assigned to it, its load -+ address will be zero. */ -+} -+ - #ifdef CONFIG_PPC64 - OUTPUT_ARCH(powerpc:common64) - jiffies = jiffies_64; -@@ -35,7 +54,7 @@ - ALIGN_FUNCTION(); - *(.text.head) - _text = .; -- *(.text .fixup .text.init.refok .exit.text.refok) -+ *(.text .fixup .text.init.refok .exit.text.refok __ftr_alt_*) - SCHED_TEXT - LOCK_TEXT - KPROBES_TEXT -@@ -50,7 +69,7 @@ - . = ALIGN(PAGE_SIZE); - _etext = .; - PROVIDE32 (etext = .); -- } -+ } :kernel - - /* Read-only data */ - RODATA -@@ -62,9 +81,13 @@ - __stop___ex_table = .; - } - -- NOTES -+ NOTES :kernel :notes - -- BUG_TABLE -+ /* The dummy segment contents for the bug workaround mentioned above -+ near PHDRS. */ -+ .dummy : AT(ADDR(.dummy) - LOAD_OFFSET) { -+ LONG(0xf177) -+ } :kernel :dummy - - /* - * Init sections discarded at runtime -@@ -76,7 +99,7 @@ - _sinittext = .; - INIT_TEXT - _einittext = .; -- } -+ } :kernel - - /* .exit.text is discarded at runtime, not link time, - * to deal with references from __bug_table -@@ -127,6 +150,12 @@ - *(__ftr_fixup) - __stop___ftr_fixup = .; - } -+ . = ALIGN(8); -+ __lwsync_fixup : AT(ADDR(__lwsync_fixup) - LOAD_OFFSET) { -+ __start___lwsync_fixup = .; -+ *(__lwsync_fixup) -+ __stop___lwsync_fixup = .; -+ } - #ifdef CONFIG_PPC64 - . = ALIGN(8); - __fw_ftr_fixup : AT(ADDR(__fw_ftr_fixup) - LOAD_OFFSET) {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/patches/alt-linux-noperl-yesreally.patch Tue Dec 16 13:28:46 2008 -0600 @@ -0,0 +1,102 @@ +You should not need perl to build the kernel. Honestly. For 17 years, you +could build the kernel without perl. Don't let perl metasticize throughout +the kernel, BURN IT OUT. + +--- /dev/null 2008-11-21 04:46:41.000000000 -0600 ++++ b/scripts/headers_install.sh 2008-12-15 22:09:45.000000000 -0600 +@@ -0,0 +1,23 @@ ++#!/bin/bash ++ ++# Grab arguments ++ ++INDIR="$1" ++shift ++OUTDIR="$1" ++shift ++ARCH="$1" ++shift ++ ++# Iterate through files listed on command line ++ ++for i in "$@" ++do ++ sed -r \ ++ -e 's/([ \t(])(__user|__force|__iomem)[ \t]/\1/g' \ ++ -e 's/__attribute_const__([ \t]|$)/\1/g' \ ++ -e 's@^#include <linux/compiler.h>@@' "$INDIR/$i" | ++ scripts/unifdef -U__KERNEL__ - > "$OUTDIR/$i" ++done ++ ++exit 0 +diff -r d9b501c91442 scripts/Makefile.headersinst +--- a/scripts/Makefile.headersinst Sun Dec 14 16:25:19 2008 -0800 ++++ b/scripts/Makefile.headersinst Mon Dec 15 23:30:15 2008 -0600 +@@ -44,8 +44,8 @@ + quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\ + file$(if $(word 2, $(all-files)),s)) + cmd_install = \ +- $(PERL) $< $(srctree)/$(obj) $(install) $(SRCARCH) $(header-y); \ +- $(PERL) $< $(objtree)/$(obj) $(install) $(SRCARCH) $(objhdr-y); \ ++ $(CONFIG_SHELL) $< $(srctree)/$(obj) $(install) $(SRCARCH) $(header-y); \ ++ $(CONFIG_SHELL) $< $(objtree)/$(obj) $(install) $(SRCARCH) $(objhdr-y); \ + touch $@ + + quiet_cmd_remove = REMOVE $(unwanted) +@@ -64,7 +64,7 @@ + @: + + targets += $(install-file) +-$(install-file): scripts/headers_install.pl $(input-files) FORCE ++$(install-file): scripts/headers_install.sh $(input-files) FORCE + $(if $(unwanted),$(call cmd,remove),) + $(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@))) + $(call if_changed,install) +--- hg/scripts/headers_install.pl 2008-11-22 19:09:21.000000000 -0600 ++++ /dev/null 1970-01-01 00:00:00 -0600 +@@ -1,46 +0,0 @@ +-#!/usr/bin/perl -w +-# +-# headers_install prepare the listed header files for use in +-# user space and copy the files to their destination. +-# +-# Usage: headers_install.pl readdir installdir arch [files...] +-# readdir: dir to open files +-# installdir: dir to install the files +-# arch: current architecture +-# arch is used to force a reinstallation when the arch +-# changes because kbuild then detect a command line change. +-# files: list of files to check +-# +-# Step in preparation for users space: +-# 1) Drop all use of compiler.h definitions +-# 2) Drop include of compiler.h +-# 3) Drop all sections defined out by __KERNEL__ (using unifdef) +- +-use strict; +- +-my ($readdir, $installdir, $arch, @files) = @ARGV; +- +-my $unifdef = "scripts/unifdef -U__KERNEL__"; +- +-foreach my $file (@files) { +- local *INFILE; +- local *OUTFILE; +- my $tmpfile = "$installdir/$file.tmp"; +- open(INFILE, "<$readdir/$file") +- or die "$readdir/$file: $!\n"; +- open(OUTFILE, ">$tmpfile") or die "$tmpfile: $!\n"; +- while (my $line = <INFILE>) { +- $line =~ s/([\s(])__user\s/$1/g; +- $line =~ s/([\s(])__force\s/$1/g; +- $line =~ s/([\s(])__iomem\s/$1/g; +- $line =~ s/\s__attribute_const__\s/ /g; +- $line =~ s/\s__attribute_const__$//g; +- $line =~ s/^#include <linux\/compiler.h>//; +- printf OUTFILE "%s", $line; +- } +- close OUTFILE; +- close INFILE; +- system $unifdef . " $tmpfile > $installdir/$file"; +- unlink $tmpfile; +-} +-exit 0;