gluon/patches/lede/0093-ar71xx-lzma-loader-set-page-size-to-4KB.patch
Matthias Schiffer 0563473abb
ar71xx: fix boot with increased kernel size on CPE/WBS 210/510
Fixes: d139a13563 ("Add various patches to deal with bigger kernels")
Fixes #1417
2018-06-06 22:29:01 +02:00

24 lines
1006 B
Diff

From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Wed, 6 Jun 2018 00:27:42 +0200
Subject: ar71xx: lzma-loader: set page size to 4KB
The text section in the ELF loader is aligned to the maximum page size,
which defaults to 64KB. Reduce it to the actual page size to avoid wasting
flash space for this alignment.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
diff --git a/target/linux/ar71xx/image/lzma-loader/src/Makefile b/target/linux/ar71xx/image/lzma-loader/src/Makefile
index 5f10bdb8f1499f24f00a8bf4d53f370fef88bd1e..fadb7e6206070c07aab3e8b323324976c6998eea 100644
--- a/target/linux/ar71xx/image/lzma-loader/src/Makefile
+++ b/target/linux/ar71xx/image/lzma-loader/src/Makefile
@@ -95,7 +95,7 @@ loader2.o: loader.bin
$(LD) -r -b binary --oformat $(O_FORMAT) -o $@ $<
loader.elf: loader2.o
- $(LD) -e startup -T loader2.lds -Ttext $(LOADADDR) -o $@ $<
+ $(LD) -z max-page-size=0x1000 -e startup -T loader2.lds -Ttext $(LOADADDR) -o $@ $<
mrproper: clean