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.

AM437x board hangs after "Starting kernel ..."

Hello, 

I'm trying to run my kernel version on a custom board with am437x processor but i'm getting stuck in the "Starting kernel ..." message.

I've already tried the solutions that i have found online like include the earlyprintk to the bootargs and select different serial drivers (SERIAL_OMAP and  SERIAL_8250) and nothing worked.

I would be happy if someone had any suggestion of what could be the problem.

  • I will forward this to the software team. Please post what Linux version you are using and what is your boot device. It will help if you post the log file too.
  • Did you have to modify the UART in u-boot, i.e. are you using a different UART for your console than the reference design?

    Do you have a 32k crystal on your board? This isn't a requirement, but I ran into similar issues on AM335x where you would see similar behavior without a tiny kernel tweak.

    What SDK have you based your code on?
  • Hello, thank you for the fast response.

    I'm using the Mistral am437x PoM -> www.ti.com/.../thirdpartydevtoolfolder.tsp

    I'am not sure what is the UART in the reference design, but I'm using the UART0.
    When I tried to use the SERIAL_OMAP driver I selected the console ttyO0, and when I tried the SERIAL_8250 I used the ttyS0.

    Yes, there is the 32KHz cristal in the board.

    I'm using the sdk-linux-am437x-evm-02.00.02.11.
  • Can you do a "printenv" and post your environment from u-boot?
  • bootcmd=run envboot;run mmcboot;run usbboot;run nandboot;
    bootdelay=1
    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=MLO raw 0x100 0x100 mmcpart 0;u-boot.img raw 0x300 0x1000 mmcpart 0
    dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;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_qspi=u-boot.bin raw 0x0 0x080000;u-boot.backup raw 0x080000 0x080000;u-boot-spl-os raw 0x100000 0x010000;u-boot-env raw 0x110000 0x010000;u-boot-env.backup raw 0x120000 0x010000
    dfu_alt_info_ram=kernel ram 0x80200000 0x4000000;fdt ram 0x80f80000 0x80000;ramdisk ram 0x81000000 0x4000000
    dfu_bufsiz=0x10000
    envboot=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 env from ${bootenvf;
    eth1addr=34:b1:f7:3d:b9:b6
    ethact=cpsw
    ethaddr=34:b1:f7:3d:b9:b4
    fdt_addr_r=0x88000000
    fdtaddr=0x88000000
    fdtfile=am437x-gp-evm.dtb
    finduuid=part uuid mmc 0:2 uuid
    importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize}
    kernel_addr_r=0x82000000
    loadaddr=0x82000000
    loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
    loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr
    loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
    loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
    loadramdisk=load ${devtype} ${devnum} ${rdaddr} ramdisk.gz
    mmcboot=mmc dev ${mmcdev}; setenv devnum ${mmcdev}; setenv devtype mmc; if mmc rescan; then echo SD/MMC found on device ${devnum};if run loadimage; then run loadfdt; echo Booting from mmc${;
    mmcdev=0
    mmcrootfstype=ext4 rootwait
    mtdids=nand0=nand.0
    mtdparts=mtdparts=nand.0:256k(NAND.SPL),256k(NAND.SPL.backup1),256k(NAND.SPL.backup2),256k(NAND.SPL.backup3),512k(NAND.u-boot-spl-os),1m(NAND.u-boot),256k(NAND.u-boot-env),256k(NAND.u-boot-)
    nandargs=setenv bootargs console=${console} ${optargs} root=${nandroot} rootfstype=${nandrootfstype}
    nandboot=echo Booting from nand ...; run nandargs; nand read ${fdtaddr} NAND.u-boot-spl-os; nand read ${loadaddr} NAND.kernel; bootz ${loadaddr} - ${fdtaddr}
    nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,4096
    nandrootfstype=ubifs rootwait=1
    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; run netloadimage; run netloadfdt; run netargs; bootz ${loadaddr} - ${fdtaddr}
    netloadfdt=tftp ${fdtaddr} ${fdtfile}
    netloadimage=tftp ${loadaddr} ${bootfile}
    nfsopts=nolock
    optargs=earlyprintk
    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}
    ramdisk_addr_r=0x88080000
    ramroot=/dev/ram0 rw
    ramrootfstype=ext2
    rdaddr=0x88080000
    rootpath=/export/rootfs
    soc=am33xx
    static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
    stderr=serial
    stdin=serial
    stdout=serial
    usbargs=setenv bootargs console=${console} ${optargs} root=${usbroot} rootfstype=${usbrootfstype}
    usbboot=setenv devnum ${usbdev}; setenv devtype usb; usb start ${usbdev}; if usb dev ${usbdev}; then if run loadbootenv; then echo Loaded environment from ${bootenv};run importbootenv;fi;ifi
    usbdev=0
    usbnet_devaddr=34:b1:f7:3d:b9:b6
    usbroot=/dev/sda2 rw
    usbrootfstype=ext4 rootwait
    vendor=ti
    ver=U-Boot 2015.07 (May 12 2016 - 16:22:25 +0200)
  • Have you tried the u-boot and kernel provided by Mistral as a starting point? What are you using for your device tree file? Are you reusing the TI EVM device tree? If so, you should whittle that down to something minimal for starters.
  • Yes I've tried the u-boot and kernel provided by Mistral, but my problem is that I want to work with the PRU, but the Linux provided by Mistral does not have the remoteproc and RPMmsg modules, so I need to make my own kernel. And they refuse to give access their kernel source code for free, I don't even know if they could do it, but whatever.

    I'm using the device tree that came in their linux.

    I dont think that the problem is in the u-boot because if I use my u-boot with Mistral's Kernel it loads alright.
  • I have emailed Mistral about this issue. I have no legal background, but that sounds like a GPL violation to me.

    I agree that u-boot is likely not the issue. The question is whether the device tree or the kernel is the culprit. I do not recommend using their device tree from 3.12 in conjunction with your 4.1 kernel. Ideally it should be compatible, but I'm not so sure things are that clean in reality. I recommend taking the AM43xx EVM file and stripping it down to bare minimum (e.g. pretty much just the UART, I2C, MMC, and PMIC).
  • Can you clarify on the Mistral thing... Were they asking for a nominal fee (e.g. $20 or so) to mail you a dvd with the code, or were they asking something much larger?

    Also, if you want to decompile the dtb file from Mistral, that can be easily done.

    wiki.sharedcircuits.com/.../BeagleBone_Black
  • Mistral send me a e-mail apologizing for the misunderstanding, they will be sending me the source code shortly