at91sam9x5ek kernel hang problem

ATMEL in-system programing solution including SAM-BA and SAM-PROG.

Moderators: nferre, fab

sidds
Posts: 1
Joined: Mon May 30, 2016 11:25 am

at91sam9x5ek kernel hang problem

Mon May 30, 2016 12:22 pm

Hi,

I have a at91sam9x5ek(AT91SAM9X35) board that is currently running a 2.6.39 kernel from NandFlash. I need to upgrade to the 3.x or 4.x kernel. I follow these instructions.
linux4sam/bin/view/Linux4SAM/LinuxKernel

Code: Select all

git clone git://github.com/linux4sam/linux-at91.git
git checkout linux-3.10-at91

export CROSS_COMPILE=arm-linux-gnueabi-
make clean
make ARCH=arm at91_dt_defconfig
make ARCH=arm
mkimage -A arm -O linux -T kernel -C none -a 0x20008000 -e 0x20008000 -n "Linux kernel" -d arch/arm/boot/zImage uImage3.10
Everything is ok, but when I trying to boot this uImage, I encounter a hand-problem.

Code: Select all

NAND read: device 0 offset 0x200000, size 0x400000                                                                                                                                           
 4194304 bytes read: OK                                                                                                                                                                      
## Booting kernel from Legacy Image at 22000000 ...                                                                                                                                          
   Image Name:   Linux kernel                                                                                                                                                                
   Image Type:   ARM Linux Kernel Image (uncompressed)                                                                                                                                       
   Data Size:    2909440 Bytes = 2.8 MiB                                                                                                                                                     
   Load Address: 20008000                                                                                                                                                                    
   Entry Point:  20008000                                                                                                                                                                    
   Verifying Checksum ... OK                                                                                                                                                                 
   Loading Kernel Image ... OK                                                                                                                                                               
                                                                                                                                                                                             
Starting kernel ...                                                                                                                                                                          
                                                                                                                                                                                             
Uncompressing Linux... done, booting the kernel. 
And nothing follows after last message. Versions linux-3.18-at91 and linux-4.1-at91 hang in the same way. And package meta-atmel https://github.com/linux4sam/meta-atmel/tree/jethro too.
The hand-problem does not occur when I use linux-2.6.39-at91 version in the git repository.

Code: Select all

git checkout linux-2.6.39-at91

export CROSS_COMPILE=arm-linux-gnueabi-
make clean
make ARCH=arm at91sam9x5ek_defconfig
make ARCH=arm
mkimage -A arm -O linux -T kernel -C none -a 0x20008000 -e 0x20008000 -n "Linux kernel" -d arch/arm/boot/zImage uImage2.6.39
My u-boot environment variables

Code: Select all

U-Boot> printenv                                                                                                                                                                             
baudrate=115200                                                                                                                                                                              
bootargs=console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256k(env),256k(env_redundant),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubw
bootcmd=nand read 0x22000000 0x200000 0x400000; bootm 0x22000000                                                                                                                             
bootdelay=3                                                                                                                                                                                  
ethact=macb0                                                                                                                                                                                 
                                                                                                                                                                                             
Environment size: 333/131067 bytes
Can someone please explain to me what I need to do to boot or diagnose the problem?

Thanks you for any help!
blue_z
Location: USA
Posts: 1513
Joined: Thu Apr 19, 2007 10:15 pm

Re: at91sam9x5ek kernel hang problem

Tue May 31, 2016 7:11 am

sidds wrote:I have a at91sam9x5ek(AT91SAM9X35) board that is currently running a 2.6.39 kernel from NandFlash. I need to upgrade to the 3.x or 4.x kernel.
Then you need to learn about Device Trees.
Device Tree for Dummies
sidds wrote:Everything is ok, but when I trying to boot this uImage, I encounter a hand-problem.
If you cannot boot the kernel, then "everything" is not okay.
You configured and built the kernel to use a Device Tree, but booted that kernel without providing any DT blob for your board.
Hence the kernel fails to boot.
You could confirm this analysis by enabling the earlyprintk feature. You'll have to use `make menuconfig` to enable this feature (activated by low-level debug), and you already have the earlyprintk parameter in the kernel command line.

Note, to provide the kernel with a Device Tree blob, you'll probably want to also update to a more recent version of U-Boot. Otherwise see page 8 of DTfD.

Regards

Return to “AT91-ISP”

Who is online

Users browsing this forum: No registered users and 1 guest