11.1. How To Use EMMC Based Filesystem

The PSDK QNX release focus on filesystems on the SD card. How can an eMMC based filesystem be made accessible/used on a PSDK QNX release?

To make use of the eMMC filesystem on the J721E EVM with the PSDK QNX 09_01_00 release, the below steps can be followed.

Note

These steps were tested on the J721E EVM using the PSDK QNX 09_01_00 release, and may change with newer revisions of the TI PSDK QNX release.

  • Refer Getting Started and Release Notes to get the J721E EVM running with SD boot (either SBL or SPL).

  • After booting the J721E EVM to the QNX prompt run the below commands to format and create an eMMC partition. For further information on usage of eMMC filesystems in the QNX environment please reference QNX’s Online User Guide.

# Check the partition information:
fdisk /dev/emmc0 info
# Delete all existing partitions:
fdisk /dev/emmc0 delete -a
fdisk /dev/emmc0 show
# Create a 128MB and a 8GB FAT32 partition from the beginning of the eMMC device:
fdisk /dev/emmc0 add -t 12 -c 0,127
fdisk /dev/emmc0 add -t 12 -c 128,8128
fdisk /dev/emmc0 show
#Enumerate the partitions:
mount -e /dev/emmc0
ls /dev/emmc0*
# Format the FAT32 partition and mount it:
mkdosfs /dev/emmc0t12
mkdosfs /dev/emmc0t12.1
# Mount
mount -t dos /dev/emmc0t12 /emmc_boot
mount -t dos /dev/emmc0t12.1 /emmc_ti_fs
  • Copy the filesystem contents from the SD card to the newly created eMMC partition

ls /emmc_boot
cp -Rvf /boot/* /emmc_boot
cp -Rvf /ti_fs/* /emmc_ti_fs
sync
  • At this point the eMMC should contain a filesystem that is capable of running the PSDK QNX Vision Apps demos. After each “boot”, the following commands can be entered to launch the demo applications from the eMMC filesystem.

mount -tdos -oexe=all /dev/emmc0t12 /boot
mount -tdos -oexe=all /dev/emmc0t12.1 /ti_fs
export PATH=:/proc/boot:/bin:/sbin:/usr/bin:/usr/sbin:/opt/bin:/ti_fs:/ti_fs/bin:/ti_fs/sbin:/ti_fs/usr/bin:/ti_fs/usr/sbin:/ti_fs/tibin:/ti_fs/vision_apps:/ti_fs/scripts
export LD_LIBRARY_PATH=:/proc/boot:/lib:/usr/lib:/lib/dll:/opt/lib:/ti_fs/lib:/ti_fs/usr/lib:/ti_fs/lib/dll/mmedia:/ti_fs/lib/dll:/ti_fs/tilib:/ti_fs/vision_apps:/ti_fs/usr/lib/graphics/j721e
export GRAPHICS_ROOT=/ti_fs/usr/lib/graphics/j721e
cd /ti_fs/vision_apps
./vision_apps_init.sh &
./run_app_dof.sh
  • To automate the mounting of the eMMC filesystem, and setting of environment variables, the QNX IFS image used during boot must be updated. A build file designed to mount and run content from eMMC is included in the PSDK QNX releases (j721e-evm-ti-emmc.build). This build generates an IFS image targeted at using the eMMC, as part of the PSDK QNX build process. The IFS file can be used as below:

    • If using SPL SD boot:

      • Copy ${PSDK_RTOS_PATH}/psdkqa/qnx/bsp/images/ifs-j721e-evm-ti-emmc.raw to /media/<USERNAME>/boot/qnx-ifs On the next boot the eMMC should automatically mount at “/ti_fs” and binaries/libraries will be invoked from /ti_fs which is in emmc filesystem.

    • If using SBL SD boot:

      • Copy the ${PSDK_RTOS_PATH}/psdkqa/qnx/bsp/images/ifs-j721e-evm-ti-emmc.raw to ${PSDK_RTOS_PATH}/psdkqa/bootfs/qnx-ifs, prior to running the “make sbl_bootimage” step at Link1

      • On the next boot the eMMC should automatically mount at “/ti_fs” and binaries/libraries will be invoked from /ti_fs which is in emmc filesystem.

    • If using SBL OSPI boot:

      • Copy the ${PSDK_RTOS_PATH}/psdkqa/qnx/bsp/images/ifs-j721-emv-ti-emmc.raw to ${PSDK_RTOS_PATH}/psdkqa/bootfs/qnx-ifs, prior to running the “make sbl_bootimage” step at Link2

      • Once the OSPI has been flashed, on the next boot the eMMC should automatically mount at “/ti_fs” and all binaries not part of /proc/boot, will be invoked from /ti_fs.