1 include $(TOPDIR
)/rules.mk
5 TARGETS
:= $(BIN_DIR
)/openwrt-generic-jffs2-4MB.trx
$(BIN_DIR
)/openwrt-generic-jffs2-8MB.trx
6 JFFS2OPTS
:= --pad
--little-endian
--squash
-d
$(TARGET_DIR
)
7 JFFS2OPTS
+= -Xlzo
-msize
-Xlzari
9 prepare
: $(MTD_DIR
)/.unpacked
11 install: compile
$(TARGETS
)
12 clean: jffs2root-dirclean
14 $(BIN_DIR
)/openwrt-generic-jffs2-4MB.trx
:
15 $(MKFS_JFFS2
) $(JFFS2OPTS
) -e
0x10000 -o
$(IMAGE
)-4MB.jffs2
16 PATH
=$(TARGET_PATH
) trx
-o
$@
$(BUILD_DIR
)/loader.gz \
17 $(LINUX_IMAGE
) -a
0x10000 $(IMAGE
)-4MB.jffs2
19 $(BIN_DIR
)/openwrt-generic-jffs2-8MB.trx
:
20 $(MKFS_JFFS2
) $(JFFS2OPTS
) -e
0x20000 -o
$(IMAGE
)-8MB.jffs2
21 PATH
=$(TARGET_PATH
) trx
-o
$@
$(BUILD_DIR
)/loader.gz \
22 $(LINUX_IMAGE
) -a
0x20000 $(IMAGE
)-8MB.jffs2
24 $(BIN_DIR
)/openwrt-wrt54g-jffs2.bin
: $(BIN_DIR
)/openwrt-generic-jffs2-4MB.trx
25 PATH
=$(TARGET_PATH
) addpattern
-2 -i
$< -o
$@
-g
26 $(SED
) "1s,^W54S,W54G," $@
28 $(BIN_DIR
)/openwrt-wrt54gs-jffs2.bin
: $(BIN_DIR
)/openwrt-generic-jffs2-8MB.trx
29 PATH
=$(TARGET_PATH
) addpattern
-2 -i
$< -o
$@
-g
31 $(BIN_DIR
)/openwrt-motorola-jffs2-4MB.bin
: $(BIN_DIR
)/openwrt-generic-jffs2-4MB.trx
32 PATH
=$(TARGET_PATH
) motorola-bin
$< $@
34 $(BIN_DIR
)/openwrt-motorola-jffs2-8MB.bin
: $(BIN_DIR
)/openwrt-generic-jffs2-8MB.trx
35 PATH
=$(TARGET_PATH
) motorola-bin
$< $@