aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm63xx/image/lzma-loader
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2020-06-03 13:39:50 +0200
committerÁlvaro Fernández Rojas <noltari@gmail.com>2020-06-03 15:33:04 +0200
commit6dc01cdee8162ca5d23c67443558a051da085add (patch)
tree3884038139959ef4dd6ab247ee1652c68bc3cedc /target/linux/bcm63xx/image/lzma-loader
parentb1f26b7160499c213b84619effc61e6034df589a (diff)
downloadupstream-6dc01cdee8162ca5d23c67443558a051da085add.tar.gz
upstream-6dc01cdee8162ca5d23c67443558a051da085add.tar.bz2
upstream-6dc01cdee8162ca5d23c67443558a051da085add.zip
bcm63xx: lzma-loader: allow bigger ramdisks
Some (older) CFEs are loaded at 0x80401000 and ramdisks are loaded at 0x80010000, which means that ramdisk size limit is 0x3F1000 (almost 4M). Therefore, current ramdisks (~4MB) are overwritting CFE in these devices, which results in a crash. This commit changes the address where ramdisks are loaded to 0x80a00000, which is the same address where kernel is loaded when booting from the flash. Therefore, lzma-loader will now be loaded at 0x80a00000, but it will still decompress the kernel at 0x80010000. Tested with huawei,hg556a-b, which has its CFE loaded at 0x80401000. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm63xx/image/lzma-loader')
-rw-r--r--target/linux/bcm63xx/image/lzma-loader/src/Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/target/linux/bcm63xx/image/lzma-loader/src/Makefile b/target/linux/bcm63xx/image/lzma-loader/src/Makefile
index 9115f75af3..0310051a93 100644
--- a/target/linux/bcm63xx/image/lzma-loader/src/Makefile
+++ b/target/linux/bcm63xx/image/lzma-loader/src/Makefile
@@ -17,7 +17,8 @@
# by the Free Software Foundation.
#
-LOADADDR :=
+LOADER_ADDR :=
+KERNEL_ADDR :=
LZMA_TEXT_START := 0x80a00000
LOADER_DATA :=
@@ -49,7 +50,7 @@ OBJECTS := head.o loader.o cache.o board.o printf.o LzmaDecode.o
ifneq ($(strip $(LOADER_DATA)),)
OBJECTS += data.o
-CFLAGS += -DLZMA_WRAPPER=1 -DLOADADDR=$(LOADADDR)
+CFLAGS += -DLZMA_WRAPPER=1 -DLOADADDR=$(KERNEL_ADDR)
endif
@@ -79,7 +80,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) -e startup -T loader2.lds -Ttext $(LOADER_ADDR) -o $@ $<
mrproper: clean