changeset 1608:f0c3f8456602

Upgrade to new kernel, toybox, busybox, and musl releases.
author Rob Landley <rob@landley.net>
date Wed, 03 Jul 2013 22:55:06 -0500
parents 59c1495d5b5e
children 19a363f60409
files download.sh sources/baseconfig-busybox sources/patches/linux-mips64fix.patch sources/patches/linux-noperl-capflags.patch sources/patches/linux-noperl-headers.patch sources/targets/sh4
diffstat 6 files changed, 29 insertions(+), 347 deletions(-) [+]
line wrap: on
line diff
--- a/download.sh	Wed Jul 03 22:54:00 2013 -0500
+++ b/download.sh	Wed Jul 03 22:55:06 2013 -0500
@@ -25,12 +25,12 @@
 SHA1=4d8d67d6754409bd10015d67d1ce7a04c0b001ba \
 maybe_fork "download || dienow"
 
-URL=http://etalabs.net/musl/releases/musl-0.9.10.tar.gz
-SHA1=4082df10a2985c36be50a3643a0215b219154049 \
+URL=http://etalabs.net/musl/releases/musl-0.9.11.tar.gz
+SHA1=beb507e6fcbc5aeda856171a50258093138c20cd \
 maybe_fork "download || dienow"
 
-URL=ftp://kernel.org/pub/linux/kernel/v3.x/linux-3.9.tar.bz2 \
-SHA1=eccaff1bf7c671dacb18cfa98f8275fc9afbb0e1 \
+URL=ftp://kernel.org/pub/linux/kernel/v3.x/linux-3.10.tar.bz2 \
+SHA1=2a922a4268bf69381747d219a05a729f5b0c3ba0 \
 maybe_fork "download || dienow"
 
 
@@ -59,12 +59,12 @@
 # BusyBox.  Adding a native toolchain requires binutils and gcc (above) plus
 # make and bash.
 
-URL=http://landley.net/toybox/downloads/toybox-0.4.4.tar.bz2 \
-SHA1=36c51981e0260973c50e115223936878577c6c6a \
+URL=http://landley.net/toybox/downloads/toybox-0.4.5.tar.bz2 \
+SHA1=7e4a2065845ff6b521378158310696d4b926a5ba \
 maybe_fork "download || dienow"
 
-URL=http://www.busybox.net/downloads/busybox-1.21.0.tar.bz2 \
-SHA1=1e22c35fd5d93db1046c87c141b19026a38e81a2 \
+URL=http://www.busybox.net/downloads/busybox-1.21.1.tar.bz2 \
+SHA1=9244187d8d30447e165c694e89f4731c1705a53b \
 maybe_fork "download || dienow"
 
 URL=ftp://ftp.gnu.org/gnu/make/make-3.81.tar.bz2 \
--- a/sources/baseconfig-busybox	Wed Jul 03 22:54:00 2013 -0500
+++ b/sources/baseconfig-busybox	Wed Jul 03 22:55:06 2013 -0500
@@ -37,12 +37,8 @@
 CONFIG_EXPR_MATH_SUPPORT_64=y
 
 CONFIG_INSTALL=y
-CONFIG_MV=y
 CONFIG_FEATURE_PRESERVE_HARDLINKS=y
 
-CONFIG_STAT=y
-CONFIG_FEATURE_STAT_FORMAT=y
-
 CONFIG_TR=y
 CONFIG_AWK=y
 
@@ -70,11 +66,6 @@
 CONFIG_FEATURE_TEST_64=y
 
 # for root file system use
-CONFIG_IFCONFIG=y
-CONFIG_FEATURE_IFCONFIG_STATUS=y
-CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y
-CONFIG_FEATURE_IFCONFIG_HW=y
-CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y
 
 CONFIG_ROUTE=y
 
@@ -103,7 +94,6 @@
 
 CONFIG_WGET=y
 CONFIG_LESS=y
-CONFIG_SPLIT=y
 CONFIG_MAN=y
 
 # native-build.sh
@@ -156,7 +146,6 @@
 CONFIG_FEATURE_FANCY_ECHO=y
 
 CONFIG_ENV=y
-CONFIG_HEAD=y
 CONFIG_ID=y
 CONFIG_LN=y
 
@@ -175,8 +164,6 @@
 CONFIG_SORT=y
 CONFIG_FEATURE_SORT_BIG=y
 
-CONFIG_SYNC=y
-CONFIG_TEE=y
 CONFIG_TRUE=y
 CONFIG_UNAME=y
 CONFIG_WC=y
@@ -196,9 +183,7 @@
 CONFIG_FEATURE_LS_TIMESTAMPS=y
 CONFIG_FEATURE_LS_USERNAME=y
 CONFIG_BASENAME=y
-CONFIG_CHGRP=y
 CONFIG_CHMOD=y
-CONFIG_LOGNAME=y
 CONFIG_MKDIR=y
 CONFIG_MKTEMP=y
 
@@ -209,7 +194,6 @@
 
 CONFIG_OD=y
 CONFIG_DATE=y
-CONFIG_COMM=y
 
 CONFIG_CHOWN=y
 
@@ -219,8 +203,28 @@
 CONFIG_SWITCH_ROOT=y
 CONFIG_TOUCH=y
 CONFIG_CP=y
+CONFIG_MV=y
 CONFIG_LOSETUP=y
 
 CONFIG_READLINK=y
 CONFIG_FEATURE_READLINK_FOLLOW=y
 CONFIG_TIME=y
+
+CONFIG_IFCONFIG=y
+CONFIG_FEATURE_IFCONFIG_STATUS=y
+CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y
+CONFIG_FEATURE_IFCONFIG_HW=y
+CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y
+
+CONFIG_STAT=y
+CONFIG_FEATURE_STAT_FORMAT=y
+
+# LFS build
+
+CONFIG_SYNC=y
+CONFIG_HEAD=y
+CONFIG_CHGRP=y
+CONFIG_COMM=y
+CONFIG_LOGNAME=y
+CONFIG_SPLIT=y
+CONFIG_TEE=y
--- a/sources/patches/linux-mips64fix.patch	Wed Jul 03 22:54:00 2013 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-Commit f6be75d03c88 broke mips64, for no obvious reason.  Reverting it fixes
-things.
-
-diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
-index 1a4dd65..4e00f9b 100644
---- a/arch/mips/kernel/traps.c
-+++ b/arch/mips/kernel/traps.c
-@@ -1599,7 +1599,7 @@ void __init trap_init(void)
- 		ebase = (unsigned long)
- 			__alloc_bootmem(size, 1 << fls(size), 0);
- 	} else {
--		ebase = CKSEG0;
-+		ebase = CAC_BASE;
- 		if (cpu_has_mips_r2)
- 			ebase += (read_c0_ebase() & 0x3ffff000);
- 	}
--- a/sources/patches/linux-noperl-capflags.patch	Wed Jul 03 22:54:00 2013 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,140 +0,0 @@
-From: Rob Landley <rob@landley.net>
-Subject: [PATCH 1/3] convert mkcapflags.pl to mkcapflags.sh
-To: linux-kernel@vger.kernel.org
-Cc: Arnd Bergmann <arnd@arndb.de>
-Cc: Dave Jones <davej@redhat.com>
-Cc: David Howells <dhowells@redhat.com>
-Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
-Cc: Cyrill Gorcunov <gorcunov@openvz.org>
-Cc: Vince Weaver <vincent.weaver@maine.edu>
-Cc: Zheng Yan <zheng.z.yan@intel.com>
-Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
-Cc: x86@kernel.org
-Cc: "H. Peter Anvin" <hpa@zytor.com>
-Cc: Ingo Molnar <mingo@redhat.com>
-Cc: Thomas Gleixner <tglx@linutronix.de>
-
-From: Rob Landley <rob@landley.net>
-
-Generate asm-x86/cpufeature.h with posix-2008 commands instead of perl.
-
-Signed-off-by: Rob Landley <rob@landley.net>
----
-
- arch/x86/kernel/cpu/Makefile      |    4 +-
- arch/x86/kernel/cpu/mkcapflags.pl |   48 ----------------------------
- arch/x86/kernel/cpu/mkcapflags.sh |   41 +++++++++++++++++++++++
- 3 files changed, 43 insertions(+), 50 deletions(-)
-
---- linux/arch/x86/kernel/cpu/mkcapflags.pl
-+++ /dev/null
-@@ -1,48 +0,0 @@
--#!/usr/bin/perl -w
--#
--# Generate the x86_cap_flags[] array from include/asm-x86/cpufeature.h
--#
--
--($in, $out) = @ARGV;
--
--open(IN, "< $in\0")   or die "$0: cannot open: $in: $!\n";
--open(OUT, "> $out\0") or die "$0: cannot create: $out: $!\n";
--
--print OUT "#ifndef _ASM_X86_CPUFEATURE_H\n";
--print OUT "#include <asm/cpufeature.h>\n";
--print OUT "#endif\n";
--print OUT "\n";
--print OUT "const char * const x86_cap_flags[NCAPINTS*32] = {\n";
--
--%features = ();
--$err = 0;
--
--while (defined($line = <IN>)) {
--	if ($line =~ /^\s*\#\s*define\s+(X86_FEATURE_(\S+))\s+(.*)$/) {
--		$macro = $1;
--		$feature = "\L$2";
--		$tail = $3;
--		if ($tail =~ /\/\*\s*\"([^"]*)\".*\*\//) {
--			$feature = "\L$1";
--		}
--
--		next if ($feature eq '');
--
--		if ($features{$feature}++) {
--			print STDERR "$in: duplicate feature name: $feature\n";
--			$err++;
--		}
--		printf OUT "\t%-32s = \"%s\",\n", "[$macro]", $feature;
--	}
--}
--print OUT "};\n";
--
--close(IN);
--close(OUT);
--
--if ($err) {
--	unlink($out);
--	exit(1);
--}
--
--exit(0);
---- /dev/null	2012-07-11 05:54:12.790418331 -0500
-+++ linux/arch/x86/kernel/cpu/mkcapflags.sh	2012-07-22 13:13:57.700823094 -0500
-@@ -0,0 +1,41 @@
-+#!/bin/sh
-+#
-+# Generate the x86_cap_flags[] array from include/asm/cpufeature.h
-+#
-+
-+IN=$1
-+OUT=$2
-+
-+TABS="$(printf '\t\t\t\t\t')"
-+trap 'rm "$OUT"' EXIT
-+
-+(
-+	echo "#ifndef _ASM_X86_CPUFEATURE_H"
-+	echo "#include <asm/cpufeature.h>"
-+	echo "#endif"
-+	echo ""
-+	echo "const char * const x86_cap_flags[NCAPINTS*32] = {"
-+
-+	# Iterate through any input lines starting with #define X86_FEATURE_
-+	sed -n -e 's/\t/ /g' -e 's/^ *# *define *X86_FEATURE_//p' $IN |
-+	while read i
-+	do
-+		# Name is everything up to the first whitespace
-+		NAME="$(echo "$i" | sed 's/ .*//')"
-+
-+		# If the /* comment */ starts with a quote string, grab that.
-+		VALUE="$(echo "$i" | sed -n 's@.*/\* *\("[^"]*"\).*\*/@\1@p')"
-+		[ -z "$VALUE" ] && VALUE="\"$NAME\""
-+		[ "$VALUE" == '""' ] && continue
-+
-+		# Name is uppercase, VALUE is all lowercase
-+		VALUE="$(echo "$VALUE" | tr A-Z a-z)"
-+
-+		TABCOUNT=$(( ( 5*8 - 14 - $(echo "$NAME" | wc -c) ) / 8 ))
-+		printf "\t[%s]%.*s = %s,\n" \
-+			"X86_FEATURE_$NAME" "$TABCOUNT" "$TABS" "$VALUE"
-+	done
-+	echo "};"
-+) > $OUT
-+
-+trap - EXIT
-diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
-index 25f24dc..9edf7e7 100644
---- a/arch/x86/kernel/cpu/Makefile
-+++ b/arch/x86/kernel/cpu/Makefile
-@@ -43,10 +43,10 @@ obj-$(CONFIG_MTRR)			+= mtrr/
- obj-$(CONFIG_X86_LOCAL_APIC)		+= perfctr-watchdog.o perf_event_amd_ibs.o
- 
- quiet_cmd_mkcapflags = MKCAP   $@
--      cmd_mkcapflags = $(PERL) $(srctree)/$(src)/mkcapflags.pl $< $@
-+      cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/mkcapflags.sh $< $@
- 
- cpufeature = $(src)/../../include/asm/cpufeature.h
- 
- targets += capflags.c
--$(obj)/capflags.c: $(cpufeature) $(src)/mkcapflags.pl FORCE
-+$(obj)/capflags.c: $(cpufeature) $(src)/mkcapflags.sh FORCE
- 	$(call if_changed,mkcapflags)
--- a/sources/patches/linux-noperl-headers.patch	Wed Jul 03 22:54:00 2013 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +0,0 @@
-Subject: [PATCH 3/3] convert headers_install.pl to headers_install.sh
-To: linux-kbuild@vger.kernel.org
-Cc: linux-kernel@vger.kernel.org
-Cc: Thomas Gleixner <tglx@linutronix.de>
-Cc: Josh Boyer <jwboyer@redhat.com>
-Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
-Cc: Andrew Morton <akpm@linux-foundation.org>
-Cc: David Howells <dhowell@redhat.com>
-Cc: Michal Marek <mmarek@suse.cz>
-Cc: Sam Ravnborg <sam@ravnborg.org>
-
-From: Rob Landley <rob@landley.net>
-
-Remove perl from make headers_install by replacing a perl script (doing
-a simple regex search and replace) with a smaller, faster, simpler,
-POSIX-2008 shell script implementation.  The new shell script is a single
-for loop calling sed and piping its output through unifdef to produce the
-target file.
-
-Same as last time except for minor tweak to deal with code review from here:
-http://lkml.indiana.edu/hypermail/linux/kernel/1302.3/00078.html
-
-(Note that this drops the "arch" argument, which isn't used. Kbuild
-already points to the right input files on the command line.)
-
-Signed-off-by: Rob Landley <rob@landley.net>
----
-
- scripts/Makefile.headersinst |    4 +-
- scripts/headers_install.pl   |   63 ---------------------------------
- scripts/headers_install.sh   |   43 ++++++++++++++++++++++
- 3 files changed, 45 insertions(+), 65 deletions(-)
-
-diff -ruN linux-3.1/scripts/headers_install.sh linux-2.6.30/scripts/headers_install.sh
---- linux-3.1/scripts/headers_install.sh
-+++ linux/scripts/headers_install.sh
-@@ -0,0 +1,43 @@
-+#!/bin/sh
-+
-+if [ $# -lt 1 ]
-+then
-+	echo "Usage: headers_install.sh OUTDIR [FILES...]
-+	echo
-+	echo "Prepares kernel header files for use by user space, by removing"
-+	echo "all compiler.h definitions and #includes, removing any"
-+	echo "#ifdef __KERNEL__ sections, and putting __underscores__ around"
-+	echo "asm/inline/volatile keywords."
-+	echo
-+	echo "OUTDIR: directory to write each userspace header FILE to."
-+	echo "FILES:  list of header files to operate on."
-+
-+	exit 1
-+fi
-+
-+# Grab arguments
-+
-+OUTDIR="$1"
-+shift
-+
-+# Iterate through files listed on command line
-+
-+FILE=
-+trap 'rm -f "$OUTDIR/$FILE" "$OUTDIR/$FILE.sed"' EXIT
-+for i in "$@"
-+do
-+	FILE="$(basename "$i")"
-+	sed -r \
-+		-e 's/([ \t(])(__user|__force|__iomem)[ \t]/\1/g' \
-+		-e 's/__attribute_const__([ \t]|$)/\1/g' \
-+		-e 's@^#include <linux/compiler.h>@@' \
-+		-e 's/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\1__attribute__((packed))\2/g' \
-+		-e 's/(^|[ \t(])(inline|asm|volatile)([ \t(]|$)/\1__\2__\3/g' \
-+		-e 's@#(ifndef|define|endif[ \t]*/[*])[ \t]*_UAPI@#\1 @' \
-+		"$i" > "$OUTDIR/$FILE.sed" || exit 1
-+	scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__ "$OUTDIR/$FILE.sed" \
-+		> "$OUTDIR/$FILE"
-+	[ $? -gt 1 ] && exit 1
-+	rm -f "$OUTDIR/$FILE.sed"
-+done
-+trap - EXIT
-diff -ruN linux-3.1/scripts/Makefile.headersinst
---- linux-3.1/scripts/Makefile.headersinst
-+++ linux/scripts/Makefile.headersinst
-@@ -71,7 +71,7 @@
- quiet_cmd_install = INSTALL $(printdir) ($(words $(all-files))\
-                             file$(if $(word 2, $(all-files)),s))
-       cmd_install = \
--        $(PERL) $< $(installdir) $(SRCARCH) $(input-files); \
-+        $(CONFIG_SHELL) $< $(installdir) $(input-files); \
-         for F in $(wrapper-files); do                                   \
-                 echo "\#include <asm-generic/$$F>" > $(installdir)/$$F;    \
-         done;                                                           \
-@@ -97,7 +97,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)
---- a/scripts/headers_install.pl
-+++ /dev/null
-@@ -1,63 +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...]
--# installdir: dir to install the files to
--# 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 ($installdir, $arch, @files) = @ARGV;
--
--my $unifdef = "scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__";
--
--foreach my $filename (@files) {
--	my $file = $filename;
--	$file =~ s!^.*/!!;
--
--	my $tmpfile = "$installdir/$file.tmp";
--
--	open(my $in, '<', $filename)
--	    or die "$filename: $!\n";
--	open(my $out, '>', $tmpfile)
--	    or die "$tmpfile: $!\n";
--	while (my $line = <$in>) {
--		$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/\b__packed\b/__attribute__((packed))/g;
--		$line =~ s/^#include <linux\/compiler.h>//;
--		$line =~ s/(^|\s)(inline)\b/$1__$2__/g;
--		$line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g;
--		$line =~ s/(^|\s|[(])(volatile)\b(\s|[(]|$)/$1__$2__$3/g;
--		$line =~ s/#ifndef\s+_UAPI/#ifndef /;
--		$line =~ s/#define\s+_UAPI/#define /;
--		$line =~ s!#endif\s+/[*]\s*_UAPI!#endif /* !;
--		printf {$out} "%s", $line;
--	}
--	close $out;
--	close $in;
--
--	system $unifdef . " $tmpfile > $installdir/$file";
--	# unifdef will exit 0 on success, and will exit 1 when the
--	# file was processed successfully but no changes were made,
--	# so abort only when it's higher than that.
--	my $e = $? >> 8;
--	if ($e > 1) {
--		die "$tmpfile: $!\n";
--	}
--	unlink $tmpfile;
--}
--exit 0;
--- a/sources/targets/sh4	Wed Jul 03 22:54:00 2013 -0500
+++ b/sources/targets/sh4	Wed Jul 03 22:55:06 2013 -0500
@@ -36,6 +36,7 @@
 CONFIG_AIO=y
 CONFIG_PCI_QUIRKS=y
 CONFIG_BLOCK=y
+CONFIG_TTY=y
 CONFIG_CPU_SUBTYPE_SH7751R=y
 CONFIG_MMU=y
 CONFIG_MEMORY_START=0x0c000000