summaryrefslogtreecommitdiff
path: root/recipes/images/files/library/tegra/update.sh
diff options
context:
space:
mode:
authorMax Krummenacher <max.oss.09@gmail.com>2015-10-19 17:14:29 +0200
committerMax Krummenacher <max.oss.09@gmail.com>2015-10-28 09:31:27 +0100
commit4c49bd46708dd552d6471e24657ebcbf1c4f44bd (patch)
tree0da40493f0b5bfac226a0175b6721f816ec811d4 /recipes/images/files/library/tegra/update.sh
parent878f19253370e3d11f1e877bfb83f65db4315f5b (diff)
flash_eth: provide option to split output file
To flash a large rootfs over tftp the rootfs must be split into chunks of 64MB on the tftp server. Add the option '-c' to the update.sh script which does this automatically. Use 64MB chunks on all module types.
Diffstat (limited to 'recipes/images/files/library/tegra/update.sh')
-rwxr-xr-xrecipes/images/files/library/tegra/update.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/recipes/images/files/library/tegra/update.sh b/recipes/images/files/library/tegra/update.sh
index 2248b22..10b11ef 100755
--- a/recipes/images/files/library/tegra/update.sh
+++ b/recipes/images/files/library/tegra/update.sh
@@ -52,6 +52,7 @@ Usage()
echo "on the eMMC/NAND or one copied over USB into the module's RAM"
echo ""
echo "-b : T20: selects boot device (hsmmc/nand) (default: nand)"
+ echo "-c : split the resulting rootfs into chunks usable for tftp transmission"
echo "-d : use USB recovery mode to copy/execute U-Boot to the module's RAM"
echo "-f : flash instructions"
echo "-h : prints this message"
@@ -73,6 +74,7 @@ Usage()
# initialise options
BOOT_DEVICE=nand
EMMC_PARTS="mbr.bin boot.vfat"
+SPLIT=0
# no devicetree by default
KERNEL_DEVICETREE=""
KERNEL_IMAGETYPE="uImage"
@@ -91,10 +93,12 @@ UBOOT_RECOVERY=0
MODVERSION=Add_Version_-v
RAM_SIZE=Add_RAMsize_-r
-while getopts "b:dfho:r:sv:" Option ; do
+while getopts "b:cdfho:r:sv:" Option ; do
case $Option in
b) BOOT_DEVICE=$OPTARG
;;
+ c) SPLIT=1
+ ;;
d) UBOOT_RECOVERY=1
;;
f) Flash
@@ -397,6 +401,11 @@ OUT_DIR=`readlink -f $OUT_DIR`
cd ${BINARIES}
sudo cp ${CBOOT_IMAGE} ${KERNEL_IMAGETYPE} ${EMMC_PARTS} ${IMAGEFILE}* flash*.img versions.txt "$OUT_DIR"
cd ..
+if [ "${IMAGEFILE}" = "root.ext3" ] ; then
+ if [ "$SPLIT" -ge 1 ] ; then
+ sudo split -a 2 -b `expr 64 \* 1024 \* 1024` --numeric-suffixes=10 "$OUT_DIR/root.ext3" "$OUT_DIR/root.ext3-"
+ fi
+fi
sync
echo "Successfully copied data to target folder."
echo ""