aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/image
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
commit60c13c3b3179f92cd8eb5e2ecb83cc487a980035 (patch)
treec8f4eca4497f3615a68590e6171920f62dfaaad2 /target/linux/image
parent3954f5bb6270b5b7291fbd4c09c4f8e6c88c5f42 (diff)
downloadmaster-187ad058-60c13c3b3179f92cd8eb5e2ecb83cc487a980035.tar.gz
master-187ad058-60c13c3b3179f92cd8eb5e2ecb83cc487a980035.tar.bz2
master-187ad058-60c13c3b3179f92cd8eb5e2ecb83cc487a980035.zip
add proper ar7 flash map driver and change image stuff to save more flash space
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1506 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/image')
-rw-r--r--target/linux/image/ar7/Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/target/linux/image/ar7/Makefile b/target/linux/image/ar7/Makefile
index b2683dbd84..c3ffb25a95 100644
--- a/target/linux/image/ar7/Makefile
+++ b/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