summaryrefslogtreecommitdiff
path: root/target/linux/brcm63xx/image
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2013-06-06 22:22:14 +0000
committerFlorian Fainelli <florian@openwrt.org>2013-06-06 22:22:14 +0000
commit42e69f45c7980a99f9a89e957d3174cda7b46253 (patch)
treec1a1cd008ef63bfc1445ea849c2c6d838c045387 /target/linux/brcm63xx/image
parent966d47989b4f319d6bfba2c8cf22fdf8a3de67b2 (diff)
downloadmtk-20170518-42e69f45c7980a99f9a89e957d3174cda7b46253.zip
mtk-20170518-42e69f45c7980a99f9a89e957d3174cda7b46253.tar.gz
mtk-20170518-42e69f45c7980a99f9a89e957d3174cda7b46253.tar.bz2
brcm63xx: add kernel space and image support for the Netgear CVG834G
Signed-off-by: Florian Fainelli <florian@openwrt.org> SVN-Revision: 36876
Diffstat (limited to 'target/linux/brcm63xx/image')
-rwxr-xr-xtarget/linux/brcm63xx/image/Makefile14
1 files changed, 14 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/image/Makefile b/target/linux/brcm63xx/image/Makefile
index 69621dc..7544607 100755
--- a/target/linux/brcm63xx/image/Makefile
+++ b/target/linux/brcm63xx/image/Makefile
@@ -11,6 +11,9 @@ LOADADDR = 0x80010000 # RAM start + 16M
KERNEL_ENTRY = $(LOADADDR) # Newer kernels add a jmp to the kernel_entry at the start of the binary
RAMSIZE = 0x01000000 # 64MB
+DROP_SECTIONS := .reginfo .mdebug .comment .note .pdr .options .MIPS.options
+OBJCOPY_BIN := $(TARGET_CROSS)objcopy -S -O binary $(addprefix --remove-section=,$(DROP_SECTIONS))
+
LOADER_MAKEOPTS= \
KDIR=$(KDIR) \
LOADADDR=$(LOADADDR) \
@@ -119,11 +122,19 @@ define Image/Build/CFEOLD
-o $(BIN_DIR)/openwrt-$(2)-$(1)-cfe.bin
endef
+define Image/Build/HCS
+ $(STAGING_DIR_HOST)/bin/hcsmakeimage --magic_byte=$(3) \
+ --rev_maj=$(4) --rev_min=$(5) --input_file=$(6) \
+ --output_file=$(BIN_DIR)/openwrt-$(2)-$(1).bin
+endef
+
define Build/Clean
$(MAKE) -C lzma-loader clean
endef
define Image/Prepare
+ # Binary kernel
+ $(OBJCOPY_BIN) $(LINUX_DIR)/vmlinux $(KDIR)/vmlinux.bin
# Standard LZMA kernel
cat $(KDIR)/vmlinux | $(STAGING_DIR_HOST)/bin/lzma e -si -so -eos -lc1 -lp2 -pb2 > $(KDIR)/vmlinux.lzma
@@ -279,6 +290,9 @@ define Image/Build
# T-Com Speedport W 303V Typ B
$(call Image/Build/SPW303V,$(1),96358-502V,6358,SPW303V)
+
+ # Netgear CVG834G
+ $(call Image/Build/HCS,$(1),cvg834g,a020,0001,0022,$(KDIR)/vmlinux.bin)
endif
endef