Boot using xSPI NOR flash

After you boot your board, you can prepare a bootable xSPI NOR flash device to use to boot your board.

Note:
Before you can perform the steps to prepare a bootable xSPI NOR flash, you must first boot your board using a bootable SD card. For more information, see Prepare a bootable microSD and Use the QNX IPL to boot the board.
After you have QNX OS running, complete the following steps to prepare a bootable xSPI NOR Flash.
  1. Start the devf-flexspi-imx8 driver from commandline in QNX if not started during QNX boot.
  2. You should see fs0, fs0p0 devices (partitions) appear in device files. You can use the ls /dev command to show the dev directory.
  3. Format the SPI NOR Flash memory using following command:
    flashctl -p /dev/fs0 -ev
  4. Copy the FlexSPI header file imx-fspi-header.bin into the /tmp directory of the target that's running the OS. The FlexSPI configuration parameter file is available in the $BSP_ROOT_DIR/images/tools/imx-fspi-header directory.
  5. Copy the FlexSPI configuration parameters (FlexSPI header) to the NOR flash memory device using the following command:
    dd if=/tmp/imx-fspi-header.bin of=/dev/fs0 bs=512 seek=2
    1+0 records in
    1+0 records out
  6. Copy the QNX IFS file (qnx-ifs-cpu-mek), the NXP DTB file fsl-imx8qm-mek.dtb, and the QNX IPL file (ipl-imx8qm-cpu-mek_flash_b0.imx (i.MX8QM MEK with the B0 SoC)) to the /tmp directory on your board. Both files are in the $BSP_ROOT_DIR/images directory.
  7. From a terminal or console connection on your board, copy the QNX IPL file onto the memory device using the following command:
    dd if=/tmp/ipl-imx8qm-cpu-mek_flash_b0.imx  of=/dev/fs0 bs=512 seek=8
    624+0 records in
    624+0 records out
  8. Copy the QNX IFS file (qnx-ifs-cpu-mek) to the memory device at a 1M offset using the following command:
    dd if=/tmp/qnx-ifs-cpu-mek of=/dev/fs0 bs=512 seek=2048
  9. Copy the NXP DTB file fsl-imx8qm-mek.dtb to the memory device at a 30M offset using the following command:
    # dd if=/fs/sd/fsl-imx8qm-mek.dtb of=/dev/fs0 bs=512 seek=61440
  10. Configure the DIP switches on your board to boot from the xSPI NOR flash memory instead of the SD card on your board as follows:
    Figure 1DIP switch configuration for the i.MX8QM MEK to boot from QSPI

    For more information about configuring the DIP switches on the board, see Set up the hardware in this guide.

  11. Press the SW3 (RESET) switch on the i.MX8QM MEK to reset the board and press the F key to boot from xSPI NOR Flash:
    Welcome to QNX Initial Program Loader for NXP i.MX8QM(Rev B) MEK Board (ARM Cortex-A53/A72)
    SCFW build version: 5624, SCFW commit: 6638c032
    SECO version: 2.5.6, commit: 6638c032
    Command:
    Press 'D' for serial download, using the 'sendnto' utility
    Press 'M' for eSDC download, IFS filename MUST be 'QNX-IFS'
    Press 'E' for eMMC download, IFS filename MUST be 'QNX-IFS'
    Press 'F' for NOR flash download, IFS MUST be at 0x100000 offset
    
Page updated: