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.

Linux/AM3358: regarding mlo and uboot changes for am33xx sdk .

Part Number: AM3358

Tool/software: Linux

Hello Ti ,

we developed a custom board with a reference of beaglebone . 

from web resource ,i got a Mlo , uboot.img  files .

Through am33xx sdk , ran create_sd_card.sh script created boot and rootfs partition to SD card .

In next step i removed Mlo and Uboot.img files which are created and replaced the mlo and uboot.img files which i got through web.

with that i files i able to directly boot from sd card with our custom board .

kindly suggest what are required changes to be made for uboot in sdk folder  as per working files for my board .

uboot console log follows :

=> printenv
arch=arm
args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype}
baudrate=115200
board=am335x
board_name=BBBW
board_rev=BWA5
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_efi_binary=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr ${fdtcontroladdr};fi;load ${devtype} ${devnum}:${distro_bootpart} ${ki
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
boot_fdt=try
boot_fit=0
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_targets=mmc0 legacy_mmc0 mmc1 legacy_mmc1 nand0 pxe dhcp
bootcmd=if test ${boot_fit} -eq 1; then run update_to_fit; fi; run findfdt; run init_console; run envboot; run distro_bootcmd
bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a ;
bootcmd_legacy_mmc0=setenv mmcdev 0; setenv bootpart 0:2 ; run mmcboot
bootcmd_legacy_mmc1=setenv mmcdev 1; setenv bootpart 1:2 ; run mmcboot
bootcmd_mmc0=setenv devnum 0; run mmc_boot
bootcmd_mmc1=setenv devnum 1; run mmc_boot
bootcmd_nand=run nandboot
bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
bootcount=3
bootdelay=2
bootdir=/boot
bootenvfile=uEnv.txt
bootfile=zImage
bootm_size=0x10000000
bootpart=0:2
bootscript=echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr}
console=ttyO0,115200n8
cpu=armv7
dfu_alt_info_emmc=rawemmc raw 0 3751936;boot part 1 1;rootfs part 1 2;MLO fat 1 1;MLO.raw raw 0x100 0x200;u-boot.img.raw raw 0x300 0x1000;u-env.raw raw 0x1300 0x200;spl1
dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw raw 0x100 0x200;u-boot.img.raw raw 0x300 0x1000;u-env.raw raw 0x1300 0x200;spl-os-args.raw raw 0x15001
dfu_alt_info_nand=SPL part 0 1;SPL.backup1 part 0 2;SPL.backup2 part 0 3;SPL.backup3 part 0 4;u-boot part 0 5;u-boot-spl-os part 0 6;kernel part 0 8;rootfs part 0 9
dfu_alt_info_ram=kernel ram 0x80200000 0x4000000;fdt ram 0x80f80000 0x80000;ramdisk ram 0x81000000 0x4000000
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
efi_dtb_prefixes=/ /dtb/ /dtb/current/
envboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootscript; then run bootscript;else if run loadbootenv; then echo Loade;
eth1addr=98:5d:ad:cf:7b:a3
ethact=cpsw
ethaddr=98:5d:ad:cf:7b:a1
fdt_addr_r=0x88000000
fdtaddr=0x88000000
fdtcontroladdr=9df11038
fdtfile=undefined
findfdt=if test $board_name = A335BONE; then setenv fdtfile am335x-bone.dtb; fi; if test $board_name = A335BNLT; then setenv fdtfile am335x-boneblack.dtb; fi; if test $
finduuid=part uuid mmc ${bootpart} uuid
fit_bootfile=fitImage
fit_loadaddr=0x87000000
ice_mii=mii
importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize}
init_console=if test $board_name = A335_ICE; then setenv console ttyO3,115200n8;else setenv console ttyO0,115200n8;fi;
kernel_addr_r=0x82000000
load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
loadaddr=0x82000000
loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr
loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
loadfit=run args_mmc; bootm ${loadaddr}#${fdtfile};
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz
mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi
mmcboot=mmc dev ${mmcdev}; setenv devnum ${mmcdev}; setenv devtype mmc; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadimage; then if test ${boot_;
mmcdev=0
mmcloados=run args_mmc; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdtaddr}; else if test ${boot_fdt} = try; t;
mmcrootfstype=ext4 rootwait
mtdids=nand0=nand.0
mtdparts=mtdparts=nand.0:128k(NAND.SPL),128k(NAND.SPL.backup1),128k(NAND.SPL.backup2),128k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),1m(NAND.u-boot),128k(NAND.u-boot-e)
nandargs=setenv bootargs console=${console} ${optargs} root=${nandroot} rootfstype=${nandrootfstype}
nandboot=echo Booting from nand ...; run nandargs; nand read ${fdtaddr} NAND.u-boot-spl-os; nand read ${loadaddr} NAND.kernel; bootz ${loadaddr} - ${fdtaddr}
nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048
nandrootfstype=ubifs rootwait=1
netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
netboot=echo Booting from network ...; setenv autoload no; dhcp; run netloadimage; run netloadfdt; run netargs; bootz ${loadaddr} - ${fdtaddr}
netloadfdt=tftp ${fdtaddr} ${fdtfile}
netloadimage=tftp ${loadaddr} ${bootfile}
nfsopts=nolock
partitions=uuid_disk=${uuid_gpt_disk};name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}
pxefile_addr_r=0x80100000
ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot} rootfstype=${ramrootfstype}
ramboot=echo Booting from ramdisk ...; run ramargs; bootz ${loadaddr} ${rdaddr} ${fdtaddr}
ramdisk_addr_r=0x88080000
ramroot=/dev/ram0 rw
ramrootfstype=ext2
rdaddr=0x88080000
rootpath=/export/rootfs
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${de
scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; for prefix in ${efi_e
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extli
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${se
scriptaddr=0x80000000
soc=am33xx
spiargs=setenv bootargs console=${console} ${optargs} root=${spiroot} rootfstype=${spirootfstype}
spiboot=echo Booting from spi ...; run spiargs; sf probe ${spibusno}:0; sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; bootz ${loadaddr}
spibusno=0
spiimgsize=0x362000
spiroot=/dev/mtdblock4 rw
spirootfstype=jffs2
spisrcaddr=0xe0000
static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
stderr=serial@44e09000
stdin=serial@44e09000
stdout=serial@44e09000
update_to_fit=setenv loadaddr ${fit_loadaddr}; setenv bootfile ${fit_bootfile}
usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi
usbnet_devaddr=98:5d:ad:cf:7b:a1
vendor=ti
ver=U-Boot 2018.01 (May 02 2019 - 10:52:55 +0530)

Environment size: 9860/131068 bytes

  • Manoj,

    Where did you get the other bootloader? Can you get access to the source so that you can compare their settings with those of the SDK? If not, I'm afraid this will be pretty difficult to do with binaries.

    Thanks.
  • Rob,

    kindly help me what are the required changes to be made in sdk .so can boot linux ti am3xx sdk from sd card directly .
  • Manoj,

    The main thing would be the pinmuxing of the pins used for the SD Card interface. The SDK is designed to boot from MMC/SD by default.

    I hope this helps.
  • Hello RonB,

    following log for our custom board . I used the same sd card , able to boot sdk linux .


    U-Boot 2018.01-g313dcd69c2 (Dec 16 2018 - 09:01:09 +0000)

    CPU : AM335X-GP rev 2.1
    Model: TI AM335x BeagleBone Black
    DRAM: 512 MiB
    NAND: 0 MiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    ** Bad device mmc 0 **
    Using default environment

    <ethaddr> not set. Validating first E-fuse MAC
    Net: Could not get PHY for cpsw: addr 0
    cpsw, usb_ether
    Hit any key to stop autoboot: 0
    switch to partitions #0, OK
    mmc1(part 0) is current device
    ** No partition table - mmc 1 **
    switch to partitions #0, OK
    mmc1(part 0) is current device
    SD/MMC found on device 1
    ** No partition table - mmc 1 **
    ## Error: "bootcmd_nand0" not defined
    starting USB...
    USB0: Port not available.
    using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
    MAC 98:5d:ad:cf:7b:a1
    HOST MAC de:ad:be:ef:00:00
    RNDIS ready
    missing environment varia+-----------------------------+
    Retrieving file: pxelinux| |
    using musb-hdrc, OUT ep1o| Cannot open /dev/ttyUSB0! |
    MAC 98:5d:ad:cf:7b:a1 | |
    HOST MAC de:ad:be:ef:00:0+-----------------------------+
    RNDIS ready
    Retrieving file: pxelinux.cfg/00000000
    using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
    MAC 98:5d:ad:cf:7b:a1
    HOST MAC de:ad:be:ef:00:00

  • Manoj,

    I'm sorry, I don't follow your post.

    manoj sai said:
    following log for our custom board . I used the same sd card , able to boot sdk linux .

    The log seems contradictory to this statement. The log seems to show a failure, and NOT booting the SDK. What boots the SDK?

    I'm sorry, please help me understand.

  • sorry Ronb ,

    I missed to type that ,I able to able to boot sdk linux through beaglebone . but not able to do with our custom board with same reference design of beagle bone .

    with our custom board , i am getting following error while boot
    U-Boot 2018.01-g313dcd69c2 (Dec 16 2018 - 09:01:09 +0000)

    CPU : AM335X-GP rev 2.1
    Model: TI AM335x BeagleBone Black
    DRAM: 512 MiB
    NAND: 0 MiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    ** Bad device mmc 0 **
    Using default environment

    <ethaddr> not set. Validating first E-fuse MAC
    Net: Could not get PHY for cpsw: addr 0
    cpsw, usb_ether
    Hit any key to stop autoboot: 0
    switch to partitions #0, OK
    mmc1(part 0) is current device
    ** No partition table - mmc 1 **
    switch to partitions #0, OK
    mmc1(part 0) is current device
    SD/MMC found on device 1
    ** No partition table - mmc 1 **
    ## Error: "bootcmd_nand0" not defined
    starting USB...
    USB0: Port not available.
    using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
    MAC 98:5d:ad:cf:7b:a1
    HOST MAC de:ad:be:ef:00:00
    RNDIS ready
    missing environment varia+-----------------------------+
    Retrieving file: pxelinux| |
    using musb-hdrc, OUT ep1o| Cannot open /dev/ttyUSB0! |
    MAC 98:5d:ad:cf:7b:a1 | |
    HOST MAC de:ad:be:ef:00:0+-----------------------------+
    RNDIS ready
    Retrieving file: pxelinux.cfg/00000000
    using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in
    MAC 98:5d:ad:cf:7b:a1
    HOST MAC de:ad:be:ef:00:00
  • Hello Ronb sir,

    waiting for your response .


    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    ** Bad device mmc 0 **
    Using default environment .

    what are the causes for this problem .

    while reading mmc info , it displays nothing .
  • Manoj,

    Sorry for the delay. Have you checked the H/W? Are you seeing power, clock and data signals as expected on this board?

    From a S/W perspective, U-Boot seems to not be able to exchange information with the card.