summaryrefslogtreecommitdiff
path: root/target/linux/cns3xxx
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-09-19 23:50:09 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-09-19 23:50:09 +0000
commit190b4344a386616741e8712ca176205d296d83ad (patch)
tree5323313a334377990e1ec9ca232bb18859ecf600 /target/linux/cns3xxx
parent59b1d018b1f3f954903bf365ac77f683c5e04726 (diff)
downloadmtk-20170518-190b4344a386616741e8712ca176205d296d83ad.zip
mtk-20170518-190b4344a386616741e8712ca176205d296d83ad.tar.gz
mtk-20170518-190b4344a386616741e8712ca176205d296d83ad.tar.bz2
cns3xxx: build images for the old boot loader and the new one (default to the new one)
SVN-Revision: 33488
Diffstat (limited to 'target/linux/cns3xxx')
-rw-r--r--target/linux/cns3xxx/image/Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/target/linux/cns3xxx/image/Makefile b/target/linux/cns3xxx/image/Makefile
index 0265d7c..271d5ea 100644
--- a/target/linux/cns3xxx/image/Makefile
+++ b/target/linux/cns3xxx/image/Makefile
@@ -7,12 +7,18 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
+define mkimage
+ mkimage -A arm -O linux -T kernel -C none -a $(2) -e $(2) -n 'OpenWrt Linux-$(LINUX_VERSION)' -d $(LINUX_DIR)/arch/arm/boot/zImage $(KDIR)/uImage-$(1)
+endef
+
define Image/Prepare
- cp $(LINUX_DIR)/arch/arm/boot/uImage $(KDIR)/uImage
+ $(call mkimage,old,0x00008000)
+ $(call mkimage,new,0x20008000)
endef
define Image/BuildKernel
- cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage
+ cp $(KDIR)/uImage-old $(BIN_DIR)/openwrt-$(BOARD)-old-uboot-uImage
+ cp $(KDIR)/uImage-new $(BIN_DIR)/openwrt-$(BOARD)-uImage
endef
define Image/Build