我将 Linux 内核从 2.6.32 升级到 3.0.7,但现在引导加载程序无法加载内核映像。具体来说,启动过程在以下情况后冻结:
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
原因是引导加载程序(U 启动)没有正确配置,这一点可以通过以下事实得到证实:在内核 2.6.x 和内核 3.0.x 之间,串行端口已从 ttySx 重命名为 ttyOx。
下一步是编辑uEnv.txt,存储在启动分区上,以便在启动过程中读取。
uEnv.txt:
mpurate=1000
dvimode="hd720 omapfb.vram=0:8M,1:4M,2:4M"
vram=16M
optargs="consoleblank=0"
console="tty0 console=ttyO2,115200n8"
引导过程失败并显示:
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...
我指的系统是一台远程计算机 (BeagleBoard-xM),通过串行电缆进行访问。
我的问题是:
- 据我所知,
/dev/ttyO2
代表/dev/console
的是系统管理员控制台,但是它们如何与启动过程交互呢?换句话说,从console=ttyS2
到 的编辑console=ttyO2
会影响启动过程还是只是为了通过终端仿真器启用远程人机交互?
最后,开机失败的原因是什么?是uEnv.txt正确的?
答案1
console=ttyO2 允许您在相应的串行端口上查看内核和系统消息。否则它不会影响启动过程 - 即使没有控制台,系统也会启动。
请记住编辑/etc/inittab
- 将 ttyS2 更改为 ttyO2,以便在系统启动后在串行控制台上获得登录提示。
您的新内核可能缺少 SD 所需的驱动程序。检查内核配置 - 将其与旧内核的配置进行比较。您需要将驱动程序编译到内核中。
编辑:您的新内核未检测到 SD。检查它是否具有适合您的主板的正确主板配置。
答案2
我遇到了同样的问题,但对我来说,我没有提供存储卡的正确端口。我必须编辑script.fex
并生成另一个script.bin
,系统启动成功。不同的板卡有不同的端口。我的主板是 ITEAD AW2041,它之前在同一点挂起,等待 mmcblk0p2