fix the jffs2 build for separate 4M/8M images
SVN-Revision: 303
This commit is contained in:
parent
16fb0b7110
commit
883510aeed
5 changed files with 26 additions and 15 deletions
|
@ -82,6 +82,7 @@ TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS))
|
||||||
TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
|
TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
|
||||||
|
|
||||||
world: $(DL_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) $(TARGETS)
|
world: $(DL_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) $(TARGETS)
|
||||||
|
@echo DONE.
|
||||||
|
|
||||||
.PHONY: all world clean dirclean distclean source $(TARGETS) \
|
.PHONY: all world clean dirclean distclean source $(TARGETS) \
|
||||||
$(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) \
|
$(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) \
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# Default target skeleton stuff, may be overridden
|
# Default target skeleton stuff, may be overridden
|
||||||
EXTRAVERSION=
|
EXTRAVERSION:=
|
||||||
|
XXX:=
|
||||||
TARGET_SKELETON=target/default/skel.tar.gz
|
TARGET_SKELETON=target/default/skel.tar.gz
|
||||||
TARGET_SKEL_DIR=target/default/target_skeleton
|
TARGET_SKEL_DIR=target/default/target_skeleton
|
||||||
|
|
||||||
|
@ -10,19 +11,18 @@ include target/jffs2/blocksize.mk
|
||||||
JFFS2FLAGS+=-a $(JFFS2_BLOCK_SIZE)
|
JFFS2FLAGS+=-a $(JFFS2_BLOCK_SIZE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
openwrt-linux.trx: openwrt-trx
|
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)
|
$(LINUX_DIR)/$(LINUX_BINLOC) $(JFFS2FLAGS) $(IMAGE).$(ROOTFS)
|
||||||
|
|
||||||
openwrt-gs-code.bin: openwrt-addpattern openwrt-linux.trx
|
openwrt-code.bin: openwrt-addpattern openwrt-linux.trx
|
||||||
PATH=$(TARGET_PATH) addpattern -2 -i openwrt-linux$(EXTRAVERSION).trx \
|
@PATH=$(TARGET_PATH) addpattern -2 -i openwrt-linux$(EXTRAVERSION).trx \
|
||||||
-o openwrt-gs-code$(EXTRAVERSION).bin -g
|
-o openwrt-$(TAG)-code$(EXTRAVERSION).bin -g
|
||||||
|
@sed -i -e "1s,^W54S,$(TAG)," openwrt-$(TAG)-code$(EXTRAVERSION).bin
|
||||||
|
|
||||||
openwrt-g-code.bin: openwrt-gs-code.bin
|
ifeq ($(strip $(BR2_TARGET_ROOTFS_JFFS2)),y)
|
||||||
sed -e "1s,^W54S,W54G," < openwrt-gs-code$(EXTRAVERSION).bin > openwrt-g-code$(EXTRAVERSION).bin
|
else
|
||||||
|
endif
|
||||||
openwrt-image: openwrt openwrt-g-code.bin
|
|
||||||
|
|
||||||
openwrt-image-clean:
|
openwrt-image-clean:
|
||||||
@-rm openwrt-* 2>/dev/null
|
@-rm openwrt-* 2>/dev/null
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
JFFS2_BLOCK_SIZE:=0x20000
|
|
|
@ -4,8 +4,6 @@
|
||||||
#
|
#
|
||||||
#############################################################
|
#############################################################
|
||||||
|
|
||||||
include target/jffs2/blocksize.mk
|
|
||||||
|
|
||||||
MTD_DIR:=$(BUILD_DIR)/mtd-20050122.orig
|
MTD_DIR:=$(BUILD_DIR)/mtd-20050122.orig
|
||||||
MTD_SOURCE=mtd_20050122.orig.tar.gz
|
MTD_SOURCE=mtd_20050122.orig.tar.gz
|
||||||
MTD_SITE=http://ftp.debian.org/debian/pool/main/m/mtd
|
MTD_SITE=http://ftp.debian.org/debian/pool/main/m/mtd
|
||||||
|
@ -46,6 +44,12 @@ jffs2root-dirclean:
|
||||||
rm -rf $(MTD_DIR)
|
rm -rf $(MTD_DIR)
|
||||||
|
|
||||||
ifeq ($(strip $(BR2_TARGET_ROOTFS_JFFS2)),y)
|
ifeq ($(strip $(BR2_TARGET_ROOTFS_JFFS2)),y)
|
||||||
TARGETS+=jffs2root openwrt-image
|
TARGETS+=openwrt-image
|
||||||
ROOTFS=jffs2
|
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
|
endif
|
||||||
|
|
|
@ -39,7 +39,8 @@ squashfslzma-dirclean:
|
||||||
squashfslzmaroot: squashfslzma
|
squashfslzmaroot: squashfslzma
|
||||||
@rm -rf $(TARGET_DIR)/usr/man
|
@rm -rf $(TARGET_DIR)/usr/man
|
||||||
@rm -rf $(TARGET_DIR)/usr/info
|
@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
|
squashfslzmaroot-source: squashfslzma-source
|
||||||
|
|
||||||
|
@ -52,4 +53,10 @@ squashfslzmaroot-dirclean:
|
||||||
ifeq ($(strip $(BR2_TARGET_ROOTFS_SQUASHFS_LZMA)),y)
|
ifeq ($(strip $(BR2_TARGET_ROOTFS_SQUASHFS_LZMA)),y)
|
||||||
TARGETS+=squashfslzmaroot openwrt-image
|
TARGETS+=squashfslzmaroot openwrt-image
|
||||||
ROOTFS=squashfslzma
|
ROOTFS=squashfslzma
|
||||||
|
|
||||||
|
openwrt-image: openwrt
|
||||||
|
@make openwrt-code.bin TAG=W54G \
|
||||||
|
EXTRAVERSION=$(EXTRAVERSION)-SQUASHFSLZMA
|
||||||
|
@make openwrt-code.bin TAG=W54S \
|
||||||
|
EXTRAVERSION=$(EXTRAVERSION)-SQUASHFSLZMA
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in a new issue