diff options
Diffstat (limited to 'recipes/images/files/library')
-rwxr-xr-x | recipes/images/files/library/imx6/update.sh | 9 | ||||
-rwxr-xr-x | recipes/images/files/library/tegra/update.sh | 11 |
2 files changed, 18 insertions, 2 deletions
diff --git a/recipes/images/files/library/imx6/update.sh b/recipes/images/files/library/imx6/update.sh index 9739457..f6b832d 100755 --- a/recipes/images/files/library/imx6/update.sh +++ b/recipes/images/files/library/imx6/update.sh @@ -51,6 +51,7 @@ Usage() echo "Will require a running U-Boot on the target. Either one already flashed" echo "on the eMMC or one copied over usb into the module's RAM" echo "" + echo "-c : split the resulting rootfs into chunks usable for tftp transmission" echo "-d : use USB connection to copy and execute U-Boot to the module's RAM" echo "-h : prints this message" echo "-o directory : output directory" @@ -65,13 +66,16 @@ Usage() MIN_PARTITION_FREE_SIZE=100 OUT_DIR="" ROOTFSPATH=rootfs +SPLIT=0 UBOOT_RECOVERY=0 # No devicetree by default KERNEL_DEVICETREE="" KERNEL_IMAGETYPE="uImage" -while getopts "dho:" Option ; do +while getopts "cdho:" Option ; do case $Option in + c) SPLIT=1 + ;; d) UBOOT_RECOVERY=1 ;; h) Usage @@ -267,6 +271,9 @@ sudo $LOCPATH/genext3fs.sh -d rootfs -b ${EXT_SIZE} ${BINARIES}/${IMAGEFILE} || #copy to $OUT_DIR sudo cp ${BINARIES}/${U_BOOT_BINARY} ${BINARIES}/${U_BOOT_BINARY_IT} ${BINARIES}/uImage ${BINARIES}/mbr.bin ${BINARIES}/boot.vfat \ ${BINARIES}/${IMAGEFILE} ${BINARIES}/flash*.img ${BINARIES}/versions.txt "$OUT_DIR" +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 sync Flash 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 "" |