Mercurial > hg > aboriginal
changeset 1530:2b3c892dc25e
The 3.5 kernel and toybox 0.4.0. Some fixes likely to be required.
author | Rob Landley <rob@landley.net> |
---|---|
date | Wed, 25 Jul 2012 08:25:24 -0500 |
parents | 90da269bc09c |
children | 3b7e8d600c19 |
files | download.sh sources/patches/linux-fixarm.patch sources/patches/linux-fixubi.patch sources/patches/linux-noperl-capflags.patch |
diffstat | 4 files changed, 47 insertions(+), 148 deletions(-) [+] |
line wrap: on
line diff
--- a/download.sh Sun Jun 10 20:34:04 2012 -0500 +++ b/download.sh Wed Jul 25 08:25:24 2012 -0500 @@ -26,8 +26,8 @@ ALT=http://uclibc.org/downloads/uClibc-snapshot.tar.bz2 \ maybe_fork "download || dienow" -URL=http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.4.tar.bz2 \ -SHA1=dfc54e7fbee81f77aba85d3d8ff2d992e1e49573 \ +URL=http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.5.tar.bz2 \ +SHA1=d80e85147417605e125fc3fb263af85d7ffd1ad5 \ ALT=http://kernel.org/pub/linux/kernel/v3.0/testing/linux-3.0-rc1.tar.bz2 \ maybe_fork "download || dienow" @@ -57,8 +57,8 @@ # BusyBox. Adding a native toolchain requires binutils and gcc (above) plus # make and bash. -URL=http://landley.net/toybox/downloads/toybox-0.2.1.tar.bz2 \ -SHA1=0b3a27aa96de3104396253469efccc4a16fecfa4 \ +URL=http://landley.net/toybox/downloads/toybox-0.4.0.tar.bz2 \ +SHA1=2c495d9c951e6b70c4c6172be8b1c56426a54a47 \ maybe_fork "download || dienow" URL=http://www.busybox.net/downloads/busybox-1.20.0.tar.bz2 \
--- a/sources/patches/linux-fixarm.patch Sun Jun 10 20:34:04 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -The 3.4 kernel broke the versatile target in commits c334bc150524f and -4d5fc58dbe34. This fixes it. - -diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig -index 31a2ddc..6e91c39 100644 ---- a/arch/arm/Kconfig -+++ b/arch/arm/Kconfig -@@ -308,6 +308,7 @@ config ARCH_VERSATILE - select PLAT_VERSATILE - select PLAT_VERSATILE_CLCD - select PLAT_VERSATILE_FPGA_IRQ -+ select NEED_MACH_IO_H - select ARM_TIMER_SP804 - help - This enables support for ARM Ltd Versatile board. -commit 4d5fc58dbe34b78157c05b319669bb3e064ba8bd -diff --git a/arch/arm/mach-versatile/include/mach/io.h b/arch/arm/mach-versatile/include/mach/io.h -deleted file mode 100644 -index f067c14..0000000 ---- /dev/null -+++ b/arch/arm/mach-versatile/include/mach/io.h -@@ -0,0 +1,9 @@ -+#ifndef __ASM_ARM_ARCH_IO_H -+#define __ASM_ARM_ARCH_IO_H -+ -+#define IO_SPACE_LIMIT 0xffffffff -+ -+#define __io(a) __typesafe_io(a) -+#define __mem_pci(a) (a) -+ -+#endif
--- a/sources/patches/linux-fixubi.patch Sun Jun 10 20:34:04 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -Revert commit 3627924acf70a9a for details see -http://lkml.indiana.edu/hypermail/linux/kernel/1108.1/02863.html - -diff --git a/drivers/mtd/ubi/ubi-media.h b/drivers/mtd/ubi/ubi-media.h -index 6fb8ec2..503ea9b 100644 ---- a/drivers/mtd/ubi/ubi-media.h -+++ b/drivers/mtd/ubi/ubi-media.h -@@ -164,7 +164,7 @@ struct ubi_ec_hdr { - __be32 image_seq; - __u8 padding2[32]; - __be32 hdr_crc; --} __packed; -+} __attribute__ ((packed)); - - /** - * struct ubi_vid_hdr - on-flash UBI volume identifier header. -@@ -292,7 +292,7 @@ struct ubi_vid_hdr { - __be64 sqnum; - __u8 padding3[12]; - __be32 hdr_crc; --} __packed; -+} __attribute__ ((packed)); - - /* Internal UBI volumes count */ - #define UBI_INT_VOL_COUNT 1 -@@ -373,6 +373,6 @@ struct ubi_vtbl_record { - __u8 flags; - __u8 padding[23]; - __be32 crc; --} __packed; -+} __attribute__ ((packed)); - - #endif /* !__UBI_MEDIA_H__ */ -diff --git a/include/mtd/ubi-user.h b/include/mtd/ubi-user.h -index a390342..e70bd34 100644 ---- a/include/mtd/ubi-user.h -+++ b/include/mtd/ubi-user.h -@@ -310,7 +310,7 @@ struct ubi_mkvol_req { - __s16 name_len; - __s8 padding2[4]; - char name[UBI_MAX_VOLUME_NAME + 1]; --} __packed; -+} __attribute__ ((packed)); - - /** - * struct ubi_rsvol_req - a data structure used in volume re-size requests. -@@ -326,7 +326,7 @@ struct ubi_mkvol_req { - struct ubi_rsvol_req { - __s64 bytes; - __s32 vol_id; --} __packed; -+} __attribute__ ((packed)); - - /** - * struct ubi_rnvol_req - volumes re-name request. -@@ -368,7 +368,7 @@ struct ubi_rnvol_req { - __s8 padding2[2]; - char name[UBI_MAX_VOLUME_NAME + 1]; - } ents[UBI_MAX_RNVOL]; --} __packed; -+} __attribute__ ((packed)); - - /** - * struct ubi_leb_change_req - a data structure used in atomic LEB change -@@ -383,7 +383,7 @@ struct ubi_leb_change_req { - __s32 bytes; - __s8 dtype; - __s8 padding[7]; --} __packed; -+} __attribute__ ((packed)); - - /** - * struct ubi_map_req - a data structure used in map LEB requests. -@@ -395,7 +395,7 @@ struct ubi_map_req { - __s32 lnum; - __s8 dtype; - __s8 padding[3]; --} __packed; -+} __attribute__ ((packed)); - - - /** -@@ -409,6 +409,6 @@ struct ubi_set_vol_prop_req { - __u8 property; - __u8 padding[7]; - __u64 value; --} __packed; -+} __attribute__ ((packed)); - - #endif /* __UBI_USER_H__ */
--- a/sources/patches/linux-noperl-capflags.patch Sun Jun 10 20:34:04 2012 -0500 +++ b/sources/patches/linux-noperl-capflags.patch Wed Jul 25 08:25:24 2012 -0500 @@ -1,22 +1,19 @@ From: Rob Landley <rob@landley.net> -Generate capflags.c with sed (POSIX 2008) instead of perl. +Generate asm-x86/cpufeature.h with posix-2008 commands instead of perl. Signed-off-by: Rob Landley <rob@landley.net> --- -This patch hasn't changed since 2009, just rediffed to eliminate fuzz. + arch/x86/kernel/cpu/Makefile | 4 +- + arch/x86/kernel/cpu/mkcapflags.pl | 45 ---------------------------- + arch/x86/kernel/cpu/mkcapflags.sh | 39 ++++++++++++++++++++++++ + 3 files changed, 41 insertions(+), 47 deletions(-) - arch/x86/kernel/cpu/Makefile | 4 +-- - arch/x86/kernel/cpu/mkcapflags.pl | 32 ---------------------------- - arch/x86/kernel/cpu/mkcapflags.sh | 28 ++++++++++++++++++++++++ - 3 files changed, 30 insertions(+), 34 deletions(-) - -diff -ruN linux-2.6.30.old/arch/x86/kernel/cpu/mkcapflags.pl linux-2.6.30/arch/x86/kernel/cpu/mkcapflags.pl ---- linux-2.6.30.old/arch/x86/kernel/cpu/mkcapflags.pl 2009-06-09 22:05:27.000000000 -0500 -+++ linux-2.6.30/arch/x86/kernel/cpu/mkcapflags.pl 1969-12-31 18:00:00.000000000 -0600 -@@ -1,32 +0,0 @@ --#!/usr/bin/perl +--- linux/arch/x86/kernel/cpu/mkcapflags.pl 2012-07-10 11:10:30.081283128 -0500 ++++ /dev/null 2012-07-11 05:54:12.790418331 -0500 +@@ -1,45 +0,0 @@ +-#!/usr/bin/perl -w -# -# Generate the x86_cap_flags[] array from include/asm-x86/cpufeature.h -# @@ -29,29 +26,41 @@ -print OUT "#include <asm/cpufeature.h>\n\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 = $2; +- $feature = "\L$2"; - $tail = $3; - if ($tail =~ /\/\*\s*\"([^"]*)\".*\*\//) { -- $feature = $1; +- $feature = "\L$1"; - } - -- if ($feature ne '') { -- printf OUT "\t%-32s = \"%s\",\n", -- "[$macro]", "\L$feature"; +- 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); -diff -ruN linux-2.6.30.old/arch/x86/kernel/cpu/mkcapflags.sh linux-2.6.30/arch/x86/kernel/cpu/mkcapflags.sh ---- linux-2.6.30.old/arch/x86/kernel/cpu/mkcapflags.sh 1969-12-31 18:00:00.000000000 -0600 -+++ linux-2.6.30/arch/x86/kernel/cpu/mkcapflags.sh 2009-06-22 16:39:06.000000000 -0500 -@@ -0,0 +1,28 @@ +- +-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,39 @@ +#!/bin/sh +# +# Generate the x86_cap_flags[] array from include/asm/cpufeature.h @@ -60,6 +69,9 @@ +IN=$1 +OUT=$2 + ++TABS="$(printf '\t\t\t\t\t')" ++trap 'rm "$OUT"' EXIT ++ +( + echo "#include <asm/cpufeature.h>" + echo "" @@ -74,12 +86,20 @@ + + # If the /* comment */ starts with a quote string, grab that. + VALUE="$(echo "$i" | sed -n 's@.*/\* *\("[^"]*"\).*\*/@\1@p')" -+ [ -z "$VALUE" ] && VALUE="\"$(echo "$NAME" | tr A-Z a-z)\"" ++ [ -z "$VALUE" ] && VALUE="\"$NAME\"" ++ [ "$VALUE" == '""' ] && continue + -+ [ "$VALUE" != '""' ] && echo " [X86_FEATURE_$NAME] = $VALUE," ++ # 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