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.

Data abort error in u-boot while loading kernel

Other Parts Discussed in Thread: AM3358

Hi,

I am trying to migrate u-boot 2016 to 2020 version for AM3358 custom board. Here I am getting Data abort error while starting kernel. I am specifying logs which I got. My custom board doesn't have JTAG Debugger and could not able to debug the issue where it is coming. Can you help me out in this?

U-Boot SPL 2020.01-00047-g1d020ed302-dirty (Jul 28 2023 - 15:16:31 +0530)
omap24_i2c_findpsc: speed [kHz]: 100 psc: 0xb sscl: 0xd ssch: 0xf
Trying to boot from MMC2

U-Boot 2020.01-00047-g1d020ed302-dirty (Jul 28 2023 - 15:16:31 +0530)

CPU  : AM335X-GP rev 2.1

I2C:   omap24_i2c_

DRAM:  256 MiB

 Debug: bootz  0x82000000  0x88080000:  0x88000000

 ## Current stack ends at 0x8df724f0 *  kernel: cmdline image address = 0x82000000

## initrd_high = 0x90000000, copy_to_ram = 1
Loading Ramdisk to 90000000, end 90000000 ... OK
ramdisk load start = 0x90000000, ramdisk load end = 0x90000000

## Checking for 'FDT'/'FDT Image' at 88000000

*  fdt: raw FDT blob

## Flattened Device Tree blob at 88000000

   Booting using the fdt blob at 0x88000000

## device tree at 88000000 ... 88015a74 (len=100981 [0x18A75])
Loading Device Tree to 8ef2b000, end 8ef43a74 ... OK
## Transferring control to Linux (at address 82000000)...

Starting kernel ...

data abort
pc : [<81f01e44>] lr : [<82002280>]
reloc pc : [<7276ee44>] lr : [<7286f280>]
sp : 8241f150 ip : 00000705 fp : 8241f218
r10: 00000008 r9 : 8241f880 r8 : 8241f19c
r7 : 00000001 r6 : 0000013c r5 : 00165c0c r4 : 8241f1b8
r3 : 00000000 r2 : 8241f19c r1 : 00000000 r0 : 00000000
Flags: nZCv IRQs off FIQs on Mode SVC_32
Code: 81f01040 47401c58 47401c10 0000010e (04000400)
Resetting CPU ...

resetting ...

   of_flat_tree at 0x88000000 size 0x00015a75

Thank&Regards,

Jyothi.

  • Jyothi,

    This sound similar to another issue someone recently raised regarding the 2020.01 version of u-boot. Could I ask what version of the kernel you are attempting to use here?

    Regards,

    Randolph

  • Here I am trying to load 5.10 kernel. And also I removed config for RTC timer to read boot count and tested. Now I am not getting Data abort errors but still kernel logs were not coming. What could be the cause for this any console settings I need to look into? Can you help me out in this?

  • Hi Jyothi,

    As an experiment, have you tried resetting to default environment, at u-boot prompt?

    ~ Judith

  • I tried it on u-boot prompt manually but same results coming.

  • Hi Jyothi,

    Can you please show your configs and u-boot environment, to make sure it is compliant with u-boot porting guide.

    Especially need to check the following environment variables:
    - loadaddr
    - fdtaddr

    ~ Judith

  • Also,

    Looking at the release notes, it seems like minimum size of SD card must be 16 GB as per: https://software-dl.ti.com/processor-sdk-linux/esd/docs/06_01_00_08/linux/Release_Specific_Migration_Guide.html?highlight=rootfs#processor-sdk-05-02. Please verify you SD card as well.

    ~ Judith

  • Hi Judith,

    I am attaching config file and am335x_evm.h file. And I am using emmc boot here (mmc2). I am attaching uEnv.txt file also, which is used for loading 5.10 kernel. Can you please verify and suggest me how to debug this issue? Here I am getting Data abort error sometimes not for every boot.

    Thanks & Regards,

    Jyothi.1362.am335x_evm.h

    ##These are needed to be compliant with Angstrom's 2013.06.20 u-boot.
    loadaddr=0x82000000
    fdtaddr=0x88000000
    rdaddr=0x88080000
    fdtfile=am335x-bonegreen-wireless-ml5.dtb
    
    uSD_interface=0
    uSD_rootfspart=2
    
    backup_interface=1
    backup_rootfspart=6
    
    uname_r=5.10.153-gc384a4b071
    cmdline=coherent_pool=1M cape_universal=enable
    
    ##These are needed to be compliant with Debian 2014-05-14 u-boot.
    
    loadkern=\
    	if load mmc ${mmcinterface}:${rootfspart} ${loadaddr} /boot/zImage-${uname_r}; \
    	then #echo debug: [Kernel from partition - ${mmcinterface}:${rootfspart}]; \
    	else setenv mmcinterface ${backup_interface}; \
    	     setenv rootfspart ${backup_rootfspart}; \
    	     echo debug: [Kernel -NOT- found loading from - ${mmcinterface}:${rootfspart}]; \
    	     load mmc ${mmcinterface}:${rootfspart} ${loadaddr} /boot/zImage-${uname_r}; \
    	fi
    
    				
    loadxfdt= \
    	if load mmc ${mmcinterface}:${rootfspart} ${fdtaddr} /boot/${fdtfile}; \
    	then  \
    		echo debug: [DTB loaded from ${mmcinterface}:${rootfspart}]; \
    	else \
    		setenv mmcinterface ${backup_interface}; \
    		setenv rootfspart ${backup_rootfspart}; \
    		echo debug: [DTB -NOT- found, switching to - ${mmcinterface}:${rootfspart}]; \
    		echo debug :[reload kernel from other partition]; \
    		run loadximage; \
    	fi
    
    check_dtb=if test -n ${dtb}; then setenv fdtfile ${dtb};fi
    loadall=run check_dtb; run loadkern; run loadxfdt;
    
    #mmcargs=setenv bootargs console=tty0 ${optargs} ${cape_disable} ${cape_enable} root=/dev/mmcblk${mmcinterface}p${linux_backup_rootfs} rootfstype=${mmcrootfstype} ${cmdline} panic=1 fsck.mode=force fsck.repair=yes
    mmcargs=setenv bootargs console=ttyS0,115200n8 earlyprintk console=tty0 mem=256M ${optargs} ${cape_disable} ${cape_enable} cma=48M root=/dev/mmcblk${mmcinterface}p${linux_backup_rootfs}  rootfstype=${mmcrootfstype} ${cmdline} panic=1
    
    
    uenvcmd=if mmc dev 0; then \
    		echo debug [uSD]; \
    		setenv mmcinterface ${uSD_interface}; setenv rootfspart ${uSD_rootfspart}; \
    		setenv linux_backup_rootfs ${uSD_rootfspart}; \
    	fi; \
    	echo =---debug: About to boot from --- ${mmcinterface}p${rootfspart} -----====; \
    	run loadall; \
    	run mmcargs; \
    	bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; 
    	
    
    debug_envcmd=if mmc dev 0; then \
    		echo debug [uSD]; \
    		echo debug: [Fariya mmcinterface and linux_backuo_rootfs values are ${mmcinterface} ${uSD_rootfspart} ${linux_backup_rootfs}]; \
    		setenv mmcinterface ${uSD_interface}; setenv rootfspart ${uSD_rootfspart}; \
    		setenv linux_backup_rootfs ${uSD_rootfspart}; \
    	fi; \
    	echo =---debug: yes did it here. About to boot from --- ${mmcinterface}p${rootfspart} -----====; \
    	run loadall; \
    	echo Ran loadall here; \
    	run debugargs; \
    	bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr};
    

  • Hi Jyothi,

    Sorry for the delay, for the debug question:

    Here is some information on board port: https://software-dl.ti.com/processor-sdk-linux/esd/docs/06_03_00_106/AM335X/linux/How_to_Guides/Board_Port/U-Boot.html

    In the following section: https://software-dl.ti.com/processor-sdk-linux/esd/docs/06_03_00_106/AM335X/linux/How_to_Guides/Board_Port/U-Boot.html#u-boot-bringup-debugging-tips shows some debugging tips like printf style debugging that could be used to tell more information. You can also double check device tree file contents as shown in the next section after printf.

    ~ Judith

  • Hi Judith,

    I enabled kernel early debug logs and data abort excemption coming from kernel at uncompressing zimage. I think I am configuring RAM memory for uncompression may be wrong or it is overlapping with another memory location in kernel. Any idea on this? Mentioned below logs.

     

    Debug: bootz  0x82000000  0x88080000:  0x88000000

    ## Current stack ends at 0x8ef54500 * 

    kernel: cmdline image address = 0x82000000

    Kernel image @ 0x82000000 [ 0x000000 - 0x423200 ]

    *  ramdisk: subimage '' from image at 0x88080000

       ramdisk start = 0x88080000, ramdisk end = 0x88080000

    *  fdt: cmdline image address = 0x88000000

    ## Checking for 'FDT'/'FDT Image' at 88000000

    *  fdt: raw FDT blob

    ## Flattened Device Tree blob at 88000000

       Booting using the fdt blob at 0x88000000

       of_flat_tree at 0x88000000 size 0x00015a75

    ## FIT configuration was not specified

    ## initrd_high = 0x90000000, copy_to_ram = 1

       Loading Ramdisk to 90000000, end 90000000 ... OK

       ramdisk load start = 0x90000000, ramdisk load end = 0x90000000

    using: FDT

    ## device tree at 88000000 ... 88015a74 (len=100981 [0x18A75])

       Loading Device Tree to 8ef3a000, end 8ef52a74 ... OK

    ## Transferring control to Linux (at address 82000000)...

     

    Starting kernel ...

     

    Uncompressing Linux...

     

    LZMA data is corrupt

     

     -- System halted

     This is why kernel is hanging sometimes I am gitting data abort error after print Uncompressing Linux...

    Reagrds,

    Jyothi. P

  • Hi Jyothi,

    Is your kernel compressed zImage or are you trying to boot uImage? Have you verified/validated the kernel Image you built works?

    ~ Judith

  • Hi Judith,

    I am using compressed zImage and verified with ti u-boot 2016 version. Now I am testing with u-boot 2020 version. And I am using 5.10 kernel zImage.

    Thanks,

    Jyothi.

  • Hi Jyothi,

    Sorry for the delay. Will look into this again tomorrow.

    ~ Judith

  • Hello Jyothi,
    Will you have a look at the e2e on few debug options?
    e2e.ti.com/.../3520128
    Best,
    -Hong