-$(KDIR)/root.squashfs: install-prepare
- @mkdir -p $(KDIR)/root/jffs
- $(STAGING_DIR)/bin/mksquashfs-lzma $(KDIR)/root $@ -nopad -noappend -root-owned -$(endian) $(MAKE_TRACE)
-
-ifeq ($(IB),)
-squashfs-install: compile-targets $(BOARD)-compile
-endif
-
-squashfs-install: $(KDIR)/root.squashfs
- $(TRACE) target/linux/image/$(BOARD)/install
- $(MAKE) -C $(BOARD) install KERNEL="$(KERNEL)" FS="squashfs"
+define Image/mkfs/squashfs
+ @mkdir -p $(BUILD_DIR)/root/jffs
+ $(STAGING_DIR)/bin/mksquashfs-lzma $(BUILD_DIR)/root $(KDIR)/root.squashfs -nopad -noappend -root-owned -$(ENDIAN)
+ $(call Image/Build,squashfs)
+endef