|
楼主 |
发表于 2010-9-26 14:21
|
显示全部楼层
本帖最后由 adoot 于 2010-9-26 14:58 编辑
在OpenWRT里面,启动过程中,串口输出其实是有2个阶段的,这个2个阶段需要分别关闭。第一个阶段叫earlyprint,这个时候Linux刚启动,还没有安装串口驱动,串口输出是直接调用一个叫prom_putchar的函数。我们需要做的就是把这个函数里面的输出部分关掉。第二阶段串口驱动安装完毕,把console映射到该串口,这个时候关闭earlyprint,切换到console输出。这个串口对应的代号是ttyS0,我们需要做的就是把console指向其他串口,即使那个串口不存在也没关系。我就设置成了console=ttyS3.
看看下面的启动信息,红色标记是我上面提到的。
Linux version 2.6.32.16 (adoot@host) (gcc version 4.3.3 (GCC) ) #10 Sun Aug 22 08:12:02 CST 2010
prom: fw_arg0=00000007, fw_arg1=a1f87fb0, fw_arg2=a1f88460, fw_arg3=00000004
MyLoader: sysp=8cedceaf, boardp=ef9f5eff, parts=dcad4e02
bootconsole [early0] enabled
CPU revision is: 00019374 (MIPS 24Kc)
Atheros AR7240 rev 2, CPU:350.000 MHz, AHB:175.000 MHz, DDR:350.000 MHz
Determined physical RAM map:
memory: 02000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
Normal 0x00000000 -> 0x00002000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0x00000000 -> 0x00002000
On node 0 totalpages: 8192
free_area_init_node: node 0, pgdat 802bb960, node_mem_map 81000000
Normal zone: 64 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 8128 pages, LIFO batch:0
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128
Kernel command line: rootfstype=squashfs,yaffs,jffs2 noinitrd console=ttyS3,115200 board=TL-WR741ND
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)
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Writing ErrCtl register=00000000
Readback ErrCtl register=00000000
Memory: 29400k/32768k available (2028k kernel code, 3368k reserved, 388k data, 152k init, 0k highmem)
SLUB: Genslabs=7, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:56
Calibrating delay loop... 232.65 BogoMIPS (lpj=1163264)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
MIPS: machine is TP-LINK TL-WR741ND
registering PCI controller with io_map_base unset
bio: create slab <bio-0> at 0
PCI: fixup device 0000:00:00.0
pci 0000:00:00.0: reg 10 64bit mmio: [0x000000-0x00ffff]
pci 0000:00:00.0: supports D1
pci 0000:00:00.0: PME# supported from D0 D1 D3hot
pci 0000:00:00.0: PME# disabled
PCI: mapping irq 48 to pin1@0000:00:00.0
Switching to clocksource MIPS
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY) ?? 2001-2006 Red Hat, Inc.
yaffs Aug 19 2010 10:21:00 Installing.
msgmni has been set to 57
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
Atheros AR71xx SPI Controller driver version 0.2.4
m25p80 spi0.0: mw150r (4096 Kbytes)
spi0.0: searching for MyLoader partition table at offset 0x10000
spi0.0: searching for MyLoader partition table at offset 0x20000
spi0.0: searching for MyLoader partition table at offset 0x30000
spi0.0: searching for MyLoader partition table at offset 0x40000
spi0.0: no MyLoader partition table found
Searching for RedBoot partition table in spi0.0 at offset 0x3e0000
Searching for RedBoot partition table in spi0.0 at offset 0x3f0000
No RedBoot partition table detected in spi0.0
spi0.0: no WRT160NL signature found
Creating 5 MTD partitions on "spi0.0":
0x000000000000-0x000000020000 : "u-boot"
0x000000020000-0x000000120000 : "kernel"
0x000000120000-0x0000003f0000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=350000, len=A0000
0x000000350000-0x0000003f0000 : "rootfs_data"
0x0000003f0000-0x000000400000 : "art"
0x000000020000-0x0000003f0000 : "firmware"
ag71xx_mdio: probed
eth0: Atheros AG71xx at 0xba000000, irq 5
eth0: Found an AR7240 built-in switch
eth1: Atheros AG71xx at 0xb9000000, irq 4
eth1: using fixed link parameters
Atheros AR71xx hardware watchdog driver version 0.1.0
ar71xx-wdt: timeout=15 secs (max=24)
TCP westwood registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
turn off boot console early0
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
Freeing unused kernel memory: 152k freed
Please be patient, while OpenWrt loads ...
gpio-buttons driver version 0.1.2
input: gpio-buttons as /devices/platform/gpio-buttons/input/input0 |
|