+define Build/bootfs.tar.gz
+ # boot filesystem
+ rm -rf $(TARGET_ROOTFS_DIR)/boot-$(DEVICE_NAME)
+ mkdir -p $(TARGET_ROOTFS_DIR)/boot-$(DEVICE_NAME)
+ $(CP) $< $(TARGET_ROOTFS_DIR)/boot-$(DEVICE_NAME)/$(IMG_PREFIX)-uImage
+ ln -sf $(IMG_PREFIX)-uImage \
+ $(TARGET_ROOTFS_DIR)/boot-$(DEVICE_NAME)/uImage
+ $(foreach dts,$(shell echo $(DEVICE_DTS)), \
+ $(CP) $(LINUX_DIR)/arch/$(ARCH)/boot/dts/$(dts).dtb \
+ $(BIN_DIR)/$(IMG_PREFIX)-$(dts).dtb; \
+ $(CP) $(LINUX_DIR)/arch/$(ARCH)/boot/dts/$(dts).dtb \
+ $(TARGET_ROOTFS_DIR)/boot-$(DEVICE_NAME)/$(IMG_PREFIX)-$(dts).dtb; \
+ ln -sf $(IMG_PREFIX)-$(dts).dtb \
+ $(TARGET_ROOTFS_DIR)/boot-$(DEVICE_NAME)/$(dts).dtb; \
+ )
+ mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
+ -n '$(DEVICE_ID) OpenWrt bootscript' \
+ -d ./bootscript-$(DEVICE_NAME) \
+ $(TARGET_ROOTFS_DIR)/boot-$(DEVICE_NAME)/6x_bootscript-$(DEVICE_NAME)
+
+ # tar and zip
+ ( \
+ cd $(TARGET_ROOTFS_DIR)/boot-$(DEVICE_NAME); \
+ $(TAR) --numeric-owner --owner=0 --group=0 --transform "s,./,./boot/," \
+ -czvf $(BIN_DIR)/$(IMG_PREFIX)-$(DEVICE_NAME)-bootfs.tar.gz . ; \
+ )
+endef
+