O bootloader não carrega o kernel do linux

1

Eu atualizei o kernel do linux do 2.6.32 para o 3.0.7 mas agora o bootloader não é capaz de carregar a imagem do kernel. Especificamente, o procedimento de inicialização congela depois:

Starting kernel ... 
Uncompressing Linux... done, booting the kernel.

O motivo foi que o bootloader (U-Boot) não foi configurado corretamente, o que foi confirmado pelo fato de que entre o kernel 2.6.xeo kernel 3.0.x as portas seriais foram renomeadas de ttySx para ttyOx.

O próximo passo foi editar um uEnv.txt , armazenado na partição de inicialização, para obter a leitura durante o procedimento de inicialização.

uEnv.txt:

mpurate=1000
dvimode="hd720 omapfb.vram=0:8M,1:4M,2:4M"
vram=16M
optargs="consoleblank=0"
console="tty0 console=ttyO2,115200n8"

O procedimento de inicialização falha com:

 Texas Instruments X-Loader 1.5.0 (Jun 14 2011 - 22:04:07)                    
Beagle xM                                                                    
Reading boot sector                                                          
Loading u-boot.bin from mmc             


U-Boot 2011.03-rc1-00000-g9a3cc57-dirty (Apr 01 2011 - 17:41:42)

OMAP36XX/37XX-GP ES2.1, CPU-OPP2, L3-165MHz, Max CPU Clock 1 Ghz
OMAP3 Beagle board + LPDDR/NAND
I2C:   ready
DRAM:  512 MiB
NAND:  0 MiB                                                                    
MMC:   OMAP SD/MMC: 0                                                           
*** Warning - readenv() failed, using default environment                       

In:    serial                                                                   
Out:   serial                                                                   
Err:   serial                                                                   
Beagle xM Rev C                                                                 
No EEPROM on expansion board                                                    
Die ID #7ba200029ff800000168300f0802900e                                        
Hit any key to stop autoboot:  0                                                
The user button is currently NOT pressed.                                       
SD/MMC found on device 0                                                        
reading uEnv.txt                                                                

135 bytes read                                                                  
Loaded environment from uEnv.txt                                                
Importing environment from mmc ...                                              
Loading file "/boot/uImage" from mmc device 0:2 (xxa2)                          
2495320 bytes read                                                              
Booting fromage at 80200000 ...                                                 
   Image Name:   Linux-3.0.7                                                    
   Image Type:   ARM Linux Kernel Image (uncompressed)                          
   Data Size:    2495256 Bytes = 2.4 MiB                                        
   Load Address: 80008000                                                       
   Entry Point:  80008000                                                       
   Verifying Checksum ... OK                                                    
   Loading Kernel Image ... OK                                                  
OK                                                                              

Starting kernel ...                                                             

Uncompressing Linux... done, booting the kernel.                                
Linux version 3.0.7 (root@beagleboard) (gcc version 4.3.3 (GCC) ) #1 PREEMPT Sa4
CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f                 
CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache               
Machine: OMAP3 Beagle Board                                                     
Reserving 16777216 bytes SDRAM for VRAM                                         
Memory policy: ECC disabled, Data cache writeback                               
OMAP3630 ES1.2 (l2cache iva sgx neon isp 192mhz_clk )                           
SRAM: Mapped pa 0x40200000 to va 0xfe400000 size: 0x10000                       
Clocking rate (Crystal/Core/MPU): 26.0/332/600 MHz                              
Reprogramming SDRC clock to 332000000 Hz                                        
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 125952     
 omapdss.def_disp=dvi root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait           
PID hash table entries: 2048 (order: 1, 8192 bytes)                             
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)                 
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)                  
Memory: 496MB = 496MB total                                                     
Memory: 498048k/498048k available, 26240k reserved, 0K highmem                  
Virtual kernel memory layout:                                                   
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)                               
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)                               
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)                               
    vmalloc : 0xe0800000 - 0xf8000000   ( 376 MB)                               
    lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)                               
    modules : 0xbf000000 - 0xc0000000   (  16 MB)                               
      .init : 0xc0008000 - 0xc0029000   ( 132 kB)                               
      .text : 0xc0029000 - 0xc04b46c8   (4654 kB)                               
      .data : 0xc04b6000 - 0xc04efec0   ( 232 kB)                               
       .bss : 0xc04efee4 - 0xc05311a4   ( 261 kB)                               
Preemptible hierarchical RCU implementation.                                    
NR_IRQS:410                                                                     
IRQ: Found an INTC at 0xfa200000 (revision 4.0) with 96 interrupts              
Total of 96 interrupts on 1 active controller                                   
omap_hwmod: gpt12_fck: missing clockdomain for gpt12_fck.                       
OMAP clockevent source: GPTIMER12 at 32768 Hz                                   
sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms      
Console: colour dummy device 80x30                                              
console [tty0] enabled                                                          
Calibrating delay loop... 331.40 BogoMIPS (lpj=1296384)                         
pid_max: default: 32768 minimum: 301                                            
Mount-cache hash table entries: 512                                             
CPU: Testing write buffer coherency: ok                                         
devtmpfs: initialized                                                           
omap_hwmod: _populate_mpu_rt_base found no _mpu_rt_va for l4_core               
omap_hwmod: _populate_mpu_rt_base found no _mpu_rt_va for l4_per                
omap_hwmod: _populate_mpu_rt_base found no _mpu_rt_va for l4_wkup               
omap_hwmod: i2c1: softreset failed (waited 10000 usec)                          
omap_hwmod: i2c2: softreset failed (waited 10000 usec)                          
omap_hwmod: i2c3: softreset failed (waited 10000 usec)                          
print_constraints: dummy:                                                       
GPMC revision 5.0                                                               
omap_device: omap_gpio.0: new worst case activate latency 0: 30517              
OMAP GPIO hardware version 2.5                                                  
OMAP GPIO hardware version 2.5                                                  
OMAP GPIO hardware version 2.5                                                  
OMAP GPIO hardware version 2.5                                                  
OMAP GPIO hardware version 2.5                                                  
OMAP GPIO hardware version 2.5                                                  
omap_mux_init: Add partition: #1: core, flags: 0                                
OMAP3 Beagle Rev: unknown 2                                                     
Unable to get DVI reset GPIO                                                    
hw-breakpoint: debug architecture 0x4 unsupported.                              
------------[ cut here ]------------                                            
WARNING: at arch/arm/mach-omap2/clock.c:455 omap2_clk_switch_mpurate_at_boot+0x)
clock: dpll1_ck: unable to set MPU rate to 1000: -22                            
[<c0032ee0>] (unwind_backtrace+0x0/0xec) from [<c00519d8>] (warn_slowpath_commo)
[<c00519d8>] (warn_slowpath_common+0x48/0x60) from [<c0051a84>] (warn_slowpath_)
[<c0051a84>] (warn_slowpath_fmt+0x30/0x40) from [<c000f8f4>] (omap2_clk_switch_)
[<c000f8f4>] (omap2_clk_switch_mpurate_at_boot+0x80/0xb4) from [<c000f934>] (om)
[<c000f934>] (omap3xxx_clk_arch_init+0xc/0x3c) from [<c0008370>] (do_one_initca)
[<c0008370>] (do_one_initcall+0x94/0x15c) from [<c00084e0>] (kernel_init+0x74/0)
[<c00084e0>] (kernel_init+0x74/0x11c) from [<c002f35c>] (kernel_thread_exit+0x0)
---[ end trace 1b75b31a2719ed1c ]---                                            
OMAP DMA hardware revision 5.0                                                  
bio: create slab <bio-0> at 0                                                   
SCSI subsystem initialized                                                      
omap_device: omap_i2c.1: new worst case activate latency 0: 30517               
omap_i2c omap_i2c.1: bus 1 rev4.0 at 2600 kHz                                   
twl4030: PIH (irq 7) chaining IRQs 368..375                                     
twl4030: power (irq 373) chaining IRQs 376..383                                 
twl4030: gpio (irq 368) chaining IRQs 384..401                                  
print_constraints: VMMC1: 1850 <--> 3150 mV at 3000 mV normal standby           
print_constraints: VDAC: 1800 mV normal standby                                 
print_constraints: VDVI: 1800 mV normal standby                                 
print_constraints: VSIM: 1800 <--> 3000 mV at 1800 mV normal standby            
omap_i2c omap_i2c.3: bus 3 rev4.0 at 100 kHz                                    
Switching to clocksource 32k_counter                                            
NTFS driver 2.1.30 [Flags: R/W].                                                
Btrfs loaded                                                                    
GFS2 installed                                                                  
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)            
io scheduler noop registered                                                    
io scheduler deadline registered                                                
io scheduler cfq registered (default)                                           
OMAP DSS rev 2.0                                                                
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled                         
omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 72) is a OMAP UART0                
omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 73) is a OMAP UART1                
omap_uart.2: ttyO2 at MMIO 0x49020000 (irq = 74) is a OMAP UART2                
console [ttyO2] enabled                                                         
omap_uart.3: ttyO3 at MMIO 0x49042000 (irq = 80) is a OMAP UART3                
SCSI Media Changer driver v0.25                                                 
mousedev: PS/2 mouse device common for all mice                                 
input: gpio-keys as /devices/platform/gpio-keys/input/input0                    
input: twl4030_pwrbutton as /devices/platform/omap/omap_i2c.1/i2c-1/1-0049/twl41
i2c /dev entries driver                                                         
lirc_dev: IR Remote Control driver registered, major 252                        
IR NEC protocol handler initialized                                             
IR RC5(x) protocol handler initialized                                          
IR RC6 protocol handler initialized                                             
IR JVC protocol handler initialized                                             
IR Sony protocol handler initialized                                            
IR RC5 (streamzap) protocol handler initialized                                 
IR LIRC bridge handler initialized                                              
Linux video capture interface: v2.00                                            
i2c-core: driver [msp3400] using legacy suspend method                          
i2c-core: driver [msp3400] using legacy resume method                           
vivi-000: V4L2 device registered as video0                                      
Video Technology Magazine Virtual Video Capture Board ver 0.8.0 successfully lo.
vpfe_init                                                                       
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3         
ThumbEE CPU extension supported.                                                
omap_voltage_late_init: Unable to create voltage debugfs main dir               
vdd_debugfs_init: Unable to create debugfs directory for vdd_mpu                
vdd_debugfs_init: Unable to create debugfs directory for vdd_core               
sr_init: No PMIC hook to init smartreflex                                       
smartreflex smartreflex.0: omap_sr_probe: SmartReflex driver initialized        
smartreflex: probe of smartreflex.0 failed with error -22                       
smartreflex smartreflex.1: omap_sr_probe: SmartReflex driver initialized        
smartreflex: probe of smartreflex.1 failed with error -22                       
sr_init: platform driver register failed for SR                                 
clock: disabling unused clocks to save power                                    
omapfb omapfb: no driver for display                                            
omapfb omapfb: failed to setup omapfb                                           
regulator_init_complete: VDVI: incomplete constraints, leaving on               
regulator_init_complete: VDAC: incomplete constraints, leaving on               
regulator_init_complete: VMMC1: incomplete constraints, leaving on              
omap_vout omap_vout: probed for an unknown device                               
Waiting for root device /dev/mmcblk0p2... 

O sistema a que me refiro é um computador remoto (BeagleBoard-xM) e o acesso é via cabo serial.

A minha pergunta é:

  • Até onde eu sei, /dev/ttyO2 representa /dev/console , que é o console do administrador do sistema , mas como eles interagem com o procedimento de inicialização? Em outras palavras, a edição de console=ttyS2 para console=ttyO2 afeta o procedimento de inicialização ou serve apenas para ativar a interação humana remota por meio de um emulador de terminal?

Por fim, qual é o motivo da falha de inicialização? O uEnv.txt está correto?

    
por dempap 01.04.2014 / 16:42

2 respostas

1

O console = ttyO2 permite que você veja o kernel e as mensagens do sistema na porta serial correspondente. Isso não afeta o processo de inicialização - o sistema inicializará mesmo sem um console.

Lembre-se de editar /etc/inittab - altere ttyS2 para ttyO2 para obter um prompt de login no console serial assim que o sistema inicializar.

Seu novo kernel provavelmente está faltando o driver necessário para o seu SD. Verifique a configuração do kernel - compare com a configuração do seu kernel antigo. Você precisa do driver compilado no kernel.

EDIT: Seu novo kernel não detecta o SD. Verifique se tem a configuração correta da placa para sua placa.

    
por 01.04.2014 / 21:31
0

Eu tive o mesmo problema, mas, para mim, não forneci a porta correta para o cartão de memória. Eu tive que editar o script.fex e gerar outro script.bin e o sistema foi inicializado com sucesso. Placas diferentes têm portas diferentes. Meu quadro era um ITEAD AW2041, e ele pendurou no mesmo ponto aguardando no mmcblk0p2

    
por 20.01.2015 / 13:21