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/PROCESSOR-SDK-AM335X: Troubles with booting 4.4 kernel on AM335x

Part Number: PROCESSOR-SDK-AM335X

Tool/software: Linux

Good time of day, dear All :)

I have a problem with custom board, based on AM335x.

One year ago I used TI Linux, kernel version 3.19 and it worked perfectly. In this year I want to use Ti Linux with Kernel 4.4.

I rebuilt new kernel and device tree and cannot boot it :) Device silently hangs. Here is u-boot log:

U-Boot SPL 2015.04-rc1-dirty (Jun 25 2015 - 18:09:55)
Trying to init board (board.c/am33xx_spl_board_init).
Reading header
Magic: ee3355aa
Name: A335BNLT
Serial:
Version: 000C
MMC: block number 0x100 exceeds max(0x0)
MMC: block number 0x200 exceeds max(0x0)
*** Error - No Valid Environment Area found
Using default environment

reading u-boot.img
reading u-boot.img


U-Boot 2015.04-rc1-dirty (Jun 25 2015 - 18:09:55)

Watchdog enabled
I2C:   ready
DRAM:  512 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Reading headerNet:   Reading headercpsw, usb_ether
Hit any key to stop autoboot:  0
Unknown command 'run' - try 'help'
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
** Unable to read file uEnv.txt **
5051464 bytes read in 324 ms (14.9 MiB/s)
36181 bytes read in 50 ms (706.1 KiB/s)
Kernel image @ 0x82000000 [ 0x000000 - 0x4d1448 ]
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Device Tree to 8fff4000, end 8ffffd54 ... OK

Starting kernel ...

That`s all. I user hardware UART as serial terminal. It worked perfectly year ago in 3.19 and doesn't work now in 4.4.

Here is printenv of u-boot:

Kobus U-Boot# printenv
arch=arm
baudrate=115200
board=am335x
board_name=A335BNLT
board_rev=000C
boot_fdt=try
bootargs=console=ttyO0,115200n8 root=/dev/nfs nfsroot=192.168.7.34:/media/kobus/fs,nolock rw ip=192.168.7.159
bootcmd=run findfdt; run mmcboot; setenv bootpart 1:1; run mmcboot; run netboot;
bootcount=1
bootdelay=1
bootdir=/boot
bootenv=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
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-os-image fat 0 1;u-boot.img fat 0 1;uEnv.txt fat 0 1
dfu_alt_info_ram=kernel ram 0x80200000 0xD80000;fdt ram 0x80F80000 0x80000;ramdisk ram 0x81000000 0x4000000
eth1addr=84:eb:18:92:85:3b
ethact=cpsw
ethaddr=84:eb:18:92:85:39
fdt_addr_r=0x88000000
fdtaddr=0x88000000
fdtfile=kobus10.dtb
fileaddr=82000000
filesize=3ff028
findfdt=setenv fdtfile kobus10.dtb;
importbootenv=echo Importing environment from mmc ...; env import -t -r $loadaddr $filesize
ipaddr=192.168.7.159
kernel_addr_r=0x82000000
loadaddr=0x82000000
loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}
loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr
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 loadbootscript; then run bootscript;else if run loadbootenv; then echo Loaded environment from ${bootenv};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;if run loadimage; then run mmcloados;fi;fi ;fi;
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 load the DT; fi; fi; else bootz; fi;
mmcroot=/dev/mmcblk0p2 ro
mmcrootfstype=ext4 rootwait
netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=${ipaddr}
netboot=echo Hi, booting from network ...; tftp ${loadaddr} ${bootfile}; tftp ${fdtaddr} ${fdtfile}; run netargs; bootz ${loadaddr} - ${fdtaddr}
nfsopts=nolock
partitions=uuid_disk=${uuid_gpt_disk};name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}
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=/media/kobus/fs
serverip=192.168.7.34
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_omap
stdin=serial_omap
stdout=serial_omap
usbnet_devaddr=84:eb:18:92:85:3b
vendor=ti
ver=U-Boot 2015.04-rc1-dirty (Jun 25 2015 - 18:09:55)

Environment size: 3725/131067 bytes

Kernel config :/cfs-file/__key/communityserver-discussions-components-files/354/0066_2E00_config

And device tree files: /cfs-file/__key/communityserver-discussions-components-files/354/5756_2E00_kobus10_2E00_dts_2E00_config

/cfs-file/__key/communityserver-discussions-components-files/354/7002_2E00_kobusxx_2E00_dtsi_2E00_config

Please, help at least to enable the UART console for kernel boot.

  • Hi,

    Enable the EARLY_PRINTK & DEBUG_LL, to get the low level debug options in the linux kernel.

    Also can you share which UART are you using as a debug console in the u-boot? Please share your u-boot config header, located in include/configs/, by default it should be am335x_evm.h, but you may have changed it for your custom board..

    Another idea is to add define DEBUG in am335x_evm.h (or whatever u-boot config file you use), to get more verbose output out of the u-boot.

    Best Regards,
    Yordan
  • Hi, Yordan.

    I enabled EARLY_PRINTK && DEBUG_LL as follows:

    CONFIG_DEBUG_LL=y
    # CONFIG_DEBUG_OMAP2UART1 is not set
    CONFIG_DEBUG_AM33XXUART1=y
    # CONFIG_DEBUG_AM33XXUART2 is not set
    # CONFIG_DEBUG_LL_UART_PL01X is not set
    CONFIG_DEBUG_OMAP2PLUS_UART=y
    CONFIG_DEBUG_LL_INCLUDE="debug/omap2plus.S"
    # CONFIG_DEBUG_UART_8250 is not set
    CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
    CONFIG_EARLY_PRINTK=y

    I recompiled new version of TI u-boot and it works great.

    I use UART0 as a debug console in u-boot.  DEBUG in am335x_evm.h doesn`t show anything exceptional. It hangs after jump to kernel.

    I actually use am335x_evm.h. Here it is:

    /cfs-file/__key/communityserver-discussions-components-files/354/3465.am335x_5F00_evm.h

    I forgot to mention that all proposed actions didn`t change anything. Kernel hangs on startup :(

  • I made it to work. It seems that I took wrong kernel config as basic config for my kernel