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 boot frozen

Other Parts Discussed in Thread: AM1705, OMAP-L137, LINUXEZSDK-SITARA, DA8XX

We have custom board based on AM1705.

I compiled the latest buildroot with kernel 3.7.6 and it stops during the boot.

Here is the earlyprintk output:

___________________________________________________________________________________________

setenv bootargs "mem=32M console=ttyS2,115200n8 root=/dev/mmcblk0p1 rw noinitrd earlyprintk earlyshell debug dma_debug=on keep_bootcon memblock=debug loglevel=7 nocache nohlt noinitrd nousb apparmor=0 "
U-Boot > bootm
## Booting kernel from Legacy Image at c0700000 ...
   Image Name:   Linux-3.7.6
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2251632 Bytes = 2.1 MiB
   Load Address: c0008000
   Entry Point:  c0008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Linux version 3.7.6 (root@core) (gcc version 4.7.2 (Buildroot 2013.02-rc1) ) #1 PREEMPT Wed Feb 20 16:34:56 UTC 2013
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] debug: skip boot console de-registration.
[    0.000000] nocache is deprecated; use cachepolicy=buffered
[    0.000000] memblock_reserve: [0x000000c0008400-0x000000c046e7c8] arm_memblock_init+0x4c/0x14c
[    0.000000] memblock_reserve: [0x000000c0004000-0x000000c0008000] arm_memblock_init+0xf0/0x14c
[    0.000000] MEMBLOCK configuration:
[    0.000000]  memory size = 0x2000000 reserved size = 0x46a3c8
[    0.000000]  memory.cnt  = 0x1
[    0.000000]  memory[0x0]     [0x000000c0000000-0x000000c1ffffff], 0x2000000 bytes
[    0.000000]  reserved.cnt  = 0x2
[    0.000000]  reserved[0x0]   [0x000000c0004000-0x000000c0007fff], 0x4000 bytes
[    0.000000]  reserved[0x1]   [0x000000c0008400-0x000000c046e7c7], 0x4663c8 bytes
[    0.000000] memblock_reserve: [0x000000c1fff000-0x000000c2000000] memblock_alloc_base_nid+0x48/0x58
[    0.000000] memblock_reserve: [0x000000c1ffe000-0x000000c1fff000] memblock_alloc_base_nid+0x48/0x58
[    0.000000] memblock_reserve: [0x000000c1ffdfc0-0x000000c1ffe000] memblock_alloc_base_nid+0x48/0x58
[    0.000000] memblock_reserve: [0x000000c1ffc000-0x000000c1ffd000] memblock_alloc_base_nid+0x48/0x58
[    0.000000] DaVinci da830/omap-l137 rev2.0 variant 0x9
[    0.000000] memblock_reserve: [0x000000c1ffb000-0x000000c1ffc000] memblock_alloc_base_nid+0x48/0x58
[    0.000000] memblock_reserve: [0x000000c1ffa000-0x000000c1ffb000] memblock_alloc_base_nid+0x48/0x58
[    0.000000] Kernel command line: mem=32M console=ttyS2,115200n8 root=/dev/mmcblk0p1 rw noinitrd earlyprintk earlyshell debug dma_debug=on keep_bootcon memblock=debug loglevel=7 nocache nohlt noinitrd nousb apparmor=0
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Memory: 32MB = 32MB total
[    0.000000] Memory: 27900k/27900k available, 4868k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc2800000 - 0xff000000   ( 968 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc03f9e64   (4040 kB)
[    0.000000]       .init : 0xc03fa000 - 0xc041b11c   ( 133 kB)
[    0.000000]       .data : 0xc041c000 - 0xc0446778   ( 170 kB)
[    0.000000]        .bss : 0xc044679c - 0xc046e7c8   ( 161 kB)
[    0.000000] SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:245
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[    0.000000] Console: colour dummy device 80x30
[    0.014226] Calibrating delay loop... 4.63 BogoMIPS (lpj=23168)
[    0.149315] pid_max: default: 32768 minimum: 301
[    0.169474] Mount-cache hash table entries: 512
[    0.203201] CPU: Testing write buffer coherency: ok
[    0.212237] Setting up static identity map for 0xc02f32d0 - 0xc02f3328
[    0.346439] DaVinci: 128 gpio irqs
[    0.396707] regulator-dummy: no parameters
[    0.417939] NET: Registered protocol family 16
[    0.455621] DMA: preallocated 256 KiB pool for atomic coherent allocations
________________________________________________________________________________________

any suggestion how to proceed?

  • Timofei,

    Can you try with the bootargs "mem=32M console=ttyS2,115200n8 root=/dev/mmcblk0p1 rw noinitrd earlyprintk earlyshell debug dma_debug=on keep_bootcon memblock=debug loglevel=7"?

    Also have you verified whether kernel 3.7.8 supports AM1705 properly?

  • 1. Just tried with arguments you suggested  - result is exactly the same.

    2. I did not verified that kernel 3.7.6 supports AM1705 properly. I assumed that. If somebody can confirm it will be nice.

  • Timofei,

    I don't think AM1705 is properly supported in the latest kernel. Its better to use the SDK available from TI in the below link.

    http://www.ti.com/tool/linuxezsdk-sitara

  • Kernel, provided by TI stops almost at the same place:

    _____________________________________________________________________________________

    ## Total Size      = 0x001f7238 = 2060856 Bytes
    U-Boot > setenv bootargs "mem=32M console=ttyS2,115200n8 root=/dev/mmcblk0p1 rw noinitrd earlyprintk earlyshell debug dma_debug=on keep_bootcon memblock=debug loglevel=7"
    U-Boot > bootm
    ## Booting kernel from Legacy Image at c0700000 ...
       Image Name:   Linux-2.6.33-rc4
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    2060792 Bytes = 2 MiB
       Load Address: c0008000
       Entry Point:  c0008000
       Verifying Checksum ... OK
       Loading Kernel Image ... OK
    OK

    Starting kernel ...

    Uncompressing Linux... done, booting the kernel.
    Linux version 2.6.33-rc4 (tbolshakov@barguzin) (gcc version 4.7.2 (crosstool-NG 1.17.0) ) #2 PREEMPT Wed Feb 20 11:05:37 MST 2013
    CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
    CPU: VIVT data cache, VIVT instruction cache
    Machine: DaVinci DA830/OMAP-L137/AM17xx EVM
    Memory policy: ECC disabled, Data cache writethrough
    DaVinci da830/omap-l137 rev2.0 variant 0x9
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
    Kernel command line: mem=32M console=ttyS2,115200n8 root=/dev/mmcblk0p1 rw noinitrd earlyprintk earlyshell debug dma_debug=on keep_bootcon memblock=debug loglevel=7
    bootconsole [earlycon0] enabled
    PID hash table entries: 128 (order: -3, 512 bytes)
    Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
    Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
    Memory: 32MB = 32MB total
    Memory: 28068KB available (3808K code, 424K data, 140K init, 0K highmem)
    SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    Hierarchical RCU implementation.
    NR_IRQS:245
    Console: colour dummy device 80x30
    Calibrating delay loop... 149.50 BogoMIPS (lpj=747520)
    Mount-cache hash table entries: 512
    CPU: Testing write buffer coherency: ok
    DaVinci: 128 gpio irqs
    NET: Registered protocol family 16
    _________________________________________________________________________________

    May be I can disable the network for the test? Is it possible to do using bootargs?

  • I did that - same results (see one of my posts).

    Meanwhile - I was using the latest kernel with AM91SAM9G20 - everything works fine.

    So, again, normal kernel stops at the same place.

  • It is no the network:

    __________________________________________________________________________________________

    U-Boot > setenv bootargs "mem=32M console=ttyS2,115200n8 root=/dev/mmcblk0p1 rw noinitrd earlyprintk earlyshell debug dma_debug=on keep_bootcon memblock=debug loglevel=7"
    U-Boot > bootm                                                                                                                        
    ## Booting kernel from Legacy Image at c0700000 ...                                                                                   
       Image Name:   Linux-2.6.33-rc4                                                                                                     
       Image Type:   ARM Linux Kernel Image (uncompressed)                                                                                
       Data Size:    1553568 Bytes = 1.5 MiB                                                                                              
       Load Address: c0008000                                                                                                             
       Entry Point:  c0008000                                                                                                             
       Verifying Checksum ... OK                                                                                                          
       Loading Kernel Image ... OK                                                                                                        
    OK                                                                                                                                    
                                                                                                                                          
    Starting kernel ...                                                                                                                   
                                                                                                                                          
    Uncompressing Linux... done, booting the kernel.                                                                                      
    Linux version 2.6.33-rc4 (tbolshakov@barguzin) (gcc version 4.7.2 (crosstool-NG 1.17.0) ) #3 PREEMPT Wed Feb 20 11:29:58 MST 2013     
    CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177                                                                         
    CPU: VIVT data cache, VIVT instruction cache                                                                                          
    Machine: DaVinci DA830/OMAP-L137/AM17xx EVM                                                                                           
    Memory policy: ECC disabled, Data cache writethrough                                                                                  
    DaVinci da830/omap-l137 rev2.0 variant 0x9                                                                                            
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128                                                             
    Kernel command line: mem=32M console=ttyS2,115200n8 root=/dev/mmcblk0p1 rw noinitrd earlyprintk earlyshell debug dma_debug=on keep_bootcon memblock=debug loglevel=7
    bootconsole [earlycon0] enabled
    PID hash table entries: 128 (order: -3, 512 bytes)                                                                                    
    Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
    Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
    Memory: 32MB = 32MB total
    Memory: 29080KB available (2872K code, 374K data, 116K init, 0K highmem)
    SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    Hierarchical RCU implementation.
    NR_IRQS:245
    Console: colour dummy device 80x30
    Calibrating delay loop... 149.50 BogoMIPS (lpj=747520)
    Mount-cache hash table entries: 512
    CPU: Testing write buffer coherency: ok
    DaVinci: 128 gpio irqs
    _________________________________________________________________________________

    Any ideas?

  • Timofei,

    Which is the defconfig that you have used to build the kernel?

  • I started from da8xx_omapl_defconfig, but then modified it to enable mtd devices, nand TI devices etc.

    But just plan da8xx_omapl_defconfig works exactly as bad as the modified one - I can get to the place shown above and no further.

  • On the standard kernel (2.6.33) I was using da830_omapl137_defconfig

  • Timofei,

    Is this the right defconfing. I'm not sure about the 170x platform. Just double check. 

    Also can you enable more debug logs in kernel and try?

  • Yes, that is the correct defconfig

    At least the closest ones to the target system (please do not forget - that is a custom board).

  • Timofei,

    In any case you try enabling more debug logs in kernel. That's the first thing to try. Also you've to see where its getting stuck. If you can attach a debugger like CCS and see where is program counter is stuck at, we can get more clue. If its consistently getting stuck at the same location, then it will be easier to figure out.

  • Yes, I enabled as much debug as I can.

    I will try the CCS debugger to get the program counter - but I think it will be hard to understand where it stuck

    I have string impression that it is stucking in the very same place.

  • I compared the output with http://www.youtube.com/watch?v=XZ06dc4i6Jk (between 14 and 15 seconds) and derived that it stops in the PINMUX / PLL configuration (Duh!).

    After I start to work with it ( arch/arm/mach-davinci/da830.c and others there) I moved behind the stopping point.

    It did not boot yet, but those questions will be discussed in another ticket - if I will need to.