aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2016-08-11 17:20:54 +0200
committerJo-Philipp Wich <jo@mein.io>2016-08-13 16:24:04 +0200
commitb9b665ae49469a73d254b1a219a4a7c4e22f27c0 (patch)
tree1b5a05baa8b618f75c026104ded5768532b4075c /target/linux/mvebu
parent3c2c31bb66e5b247ffbb3cafac2a21d441daef39 (diff)
downloadupstream-b9b665ae49469a73d254b1a219a4a7c4e22f27c0.tar.gz
upstream-b9b665ae49469a73d254b1a219a4a7c4e22f27c0.tar.bz2
upstream-b9b665ae49469a73d254b1a219a4a7c4e22f27c0.zip
mvebu: add ClearFog .tar.gz bundle
The previous image building code rework removed the rootfs.tar.gz with embedded kernel and dtb build artifact which is required to build suitable SD images. Reintroduce a .tar.gz artifact locally which embeds kernel and dtb, similar to how the old code handled it. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'target/linux/mvebu')
-rw-r--r--target/linux/mvebu/image/Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile
index 0e863478d8..7d87e5cc8f 100644
--- a/target/linux/mvebu/image/Makefile
+++ b/target/linux/mvebu/image/Makefile
@@ -14,12 +14,33 @@ KERNEL_LOADADDR := 0x00008000
DEVICE_VARS += KERNEL_SIZE
+define Image/mkfs/bundle
+ $(TAR) -cp --numeric-owner --owner=0 --group=0 --sort=name \
+ $(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \
+ -C $(call mkfs_target_dir,$(1))/ . > $@
+endef
+TARGET_FILESYSTEMS += bundle
+
+define Build/dtb
+ $(call Image/BuildDTB,$(DTS_DIR)/$(DEVICE_DTS).dts,$@.dtb)
+endef
+
+define Build/clearfog-bundle
+ cp $(IMAGE_ROOTFS) $@.new
+ $(TAR) -rp --numeric-owner --owner=0 --group=0 --sort=name \
+ $(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \
+ --file=$@.new -C $(dir $(IMAGE_KERNEL))/ $(notdir $(IMAGE_KERNEL)) $(notdir $(IMAGE_KERNEL).dtb)
+ gzip -9n -c $@.new > $@
+endef
+
+
define Device/Default
PROFILES := Default
DEVICE_DTS := $(1)
BOARD_NAME = $$(DEVICE_DTS)
KERNEL_NAME := zImage
KERNEL := kernel-bin | append-dtb | uImage none
+ FILESYSTEMS = $(filter-out bundle,$(TARGET_FILESYSTEMS))
endef
define Device/UBI
@@ -132,7 +153,12 @@ TARGET_DEVICES += armada-388-rd
define Device/armada-388-clearfog
KERNEL_INSTALL := 1
+ KERNEL := dtb | kernel-bin
DEVICE_TITLE := SolidRun ClearFog
+ FILESYSTEMS := bundle
+ IMAGES := bundle.tar.gz
+ IMAGE/bundle.tar.gz := append-rootfs | clearfog-bundle
+ IMAGE_NAME = $$(IMAGE_PREFIX)-$$(2)
endef
TARGET_DEVICES += armada-388-clearfog