summaryrefslogtreecommitdiff
path: root/openwrt/target
diff options
context:
space:
mode:
authorMike Baker <mbm@openwrt.org>2005-03-04 04:35:15 +0000
committerMike Baker <mbm@openwrt.org>2005-03-04 04:35:15 +0000
commit883510aeed90142d275a8dd94d1113be77028258 (patch)
treed4618308936a52dfca2e304bfba37bba9b4ca5ec /openwrt/target
parent16fb0b7110acfc5e32a65502f5762745759e702e (diff)
downloadmtk-20170518-883510aeed90142d275a8dd94d1113be77028258.zip
mtk-20170518-883510aeed90142d275a8dd94d1113be77028258.tar.gz
mtk-20170518-883510aeed90142d275a8dd94d1113be77028258.tar.bz2
fix the jffs2 build for separate 4M/8M images
SVN-Revision: 303
Diffstat (limited to 'openwrt/target')
-rw-r--r--openwrt/target/Makefile.in20
-rw-r--r--openwrt/target/jffs2/blocksize.mk1
-rw-r--r--openwrt/target/jffs2/jffs2root.mk10
-rw-r--r--openwrt/target/squashfs-lzma/squashfslzmaroot.mk9
4 files changed, 25 insertions, 15 deletions
diff --git a/openwrt/target/Makefile.in b/openwrt/target/Makefile.in
index 22cd7a4..aeceb3c 100644
--- a/openwrt/target/Makefile.in
+++ b/openwrt/target/Makefile.in
@@ -1,5 +1,6 @@
# Default target skeleton stuff, may be overridden
-EXTRAVERSION=
+EXTRAVERSION:=
+XXX:=
TARGET_SKELETON=target/default/skel.tar.gz
TARGET_SKEL_DIR=target/default/target_skeleton
@@ -10,19 +11,18 @@ include target/jffs2/blocksize.mk
JFFS2FLAGS+=-a $(JFFS2_BLOCK_SIZE)
endif
-
openwrt-linux.trx: openwrt-trx
- PATH=$(TARGET_PATH) trx -o openwrt-linux$(EXTRAVERSION).trx \
+ @PATH=$(TARGET_PATH) trx -o openwrt-linux$(EXTRAVERSION).trx \
$(LINUX_DIR)/$(LINUX_BINLOC) $(JFFS2FLAGS) $(IMAGE).$(ROOTFS)
-openwrt-gs-code.bin: openwrt-addpattern openwrt-linux.trx
- PATH=$(TARGET_PATH) addpattern -2 -i openwrt-linux$(EXTRAVERSION).trx \
- -o openwrt-gs-code$(EXTRAVERSION).bin -g
-
-openwrt-g-code.bin: openwrt-gs-code.bin
- sed -e "1s,^W54S,W54G," < openwrt-gs-code$(EXTRAVERSION).bin > openwrt-g-code$(EXTRAVERSION).bin
+openwrt-code.bin: openwrt-addpattern openwrt-linux.trx
+ @PATH=$(TARGET_PATH) addpattern -2 -i openwrt-linux$(EXTRAVERSION).trx \
+ -o openwrt-$(TAG)-code$(EXTRAVERSION).bin -g
+ @sed -i -e "1s,^W54S,$(TAG)," openwrt-$(TAG)-code$(EXTRAVERSION).bin
-openwrt-image: openwrt openwrt-g-code.bin
+ifeq ($(strip $(BR2_TARGET_ROOTFS_JFFS2)),y)
+else
+endif
openwrt-image-clean:
@-rm openwrt-* 2>/dev/null
diff --git a/openwrt/target/jffs2/blocksize.mk b/openwrt/target/jffs2/blocksize.mk
deleted file mode 100644
index 9e08a04..0000000
--- a/openwrt/target/jffs2/blocksize.mk
+++ /dev/null
@@ -1 +0,0 @@
-JFFS2_BLOCK_SIZE:=0x20000
diff --git a/openwrt/target/jffs2/jffs2root.mk b/openwrt/target/jffs2/jffs2root.mk
index 9846d00..b14f2d0 100644
--- a/openwrt/target/jffs2/jffs2root.mk
+++ b/openwrt/target/jffs2/jffs2root.mk
@@ -4,8 +4,6 @@
#
#############################################################
-include target/jffs2/blocksize.mk
-
MTD_DIR:=$(BUILD_DIR)/mtd-20050122.orig
MTD_SOURCE=mtd_20050122.orig.tar.gz
MTD_SITE=http://ftp.debian.org/debian/pool/main/m/mtd
@@ -46,6 +44,12 @@ jffs2root-dirclean:
rm -rf $(MTD_DIR)
ifeq ($(strip $(BR2_TARGET_ROOTFS_JFFS2)),y)
-TARGETS+=jffs2root openwrt-image
+TARGETS+=openwrt-image
ROOTFS=jffs2
+
+openwrt-image: openwrt
+ @make jffs2root openwrt-code.bin TAG=W54G \
+ EXTRAVERSION=$(EXTRAVERSION)-JFFS2-4M JFFS2_BLOCK_SIZE=0x10000
+ @make jffs2root openwrt-code.bin TAG=W54S \
+ EXTRAVERSION=$(EXTRAVERSION)-JFFS2-8M JFFS2_BLOCK_SIZE=0x20000
endif
diff --git a/openwrt/target/squashfs-lzma/squashfslzmaroot.mk b/openwrt/target/squashfs-lzma/squashfslzmaroot.mk
index 722c205..1aa80e0 100644
--- a/openwrt/target/squashfs-lzma/squashfslzmaroot.mk
+++ b/openwrt/target/squashfs-lzma/squashfslzmaroot.mk
@@ -39,7 +39,8 @@ squashfslzma-dirclean:
squashfslzmaroot: squashfslzma
@rm -rf $(TARGET_DIR)/usr/man
@rm -rf $(TARGET_DIR)/usr/info
- $(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma $(TARGET_DIR) $(IMAGE).squashfslzma -noappend -root-owned -le
+ $(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma \
+ $(TARGET_DIR) $(IMAGE).squashfslzma -noappend -root-owned -le
squashfslzmaroot-source: squashfslzma-source
@@ -52,4 +53,10 @@ squashfslzmaroot-dirclean:
ifeq ($(strip $(BR2_TARGET_ROOTFS_SQUASHFS_LZMA)),y)
TARGETS+=squashfslzmaroot openwrt-image
ROOTFS=squashfslzma
+
+openwrt-image: openwrt
+ @make openwrt-code.bin TAG=W54G \
+ EXTRAVERSION=$(EXTRAVERSION)-SQUASHFSLZMA
+ @make openwrt-code.bin TAG=W54S \
+ EXTRAVERSION=$(EXTRAVERSION)-SQUASHFSLZMA
endif