summaryrefslogtreecommitdiff
path: root/recipes/images/files/colibri-imx7/update.sh
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2016-06-06 11:27:54 -0700
committerMax Krummenacher <max.krummenacher@toradex.com>2016-06-30 13:19:25 +0200
commit379eebf6059721ef36fd7db4851652b086cd1b76 (patch)
tree214b3dcc40e32106dc5ebf4d293af09c4194e7ef /recipes/images/files/colibri-imx7/update.sh
parent76980cf65b0b6fe38ef71265c980c6cf48982fa6 (diff)
update.sh: imx7: write kernel and dt into static UBI volumes
Write kernel and device tree into seperate UBI Volumes. This allows to use a lot less UBI/UBIFS support in U-Boot, which should lower the risk of hitting bugs in this area. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'recipes/images/files/colibri-imx7/update.sh')
-rwxr-xr-xrecipes/images/files/colibri-imx7/update.sh16
1 files changed, 15 insertions, 1 deletions
diff --git a/recipes/images/files/colibri-imx7/update.sh b/recipes/images/files/colibri-imx7/update.sh
index 07b04bd..f998b78 100755
--- a/recipes/images/files/colibri-imx7/update.sh
+++ b/recipes/images/files/colibri-imx7/update.sh
@@ -66,6 +66,8 @@ OUT_DIR=""
PAGE=2KiB
BLOCK=124KiB
MAXLEB=8112
+KERNEL_DEVICETREE="imx7s-colibri-eval-v3.dtb imx7d-colibri-eval-v3.dtb"
+KERNEL_IMAGETYPE="zImage"
while getopts "dfhno:s" Option ; do
case $Option in
@@ -162,8 +164,20 @@ echo "Rootfs ${ROOTFSVERSION}" >> ${BINARIES}/versions.txt
#create subdirectory for this module type
sudo mkdir -p "$OUT_DIR"
+# Copy device tree file
+COPIED=false
+if test -n "${KERNEL_DEVICETREE}"; then
+ for DTB_FILE in ${KERNEL_DEVICETREE}; do
+ if [ -e "${BINARIES}/${KERNEL_IMAGETYPE}-${DTB_FILE}" ]; then
+ sudo cp ${BINARIES}/${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_FILE} "$OUT_DIR/${DTB_FILE}"
+ COPIED=true
+ fi
+ done
+ [ $COPIED = true ] || { echo "Did not find the devicetrees from KERNEL_DEVICETREE, ${KERNEL_DEVICETREE}. Aborting."; exit 1; }
+fi
+
#copy to $OUT_DIR
-sudo cp ${BINARIES}/u-boot-nand.imx ${BINARIES}/ubifs.img ${BINARIES}/flash*.img ${BINARIES}/versions.txt "$OUT_DIR"
+sudo cp ${BINARIES}/u-boot-nand.imx ${BINARIES}/zImage ${BINARIES}/ubifs.img ${BINARIES}/flash*.img ${BINARIES}/versions.txt "$OUT_DIR"
sudo cp ${BINARIES}/fwd_blk.img "$OUT_DIR/../flash_blk.img"
sudo cp ${BINARIES}/fwd_eth.img "$OUT_DIR/../flash_eth.img"
#cleanup intermediate files