summaryrefslogtreecommitdiff
path: root/openwrt/target/linux/image/ar7/Makefile
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2005-07-20 23:10:28 +0000
committerFelix Fietkau <nbd@openwrt.org>2005-07-20 23:10:28 +0000
commit579236f3de613fec337bb85465fe86a2d7f97601 (patch)
tree3d17258e4c3f9aacafb65f711fa87f8ef9502a2c /openwrt/target/linux/image/ar7/Makefile
parent6a4f0e2b5488b191d8d96482717f56984bc2e386 (diff)
downloadmtk-20170518-579236f3de613fec337bb85465fe86a2d7f97601.zip
mtk-20170518-579236f3de613fec337bb85465fe86a2d7f97601.tar.gz
mtk-20170518-579236f3de613fec337bb85465fe86a2d7f97601.tar.bz2
add proper ar7 flash map driver and change image stuff to save more flash space
SVN-Revision: 1506
Diffstat (limited to 'openwrt/target/linux/image/ar7/Makefile')
-rw-r--r--openwrt/target/linux/image/ar7/Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/openwrt/target/linux/image/ar7/Makefile b/openwrt/target/linux/image/ar7/Makefile
index b2683db..c3ffb25 100644
--- a/openwrt/target/linux/image/ar7/Makefile
+++ b/openwrt/target/linux/image/ar7/Makefile
@@ -41,10 +41,19 @@ $(BIN_DIR)/openwrt-ar7-zimage.bin: $(KDIR)/vmlinux.gz compile
-o $(KDIR)/loader
$(TARGET_CROSS)objcopy -O srec $(KDIR)/loader $(KDIR)/ram_zimage.sre
$(PKG_BUILD_DIR)/srec2bin $(KDIR)/ram_zimage.sre $@
+ dd if=/dev/zero bs=1024 count=1 >> $@
+
+ALIGN:=1024
+ifeq ($(FS),jffs2-8MB)
+ALIGN:=131072
+endif
+ifeq ($(FS),jffs2-4MB)
+ALIGN:=65536
+endif
$(BIN_DIR)/openwrt-ar7-$(KERNEL)-$(FS).bin:
- dd if=$(BIN_DIR)/openwrt-ar7-zimage.bin of=$@ bs=786432 conv=sync
- cat $(BUILD_DIR)/linux-$(KERNEL)-ar7/root.$(FS) >> $@
+ dd if=$(BIN_DIR)/openwrt-ar7-zimage.bin bs=$(ALIGN) conv=sync | head -c -1024 > $@
+ $(STAGING_DIR)/bin/trx -a 1024 $(BUILD_DIR)/linux-$(KERNEL)-ar7/root.$(FS) >> $@
define pattern_template
$(BIN_DIR)/openwrt-ar7-$(KERNEL)-$(FS)-$(1).bin: $(BIN_DIR)/openwrt-ar7-$(KERNEL)-$(FS).bin