summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2021-11-27 21:43:40 +0100
committerMathias Kresin <dev@kresin.me>2021-11-27 22:55:25 +0100
commitf14bc5cf5635edbb3ab2e29c14a260e2640e588f (patch)
tree4b289bc1bd63f2a1eb8e029bf6819ed73d698cb7
parent8fb714edd6e4340729e271139164a0163b027d68 (diff)
downloadopenwrt-f14bc5cf5635edbb3ab2e29c14a260e2640e588f.tar.gz
openwrt-f14bc5cf5635edbb3ab2e29c14a260e2640e588f.tar.bz2
openwrt-f14bc5cf5635edbb3ab2e29c14a260e2640e588f.zip
uboot-lantiq: danube: fix hanging lzma kernel uncompression #2
Follow up to commit 8fb714edd6e4340729e271139164a0163b027d68. Managed to hit the very same issue again while playing with the NOR SPL builds. Signed-off-by: Mathias Kresin <dev@kresin.me>
-rw-r--r--package/boot/uboot-lantiq/patches/0030-lzma-force-8bit-reads.patch9
1 files changed, 9 insertions, 0 deletions
diff --git a/package/boot/uboot-lantiq/patches/0030-lzma-force-8bit-reads.patch b/package/boot/uboot-lantiq/patches/0030-lzma-force-8bit-reads.patch
index dc7d9ed7ee..a934dab5cd 100644
--- a/package/boot/uboot-lantiq/patches/0030-lzma-force-8bit-reads.patch
+++ b/package/boot/uboot-lantiq/patches/0030-lzma-force-8bit-reads.patch
@@ -37,6 +37,15 @@ Signed-off-by: Mathias Kresin <dev@kresin.me>
#define kNumTopBits 24
#define kTopValue ((UInt32)1 << kNumTopBits)
+@@ -703,7 +704,7 @@ static ELzmaDummy LzmaDec_TryDummy(const
+
+ static void LzmaDec_InitRc(CLzmaDec *p, const Byte *data)
+ {
+- p->code = ((UInt32)data[1] << 24) | ((UInt32)data[2] << 16) | ((UInt32)data[3] << 8) | ((UInt32)data[4]);
++ p->code = ((UInt32)readb(&data[1]) << 24) | ((UInt32)readb(&data[2]) << 16) | ((UInt32)readb(&data[3]) << 8) | ((UInt32)readb(&data[4]));
+ p->range = 0xFFFFFFFF;
+ p->needFlush = 0;
+ }
@@ -929,7 +930,7 @@ SRes LzmaProps_Decode(CLzmaProps *p, con
if (size < LZMA_PROPS_SIZE)
return SZ_ERROR_UNSUPPORTED;