aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm63xx
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2020-06-07 10:55:53 +0200
committerÁlvaro Fernández Rojas <noltari@gmail.com>2020-06-07 20:26:17 +0200
commit9eb9d0baa0b2f4f3487f53d0c7d44c619194b42d (patch)
treeadf62b2fd48ce20c605095faff27e8c89e35f505 /target/linux/bcm63xx
parent27c20a1ef5da22b91c1074a6dd044f0401ddfb2b (diff)
downloadupstream-9eb9d0baa0b2f4f3487f53d0c7d44c619194b42d.tar.gz
upstream-9eb9d0baa0b2f4f3487f53d0c7d44c619194b42d.tar.bz2
upstream-9eb9d0baa0b2f4f3487f53d0c7d44c619194b42d.zip
bcm63xx: image: support device-specific load address
Some CFEs are located at the address currently used for relocation and lzma loader load address, so we need to provide a way to override it. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm63xx')
-rw-r--r--target/linux/bcm63xx/image/Makefile22
1 files changed, 10 insertions, 12 deletions
diff --git a/target/linux/bcm63xx/image/Makefile b/target/linux/bcm63xx/image/Makefile
index 294db6eb32..90d87f7bd4 100644
--- a/target/linux/bcm63xx/image/Makefile
+++ b/target/linux/bcm63xx/image/Makefile
@@ -13,14 +13,6 @@ LOADER_ENTRY = 0x80a00000 # RAM start + 10M, for relocate
RAMSIZE = 0x02000000 # 32MB
LZMA_TEXT_START = 0x81800000 # 32MB - 8MB
-LOADER_MAKEOPTS= \
- KDIR=$(KDIR) \
- LOADER_ADDR=$(LOADER_ENTRY) \
- KERNEL_ADDR=$(KERNEL_LOADADDR) \
- RAMSIZE=$(RAMSIZE) \
- LZMA_TEXT_START=$(LZMA_TEXT_START) \
- CHIP_ID=$(CHIP_ID)
-
RELOCATE_MAKEOPTS= \
CACHELINE_SIZE=16 \
KERNEL_ADDR=$(KERNEL_LOADADDR) \
@@ -44,7 +36,12 @@ endef
define Build/loader-lzma
rm -rf $@.src
$(MAKE) -C lzma-loader \
- $(LOADER_MAKEOPTS) \
+ KDIR=$(KDIR) \
+ LOADER_ADDR=$(if $(DEVICE_LOADADDR),$(DEVICE_LOADADDR),$(LOADER_ENTRY)) \
+ KERNEL_ADDR=$(KERNEL_LOADADDR) \
+ RAMSIZE=$(RAMSIZE) \
+ LZMA_TEXT_START=$(LZMA_TEXT_START) \
+ CHIP_ID=$(CHIP_ID) \
PKG_BUILD_DIR="$@.src" \
TARGET_DIR="$(dir $@)" \
LOADER_DATA="$@" \
@@ -172,8 +169,8 @@ define Build/cfe-jffs2-kernel
$(TOPDIR)/scripts/cfe-bin-header.py \
--input-file $@ \
--output-file $@-kernel/vmlinux.lz \
- --load-addr $(LOADER_ENTRY) \
- --entry-addr $(LOADER_ENTRY)
+ --load-addr $(if $(DEVICE_LOADADDR),$(DEVICE_LOADADDR),$(LOADER_ENTRY)) \
+ --entry-addr $(if $(DEVICE_LOADADDR),$(DEVICE_LOADADDR),$(LOADER_ENTRY))
# The JFFS2 partition creation should result in the following
# layout:
@@ -310,8 +307,9 @@ define Device/Default
CHIP_ID :=
SOC = bcm$$(CHIP_ID)
DEVICE_DTS = $$(SOC)-$(subst _,-,$(1))
+ DEVICE_LOADADDR :=
endef
-DEVICE_VARS += CHIP_ID
+DEVICE_VARS += CHIP_ID DEVICE_LOADADDR
ATH5K_PACKAGES := kmod-ath5k wpad-basic
ATH9K_PACKAGES := kmod-ath9k wpad-basic