Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

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.

QSPI boot procedure question

According to "GLSDK Software Developers Guide", mk-qspi-boot.sh can flash MLO & u-boot to QSPI flash, and DTB & uImage store in MMC/SD. Also rootfs is mounted from MMC/SD.

I have some questions,

1. It look like system will boot to u-boot from QSPI, then start kernel through MMC/SD, right?

2. In our custom board(with J6), with a NAND flash connected by GPMC interface. May i change the boot procedure => Boot to u-boot from QSPI flash, and start kernel trough NAND flash?

3. If the answer of question 2 is "yes", then what should i do to make it work? 

Regards,

Shawn

  • Shawn

    mk-qspi-boot.sh, what it does is, it flash the MLO, u-boot.img, uImage and DTB into respective partition/offset location in QSPI, and copies the file system into eMMC. So in QSPI boot mode (SYSBOOT pins = QSPI BOOT MODE 00110110), J6 loads the MLO, and checks uImage is valid in QSPI partition and loads the uImage and DTB and jump to kernel. This mode is called as single stage boot mode. (booting SPL->kernel).

    In case uImage is not valid, then load the u-boot and executes u-boot. This is called two stage boot mode (SPL->U-BOOT->kernel).

    Yes, For your requirement, its possible using two stage boot. So, you NO need to load uImage & DTB in QSPI flash (you can modify mk-spi-boot accordingly). 

    So only Flash MLO and u-boot.img into QSPI and set SYSBOOT[7..0] = 00110110. Refer User guide for more info.

    Regards

    Ravi

  • You can also flash QSPI from ubuntu PC using dfu-util. Refer to DFU section in User's Guide.
  • Hi Ravi,

    Thanks for your reply.
    Here are some question need your advice,
    1.In QSPI two-stage boot, i should copy related files(uImage, DTB, rootfs) to NAND flash in order to let system boot into kernel, right?
    2.Is there has any User's Guild about how to flash files into NAND flash?
    3.Currently, QSPI two-stage boot will load kernel from eMMC. What should i modify in order to let system can load kernel from NAND flash.

    Regards,
    Shawn
  • Shawn

    Current existing solution for QSPI boot, you can have MLO, u-boot.img, uImage, DTB in QSPI and rootfs in eMMC or SD card. 

    I have never used NAND. I will come back on NAND releated question.

    Regards

    Ravi

  • Shawn

    NAND is not supported on latest releases.

    Are you able to get to u-boot prompt from QSPI.

    Regards
    Ravi
  • Hi Ravi,

    Based on "Flashing UBoot to QSPI from UBoot" descripted in user guides,

    yes, right now, i can get into u-boot prompt from QSPI boot.

    I have some questions,

    1.So, right now, i can't load kernel from NAND device?

    2.Is there exist any utility can let me read/write NAND device at u-boot prompt or kernel prompt?

    3.On our custom board, we use "MT29F2G16ABAEAWP-AIT" NAND device, is this support by DRA-750?

    Regards,

    Shawn

  • Shawn

    I have not verified NAND on J6 platform. 

    In u-boot, nand command available to read/write to nand memory. Check cmd/nand.c, you must enable CONFIG_CMD_NAND.

    Regards

    Ravi

  • Hi Ravi,

    I try to enable nand command in u-boot
    1.add "CONFIG_CMD_NAND"、"CONFIG_SYS_MAX_NAND_DEVICE"、"CONFIG_SYS_NAND_BASE" these define at ~/J6_SDK/board-support/u-boot/include/configs/xxx.h, (xxx.h is used for our custome board)
    2.try to build image, but got error, which show board_nand_init() undefined reference in nand.c
    board_nand_init() already defined in nand.h, but i don't know why error occur.
    Am i doing right? or i shoud add CONFIG_CMD_NAND in other place?

    Besides, i found there have documents descript how to enable NAND boot at DRA7xx evm, link as below
    patchwork.kernel.org/.../
    I haven't try it, is this the right way to enable NAND boot?

    Regards,
    Shawn
  • Shawn

    You can check the reference code for NAND support for dra7xx in 2014.07 u-boot.
    check boards.cfg, dra7xx_evm_nandboot_config.

    Regards
    Ravi
  • Hi Ravi,

    I check 2014.07 u-boot, boards.cfg, but i can't find "dra7xx_evm_nandboot_config". There are only "dra7xx_evm"、"dra7xx_evm_uart3"、"dra7xx_evm_usbboot"...etc.

    So i still can't enable "nand" command at u-boot. Can you provide more infomation to me to enable this command, thank you.

    Regards,

    Shawn

  • Hi Ravi,

    Update the latest status. I try to enable NAND at dra7xx evm board, and have the same problem.
    After i reference the info from here=> lists.denx.de/.../184174.html
    I add more CONFIG at board-support/u-boot/include/configs/dra7xx_evm.h
    Finally, i can use nand command at u-boot prompt.

    But another problem happend, i use "nand info" to probe nand device, got nothing.
    Do you know what might be the reason about this?

    P.S. i am working on DRA7xx evm board. It should have NAND device(MT29F2G16AADWP) on it.

    Regards,
    Shawn