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 showing data abort error

Part Number: AM3354
Other Parts Discussed in Thread: TPS65217, AM3517

Tool/software: Linux

I running the Kernel version 4.9.28 and uboot 2017.1 in the custom board which design is similar to beagle-bone black, kernel is not booting. U-boot is booting with some warnings, kindly check the logs stated below.

U-Boot SPL 2017.01-00319-g7752743-dirty (Sep 22 2017 - 10:28:50)
tps65217: Set UVLO
Trying to boot from MMC1
spl: falcon_args_file not set in environment, falling back to default
reading args
spl_load_image_fat_os: error reading image args, err - -1
reading u-boot.img
reading u-boot.img


U-Boot 2017.01-00319-g7752743-dirty (Sep 22 2017 - 10:28:50 +0530)

CPU  : AM335X-GP rev 2.1
I2C:   ready
DRAM:  512 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
** First descriptor is NOT a primary desc on 1:1 **
Net:   <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
Error: usb_ether address not set.

Press SPACE to abort autoboot in 2 seconds
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
reading uEnv.txt
3051 bytes read in 154 ms (18.6 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc ...

I tried running below commands to boot zimage:

1. Press SPACE to abort autoboot in 2 seconds
=> run mmcboot
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
reading uEnv.txt
3051 bytes read in 154 ms (18.6 KiB/s)
Loaded environment from uEnv.txt
Importing environment from mmc ...
(Note:not going forward after this)
2. Press SPACE to abort autoboot in 2 seconds
=> go 0x80200000
## Starting application at 0x80200000 ...
undefined instruction
pc : [<801ff000>]          lr : [<80200004>]
reloc pc : [<60aac000>]    lr : [<60aad004>]
sp : 9df32d78  ip : 0000001c     fp : 00000002
r10: 9ffa0b58  r9 : 9df32ed8     r8 : 9df360c8
r7 : 9ff5450d  r6 : 00000002     r5 : 80200000  r4 : 9df360cc
r3 : 80200000  r2 : 9df360cc     r1 : 9df360cc  r0 : 00000001
Flags: nzCv  IRQs off  FIQs on  Mode SVC_32
Resetting CPU ...

resetting ...
(Note:not going forward after this)
Please find the attached uEnv file.
0714.uEnv_uboot.txt
=> printenv
arch=arm
baudrate=115200
board=htouch
board_name=htouch
boot_fdt=try
bootargs=console=ttyO0,115200n8 vt.global_cursor_default=0 root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait
bootcmd=run mmcboot;setenv mmcdev 1; setenv bootpart 1:2; run mmcboot;run nandboot;
bootcount=1
bootdelay=2
bootdir=/boot
bootenv=uEnv.txt
bootfile=zImage
bootpart=0:2
console=ttyO0,115200n8
cpu=armv7
devnum=0
devtype=mmc
dfu_alt_info=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw raw 0x100 0x100;u-boot.img.raw raw 0x300 0x400;spl-os-args.raw raw 0x80 0x80;spl-os-image.raw raw 0x900 0x2000;spl-os-args fat 0 1;spl-os-ima1
dfu_alt_info_emmc=rawemmc raw 0 3751936
dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw raw 0x100 0x100;u-boot.img.raw raw 0x300 0x400;spl-os-args.raw raw 0x80 0x80;spl-os-image.raw raw 0x900 0x2000;spl-os-args fat 0 1;spl-os1
dfu_alt_info_ram=kernel ram 0x80200000 0x4000000;fdt ram 0x80f80000 0x80000;ramdisk ram 0x81000000 0x4000000
ethact=cpsw
ethaddr=d0:ff:50:0b:c7:51
fdt_high=0xffffffff
fdtaddr=0x80F80000
fdtfile=htouch.dtb
fileaddr=80200000
filesize=583e0
gatewayip=192.168.1.1
importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $filesize
ipaddr=192.168.1.101
loadaddr=0x80200000
loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}
loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz
mmcargs=setenv bootargs console=${console} ${optargs} root=${mmcroot} rootfstype=${mmcrootfstype}
mmcboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootenv; then echo Loaded environment from ${bootenv};run importbootenv;fi;if test -n $uenvcmd; then echo Ru;
mmcdev=0
mmcloados=run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdtaddr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot loa;
mmcroot=/dev/mmcblk0p2 ro
mmcrootfstype=ext4 rootwait
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; tftp ${loadaddr} ${bootfile}; tftp ${fdtaddr} ${fdtfile}; run netargs; bootz ${loadaddr} - ${fdtaddr}
nfsopts=nolock
optargs=vt.global_cursor_default=0
ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot} rootfstype=${ramrootfstype}
ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M
ramrootfstype=ext2
rdaddr=0x81000000
rootpath=/export/rootfs
serverip=192.168.1.100
soc=am33xx
spiargs=setenv bootargs console=${console} ${optargs} root=${spiroot} rootfstype=${spirootfstype}
spibusno=0
spiimgsize=0x362000
spiroot=/dev/mtdblock4 rw
spirootfstype=jffs2
spisrcaddr=0xe0000
static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
stderr=ns16550_serial
stdin=ns16550_serial
stdout=ns16550_serial
usbnet_devaddr=d0:ff:50:0b:c7:51
vendor=hetronic
ver=U-Boot 2017.01-00319-g7752743-dirty (Sep 22 2017 - 10:28:50 +0530)

Environment size: 3426/131067 bytes

  • Hi,
    if your custom board is similar to BBB, can you try to boot the BBB's uboot and kernel binaries on your custom board? Share your observations.

    thanks,
    Prabhuraj
    BlackPepper Technologies
  • Hi,
    I tried the BBB's binaries, it is showing nothing . Even uboot is not booting. The binaries i tried is working in BBB.
  • In the same board, 3.14 kernel is running properly. Now i want to upgrade it to 4.9.28. In 3.14 kernel the loadaddr is 0x80200000. So address should be correct.
  • Press SPACE to abort autoboot in 2 seconds
    => loadx
    ## Ready for binary (xmodem) download to 0x80200000 at 115200 bps...
    C mode, 30847(SOH)/0(STX)/0(CAN) packets, 1 retries
    ## Total Size = 0x003c3f50 = 3948368 Bytes
    => go 0x80200000
    ## Starting application at 0x80200000 ...

    I loaded kernel via xmodem, now the data abort error is not coming. But kernel is hanging after starting kernel

    => bootz

    Starting kernel ...
  • Have you loaded the fdt at address 0x88000000?
  • I loaded via xmodem, it is taking only loadaddr(0x80200000). How i can load fdt addr via xmodem. Tftp booting is not available in my board.
  • See the usage, there is an offset which can be changed.

    => help loadx
    loadx - load binary file over serial line (xmodem mode)

    Usage:
    loadx [ off ] [ baud ]
    - load binary file over serial line with offset 'off' and baudrate 'baud'
  • Thank you for ur response. It is helpful for me upload dtb via xmodem.

    But still it seems like, it is not accepting the dts. I tried with am335x_boneblack.dtb and the custom board dts file(which is working fine in 3.14 kernel).

    => bootz

    Starting kernel ...


    Error: unrecognized/unsupported machine ID (r1 = 0x0000157d).

    Available machine support:

    ID (hex) NAME
    ffffffff Generic DT based system
    ffffffff Generic DRA72X (Flattened Device Tree)
    ffffffff Generic DRA74X (Flattened Device Tree)
    ffffffff Generic AM43 (Flattened Device Tree)
    ffffffff Generic OMAP5 (Flattened Device Tree)
    ffffffff Generic OMAP4 (Flattened Device Tree)
    ffffffff Generic AM33XX (Flattened Device Tree)
    ffffffff Generic ti816x (Flattened Device Tree)
    ffffffff Generic ti814x (Flattened Device Tree)
    ffffffff Generic AM3517 (Flattened Device Tree)
    ffffffff Generic OMAP3-GP (Flattened Device Tree)
    ffffffff Generic OMAP36xx (Flattened Device Tree)
    ffffffff Generic OMAP3 (Flattened Device Tree)
    ffffffff Nokia RX-51 board
    ffffffff Generic OMAP2430 (Flattened Device Tree)
    ffffffff Generic OMAP2420 (Flattened Device Tree)

    Please check your kernel config and/or bootloader.

    As in theory Device Tree files should work across kernel versions, it is very likely that your 3.14 Device Tree file simply won't work as-is with Linux 4.9, i have to adjust it. But unable to get how to modify it.. Can u please help.
  • You are not passing the fdt address to bootz command. Please, try this line.
    bootz ${loadaddr} - ${fdtaddr}

  • Press SPACE to abort autoboot in 2 seconds
    => bootz 0x80200000 - 0x88000000
    ## Flattened Device Tree blob at 88000000
    Booting using the fdt blob at 0x88000000
    reserving fdt memory region: addr=88000000 size=9000
    Using Device Tree in place at 88000000, end 8800bfff

    Starting kernel ...

    After few seconds, it is restarting automatically. It is hanging in Starting kernel, i tried enabling earlyprintk. please suggest.
  • After loaded kernel and dtb via xmodem, i tried go command. KIndly check the below log.

    Press SPACE to abort autoboot in 2 seconds
    => loadx 0x80200000 115200
    ## Ready for binary (xmodem) download to 0x80200000 at 115200 bps...
    C mode, 32836(SOH)/0(STX)/0(CAN) packets, 1 retries
    ## Total Size = 0x004021a8 = 4202920 Bytes
    => loadx 0x88000000 115200
    ## Ready for binary (xmodem) download to 0x88000000 at 115200 bps...
    C mode, 282(SOH)/0(STX)/0(CAN) packets, 1 retries
    ## Total Size = 0x00008cfb = 36091 Bytes
    => go
    go - start application at address 'addr'

    Usage:
    go addr [arg ...]
    - start application at address 'addr'
    passing 'arg' as arguments
    => go 0x80200000
    ## Starting application at 0x80200000 ...

    Error: unrecognized/unsupported machine ID (r1 = 0x9df370cc).

    Available machine support:

    ID (hex) NAME
    ffffffff Generic DT based system
    ffffffff Generic DRA72X (Flattened Device Tree)
    ffffffff Generic DRA74X (Flattened Device Tree)
    ffffffff Generic AM43 (Flattened Device Tree)
    ffffffff Generic OMAP5 (Flattened Device Tree)
    ffffffff Generic OMAP4 (Flattened Device Tree)
    ffffffff Generic AM33XX (Flattened Device Tree)
    ffffffff Generic ti816x (Flattened Device Tree)
    ffffffff Generic ti814x (Flattened Device Tree)
    ffffffff Generic AM3517 (Flattened Device Tree)
    ffffffff Generic OMAP3-GP (Flattened Device Tree)
    ffffffff Generic OMAP36xx (Flattened Device Tree)
    ffffffff Generic OMAP3 (Flattened Device Tree)
    ffffffff Nokia RX-51 board
    ffffffff Generic OMAP2430 (Flattened Device Tree)
    ffffffff Generic OMAP2420 (Flattened Device Tree)

    Please check your kernel config and/or bootloader.
  • Please, try this command:
    => bootz 0x80200000 - 0x88000000
  • => bootz 0x80200000 - 0x88000000
    ## Flattened Device Tree blob at 88000000
    Booting using the fdt blob at 0x88000000
    Using Device Tree in place at 88000000, end 8800bcfa

    Starting kernel ...

    Kindly check the second last post from me...already posted there. Please suggest, what i am missing and how to proceed.
  • Maybe the device tree doesn't match your hardware or the console messages are router to different tty. Please, check this post.

  • In 3.14 kernel with the same board, dtb is working fine. Why it is taking same dtb(compiled for 4.9 kernel)..?
  • why it is not taking the same dtb in 4.9.28 kernel..?
  • Because the dts needs to be recompiled within the kernel, which will run on it.
  • Yes, i complied my .dts file under 4.9.28 kernel, it generated .dtb. The compile .dtb for 4.9.28 kernel only i used. Can u please explain what is recompiled within the kernel...?
  • Can u help me to resolve the dts problem in 4.9 kernel..!

    1.How can i find out which part in dts is not matching..?
    2.Why it is showing unrecognized/unsupported machine id..?
    3.I tried with am335x-beaglebone.dtb, since my custom board design is similar to beagle bone board. But the error is same.
    4.Did i have to set machine id anywhere..?

    Error: unrecognized/unsupported machine ID (r1 = 0x9df370cc).

    Available machine support:

    ID (hex) NAME
    ffffffff Generic DT based system
    ffffffff Generic DRA72X (Flattened Device Tree)
    ffffffff Generic DRA74X (Flattened Device Tree)
    ffffffff Generic AM43 (Flattened Device Tree)
    ffffffff Generic OMAP5 (Flattened Device Tree)
    ffffffff Generic OMAP4 (Flattened Device Tree)
    ffffffff Generic AM33XX (Flattened Device Tree)
    ffffffff Generic ti816x (Flattened Device Tree)
    ffffffff Generic ti814x (Flattened Device Tree)
    ffffffff Generic AM3517 (Flattened Device Tree)
    ffffffff Generic OMAP3-GP (Flattened Device Tree)
    ffffffff Generic OMAP36xx (Flattened Device Tree)
    ffffffff Generic OMAP3 (Flattened Device Tree)
    ffffffff Nokia RX-51 board
    ffffffff Generic OMAP2430 (Flattened Device Tree)
    ffffffff Generic OMAP2420 (Flattened Device Tree)

    Please check your kernel config and/or bootloader.
  • madhu sundar said:

    1.How can i find out which part in dts is not matching..?


    Compare the am335x-beaglebone.dts with your working device tree from kernel 3.14. Start from scratch, create the general nodes then add the other peripherals in groups or one by one.
    madhu sundar said:

    2.Why it is showing unrecognized/unsupported machine id..?

    When you are not using bootz to start the kernel with device tree specified and just jump to that address with go command. The kernel thinks that you are booting with ATAGS then that is the reason why it prints that unrecognized/unsupported machine id.
    madhu sundar said:

    3.I tried with am335x-beaglebone.dtb, since my custom board design is similar to beagle bone board. But the error is same.

    Custom board will require custom device tree.
    madhu sundar said:

    4.Did i have to set machine id anywhere..?

    In this case no, you just have to use the bootz command and unset fdt_high.

  • Hi,

    I did few trials, to find the issue.

    I am using 4.9.28 kernel and uboot-2017.1 in my custom board which is similar to beaglebone black.

    The custom board is working in kernel version 3.14 with device tree. Now i want to made it to work on kernel 4.9.28 + uboot.2017.1.

    Trial 1: uboot-2017.1 + kernel 4.9.28 + custom board dts ---------> Not Booting

    Trail 2: Uboot-2017.1 + kerenl 3.14 + custom board dts ---------> Booting properly

    Trail 3: uboot-2017.1 + kernel 3.14 + am335x-evm.dts ---------> Booting properly

    According to the above trails, Uboot and dts is working fine..., the issue is with kernel 4.9.28.

    The following steps, i followed to configure and compile the kernel 4.9.28. Kindly suggest, if any of the steps i should modify/add.

    Steps 1: Downloaded the SDK and extracted it.

    Steps 2: Under kernel source tree,
    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- mrproper

    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- tisdk_am335x-evm_defconfig

    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage dtbs(here .dts files are not compiled).
    So i did the following command

    make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x-evm.dtb

    step 3: Partitioned SDCARD

    step 4: copied MLO,uboot.img to /media/boot , Copied roofs, copied zimage,dtb to /media/rootfs/boot/

    step 5: after power up the board. I am getting the following error

    ## Booting kernel from Legacy Image at 80200000 ...
    Image Name: Linux-4.9.28-geed43d1050
    Created: 2017-10-13 7:11:04 UTC
    Image Type: ARM Linux Kernel Image (uncompressed)
    Data Size: 3590872 Bytes = 3.4 MiB
    Load Address: 80200000
    Entry Point: 80200000
    Verifying Checksum ... OK
    ## Flattened Device Tree blob at 80f80000
    Booting using the fdt blob at 0x80f80000
    Loading Kernel Image ... OK
    Using Device Tree in place at 80f80000, end 80f8d75d

    Starting kernel ...


    Error: unrecognized/unsupported machine ID (r1 = 0x0000157d).

    Available machine support:

    ID (hex) NAME
    ffffffff Generic DT based system
    ffffffff Generic AM33XX (Flattened Device Tree)

    Please check your kernel config and/or bootloader.
  • Please, check this post.