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.

AM335x_sk kernel booting problem

Hi,

I am using AM335x_sk. I tried taking the source from Linux-Next(http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git) and received linux kernel version 3.7.0-rc8 kernel as the latest source. I compiled it using arm-arago-linux-gnueabi- provided along with the ti-sdk-am335x-evm and as per the instructions at http://processors.wiki.ti.com/index.php/AMSDK_Linux_User%27s_Guide.

I have partitioned my micro-sd card using the utility create-sdcard.sh provided along with the ti-sdk-am335x-evm for two partitions.

I used the prebuilt u-boot.img and MLO provided in ti-sdk-am335x-evm, but am unable to boot the kernel. It hangs at "starting kernel...." and no further messages are displayed.

For this I tried changing the console device from ttyo0 to ttyo1 and ttyo2 in bootargs. I confirmed that the Machine id is same as in mach-types in kernel.

I tried using the following bootargs

setenv bootargs console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw rootwait rootfstype=ext3

The log is as follows

Welcome to minicom 2.4

OPTIONS: I18n
Compiled on Jun  3 2010, 13:48:00.
Port /dev/ttyUSB1

Press CTRL-A Z for help on special keys                                                                                           
                                                                                                                                  
 0                                                                                                                                
U-Boot# AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0                                                                                          
syntax error                                                                                                                      
U-Boot# print
autoload=yes
baudrate=115200
bootargs_defaults=setenv bootargs console=${console} ${optargs}
bootcmd=if mmc rescan; then echo SD/MMC found on device ${mmc_dev};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 mmc_load_u;
bootdelay=3
bootenv=uEnv.txt
bootfile=uImage
console=ttyO0,115200n8
ethact=cpsw
ethaddr=d4:94:a1:87:3a:12
importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $filesize
ip_method=none
kloadaddr=0x80007fc0
loadaddr=0x82000000
loadbootenv=fatload mmc ${mmc_dev} ${loadaddr} ${bootenv}
mmc_args=run bootargs_defaults;setenv bootargs ${bootargs} root=${mmc_root} rootfstype=${mmc_root_fs_type} ip=${ip_method}
mmc_boot=run mmc_args; run mmc_load_uimage; bootm ${kloadaddr}
mmc_dev=0
mmc_load_uimage=fatload mmc ${mmc_dev} ${kloadaddr} ${bootfile}
mmc_root=/dev/mmcblk0p2 rw
mmc_root_fs_type=ext3 rootwait
nand_args=run bootargs_defaults;setenv bootargs ${bootargs} root=${nand_root} noinitrd rootfstype=${nand_root_fs_type} ip=${ip_method}
nand_boot=echo Booting from nand ...; run nand_args; nandecc hw 2; nand read.i ${kloadaddr} ${nand_src_addr} ${nand_img_siz}; bootm ${kloadaddr}
nand_img_siz=0x500000
nand_root=ubi0:rootfs rw ubi.mtd=7,2048
nand_root_fs_type=ubifs rootwait=1
nand_src_addr=0x280000
net_args=run bootargs_defaults;setenv bootargs ${bootargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
net_boot=echo Booting from network ...; setenv autoload no; dhcp; tftp ${kloadaddr} ${bootfile}; run net_args; bootm ${kloadaddr}
nfsopts=nolock
nor_args=run bootargs_defaults;setenv bootargs ${bootargs} root={nor_root} rootfstype=${nor_root_fs_type} ip=${ip_method}
nor_boot=echo Booting from NOR ...; run nor_args; cp.b ${0x08080000} ${kloadaddr} ${nor_img_siz}; bootm ${kloadaddr}
nor_img_siz=0x280000
nor_root=/dev/mtdblock3 rw
nor_root_fs_type=jffs2
nor_src_addr=0x08080000
rootpath=/export/rootfs
script_addr=0x81900000
spi_args=run bootargs_defaults;setenv bootargs ${bootargs} root=${spi_root} rootfstype=${spi_root_fs_type} ip=${ip_method}
spi_boot=echo Booting from spi ...; run spi_args; sf probe ${spi_bus_no}:0; sf read ${kloadaddr} ${spi_src_addr} ${spi_img_siz}; bootm ${kloadaddr}
spi_bus_no=0
spi_img_siz=0x380000                                                                                                              
spi_root=/dev/mtdblock4 rw                                                                                                        
spi_root_fs_type=jffs2                                                                                                            
spi_src_addr=0x62000                                                                                                              
static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off                                                        
stderr=serial
stdin=serial
stdout=serial

Environment size: 2663/8188 bytes
U-Boot# mmc rescan 0
U-Boot# fatload mmc 0 80000000 am335x-evmsk.dtb
reading am335x-evmsk.dtb

10105 bytes read
U-Boot# fatload mmc 0 81000000 uImage
reading uImage

3728736 bytes read
U-Boot# fatload mmc 0 82000000 base-rootfs-am335x-evm.tar.gz
reading base-rootfs-am335x-evm.tar.gz

10879145 bytes read
U-Boot# setenv bootargs console=ttyO0,115200n8 mem=256M root=/dev/ram rw initrd=0x82000000,16MB ramdisk_size=65536 earlyprintk=serial
U-Boot# bootm 81000000 - 80000000
## Booting kernel from Legacy Image at 81000000 ...
   Image Name:   Linux-3.7.0-rc8
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3728672 Bytes = 3.6 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Can anyone please tell me what can be the problem and how can I resolve it?

  • Sandeep,

    Why are you taking mainline kernel? There is no gurantee that mainline has AM335x support. Use the SDK available from TI.

    http://processors.wiki.ti.com/index.php/Sitara_Linux_Software_Developer%E2%80%99s_Guide#Linux_Software_Stack

  • Hi Renjith,

    Firstly, thanks for responding to the post.

    I have already tried with the sdk kernel. It boots up fine. I wanted to understand the changes in the kernel. But here at least it should uncompress the kernel and upon that if at all any board support related configuration is missing should result in some misbehaviour. This is as per my understanding, as I am new to these things please correct me if I am wrong in my approach.

    It just halts at "Starting Kernel..." which is a message actually printed by u-boot and after that it disables the caches and passes the control to linux kernel vide kernel_entry function pointer passing the value for r0, r1 and r2 in arm processor (0, machine_id, address of ATAG_PARAM)

    Can you please help me out on this?

  • It would have got uncompressed and crashed some where inside the kernel. Since serial driver is not yet up you are not able to see the crash. If your platform is not really supported in the kernel, it will take a lot of effort(couple of months for all drivers to work) to enable all the drivers one by one and boot up the kernel. Unless there is any particular reason for doing so, this is not really recommended. Is there anything like that? 

  • Hi Renjith,

    Apologies for delayed response as I was not available for personal reasons for past few days so didn't get a chance to repost here.
    Yes there is a project requirement that I have to use 3.7.0-rc8 kernel from Linux-Next(
    http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git) for the starter kit. As you suggested it will involve lot of changes. Could you please suggest of any optimal path to port the kernel to support the AM335x_sk.

    Currently I am trying to compare between the 3.2.0 vanilla kernel from
    www.kernel.org and the 3.2.0 kernel in ti-sdk-am335x-evm-05.05.00.00, as a process to understand the changes induced in the sdk kernel to support AM335x.
    And isolate the current processor and board related files through this comparision.
    And subsequently adopt these changes to the above git tree.
     
    I know this is little lengthy procedure. If there is a more optimal and logical path, it would greatly help.
  • Sandeep,

    What is the real requirement for 3.7 kernel? The procedure that you are trying is the optimal approach. This will also take good enough effort I believe.

    sandeep kumar3 said:
    Currently I am trying to compare between the 3.2.0 vanilla kernel from www.kernel.org and the 3.2.0 kernel in ti-sdk-am335x-evm-05.05.00.00, as a process to understand the changes induced in the sdk kernel to support AM335x.
    And isolate the current processor and board related files through this comparision.
    And subsequently adopt these changes to the above git tree.