summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2018-04-20 14:05:51 +0200
committerStefan Agner <stefan.agner@toradex.com>2018-06-18 09:21:27 +0200
commit5a5f979b5a717fef333d0835e4431e4cf9221cc1 (patch)
treea5248685f0681abfae63c1649819dc72537df287
parentdf78aaf49a754e5f70343bd45661661714a7d02a (diff)
u-boot-toradex: apalis-t30: generate cbootimage
Generate cbootimage already during build as required for Toradex Easy Installer BSP package. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Stefan Agner <stefan.agner@toradex.com>
-rw-r--r--recipes-bsp/u-boot/files/apalis-t30/Apalis_T30_2GB_800Mhz.bctbin0 -> 6128 bytes
-rw-r--r--recipes-bsp/u-boot/files/apalis-t30/apalis_t30.img.cfg22
-rw-r--r--recipes-bsp/u-boot/files/apalis-t30/fw_env.config15
-rw-r--r--recipes-bsp/u-boot/u-boot-toradex_git.bb11
4 files changed, 48 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/files/apalis-t30/Apalis_T30_2GB_800Mhz.bct b/recipes-bsp/u-boot/files/apalis-t30/Apalis_T30_2GB_800Mhz.bct
new file mode 100644
index 0000000..f228cd2
--- /dev/null
+++ b/recipes-bsp/u-boot/files/apalis-t30/Apalis_T30_2GB_800Mhz.bct
Binary files differ
diff --git a/recipes-bsp/u-boot/files/apalis-t30/apalis_t30.img.cfg b/recipes-bsp/u-boot/files/apalis-t30/apalis_t30.img.cfg
new file mode 100644
index 0000000..6fbdc0d
--- /dev/null
+++ b/recipes-bsp/u-boot/files/apalis-t30/apalis_t30.img.cfg
@@ -0,0 +1,22 @@
+# Copyright (C) 2014 Toradex, Inc.
+#
+# This software is provided 'as-is', without any express or implied
+# warranty. In no event will the authors be held liable for any damages
+# arising from the use of this software.
+#
+# Permission is granted to anyone to use this software for any purpose,
+# including commercial applications, and to alter it and redistribute it
+# freely, subject to the following restrictions:
+#
+# 1. The origin of this software must not be misrepresented; you must not
+# claim that you wrote the original software. If you use this software
+# in a product, an acknowledgment in the product documentation would be
+# appreciated but is not required.
+# 2. Altered source versions must be plainly marked as such, and must not be
+# misrepresented as being the original software.
+# 3. This notice may not be removed or altered from any source distribution.
+
+Version = 0x00020001;
+Bctcopy = 1;
+Bctfile = Apalis_T30_2GB_800Mhz.bct;
+BootLoader = u-boot-dtb-tegra.bin,0x80108000,0x80108000,Complete;
diff --git a/recipes-bsp/u-boot/files/apalis-t30/fw_env.config b/recipes-bsp/u-boot/files/apalis-t30/fw_env.config
new file mode 100644
index 0000000..d2be4ee
--- /dev/null
+++ b/recipes-bsp/u-boot/files/apalis-t30/fw_env.config
@@ -0,0 +1,15 @@
+# Configuration file for fw_(printenv/setenv) utility.
+# Up to two entries are valid, in this case the redundant
+# environment sector is assumed present.
+# Device offset must be prefixed with 0x to be parsed as a hexadecimal value.
+# On a block device a negative offset is treated as a backwards offset from the
+# end of the device/partition, rather than a forwards offset from the start.
+
+# Colibri T30/Apalis T30
+# U-Boot environment is stored at the end of the first eMMC boot partition
+# hence use a negative value. The environment is just in front of the config
+# block which occupies the last sector (hence -0x200)
+
+# Block device name Device offset Env. size
+/dev/mmcblk0boot0 -0x2200 0x2000
+
diff --git a/recipes-bsp/u-boot/u-boot-toradex_git.bb b/recipes-bsp/u-boot/u-boot-toradex_git.bb
index 364b48a..66d18c0 100644
--- a/recipes-bsp/u-boot/u-boot-toradex_git.bb
+++ b/recipes-bsp/u-boot/u-boot-toradex_git.bb
@@ -5,6 +5,7 @@ inherit tegra-u-boot-localversion
PROVIDES = "u-boot virtual/bootloader"
DEPENDS += "dtc-native"
+DEPENDS_append_apalis-t30 = " cbootimage-native"
DEPENDS_append_apalis-tk1 = " cbootimage-native"
DEPENDS_append_apalis-tk1-mainline = " cbootimage-native"
@@ -26,6 +27,10 @@ SRCBRANCH = "2016.11-toradex"
SRCREV_use-head-next = "${AUTOREV}"
SRCBRANCH_use-head-next = "2016.11-toradex-next"
SRC_URI = "git://git.toradex.com/u-boot-toradex.git;protocol=git;branch=${SRCBRANCH}"
+SRC_URI_append_apalis-t30 = " \
+ file://apalis_t30.img.cfg \
+ file://Apalis_T30_2GB_800Mhz.bct \
+"
SRC_URI_append_apalis-tk1 = " \
file://apalis-tk1.img.cfg \
file://PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct \
@@ -40,6 +45,12 @@ PR = "${TDX_VER_ITEM}"
PACKAGE_ARCH = "${MACHINE_ARCH}"
+do_deploy_append_apalis-t30() {
+ cd ${DEPLOYDIR}
+ cp ${WORKDIR}/Apalis_T30_2GB_800Mhz.bct .
+ cbootimage -s tegra30 ${WORKDIR}/apalis_t30.img.cfg apalis_t30.img
+ rm Apalis_T30_2GB_800Mhz.bct
+}
do_deploy_append_apalis-tk1() {
cd ${DEPLOYDIR}
cp ${WORKDIR}/PM375_Hynix_2GB_H5TC4G63AFR_RDA_924MHz.bct .