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.

AM3358: Kernel boot issue

Part Number: AM3358

hello,

we have designed an am3358 based custom board with ref design of AM335x Starter Kit.

in starter kit emmc is not there we have added

i have modify

add pin mux of emmc in muc.c file and call from enable_board_pin_mux function

am335x-evmsk.dts inside

/ti-processor-sdk-linux-am335x-evm-06.01.00.08/board-support/linux-4.19.59+gitAUTOINC+5f8c1c6121-g5f8c1c6121/arch/arm/boot/dts$

and same modification done for u boot dts file and uboot detect emmc successfully

and im also able to write emmc using following thread

but while im change boot sequence jumper from sd card interface to emmc boot (i.e. boot from emmc) at that time board stop boot after Starting kernel ...

here i am attaching boot log

U-Boot SPL 2019.01 (Apr 04 2020 - 17:50:51 +0530)
Trying to boot from MMC2                
                                        
                                        
U-Boot 2019.01 (Apr 04 2020 - 17:50:51 +0530)
                                        
Aarohi WFH01                            
CPU  : AM335X-GP rev 2.1                
Model: TI AM335x EVM                    
DRAM:  1 GiB                            
NAND:  0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from FAT... <ethaddr> not set. Validating first E-fuse MAC
Net:   eth0: ethernet@4a100000                                                  
Warning: usb_ether MAC addresses don't match:                                   
Address in ROM is          de:ad:be:ef:00:01                                    
Address in environment is  04:79:b7:03:11:1b                                    
, eth1: usb_ether                                                               
Hit any key to stop autoboot:  0                                                
switch to partitions #0, OK                                                     
mmc1(part 0) is current device                                                  
Scanning mmc 1:1...                                                             
switch to partitions #0, OK                                                     
mmc1(part 0) is current device                                                  
SD/MMC found on device 1                                                        
4227584 bytes read in 718 ms (5.6 MiB/s)                                        
37166 bytes read in 8 ms (4.4 MiB/s)                                            
## Flattened Device Tree blob at 88000000                                       
   Booting using the fdt blob at 0x88000000                                     
   Loading Device Tree to 8fff3000, end 8ffff12d ... OK                         
                                                                                
Starting kernel ...                                                             

i have added uEnv.txt file in emmc boot partition 

bootargs=console=ttyS0,115200n8 root=/dev/mmcblk0p2 rootfstype=ext3 rw rootwait ip=off lpj=3590144
bootcmd=mmc rescan; ext4load mmc 0:2 ${loadaddr} /boot/zImage; bootz ${loadaddr} - ${fdtaddr}
loadfdt=ext4load mmc 0:2 ${fdtaddr} /boot/am335x-evmsk.dtb
uenvcmd=boot

but still unable to find root cause of why kernel not coming up...?

  • RAJU KUMARKHANIYA said:
    4227584 bytes read in 718 ms (5.6 MiB/s)                                       
    37166 bytes read in 8 ms (4.4 MiB/s)  

    Looks like both a Kernel and a DTB blob are being loaded. Can you confirm by looking/comparing the file sizes that indeed the files you want are getting loaded?

    Then, can you interrupt the boot (keypress), and print the entire U-Boot environment (env print) and post it here.

    Also can you confirm, the console UART you are using is awalys ttyS0, right?

    Then, can you try to enable early console printing in the Kernel? This E2E post has a lot of details regarding this: https://e2e.ti.com/support/processors/f/791/p/798346/2954226#2954226 

  • hello ,

    first of all thank so much for your quick reply.

    ==> Can you confirm by looking/comparing the file sizes that indeed the files you want are getting loaded?

    inside

    /ti-processor-sdk-linux-am335x-evm-06.01.00.08/board-support/linux-4.19.59+gitAUTOINC+5f8c1c6121-g5f8c1c6121/arch/arm/boot/dts$

    there is am335x-evmsk.dtb

    the size of that file 38.3 KB

    ==> inside u-boot directory

    /ti-processor-sdk-linux-am335x-evm-06.01.00.08/board-support/u-boot-2019.01+gitAUTOINC+029e4c009a-g029e4c009a/arch/arm/dts$

    am335x-evmsk.dtb

    51.5 KB

    ==> can you interrupt the boot (keypress), and print the entire U-Boot environment (env print) and post it here.

    emmc boot time board printenv

    U-Boot SPL 2019.01 (Apr 04 2020 - 17:50:51 +0530)
    Trying to boot from MMC2                
                                            
                                            
    U-Boot 2019.01 (Apr 04 2020 - 17:50:51 +0530)
                                            
    Aarohi WFH01                            
    CPU  : AM335X-GP rev 2.1                
    Model: TI AM335x EVM                    
    DRAM:  1 GiB                            
    NAND:  0 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Loading Environment from FAT... <ethaddr> not set. Validating first E-fuse MAC
    Net:   eth0: ethernet@4a100000                                                  
    Warning: usb_ether MAC addresses don't match:                                   
    Address in ROM is          de:ad:be:ef:00:01                                    
    Address in environment is  04:79:b7:03:11:1b                                    
    , eth1: usb_ether                                                               
    Hit any key to stop autoboot:  0                                                
    => pr                                                                           
    arch=arm                                                                        
    args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUU}
    baudrate=115200                                                                 
    board=am335x                                                                    
    boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${pref}
    boot_efi_binary=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};ei
    boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr}}
    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_syslinux_conf=extlinux/extlinux.conf                                       
    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; rund
    bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp};;
    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=1                                                                     
    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 11
    dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw raw 0x100 0x1
    dfu_alt_info_nand=SPL part 0 1;SPL.backup1 part 0 2;SPL.backup2 part 0 3;SPL.ba9
    dfu_alt_info_ram=kernel ram 0x80200000 0x4000000;fdt ram 0x80f80000 0x80000;ram0
    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 ${mm;
    eth1addr=04:79:b7:03:11:1b                                                      
    ethaddr=04:79:b7:03:11:19                                                       
    fdt_addr_r=0x88000000                                                           
    fdtaddr=0x88000000                                                              
    fdtcontroladdr=bdf398d8                                                         
    fdtfile=undefined                                                               
    findfdt=if test $board_name = A335BONE; then setenv fdtfile am335x-bone.dtb; fi 
    finduuid=part uuid mmc ${bootpart} uuid                                         
    fit_bootfile=fitImage                                                           
    fit_loadaddr=0x90000000                                                         
    get_overlaystring=for overlay in $overlay_files;do;setenv overlaystring ${overl;
    ice_mii=mii                                                                     
    importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t $}
    init_console=if test $board_name = A335_ICE; then setenv console ttyO3,115200n8;
    kernel_addr_r=0x82000000                                                        
    load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefi}
    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; run run_fit;                                              
    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_pi
    mmcboot=mmc dev ${mmcdev}; setenv devnum ${mmcdev}; setenv devtype mmc; if mmc ;
    mmcdev=0                                                                        
    mmcloados=run args_mmc; if test ${boot_fdt} = yes || test ${boot_fdt} = try; th;
    mmcrootfstype=ext4 rootwait                                                     
    mtdids=nand0=nand.0                                                             
    mtdparts=mtdparts=nand.0:128k(NAND.SPL),128k(NAND.SPL.backup1),128k(NAND.SPL.ba)
    nandargs=setenv bootargs console=${console} ${optargs} root=${nandroot} rootfst}
    nandboot=echo Booting from nand ...; run nandargs; nand read ${fdtaddr} NAND.u-}
    nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048                           
    nandrootfstype=ubifs rootwait=1                                                 
    netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${sp
    netboot=echo Booting from network ...; setenv autoload no; dhcp; run netloadima}
    netloadfdt=tftp ${fdtaddr} ${fdtfile}                                           
    netloadimage=tftp ${loadaddr} ${bootfile}                                       
    nfsopts=nolock                                                                  
    partitions=uuid_disk=${uuid_gpt_disk};name=bootloader,start=384K,size=1792K,uui}
    pxefile_addr_r=0x80100000                                                       
    ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot} rootfstyp}
    ramboot=echo Booting from ramdisk ...; run ramargs; bootz ${loadaddr} ${rdaddr}}
    ramdisk_addr_r=0x88080000                                                       
    ramroot=/dev/ram0 rw                                                            
    ramrootfstype=ext2                                                              
    rdaddr=0x88080000                                                               
    rootpath=/export/rootfs                                                         
    run_fit=bootm ${fit_loadaddr}#${fdtfile}${overlaystring}                        
    scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for;
    scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env ee
    scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "e
    scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefi
    scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${e
    scriptaddr=0x80000000                                                           
    serial#=04:79:b7:03:11:19                                                       
    soc=am33xx                                                                      
    spiargs=setenv bootargs console=${console} ${optargs} root=${spiroot} rootfstyp}
    spiboot=echo Booting from spi ...; run spiargs; sf probe ${spibusno}:0; sf read}
    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_devi
    usbnet_devaddr=de:ad:be:ef:00:01                                                
    vendor=ti                                                                       
    ver=U-Boot 2019.01 (Apr 04 2020 - 17:50:51 +0530)                               
                                                                                    
    Environment size: 10031/131068 bytes                                            
    => 
    

    ==> can you confirm, the console UART you are using is awalys ttyS0, right?

    ok i will conform and update here

    inside mmcblk1p1 partition  uEnv.txt file is

    bootargs=console=ttyS0,115200n8 root=/dev/mmcblk0p2 rootfstype=ext3 rw rootwait ip=off lpj=3590144
    bootcmd=mmc rescan; ext4load mmc 0:2 ${loadaddr} /boot/zImage; bootz ${loadaddr} - ${fdtaddr}
    loadfdt=ext4load mmc 0:2 ${fdtaddr} /boot/am335x-evmsk.dtb
    uenvcmd=boot

    ==> can you try to enable early console printing in the Kernel? This E2E post has a lot of details regarding this:

    ok i will check and update status here

  • RAJU KUMARKHANIYA said:

    /ti-processor-sdk-linux-am335x-evm-06.01.00.08/board-support/linux-4.19.59+gitAUTOINC+5f8c1c6121-g5f8c1c6121/arch/arm/boot/dts$

    there is am335x-evmsk.dtb

    the size of that file 38.3 KB

    What I meant was, does the file U-Boot loads as 37,166 bytes in size, is that exact same in your Kernel tree? What is it size in bytes? If it is also 37,166 that would be an indication it is probably the right file (note that the file in the U-Boot tree is not relevant here).

    same for the Kernel zImage.

    RAJU KUMARKHANIYA said:

    ==> can you interrupt the boot (keypress), and print the entire U-Boot environment (env print) and post it here.

    emmc boot time board printenv

    4503.printenv.txt

    That file was truncated at column 80. Not sure what terminal software you use but I'd recommend "picocom" directly from the Bash shell, usually you an copy & paste out from there without any such issues.

    Regards, Andreas

  • hello

    thank you for your reply

    i'm able to resolve my issue after common board file modification

    thank You!..