diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-04-20 17:01:30 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-04-20 17:01:30 +0000 |
commit | d4acdafcf724057bc9b718170c54b420f46c40b4 (patch) | |
tree | d54625559910142e0895d8a2318d003de21a286c /openwrt/target | |
parent | b91216ac5fe33ba6166ab40915fdb8040f470b4e (diff) |
add openwrt image builder to sdk
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@688 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt/target')
-rw-r--r-- | openwrt/target/Makefile | 2 | ||||
-rw-r--r-- | openwrt/target/jffs2/Makefile | 17 | ||||
-rw-r--r-- | openwrt/target/jffs2/jffs2root.mk | 7 | ||||
-rw-r--r-- | openwrt/target/squashfs-lzma/Makefile | 6 | ||||
-rw-r--r-- | openwrt/target/squashfs-lzma/squashfslzmaroot.mk | 7 |
5 files changed, 16 insertions, 23 deletions
diff --git a/openwrt/target/Makefile b/openwrt/target/Makefile index 437609a28b..c3d99b6526 100644 --- a/openwrt/target/Makefile +++ b/openwrt/target/Makefile @@ -74,7 +74,7 @@ $(BIN_DIR): $(INSTALL_TARGET_DIRS): lzma-loader-compile $(IMAGE_TARGETS): $(patsubst %,%-install,$(TARGET_DIRS)) -compile: $(patsubst %,%-compile,$(TARGET_DIRS)) +compile: $(patsubst %,%-compile,jffs2 squashfs-lzma lzma-loader) install: utils-install lzma-install $(LINUX_IMAGE) $(patsubst %,%-install,$(TARGET_DIRS)) $(IMAGE_TARGETS) clean: $(patsubst %,%-clean,$(TARGET_DIRS)) image_clean diff --git a/openwrt/target/jffs2/Makefile b/openwrt/target/jffs2/Makefile index 0e14ac6f2a..5925a9e123 100644 --- a/openwrt/target/jffs2/Makefile +++ b/openwrt/target/jffs2/Makefile @@ -2,13 +2,13 @@ include $(TOPDIR)/rules.mk include ./jffs2root.mk -TARGETS:= $(BIN_DIR)/openwrt-generic-jffs2-4MB.trx $(BIN_DIR)/openwrt-generic-jffs2-8MB.trx +JFFS2_TARGETS:= $(BIN_DIR)/openwrt-generic-jffs2-4MB.trx $(BIN_DIR)/openwrt-generic-jffs2-8MB.trx JFFS2OPTS := --pad --little-endian --squash -d $(TARGET_DIR) #JFFS2OPTS += -Xlzo -msize -Xlzari prepare: $(MTD_DIR)/.unpacked compile: mtd -install: compile $(TARGETS) +install: compile $(JFFS2_TARGETS) clean: jffs2root-dirclean $(BIN_DIR)/openwrt-generic-jffs2-4MB.trx: @@ -21,16 +21,3 @@ $(BIN_DIR)/openwrt-generic-jffs2-8MB.trx: PATH=$(TARGET_PATH) trx -o $@ $(BUILD_DIR)/loader.gz \ $(LINUX_IMAGE) -a 0x20000 $(IMAGE)-8MB.jffs2 -$(BIN_DIR)/openwrt-wrt54g-jffs2.bin: $(BIN_DIR)/openwrt-generic-jffs2-4MB.trx - PATH=$(TARGET_PATH) addpattern -2 -i $< -o $@ -g - $(SED) "1s,^W54S,W54G," $@ - -$(BIN_DIR)/openwrt-wrt54gs-jffs2.bin: $(BIN_DIR)/openwrt-generic-jffs2-8MB.trx - PATH=$(TARGET_PATH) addpattern -2 -i $< -o $@ -g - -$(BIN_DIR)/openwrt-motorola-jffs2-4MB.bin: $(BIN_DIR)/openwrt-generic-jffs2-4MB.trx - PATH=$(TARGET_PATH) motorola-bin $< $@ - -$(BIN_DIR)/openwrt-motorola-jffs2-8MB.bin: $(BIN_DIR)/openwrt-generic-jffs2-8MB.trx - PATH=$(TARGET_PATH) motorola-bin $< $@ - diff --git a/openwrt/target/jffs2/jffs2root.mk b/openwrt/target/jffs2/jffs2root.mk index c1d31e4106..6ed7a375c6 100644 --- a/openwrt/target/jffs2/jffs2root.mk +++ b/openwrt/target/jffs2/jffs2root.mk @@ -8,7 +8,7 @@ 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 MTD_MD5SUM:=1f42c2cae08eb9e7b52d0c188f8d6338 -MKFS_JFFS2=$(shell which mkfs.jffs2 2>/dev/null || echo $(MTD_DIR)/util/mkfs.jffs2) +MKFS_JFFS2=$(MTD_DIR)/util/mkfs.jffs2 $(DL_DIR)/$(MTD_SOURCE): $(SCRIPT_DIR)/download.pl $(DL_DIR) $(MTD_SOURCE) $(MTD_MD5SUM) $(MTD_SITE) @@ -20,7 +20,10 @@ $(MTD_DIR)/.unpacked: $(DL_DIR)/$(MTD_SOURCE) $(MTD_DIR)/util/mkfs.jffs2: $(MTD_DIR)/.unpacked $(MAKE) LINUXDIR=$(LINUX_DIR) -C $(MTD_DIR)/util -mtd: $(MKFS_JFFS2) +$(STAGING_DIR)/bin/mkfs.jffs2: $(MTD_DIR)/util/mkfs.jffs2 + cp $< $@ + +mtd: $(MTD_DIR)/util/mkfs.jffs2 $(STAGING_DIR)/bin/mkfs.jffs2 ############################################################# diff --git a/openwrt/target/squashfs-lzma/Makefile b/openwrt/target/squashfs-lzma/Makefile index 8da08b3909..2664ed7e21 100644 --- a/openwrt/target/squashfs-lzma/Makefile +++ b/openwrt/target/squashfs-lzma/Makefile @@ -1,16 +1,16 @@ include $(TOPDIR)/rules.mk include ./squashfslzmaroot.mk -TARGETS:=$(BIN_DIR)/openwrt-generic-squashfs.trx +SQUASHFS_TARGETS:=$(BIN_DIR)/openwrt-generic-squashfs.trx prepare: $(SQUASHFSLZMA_DIR)/.unpacked compile: squashfslzma -install: $(TARGETS) +install: $(SQUASHFS_TARGETS) clean: squashfslzmaroot-dirclean $(BIN_DIR)/openwrt-generic-squashfs.trx: @mkdir -p $(TARGET_DIR)/jffs - $(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma $(TARGET_DIR) $(IMAGE).squashfslzma -noappend -root-owned -le + PATH=$(TARGET_PATH) mksquashfs-lzma $(TARGET_DIR) $(IMAGE).squashfslzma -noappend -root-owned -le PATH=$(TARGET_PATH) trx -o $@ $(BUILD_DIR)/loader.gz \ $(LINUX_IMAGE) $(IMAGE).squashfslzma diff --git a/openwrt/target/squashfs-lzma/squashfslzmaroot.mk b/openwrt/target/squashfs-lzma/squashfslzmaroot.mk index ca493d7782..11b2b76bea 100644 --- a/openwrt/target/squashfs-lzma/squashfslzmaroot.mk +++ b/openwrt/target/squashfs-lzma/squashfslzmaroot.mk @@ -16,10 +16,13 @@ $(SQUASHFSLZMA_DIR)/.unpacked: $(DL_DIR)/$(SQUASHFSLZMA_SOURCE) patch -d $(SQUASHFSLZMA_DIR) -p1 < squashfs2.0-tools-lzma.patch touch $(SQUASHFSLZMA_DIR)/.unpacked -$(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs: $(SQUASHFSLZMA_DIR)/.unpacked +$(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma: $(SQUASHFSLZMA_DIR)/.unpacked $(MAKE) -C $(SQUASHFSLZMA_DIR)/squashfs-tools mksquashfs-lzma LZMAPATH=$(BUILD_DIR)/lzma -squashfslzma: $(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs +$(STAGING_DIR)/bin/mksquashfs-lzma: $(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma + cp $< $@ + +squashfslzma: $(SQUASHFSLZMA_DIR)/squashfs-tools/mksquashfs-lzma $(STAGING_DIR)/bin/mksquashfs-lzma squashfslzma-source: $(DL_DIR)/$(SQUASHFSLZMA_SOURCE) |