Tool/software:
Hi,
I flashed the 32GB EMMC via DFU.
Afterwards, the size was checked using the df command and it was confirmed to be around 6GB.
Is there a way to use the remaining capacity?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Hi,
I flashed the 32GB EMMC via DFU.
Afterwards, the size was checked using the df command and it was confirmed to be around 6GB.
Is there a way to use the remaining capacity?
Hi, Liu
$ cd <path-ti-psdk>/filesystem
$ dd if=/dev/null of=rootfs.ext4 bs=1M seek=6000
$ mkfs.ext4 -F rootfs.ext4
$ mkdir mnt_fs
$ sudo mount -t ext4 rootfs.ext4 mnt_fs
$ cd mnt_fs
$ sudo tar xvf ../tisdk-edgeai-image-am62axx-evm.tar.xz
$ cd ..
$ sudo umount mnt_fs
Using the above command, I created an ext4 file and performed dfu flash.
Hi Kim,
You can expand the eMMC rootfs using resize2fs command once booted the Linux from eMMC. Please refer to the script attached below.
https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/resize_5F00_rootfs.sh
Hi, Liu
The script doesn't work, but I solved the problem with the resize2fs command.
thank you
Hi Kim,
I got this script from the SDK rootfs image. It may not directly fit in this use case.
Can you please explain how you used resize2fs command resolving the problem?
Hi Liu,
When executing parted, free space could not be found, so I modified the command to df
FREE_SPACE=`parted /dev/$BOOT_DEV unit '%' print free | grep 'Free Space' | tail -n1 | awk '{print $3}'` if [[ ${FREE_SPACE%.*} -gt 0 ]]; then echo "$FREE_SPACE of /dev/$BOOT_DEV is free. Extending partition #2" echo ",+" | sfdisk -N 2 /dev/$BOOT_DEV --no-reread partprobe resize2fs /dev/$ROOT_PART fi
AVAIL_SPACE=`df -h | tail -n 1 | awk '{print $5}' | sed -e s/%//g ` if [[ ${AVAIL_SPACE} -eq 0 ]]; then echo ",+" | sfdisk -N 2 /dev/mmcblk0 --no-reread > /dev/null 2>&1 partprobe resize2fs /dev/$ROOT_PART > /dev/null 2>&1 fi
Regards,
Kim