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.

Kernel not starting after following "Processor SDK Linux Getting Started Guide" for K2E EVM

tl;dr: Boot stuck at "Starting kernel ...", probably missing something obvious.

I've download the Processor SDK for Linux (ti-processor-sdk-linux-k2e-evm-02.00.02.11-Linux-x86-Install.bin) and installed it. I started following the getting started guide including running setup.sh script, but initially ran into a small issue since I need to use a static IP address for the board. (This result in "BOOTP broadcast 1" messages, and the board fails to download any files.)

I manually changed my u-boot environment variables for a static IP. I successfully downloaded and installed a new U-boot image, which importantly supports the zImages produced by make all. When I run 'boot', uBoot correctly fetches the files, but the kernel fails to start. Since this should basically be just out-of-the-box build and run, I'm probably missing something obvious.

Thanks in advance for any help you can give.

Here's the boot output:

------------------------------------------------------------------------------------------------------------------------------------------------

Environment size: 3841/262140 bytes
U-Boot# boot

K2E_EMAC0 Waiting for SGMII auto negotiation to complete. done
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 192.168.0.46 (272 ms)
Using K2E_EMAC0 device
TFTP from server 192.168.0.220; our IP address is 192.168.0.46
Filename '/tftpboot/k2e-evm.dtb'.
Load address: 0x87000000
Loading: #########
1.4 MiB/s
done
Bytes transferred = 41752 (a318 hex)

K2E_EMAC0 Waiting for SGMII auto negotiation to complete. done
BOOTP broadcast 1
DHCP client bound to address 192.168.0.46 (9 ms)
Using K2E_EMAC0 device
TFTP from server 192.168.0.220; our IP address is 192.168.0.46
Filename '/tftpboot/skern-k2e.bin'.
Load address: 0xc140000
Loading: #########
1.3 MiB/s
done
Bytes transferred = 45056 (b000 hex)

K2E_EMAC0 Waiting for SGMII auto negotiation to complete. done
BOOTP broadcast 1
DHCP client bound to address 192.168.0.46 (26 ms)
Using K2E_EMAC0 device
TFTP from server 192.168.0.220; our IP address is 192.168.0.46
Filename '/tftpboot/zImage-k2e-evm.bin'.
Load address: 0x88000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##############################################
1.3 MiB/s
done
Bytes transferred = 4228936 (408748 hex)
K2_BM_15.07-39-g035329c SoC:k2e built:20:03:09, Apr 5 2016

## installed monitor, freq [208333333], status 0
Kernel image @ 0x88000000 [ 0x000000 - 0x408748 ]
## Flattened Device Tree blob at 87000000
Booting using the fdt blob at 0x87000000
Using Device Tree in place at 87000000, end 8700d317

Starting kernel ...

------------------------------------------------------------------------------------------------------------------------------------------------ 

For reference, here's my U-Boot environment variables:

------------------------------------------------------------------------------------------------------------------------------------------------

U-Boot# env print
addr_fdt=0x87000000
addr_fs=0x82000000
addr_kern=0x88000000
addr_mon=0x0c140000
addr_secdb_key=0xc000000
addr_ubi=0x82000000
addr_uboot=0x87000000
addr_uinitrd=-
args_all=setenv bootargs console=ttyS0,115200n8 rootwait=1
args_hdd=setenv bootargs ${bootargs} rw root=/dev/sda1
args_net=setenv bootargs ${bootargs} rootfstype=nfs root=/dev/nfs rw nfsroot=${serverip}:${nfs_root},${nfs_options} ip=${ipaddr}
args_ramfs=setenv bootargs ${bootargs} rdinit=/sbin/init rw root=/dev/ram0 initrd=0x802000000,9M
args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs root=ubi0:rootfs rootflags=sync rw ubi.mtd=2,2048
args_uinitrd=setenv bootargs ${bootargs} rdinit=/sbin/init rw root=/dev/ram0
baudrate=115200
boot=net
bootargs=console=ttyS0,115200n8 rootwait=1 rootfstype=nfs root=/dev/nfs rw nfsroot=192.168.0.220:/usr/local/google/home/craiglatimer/ti-processor-sdk-linux-k2e-evm8
bootcmd=run init_${boot} get_fdt_${boot} get_mon_${boot} get_kern_${boot} run_mon run_kern
bootdelay=3
bootfile=/tftpboot/devicetree-zImage-k2e-evm.dtb
burn_ubi=nand erase.part ubifs; nand write ${addr_ubi} ubifs ${filesize}
burn_uboot=sf probe; sf erase 0 0x100000; sf write ${addr_uboot} 0 ${filesize}
ethact=K2E_EMAC0
ethaddr=b4:99:4c:00:47:27
fdt_high=0xffffffff
fileaddr=87000000
filesize=a318
get_fdt_hdd=dhcp ${addr_fdt} ${tftp_root}/${name_fdt}
get_fdt_net=dhcp ${addr_fdt} ${tftp_root}/${name_fdt}
get_fdt_ramfs=dhcp ${addr_fdt} ${tftp_root}/${name_fdt}
get_fdt_ubi=ubifsload ${addr_fdt} ${name_fdt}
get_fdt_uinitrd=dhcp ${addr_fdt} ${tftp_root}/${name_fdt}
get_fs_ramfs=dhcp ${addr_fs} ${tftp_root}/${name_fs}
get_fs_uinitrd=dhcp ${addr_fs} ${tftp_root}/${name_uinitrd}
get_kern_hdd=dhcp ${addr_kern} ${tftp_root}/${name_kern}
get_kern_net=dhcp ${addr_kern} ${tftp_root}/${name_kern}
get_kern_ramfs=dhcp ${addr_kern} ${tftp_root}/${name_kern}
get_kern_ubi=ubifsload ${addr_kern} ${name_kern}
get_kern_uinitrd=dhcp ${addr_kern} ${tftp_root}/${name_kern}
get_mon_hdd=dhcp ${addr_mon} ${tftp_root}/${name_mon}
get_mon_net=dhcp ${addr_mon} ${tftp_root}/${name_mon}
get_mon_ramfs=dhcp ${addr_mon} ${tftp_root}/${name_mon}
get_mon_ubi=ubifsload ${addr_mon} ${name_mon}
get_mon_uinitrd=dhcp ${addr_mon} ${tftp_root}/${name_mon}
get_ubi_net=dhcp ${addr_ubi} ${tftp_root}/${name_ubi}
get_uboot_net=dhcp ${addr_uboot} ${tftp_root}/${name_uboot}
has_mdio=1
init_hdd=run set_fs_none args_all args_hdd
init_net=run set_fs_none args_all args_net
init_ramfs=run set_fs_none args_all args_ramfs get_fs_ramfs
init_ubi=run set_fs_none args_all args_ubi; ubi part ubifs; ubifsmount boot;ubifsload ${addr_secdb_key} securedb.key.bin;
init_uinitrd=run set_fs_uinitrd args_all args_uinitrd get_fs_uinitrd
initrd_high=0xffffffff
ip=192.168.48.46
ipaddr=192.168.48.46
mem_lpae=1
mem_reserve=512M
mtddevname=bootloader
mtddevnum=0
mtdids=nand0=davinci_nand.0
mtdparts=mtdparts=davinci_nand.0:1024k(bootloader)ro,512k(params)ro,-(ubifs)
name_fdt=k2e-evm.dtb
name_fs=arago-console-image-k2e-evm.cpio.gz
name_kern=zImage-k2e-evm.bin
name_mon=skern-k2e.bin
name_ubi=tisdk-server-rootfs-image-k2e-evm.ubi
name_uboot=u-boot-spi-k2e-evm.gph
name_uinitrd=uinitrd.bin
netmask=255.255.255.0
nfs_options=v3,tcp,rsize=4096,wsize=4096
nfs_root=/usr/local/google/home/craiglatimer/ti-processor-sdk-linux-k2e-evm-02.00.02.11/targetNFS
no_post=1
partition=nand0,0
run_kern=bootz ${addr_kern} ${addr_uinitrd} ${addr_fdt}
run_mon=mon_install ${addr_mon}
serverip=192.168.0.220
set_fs_none=setenv addr_uinitrd -
set_fs_uinitrd=setenv addr_uinitrd ${addr_fs}
stderr=serial
stdin=serial
stdout=serial
tftp_root=/tftpboot
ver=U-Boot 2015.07 (Apr 05 2016 - 20:43:22 -0400)

------------------------------------------------------------------------------------------------------------------------------------------------

  • Just following up on my own post:

    Prebuilts in ~/ti-processor-sdk-linux-k2e-evm-02.00.02.11/board-support/prebuilt-images/ also do work. (After copying them to /tftpboot/, files load correctly, but I still get "Starting kernel ..." and nothing else.

    Correction to IP address:
    ip=192.168.0.46
    ipaddr=192.168.0.46
  • So, the problem was that I was captured the old U-Boot environment variables and was using them for the new U-Boot variables. The most important difference is that the new U-Boot loads the zImage at 0x82000000 and then un-compresses it to 0x88080000. Then it can directly jump to 0x88080000 and start running the kernel.

    In retrospect... duh!

    Here's the new environment variables that actually work, which might be of interest to anyone using a static IP address:

    U-Boot# env print
    addr_mon=0x0c140000
    addr_secdb_key=0xc000000
    addr_ubi=0x82000000
    arch=arm
    args_all=setenv bootargs console=ttyS0,115200n8 rootwait=1
    args_net=setenv bootargs ${bootargs} rootfstype=nfs root=/dev/nfs rw nfsroot=${serverip}:${nfs_root},${nfs_options} ip=${ipaddr}
    args_ramfs=setenv bootargs ${bootargs} rdinit=/sbin/init rw root=/dev/ram0 initrd=0x808080000,80M
    args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs root=ubi0:rootfs rootflags=sync rw ubi.mtd=ubifs,2048
    baudrate=115200
    board=ks2_evm
    board_name=ks2_evm
    boot=net
    bootargs=console=ttyS0,115200n8 rootwait=1 rootfstype=nfs root=/dev/nfs rw nfsroot=192.168.0.220:/usr/local/google/home/craiglatimer/ti-processor-sdk-linux-k2e-evm6
    bootcmd=run init_${boot} init_fw_rd_${boot} get_fdt_${boot} get_mon_${boot} get_kern_${boot} run_mon run_kern
    bootdelay=1
    bootdir=/boot
    bootfile=/tftpboot/zImage-k2e-evm.bin
    bootm_size=0x10000000
    burn_ubi=nand erase.part ubifs; nand write ${addr_ubi} ubifs ${filesize}
    burn_uboot_nand=nand erase 0 0x100000; nand write ${loadaddr} 0 ${filesize}
    burn_uboot_spi=sf probe; sf erase 0 0x80000; sf write ${loadaddr} 0 ${filesize}
    cpu=armv7
    ethact=K2E_EMAC0
    ethaddr=b4:99:4c:00:47:27
    fdt_addr_r=0x88000000
    fdtaddr=0x88000000
    fileaddr=82000000
    filesize=408748
    get_fdt_net=dhcp ${fdtaddr} ${tftp_root}/${name_fdt}
    get_fdt_ramfs=dhcp ${fdtaddr} ${tftp_root}/${name_fdt}
    get_fdt_ubi=ubifsload ${fdtaddr} ${bootdir}/${name_fdt}
    get_fs_ramfs=dhcp ${rdaddr} ${tftp_root}/${name_fs}
    get_kern_net=dhcp ${loadaddr} ${tftp_root}/${name_kern}
    get_kern_ramfs=dhcp ${loadaddr} ${tftp_root}/${name_kern}
    get_kern_ubi=ubifsload ${loadaddr} ${bootdir}/${name_kern}
    get_mon_net=dhcp ${addr_mon} ${tftp_root}/${name_mon}
    get_mon_ramfs=dhcp ${addr_mon} ${tftp_root}/${name_mon}
    get_mon_ubi=ubifsload ${addr_mon} ${bootdir}/${name_mon}
    get_ubi_net=dhcp ${addr_ubi} ${tftp_root}/${name_ubi}
    get_uboot_net=dhcp ${loadaddr} ${tftp_root}/${name_uboot}
    init_fw_rd_net=dhcp ${rdaddr} ${tftp_root}/${name_fw_rd}; run set_rd_spec
    init_fw_rd_ramfs=setenv rd_spec -
    init_fw_rd_ubi=ubifsload ${rdaddr} ${bootdir}/${name_fw_rd}; run set_rd_spec
    init_net=run args_all args_net
    init_ramfs=run args_all args_ramfs get_fs_ramfs
    init_ubi=run args_all args_ubi; ubi part ubifs; ubifsmount ubi:rootfs;
    ip=192.168.0.46
    ipaddr=192.168.0.46
    kernel_addr_r=0x82000000
    loadaddr=0x82000000
    mem_lpae=1
    mem_reserve=512M
    mtddevname=bootloader
    mtddevnum=0
    mtdids=nand0=davinci_nand.0
    mtdparts=mtdparts=davinci_nand.0:1024k(bootloader)ro,512k(params)ro,-(ubifs)
    name_fdt=k2e-evm.dtb
    name_fs=arago-console-image-k2e-evm.cpio.gz
    name_fw_rd=k2-fw-initrd.cpio.gz
    name_kern=zImage-k2e-evm.bin
    name_mon=skern-k2e.bin
    name_ubi=k2e-evm-ubifs.ubi
    name_uboot=u-boot-spi-k2e-evm.gph
    netmask=255.255.255.0
    nfs_options=v3,tcp,rsize=4096,wsize=4096
    nfs_root=/usr/local/google/home/craiglatimer/ti-processor-sdk-linux-k2e-evm-02.00.02.11/targetNFS
    no_post=1
    partition=nand0,0
    ramdisk_addr_r=0x88080000
    rd_spec=0x88080000:cc3d
    rdaddr=0x88080000
    run_kern=bootz ${loadaddr} ${rd_spec} ${fdtaddr}
    run_mon=mon_install ${addr_mon}
    serverip=192.168.0.220
    set_rd_spec=setenv rd_spec ${rdaddr}:${filesize}
    soc=keystone
    stderr=serial
    stdin=serial
    stdout=serial
    tftp_root=/tftpboot
    vendor=ti
    ver=U-Boot 2015.07 (Apr 05 2016 - 20:43:22 -0400)

    Environment size: 3480/262140 bytes
    U-Boot#
  • Dear Craig,
    We are glad that you able to solve the problem and thanks for sharing it.
    You are right.
    You need to use new u-boot for processor SDK package and need to erase the environment variables to get the new env of uboot.

    u-boot# env default -a
    u-boot# saveenv

  • Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages (for processor issues). Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics (e2e.ti.com). Please read all the links below my signature.

    Note: We strongly recommend you to create new e2e thread for your queries instead of following up on an old/closed e2e thread, new threads gets more attention than old threads and can provide link of old threads or information on the new post for clarity and faster response.