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.

Compiler/PROCESSOR-SDK-AM65X: QSPI boot

Part Number: PROCESSOR-SDK-AM65X

Tool/software: TI C/C++ Compiler

HI,

My agenda is to boot the AM654x GP EVM from QSPI-NOR flash device. AS explained in the user's guide page no 29,  MT25QL128ABA8E12  chip is already present in EVK.

1. I added the support booting from QSPI-NOR flash in U-boot bootloader source code.Facing the compilation of U-boot build. screen shot is added below

Added the snaps of error and make menu changes. Can any one help me out why it's throwing error?

2.What are the necessary changes in U-boot's k3-am654.dts changes are to be made for QSPI-NOR flash enable?

3. What are  necessary changes to be done in the kernel level?

Can any TI experts help me out here?

  • Hi,
    You query has been assigned to a TI engineer. Please note that response may be delayed due to Christmas and New Year holidays.
  • Hi Varun,

    varun jeevangoudar said:
    My agenda is to boot the AM654x GP EVM from QSPI-NOR flash device. AS explained in the user's guide page no 29,  MT25QL128ABA8E12  chip is already present in EVK.

    as per AM654x TRM, section 4.1.2 Bootloader Modes, the device only supports booting from OSPI port 0 (also when using QSPI or legacy SPI devices), and not from any of the regular SPIx ports. So booting from the on-board MT25QL128ABA8E12 as it is connected on the EVM is not supported. As an alternative you could use the on-board OSPI device for development purposes, and then later replace it with a QSPI device once you have a custom board, and much of the SW and U-Boot configuration will directly carry over from OSPI boot which is already fully enabled and usable.

    Regards, Andreas

  • HI Andreas,

    Thanks for the useful information.Now i have written tiboot3.bin tispl.bin,u-boot.img, sysfw.itb into OSPI Flash. My one more concern is writing Kernel Image and DTB files to OSPI.

    I followed this link http://software-dl.ti.com/processor-sdk-linux/esd/docs/06_00_00_07/linux/Foundational_Components_U-Boot.html#qspi 

    Under section 3.1.1.14.4. Supported Boot Modes. They have not clearly mentioned how to copy Image and DTB files of Rootfs to flash.

    Once my device boots from OSPI it stops at kernel saying following error:

    SF: Detected mt35xu512aba with page size 256 Bytes, erase size 128 KiB, total 64 MiB
    mtd: partition "ospi.rootfs" extends beyond the end of device "nor0" -- size truncated to 0x3800000
    ubi0: attaching mtd7
    ubi0: scanning is finished
    ubi0 error: ubi_read_volume_table: the layout volume was not found
    ubi0 error: ubi_attach_mtd_dev: failed to attach mtd7, error -22
    UBI error: cannot attach mtd7
    UBI error: cannot initialize UBI, error -22
    UBI init error 22
    Please check, if the correct MTD partition is used (size big enough?)
    UBIFS error (pid: 1): cannot open "ubi:rootfs", error -19
    Error reading superblock on volume 'ubi:rootfs' errno=-19!
    ubifsmount - mount UBIFS volume

    Please help me to solve this problem

  • varun jeevangoudar said:
    mtd: partition "ospi.rootfs" extends beyond the end of device "nor0" -- size truncated to 0x3800000

    That is not good. What rootfs image are you trying to program? As per error message it would need to be smaller than 0x3800000. I don't think we currently provide one as part of the Processor SDK Linux for AM654x, so you would need to trim down an existing image or build your own.

    Regards, Andreas

  • HI Andreas,

    Can you provide me useful information on How to load kernel Image and DT binaries into OSPI? 

    As of now as a part of procedure mentioned in http://software-dl.ti.com/processor-sdk-linux/esd/docs/06_00_00_07/linux/Foundational_Components_U-Boot.html#qspi in the section  3.1.1.14.4. Supported Boot Modes , only 4 binaries of boot loader  tiboot3.bin, tispl.bin, u-boot.img and sysfw.itb are given. 

    So currently i'm able to load those only four Bootloader images to OSPI.

  • Varun,

    the way U-Boot is setup for AM654x EVM is that during OSPI boot the Kernel and the image are loaded from within the UBI image, which gets mounted first via the ospi.rootfs MTD partition. If you examine the U-Boot environment (env print), specifically the $bootcmd variable and everything that happens from there for the $boot=ubi case you find definitions of interest such as...

    => echo $init_ubi
    run args_all args_ubi; sf probe; ubi part ospi.rootfs; ubifsmount ubi:rootfs;
    => echo $get_kern_ubi
    ubifsload ${loadaddr} ${bootdir}/${name_kern}
    => echo $get_fdt_ubi
    ubifsload ${fdtaddr} ${bootdir}/${name_fdt}

    So if you keep your Kernel and DTB file(s) in the /boot folder of your UBI image then those ENV scripts should just work.

    We don't currently provide a ready-to-use OSPI-compatible image as part of the SDK hence also the lack of specific instructions at this time but I hope these explanations give you something to work with.

    Regards, Andreas