Browse Source

copy_upgrade.sh: add i.MX8 support

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
master
Gary Bisson 2 years ago
parent
commit
0fe081d4f0
1 changed files with 22 additions and 7 deletions
  1. +22
    -7
      copy_upgrade.sh

+ 22
- 7
copy_upgrade.sh View File

@@ -6,15 +6,30 @@ if [ $# -lt 1 ]; then
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
grep ^CONFIG_ARM64 .config > /dev/null
if [ $? -eq 0 ]; then
ARCH=arm64
else
ARCH=arm
fi

uboot_defconfig=`grep CONFIG_DEFCONFIG include/config.h|sed -e 's/#define CONFIG_DEFCONFIG[^"]\{1,\}"\([^"]\{1,\}\)"/\1/'`

./tools/mkimage -A arm -O linux -T script -C none \
./tools/mkimage -A $ARCH -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/'`
if [ -f u-boot.imx ]; then
cp u-boot.imx u-boot.$uboot_defconfig
fi

if [ -f flash.bin ]; then
cp flash.bin u-boot.$uboot_defconfig
fi

if [ ! -f u-boot.$uboot_defconfig ]; then
echo "Couldn't find u-boot.$uboot_defconfig!"
exit 1
fi

cp u-boot.imx u-boot.$uboot_defconfig
mv -v -t $1/ u-boot.$uboot_defconfig 6x_upgrade upgrade.scr
mv -v -t $1/ u-boot.$uboot_defconfig upgrade.scr

Loading…
Cancel
Save