summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerard Salvatella <gerard.salvatella@toradex.com>2018-09-05 14:56:43 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2018-09-27 15:59:08 +0200
commit9f2e2a4d05b4b5ef9a3fa79a2bb77fd2523aeb68 (patch)
tree4a8a8be07304a85d372617040ad0cfd9aa95a58e
parent21c18b9ebb6f3a46ebc9f18db668db842788e1c2 (diff)
images: add wic support for tegra
Currently only imx and vybrid automatically generate wic images. This functionality is useful e.g. for booting from SD cards. Add wic image generation in tegra modules. Signed-off-by: Gerard Salvatella <gerard.salvatella@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--conf/machine/apalis-t30.conf2
-rw-r--r--conf/machine/apalis-tk1-mainline.conf18
-rw-r--r--conf/machine/apalis-tk1.conf18
-rw-r--r--conf/machine/colibri-t20.conf1
-rw-r--r--conf/machine/colibri-t30.conf1
-rw-r--r--conf/machine/include/tegra-base.inc20
-rw-r--r--wic/sdimage-bootpart-tegra.wks6
7 files changed, 61 insertions, 5 deletions
diff --git a/conf/machine/apalis-t30.conf b/conf/machine/apalis-t30.conf
index c470976..16887a7 100644
--- a/conf/machine/apalis-t30.conf
+++ b/conf/machine/apalis-t30.conf
@@ -33,7 +33,7 @@ EXTRA_IMAGEDEPENDS += "u-boot"
# used by sysvinit_2
SERIAL_CONSOLE = "115200 ttyS0"
IMAGE_CLASSES += "image_type_tezi"
-IMAGE_FSTYPES = "tar.xz teziimg"
+IMAGE_FSTYPES += "teziimg"
TORADEX_PRODUCT_IDS = "0025 0026 0031"
TORADEX_FLASH_TYPE = "emmc"
diff --git a/conf/machine/apalis-tk1-mainline.conf b/conf/machine/apalis-tk1-mainline.conf
index a7eacd5..e064a97 100644
--- a/conf/machine/apalis-tk1-mainline.conf
+++ b/conf/machine/apalis-tk1-mainline.conf
@@ -13,6 +13,22 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-toradex-mainline"
KERNEL_IMAGETYPE = "zImage"
KERNEL_DEFCONFIG = "tegra_defconfig"
KERNEL_DEVICETREE += "tegra124-apalis-eval.dtb tegra124-apalis-v1.2-eval.dtb"
+
+# wic support
+IMAGE_BOOT_FILES ?= " \
+ ${KERNEL_IMAGETYPE} \
+ ${KERNEL_DEVICETREE} \
+"
+WKS_FILE_DEPENDS ?= " \
+ virtual/bootloader \
+ \
+ e2fsprogs-native \
+ bmap-tools-native \
+"
+
+WKS_FILE = "sdimage-bootpart-tegra.wks"
+WIC_CREATE_EXTRA_ARGS_append = " --no-fstab-update"
+
# The kernel lives in a seperate FAT or UBI partition, don't deploy it in /boot
RDEPENDS_kernel-base = ""
@@ -58,7 +74,7 @@ EXTRA_IMAGEDEPENDS += "u-boot"
# used by sysvinit_2
SERIAL_CONSOLE = "115200 ttyS0"
IMAGE_CLASSES += "image_type_tezi"
-IMAGE_FSTYPES = "tar.xz teziimg"
+IMAGE_FSTYPES += "wic.gz teziimg"
TORADEX_PRODUCT_IDS = "0034"
TORADEX_FLASH_TYPE = "emmc"
diff --git a/conf/machine/apalis-tk1.conf b/conf/machine/apalis-tk1.conf
index 513e5d8..5cddb23 100644
--- a/conf/machine/apalis-tk1.conf
+++ b/conf/machine/apalis-tk1.conf
@@ -12,6 +12,22 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-toradex"
KERNEL_IMAGETYPE = "zImage"
KERNEL_DEVICETREE += "tegra124-apalis-eval.dtb tegra124-apalis-v1.2-eval.dtb"
+
+# wic support
+IMAGE_BOOT_FILES ?= " \
+ ${KERNEL_IMAGETYPE} \
+ ${KERNEL_DEVICETREE} \
+"
+WKS_FILE_DEPENDS ?= " \
+ virtual/bootloader \
+ \
+ e2fsprogs-native \
+ bmap-tools-native \
+"
+
+WKS_FILE = "sdimage-bootpart-tegra.wks"
+WIC_CREATE_EXTRA_ARGS_append = " --no-fstab-update"
+
# The kernel lives in a seperate FAT or UBI partition, don't deploy it in /boot
RDEPENDS_kernel-base = ""
@@ -61,7 +77,7 @@ EXTRA_IMAGEDEPENDS += "u-boot"
# used by sysvinit_2
SERIAL_CONSOLE = "115200 ttyS0"
IMAGE_CLASSES += "image_type_tezi"
-IMAGE_FSTYPES = "tar.xz teziimg"
+IMAGE_FSTYPES += "wic.gz teziimg"
TORADEX_PRODUCT_IDS = "0034"
TORADEX_FLASH_TYPE = "emmc"
diff --git a/conf/machine/colibri-t20.conf b/conf/machine/colibri-t20.conf
index 701dffa..fd603b7 100644
--- a/conf/machine/colibri-t20.conf
+++ b/conf/machine/colibri-t20.conf
@@ -24,7 +24,6 @@ EXTRA_IMAGEDEPENDS += "u-boot"
# used by sysvinit_2
SERIAL_CONSOLE = "115200 ttyS0"
-IMAGE_FSTYPES ?= "tar.xz"
# T20 does not have neon
DEFAULTTUNE = "armv7athf"
diff --git a/conf/machine/colibri-t30.conf b/conf/machine/colibri-t30.conf
index 4f456f1..043b0f0 100644
--- a/conf/machine/colibri-t30.conf
+++ b/conf/machine/colibri-t30.conf
@@ -20,7 +20,6 @@ EXTRA_IMAGEDEPENDS += "u-boot"
# used by sysvinit_2
SERIAL_CONSOLE = "115200 ttyS0"
-IMAGE_FSTYPES ?= "tar.xz"
# meta-angstrom/conf/distro/include/arm-defaults.inc
DEFAULTTUNE = "armv7athf-neon"
diff --git a/conf/machine/include/tegra-base.inc b/conf/machine/include/tegra-base.inc
index 64b7115..c49f568 100644
--- a/conf/machine/include/tegra-base.inc
+++ b/conf/machine/include/tegra-base.inc
@@ -13,6 +13,26 @@ XSERVER = "xserver-xorg \
PREFERRED_PROVIDER_virtual/kernel = "linux-toradex"
KERNEL_IMAGETYPE = "zImage"
+
+# wic support
+SOC_DEFAULT_IMAGE_FSTYPES = "wic.gz tar.xz"
+IMAGE_FSTYPES = "${SOC_DEFAULT_IMAGE_FSTYPES}"
+
+IMAGE_BOOT_FILES ?= " \
+ ${KERNEL_IMAGETYPE} \
+"
+WKS_FILE_DEPENDS ?= " \
+ virtual/bootloader \
+ \
+ e2fsprogs-native \
+ bmap-tools-native \
+"
+
+SOC_DEFAULT_WKS_FILE ?= "imx-uboot-bootpart.wks"
+SOC_DEFAULT_WKS_FILE_mxs ?= "imx-uboot-mxs-bootpart.wks"
+WKS_FILE ?= "sdimage-bootpart-tegra.wks"
+WIC_CREATE_EXTRA_ARGS_append = " --no-fstab-update"
+
# The kernel lives in a seperate FAT or UBI partition, don't deploy it in /boot
RDEPENDS_kernel-base = ""
diff --git a/wic/sdimage-bootpart-tegra.wks b/wic/sdimage-bootpart-tegra.wks
new file mode 100644
index 0000000..f58856b
--- /dev/null
+++ b/wic/sdimage-bootpart-tegra.wks
@@ -0,0 +1,6 @@
+# short-description: Create SD card image with a boot partition
+# long-description: Creates a partitioned SD card image. Boot files
+# are located in the first vfat partition.
+
+part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4 --size 16
+part / --source rootfs --ondisk mmcblk --fstype=ext3 --label root --align 4