From 96f2b1db2fd89780dc63a336a7418fbceed06f59 Mon Sep 17 00:00:00 2001 From: Gary Bisson <gary.bisson@boundarydevices.com> Date: Mon, 4 Sep 2017 20:11:28 +0200 Subject: [PATCH] Add convenient copy_upgrade.sh script Generates upgrade scripts and copies to a mount path as well as renaming the u-boot binary properly. Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com> --- copy_upgrade.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 copy_upgrade.sh diff --git a/copy_upgrade.sh b/copy_upgrade.sh new file mode 100755 index 00000000000..8b9f9d9ab3e --- /dev/null +++ b/copy_upgrade.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +if [ $# -lt 1 ]; then + echo "Error, missing a parameter:" + echo "$0 <mount_path>" + exit 1 +fi + +./tools/mkimage -A arm -O linux -T script -C none \ + -a 0 -e 0 -n "update script" \ + -d board/boundary/nitrogen6x/6x_upgrade.txt 6x_upgrade + +./tools/mkimage -A arm -O linux -T script -C none \ + -a 0 -e 0 -n "update script" \ + -d board/boundary/bootscripts/upgrade.txt upgrade.scr + +uboot_defconfig=`grep CONFIG_DEFCONFIG include/config.h|sed -e 's/#define CONFIG_DEFCONFIG[^"]\{1,\}"\([^"]\{1,\}\)"/\1/'` + +cp u-boot.imx u-boot.$uboot_defconfig +mv -v -t $1/ u-boot.$uboot_defconfig 6x_upgrade upgrade.scr -- GitLab