summaryrefslogtreecommitdiff
path: root/target/linux/imx6
diff options
context:
space:
mode:
authorLuka Perkov <luka@openwrt.org>2016-04-19 13:46:33 +0000
committerLuka Perkov <luka@openwrt.org>2016-04-19 13:46:33 +0000
commitd1005862c2c0a298d2ff492f531aa266857dbde8 (patch)
treea7623ac2b0a598f8b0be091a6b59c9981a62f342 /target/linux/imx6
parente958d49fd1ad8b0cdb3324dec1705f7f6b686869 (diff)
downloadmtk-20170518-d1005862c2c0a298d2ff492f531aa266857dbde8.zip
mtk-20170518-d1005862c2c0a298d2ff492f531aa266857dbde8.tar.gz
mtk-20170518-d1005862c2c0a298d2ff492f531aa266857dbde8.tar.bz2
imx6: images: add bootfs.tar.gz build artifact
In order to create a bootable block storage device, both bootfs and rootfs tarballs are required. However, our current scheme does not export a bootfs tarball so add the packaging of it here. Signed-off-by: Pushpal Sidhu <psidhu@gateworks.com> SVN-Revision: 49196
Diffstat (limited to 'target/linux/imx6')
-rw-r--r--target/linux/imx6/image/Makefile31
1 files changed, 30 insertions, 1 deletions
diff --git a/target/linux/imx6/image/Makefile b/target/linux/imx6/image/Makefile
index e0017d0..910f88c 100644
--- a/target/linux/imx6/image/Makefile
+++ b/target/linux/imx6/image/Makefile
@@ -67,6 +67,34 @@ define Build/ubi-boot-overlay
)
endef
+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
+
#################################################
# Devices
#################################################
@@ -103,9 +131,10 @@ define Device/ventana
imx6q-gw5400-a \
imx6q-gw551x \
imx6q-gw552x
- IMAGES := nand_normal.ubi nand_large.ubi
+ IMAGES := nand_normal.ubi nand_large.ubi bootfs.tar.gz
IMAGE/nand_normal.ubi := ubi-boot-overlay normal 2048 124KiB 128KiB 8124
IMAGE/nand_large.ubi := ubi-boot-overlay large 4096 248KiB 256KiB 8124
+ IMAGE/bootfs.tar.gz := bootfs.tar.gz
IMAGE_NAME = $$(IMAGE_PREFIX)-$$(1)-$$(2)
endef