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.

AM3352: Boot questions

Part Number: AM3352


With latest Processor SDK 6.0 or 5.3:

#1. When to use MLO-am335x-evm or u-boot-spl.bin-am335x-evm?

#2. What is u-bot-spl-os and what is u-boot-env? where are those files?

#3. I want to use NAND boot, how to set UBOOT bootcmd and bootargs?

  • Hello Tony,

    Tony Tang said:
    #1. When to use MLO-am335x-evm or u-boot-spl.bin-am335x-evm?

    You use the u-boot-spl.bin-am335x-evm file to boot your board through UART. Please, see this link fore more details. For the rest of boot modes like MMC, NAND or TFTP the MLO-am335x-evm file is used.


    Tony Tang said:
    #2. What is u-bot-spl-os and what is u-boot-env? where are those files?

    u-boot-spl-os is a place where you save the kernel args when you use NAND falcon mode or it is used to save the device tree for a normal boot. u-boot-env is a place where the U-Boot environment is saved, it gets automatically generated when you type saveenv command and it also places its own backup copy to u-boot-env.backup. Please, see <Processor SDK>/board-support/u-boot-<version>/board/ti/am335x/README file for falcon mode.


    Tony Tang said:
    #3. I want to use NAND boot, how to set UBOOT bootcmd and bootargs?

    Keep the nandargs as default, just set the bootcmd to run nandboot.

    => setenv nandargs 'setenv bootargs console=${console} ${optargs} root=${nandroot} rootfstype=${nandrootfstype}'
    => setenv bootcmd run nandboot
    => saveenv

    You may also find this thread useful to achieve your goal.

    Best regards,
    Kemal

  • I boot from MMC uboot, tftp MLO-am335x-evm, u-boot-am335x-evm.img, zImage-am335x-evm.bin, arago-tiny-image-am335x-evm.ubi and flash to NAND according to mtdparts partitions.

    Then set uboot args 

    => setenv nandargs 'setenv bootargs console=${console} ${optargs} root=${nandroot} rootfstype=${nandrootfstype}'
    => setenv bootcmd run nandboot
    => saveenv

    But can't saveenv, . why save to FAT? seems it try to save to MMC.

    Can boot from NAND with flashed uboot, but return same error when saveenv with booting from NAND Uboot.

  • Kernal,

    I tried with PSDK 5.03, similar problem, saveenv default to MMC.

    BTW, I can boot up with run nandboot. just can't saveenv to NAND.

  • Hello Tony,

    To save the environment in a NAND device, please build a new U-Boot image by selecting these menuconfig options.

    $ cd <Processor SDK>/
    $ make u-boot_clean && make u-boot
    $ cd board-support/u-boot-<version>/
    $ ARCH=arm make menuconfig
    Disable [ ] Environment is in a FAT filesystem and enable [*] Environment in a NAND device.

    Environment  ---> [ ] Environment is in a FAT filesystem
    Environment  ---> [*] Environment in a NAND device
    Exit
    Exit
    Do you wish to save your new configuration?
    < Yes >
    $ cp .config configs/am335x_evm_defconfig
    $ cd ../../
    $ make u-boot_clean && make u-boot

    Flash the board with the newly generated MLO and u-boot.img.

    Best regards,
    Kemal

  • Kemal,

    with the Processor SDK6, I can't build the U-boot. no matter with the make command as you gave under root director of the PSDK, or export CROSS_COMPILE on command line, report the same error. 

    And I do it under Processor SDK 5.03, it is OK.

  • On Processor SDK5.03. the final step $ make u-boot_clean && make u-boot reports errors:

  • Hello Tony,

    Please, apply this patch to fix this issue.

    cd <Processor SDK>/board-support/u-boot-<version>/
    git apply 0001-AM335x-Save-the-environment-in-a-NAND-device.patch

    Best regards,
    Kemal

  • Please, see the linked articles in this post for Processor SDK 6.0. You need to install the required host packages like flex and bison.

    host$ sudo apt-get install build-essential autoconf automake bison flex libssl-dev bc