aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/rdc-2.6
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2007-07-30 15:58:15 +0000
committerFlorian Fainelli <florian@openwrt.org>2007-07-30 15:58:15 +0000
commit4e0563e185aed8237e70a854ce32a08e6c91106e (patch)
treec73c4f757bbdbaa9f0f005d19bd74db487b19313 /target/linux/rdc-2.6
parentf1ac6cf7ec87a19a5a02adc3124a357eea989d6a (diff)
downloadupstream-4e0563e185aed8237e70a854ce32a08e6c91106e.tar.gz
upstream-4e0563e185aed8237e70a854ce32a08e6c91106e.tar.bz2
upstream-4e0563e185aed8237e70a854ce32a08e6c91106e.zip
Better x86 generic config, the lzma decompressor is now reliable (thanks to Daniel Gimpelevich)
SVN-Revision: 8233
Diffstat (limited to 'target/linux/rdc-2.6')
-rw-r--r--target/linux/rdc-2.6/config/default1
-rw-r--r--target/linux/rdc-2.6/patches/600-x86_lzma.patch18
2 files changed, 14 insertions, 5 deletions
diff --git a/target/linux/rdc-2.6/config/default b/target/linux/rdc-2.6/config/default
index b4f1090dc1..c8298b558f 100644
--- a/target/linux/rdc-2.6/config/default
+++ b/target/linux/rdc-2.6/config/default
@@ -32,6 +32,7 @@ CONFIG_CLOCKSOURCE_WATCHDOG=y
# CONFIG_CPU5_WDT is not set
# CONFIG_CPU_FREQ is not set
CONFIG_CRYPTO_AES_586=m
+CONFIG_CRYPTO_ARC4=y
CONFIG_CRYPTO_DEV_GEODE=m
# CONFIG_CRYPTO_DEV_PADLOCK is not set
CONFIG_CRYPTO_TWOFISH_586=m
diff --git a/target/linux/rdc-2.6/patches/600-x86_lzma.patch b/target/linux/rdc-2.6/patches/600-x86_lzma.patch
index 51e4878481..bb10f1fdcc 100644
--- a/target/linux/rdc-2.6/patches/600-x86_lzma.patch
+++ b/target/linux/rdc-2.6/patches/600-x86_lzma.patch
@@ -825,6 +825,7 @@ diff -Naur linux-old/arch/i386/boot/compressed/lzma_misc.c linux-lzma/arch/i386/
+
+static unsigned insize; /* valid bytes in inbuf */
+static unsigned inptr; /* index of next byte to be processed in inbuf */
++static unsigned long workspace;
+
+#define get_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf())
+
@@ -902,7 +903,6 @@ diff -Naur linux-old/arch/i386/boot/compressed/lzma_misc.c linux-lzma/arch/i386/
+ unsigned int lc; /* literal context bits */
+ unsigned int lp; /* literal pos state bits */
+ unsigned int pb; /* pos state bits */
-+ unsigned char* workspace;
+ unsigned int uncompressedSize = 0;
+ unsigned char* p;
+
@@ -927,10 +927,10 @@ diff -Naur linux-old/arch/i386/boot/compressed/lzma_misc.c linux-lzma/arch/i386/
+ get_byte();
+
+ // point it beyond uncompresedSize
-+ workspace = window + uncompressedSize;
++ //workspace = window + uncompressedSize;
+
+ /* decompress kernel */
-+ if (LzmaDecode(workspace, ~0, lc, lp, pb, &callback,
++ if (LzmaDecode((unsigned char*)workspace, ~0, lc, lp, pb, &callback,
+ (unsigned char*)window, uncompressedSize, &i) == LZMA_RESULT_OK)
+ return 0;
+ else
@@ -967,7 +967,7 @@ diff -Naur linux-old/arch/i386/boot/compressed/lzma_misc.c linux-lzma/arch/i386/
+
+ if ((u32)output & (CONFIG_PHYSICAL_ALIGN -1))
+ error("Destination address not CONFIG_PHYSICAL_ALIGN aligned");
-+ if (end > ((-__PAGE_OFFSET-(512 <<20)-1) & 0x7fffffff))
++ if ((workspace = end) > ((-__PAGE_OFFSET-(512 <<20)-1) & 0x7fffffff))
+ error("Destination address too large");
+#ifndef CONFIG_RELOCATABLE
+ if ((u32)output != LOAD_PHYSICAL_ADDR)
@@ -1029,6 +1029,14 @@ diff -urN linux-2.6.19.2/scripts/Makefile.lib linux-2.6.19.2.new/scripts/Makefil
+# LZMA
+#
+quiet_cmd_lzma = LZMA $@
-+cmd_lzma = lzma e $< $@ -lc7 -lp0 -pb0
++cmd_lzma = bash -e scripts/lzma_kern $< $@ -lc7 -lp0 -pb0
+# to use lzmacomp,
+# cmd_lzma = lzmacomp $< 700 > $@
+diff -u linux/scripts/lzma_kern linux/scripts/lzma_kern
+--- linux/scripts/lzma_kern 2007-07-27 20:18:17.013014750 -0700
++++ linux/scripts/lzma_kern 2007-07-27 20:18:17.013014750 -0700
+@@ -0,0 +1,4 @@
++get-size() { echo "$5" ;}
++printf -v len '%.8x' "$(get-size $(ls -l "$1"))"
++lzma e "$@"
++echo -ne "\x$(echo $len | cut -c 7,8)\x$(echo $len | cut -c 5,6)\x$(echo $len | cut -c 3,4)\x$(echo $len | cut -c 1,2)" >> "$2"