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/AM3354: U-boot fails on custom board

Part Number: AM3354

Tool/software: Linux

Hello Sir,

I am using AM3354BZCZD80  processor . I am using yocto build uboot source . The generated MLO AND uboot.img is not booting my board ,although i can boot the beaglebone black (AM3358bzcz100) with that image. while configuring i had used am335x_evm_defconfig . Can you give me any idea where and all i do have to concentrate for AM3354BZCZD80

CONFIG_ARM=y
CONFIG_AM33XX=y
CONFIG_TARGET_AM335X_EVM=y
CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_DEFAULT_DEVICE_TREE="am335x-evm"
CONFIG_SPL=y
CONFIG_SPL_STACK_R=y
CONFIG_SYS_EXTRA_OPTIONS="NAND"
CONFIG_HUSH_PARSER=y
CONFIG_AUTOBOOT_KEYED=y
CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n"
CONFIG_AUTOBOOT_DELAY_STR="d"
CONFIG_AUTOBOOT_STOP_STR=" "
CONFIG_CMD_BOOTZ=y
# CONFIG_CMD_IMLS is not set
CONFIG_CMD_ASKENV=y
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_MMC=y
CONFIG_CMD_SF=y
CONFIG_CMD_SPI=y
CONFIG_CMD_I2C=y
CONFIG_CMD_USB=y
CONFIG_CMD_DFU=y
CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_OF_CONTROL=y
CONFIG_DM_MMC=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_EXT4=y
CONFIG_CMD_EXT4_WRITE=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_DM_ETH=y
CONFIG_SYS_NS16550=y
CONFIG_TIMER=y
CONFIG_OMAP_TIMER=y
CONFIG_USB=y
CONFIG_USB_MUSB_HOST=y
CONFIG_USB_MUSB_GADGET=y
CONFIG_USB_GADGET=y
CONFIG_RSA=y
CONFIG_FIT=y
CONFIG_SPL_OF_LIBFDT=y
CONFIG_SPL_LOAD_FIT=y
CONFIG_OF_LIST="am335x-evm am335x-bone am335x-boneblack am335x-evmsk am335x-bonegreen am335x-icev2"
CONFIG_DM_NAND=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
CONFIG_G_DNL_VENDOR_NUM=0x0451
CONFIG_G_DNL_PRODUCT_NUM=0xd022
CONFIG_MISC=y
CONFIG_DM_USB=y
CONFIG_USB_MUSB_TI=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_CMD_TIME=y
CONFIG_DM_I2C=y
CONFIG_SPL_YMODEM_SUPPORT=y

with regards

pranav

  • Please post your boot log.
  • Sir ,
    sorry but I am not getting anything on the console port while using AM3354BZCZD80. could you specify which log you want.

    with regards
    pranav
  • Hello pranav,

    Please, apply this patch and your board will boot.

    cd <Processor SDK>/board-support/u-boot-<version>/
    git apply 0001-Hardcode-EEPROM-board-name-to-A335BNLT.patch

    Best regards,
    Kemal

  • Hello Kemal ,

    Thank you for your response, I tried with that when i made it static with "A335BNLT"  the uboot starts but it stucks while loading the dtb .Because  it tried to search the dtb file at /boot location even if i placed the images over there it was not able to load the kernel images it .

    But when I made a static name as A335X_SK  it boots the device completely but after sone time it crashes .

    this is the block of code what i modified

    int __maybe_unused ti_i2c_eeprom_am_get(int bus_addr, int dev_addr)
    {
        
        //int rc;
        struct ti_am_eeprom am_ep;
        struct ti_common_eeprom *ep;

        ep = TI_EEPROM_DATA;
    #ifndef CONFIG_SPL_BUILD
        if (ep->header == TI_EEPROM_HEADER_MAGIC)
            return 0; /* EEPROM has already been read */
    #endif

        /* Initialize with a known bad marker for i2c fails.. */
        ep->header = TI_DEAD_EEPROM_MAGIC;
        ep->name[0] = 0x0;
        ep->version[0] = 0x0;
        ep->serial[0] = 0x0;
        ep->config[0] = 0x0;

        //rc = ti_i2c_eeprom_get(bus_addr, dev_addr, TI_EEPROM_HEADER_MAGIC,
                   //    sizeof(am_ep), (uint8_t *)&am_ep);
        //if (rc)
        //    return rc;

        ep->header = 0xEE3355AA;
        strlcpy(ep->name, "A335X_SK", TI_EEPROM_HDR_NAME_LEN + 1);
        ti_eeprom_string_cleanup(ep->name);

        /* BeagleBone Green '1' eeprom, board_rev: 0x1a 0x00 0x00 0x00 */
        if (am_ep.version[0] == 0x1a && am_ep.version[1] == 0x00 &&
            am_ep.version[2] == 0x00 && am_ep.version[3] == 0x00)
            strlcpy(ep->version, "BBG1", TI_EEPROM_HDR_REV_LEN + 1);
        else
            strlcpy(ep->version, am_ep.version, TI_EEPROM_HDR_REV_LEN + 1);
        ti_eeprom_string_cleanup(ep->version);
        strlcpy(ep->serial, am_ep.serial, TI_EEPROM_HDR_SERIAL_LEN + 1);
        ti_eeprom_string_cleanup(ep->serial);
        strlcpy(ep->config, am_ep.config, TI_EEPROM_HDR_CONFIG_LEN + 1);
        ti_eeprom_string_cleanup(ep->config);

        memcpy(ep->mac_addr, am_ep.mac_addr,
               TI_EEPROM_HDR_NO_OF_MAC_ADDR * TI_EEPROM_HDR_ETH_ALEN);

        return 0;
    }

    ====================================================================

    This is the crash log

    root@am335x-evm:~# [   67.131353] random: nonblocking pool is initialized
    [  131.188064] ------------[ cut here ]------------
    [  131.197228] Kernel BUG at c0429ec0 [verbose debug info unavailable]
    [  131.212100] Internal error: Oops - BUG: 0 [#1] PREEMPT ARM
    [  131.226204] Modules linked in:
    [  131.233645] CPU: 0 PID: 13 Comm: kworker/0:1 Not tainted 4.4.91-g9d9bc78b62 #6
    [  131.249518] Hardware name: Generic AM33XX (Flattened Device Tree)
    [  131.264634] Workqueue: events_power_efficient phy_state_machine
    [  131.279753] task: dc0e8580 ti: dc110000 task.ti: dc110000
    [  131.289783] PC is at mdiobus_free+0x40/0x44
    [  131.298581] LR is at lan87xx_read_status+0x98/0xe8
    [  131.307917] pc : [<c0429ec0>]    lr : [<c042b2e4>]    psr: 600e0013
    [  131.307917] sp : dc111e88  ip : 00000000  fp : dc111ea4
    [  131.332826] r10: 00000000  r9 : dc0f5a80  r8 : 00000000
    [  131.342490] r7 : dcb38800  r6 : 00000000  r5 : 00000040  r4 : dc444000
    [  131.357692] r3 : 001fff00  r2 : 00000011  r1 : 00000000  r0 : dc444000
    [  131.372940] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
    [  131.389005] Control: 10c5387d  Table: 9c500019  DAC: 00000051
    [  131.403790] Process kworker/0:1 (pid: 13, stack limit = 0xdc110208)
    [  131.419340] Stack: (0xdc111e88 to 0xdc112000)
    [  131.428323] 1e80:                   dc444400 00000040 00000000 dcb38800 dc111ec4 dc111ea8
    [  131.445953] 1ea0: c042b2e4 c0429da4 c042b24c dc4445f4 dc44462c dc444400 dc111eec dc111ec8
    [  131.463574] 1ec0: c0427d68 c042b258 c0427a30 dc0f5a80 dc4445f4 c08c8988 dcb38800 00000000
    [  131.481302] 1ee0: dc111f2c dc111ef0 c0046e1c c0427a3c dc0f5a98 c08c8988 c08c8998 00000001
    [  131.499024] 1f00: c08c8988 c08c8988 c08c8998 00000001 dc0f5a98 00000008 dc0f5a80 c08c8988
    [  131.516922] 1f20: dc111f64 dc111f30 c004724c c0046d00 dc0fca40 dc0f5a80 c0047090 00000000
    [  131.534860] 1f40: dc0fca40 dc0f5a80 c0047090 00000000 00000000 00000000 dc111fac dc111f68
    [  131.552794] 1f60: c004c8c0 c004709c 596ef1ef 00000000 dc0fca40 dc0f5a80 00000000 dc111f7c
    [  131.570704] 1f80: dc111f7c 00000000 dc111f88 dc111f88 dc0fca40 c004c7d0 00000000 00000000
    [  131.588730] 1fa0: 00000000 dc111fb0 c000fbb8 c004c7dc 00000000 00000000 00000000 00000000
    [  131.606843] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    [  131.624969] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 745d7dbf db5ffe7d
    [  131.643245] Backtrace:
    [  131.650753] [<c0429d98>] (mdiobus_read) from [<c042b2e4>] (lan87xx_read_status+0x98/0xe8)
    [  131.668899]  r7:dcb38800 r6:00000000 r5:00000040 r4:dc444400
    [  131.684712] [<c042b24c>] (lan87xx_read_status) from [<c0427d68>] (phy_state_machine+0x338/0x444)
    [  131.703521]  r6:dc444400 r5:dc44462c r4:dc4445f4 r3:c042b24c
    [  131.719366] [<c0427a30>] (phy_state_machine) from [<c0046e1c>] (process_one_work+0x128/0x360)
    [  131.738018]  r8:00000000 r7:dcb38800 r6:c08c8988 r5:dc4445f4 r4:dc0f5a80 r3:c0427a30
    [  131.756073] [<c0046cf4>] (process_one_work) from [<c004724c>] (worker_thread+0x1bc/0x594)
    [  131.774372]  r10:c08c8988 r9:dc0f5a80 r8:00000008 r7:dc0f5a98 r6:00000001 r5:c08c8998
    [  131.792477]  r4:c08c8988
    [  131.800059] [<c0047090>] (worker_thread) from [<c004c8c0>] (kthread+0xf0/0x10c)
    [  131.817286]  r10:00000000 r9:00000000 r8:00000000 r7:c0047090 r6:dc0f5a80 r5:dc0fca40
    [  131.835188]  r4:00000000
    [  131.842670] [<c004c7d0>] (kthread) from [<c000fbb8>] (ret_from_fork+0x14/0x3c)
    [  131.859591]  r7:00000000 r6:00000000 r5:c004c7d0 r4:dc0fca40
    [  131.875100] Code: 00000000 00000000 00000000 00000000 (e7f001f2)
    [  131.890958] ---[ end trace 231ebeae7e00ecc0 ]---

    the log which boots the uboot is i doubt whether the issue for crah is ethernet or some other reason.

    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    reading uboot.env

    ** Unable to read "uboot.env" from mmc0:1 **
    Using default environment

    <ethaddr> not set. Validating first E-fuse MAC
    Net:   eth0: ethernet@4a100000
    Warning: usb_ether MAC addresses don't match:
    Address in SROM is         de:ad:be:ef:00:01
    Address in environment is  50:8c:b1:17:48:f1
    , eth1: usb_ether
    Press SPACE to abort autoboot in 2 seconds
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    reading boot.scr
    ** Unable to read file boot.scr **
    reading uEnv.txt
    491 bytes read in 5 ms (95.7 KiB/s)
    Loaded env from uEnv.txt
    Importing environment from mmc0 ...
    Running uenvcmd ...
    reading zImage
    3362040 bytes read in 522 ms (6.1 MiB/s)
    reading am335x-evmsk.dtb
    40617 bytes read in 15 ms (2.6 MiB/s)
    Kernel image @ 0x82000000 [ 0x000000 - 0x334cf8 ]
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       Using Device Tree in place at 88000000, end 8800cea8

    Kindly guide me in moving with the correct direction to resolve the issue .And i also want to know why the static changes are turning the uboot active why it is not accepting the data from eeprom

    with regards

    pranav

  • If you have an EEPROM on your board, you can program it from U-Boot console by using these i2c commands. You can find the AM335X-EVM and AM335X-SK EEPROM memory layouts here and here.
    Please, use the addr2line -f c0429ec0 -e vmlinux command to see which function causes the kernel to go out of process space.
    If your board stucks at this point:
    ## Flattened Device Tree blob at 88000000
    Booting using the fdt blob at 0x88000000
    Using Device Tree in place at 88000000, end 8800cea8
    Unset the fdt_high from U-boot console.