summaryrefslogtreecommitdiff
path: root/recipes-images
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-10-03 17:01:01 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-10-03 18:25:27 +0200
commit5b8832bedff12a53a969291ee2fa7295642213fa (patch)
tree8e2924609d97b77f5cd878edb0807575e0d4778a /recipes-images
parent07896631f380b953206ce662311b3fb7b339137c (diff)
legacy update script: cleanup imagefile handling
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Stefan Agner <stefan.agner@toradex.com>
Diffstat (limited to 'recipes-images')
-rwxr-xr-xrecipes-images/images/files/library/tegra/update.sh20
1 files changed, 8 insertions, 12 deletions
diff --git a/recipes-images/images/files/library/tegra/update.sh b/recipes-images/images/files/library/tegra/update.sh
index 879918f..95c8d1a 100755
--- a/recipes-images/images/files/library/tegra/update.sh
+++ b/recipes-images/images/files/library/tegra/update.sh
@@ -395,10 +395,10 @@ else
${PARTED} -a none -s ${BINARIES}/mbr.bin unit s mkpart primary fat32 ${BOOT_START} $(expr ${ROOTFS_START} - 1 )
# the partition spans to the end of the disk, even though the fs size will be smaller
# on the target the fs is then grown to the full size
- if [ "${MODTYPE}" = "apalis-tk1" ] || [ "${MODTYPE}" = "apalis-tk1-mainline" ] ; then
- ${PARTED} -a none -s ${BINARIES}/mbr.bin unit s mkpart primary ext4 ${ROOTFS_START} $(expr ${EMMC_SIZE} \- ${ROOTFS_START} \- 1)
+ if [ "${IMAGEFILE}" = "root.ext3" ] ; then
+ ${PARTED} -a none -s ${BINARIES}/mbr.bin unit s mkpart primary ext3 ${ROOTFS_START} $(expr ${EMMC_SIZE} \- ${ROOTFS_START} \- 1)
else
- ${PARTED} -a none -s ${BINARIES}/mbr.bin unit s mkpart primary ext2 ${ROOTFS_START} $(expr ${EMMC_SIZE} \- ${ROOTFS_START} \- 1)
+ ${PARTED} -a none -s ${BINARIES}/mbr.bin unit s mkpart primary ext4 ${ROOTFS_START} $(expr ${EMMC_SIZE} \- ${ROOTFS_START} \- 1)
fi
${PARTED} -s ${BINARIES}/mbr.bin unit s print
# get the size of the VFAT partition
@@ -446,10 +446,10 @@ else
'{rootfs_size=$1+f*512;rootfs_size=int(rootfs_size/1024/985); print (rootfs_size+min) }'`
rm -f ${BINARIES}/${IMAGEFILE}
- if [ "${MODTYPE}" = "apalis-tk1" ] || [ "${MODTYPE}" = "apalis-tk1-mainline" ] ; then
- sudo $LOCPATH/genext4fs.sh -d rootfs -b ${EXT_SIZE} ${BINARIES}/${IMAGEFILE} || exit 1
- else
+ if [ "${IMAGEFILE}" = "root.ext3" ] ; then
sudo $LOCPATH/genext3fs.sh -d rootfs -b ${EXT_SIZE} ${BINARIES}/${IMAGEFILE} || exit 1
+ else
+ sudo $LOCPATH/genext4fs.sh -d rootfs -b ${EXT_SIZE} ${BINARIES}/${IMAGEFILE} || exit 1
fi
fi
fi
@@ -462,13 +462,9 @@ sudo cp fwd_blk.img "$OUT_DIR/../flash_blk.img"
sudo cp fwd_eth.img "$OUT_DIR/../flash_eth.img"
sudo cp fwd_mmc.img "$OUT_DIR/../flash_mmc.img"
-if [ "${IMAGEFILE}" = "root.ext3" ] ; then
- if [ "$SPLIT" -ge 1 ] ; then
- sudo split -a 3 -b `expr 64 \* 1024 \* 1024` --numeric-suffixes=100 ${IMAGEFILE} "$OUT_DIR/root.ext3-"
- fi
-elif [ "${IMAGEFILE}" = "root.ext4" ] ; then
+if [ "${IMAGEFILE}" = "root.ext3" ] || [ "${IMAGEFILE}" = "root.ext4" ] ; then
if [ "$SPLIT" -ge 1 ] ; then
- sudo split -a 3 -b `expr 64 \* 1024 \* 1024` --numeric-suffixes=100 ${IMAGEFILE} "$OUT_DIR/root.ext4-"
+ sudo split -a 3 -b `expr 64 \* 1024 \* 1024` --numeric-suffixes=100 ${IMAGEFILE} "${OUT_DIR}/${IMAGEFILE}-"
fi
else
sudo cp ${IMAGEFILE}* "$OUT_DIR"