-openwrt-linux.trx.$(ROOTFSTYPE):
- $(BUILD_DIR)/trx -o openwrt-linux.trx.$(ROOTFSTYPE) $(LINUX_DIR)/$(LINUX_BINLOC) $(IMAGE).$(ROOTFSTYPE)
-
-openwrt-gs-code.bin.$(ROOTFSTYPE): openwrt-linux.trx.$(ROOTFSTYPE)
- $(BUILD_DIR)/addpattern -2 -i openwrt-linux.trx.$(ROOTFSTYPE) -o openwrt-gs-code.bin.$(ROOTFSTYPE) -g
-
-openwrt-g-code.bin.$(ROOTFSTYPE): openwrt-gs-code.bin.$(ROOTFSTYPE)
- sed -e "1s,^W54S,W54G," < openwrt-gs-code.bin.$(ROOTFSTYPE) > openwrt-g-code.bin.$(ROOTFSTYPE)
-
-openwrt-image: openwrt-g-code.bin.$(ROOTFSTYPE)
+ifeq ($(strip $(BR2_TARGET_ROOTFS_SQUASHFS)),y)
+TARGETS+=squashfsroot openwrt-image
+ROOTFS=squashfs
+endif