DB1300内核启动问题:

81 views
Skip to first unread message

刘阳

unread,
Mar 24, 2010, 5:32:30 AM3/24/10
to linux...@googlegroups.com
Start = 0x80104730, range = (0x80100000,0x805414f8), format = SREC
Linux version 2.6.29.4-rmi-126-DB1300 (root@liuyang-desktop) (gcc version 4.2.4) #26 Wed Mar 24 02:13:16 PDT 2010
console [early0] enabled
CPU revision is: 800c8001 (Au13xx)
(PRId 800c8001) @ 24.00 MHz
RMI DBAu1300 Development Board
Determined physical RAM map:
 memory: 01800000 @ 00000000 (usable)
 memory: 0c800000 @ 01800000 (reserved)
 memory: 02000000 @ 0e000000 (usable)
User-defined physical RAM map:
 memory: 04000000 @ 00000000 (usable)
Zone PFN ranges:
  Normal   0x00000000 -> 0x00004000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00004000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: root=/dev/nfs nfsroot=192.168.1.15/nfsroot/rdpfs console=ttyS2 console=ttyS0 mem=64M rw video=au1200fb:panel:bs
Primary instruction cache 16kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
PID hash table entries: 256 (order: 8, 1024 bytes)
Alchemy clocksource installed
Console: colour dummy device 80x25
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 59200k/65536k available (3373k kernel code, 6268k reserved, 791k data, 192k init, 0k highmem)
Calibrating delay loop... 791.34 BogoMIPS (lpj=3956736)
Mount-cache hash table entries: 512
xxxxxxxxxxx88888888888888
net_namespace: 296 bytes
NET: Registered protocol family 16
Hooking cpu_wait
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
Creating sysfs entry for board
Alchemy MEMPOOL initializing
Alchemy MEMPOOL registered at major 235
Available memory pools:
            LCD:  40 MB @ phys 0x01800000, free
            BSA:  64 MB @ phys 0x04000000, free
            MPE:  32 MB @ phys 0x08000000, free
            OGL:  64 MB @ phys 0x0a000000, free
squashfs: version 4.0 (2009/01/31) Phillip Lougher
msgmni has been set to 115
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
au1200fb: LCD controller driver for AU1200 processors
Returning LCD switch setting 11
au1200fb: Panel 11 HMP10 800x600
au1200fb: Win 2 0-FS gfx, 1-video, 2-ovly gfx, 3-ovly gfx
Panel(HMP10 800x600), 800x600
IRQ 99/lcd: IRQF_DISABLED is not guaranteed on shared IRQs
au1200fb: Allocating fb0: 800x600@16 bpp
Console: switching to colour frame buffer device 100x37
au1200fb: Allocating fb1: 800x600@16 bpp
au1200fb: Allocating fb2: 800x600@32 bpp
au1200fb: Allocating fb3: 800x600@16 bpp
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
serial8250.9: ttyS0 at MMIO 0x10102000 (irq = 33) is a 8250
brd: module loaded
loop: module loaded
dm9000 Ethernet Driver, V1.31
00000000000000000000000
MAEBE: physAddr 08000000, physSize 02000000
Au12XX MAEBE driver registered Sucessfully v1.0
Au13XX MAEBSA driver registered Sucessfully v1.0
Au13XX MAEMPE driver registered Sucessfully v1.0
mae_dma: pri0 45617238, pri1 09000000
Driver 'sd' needs updating - please use bus_type methods
Driver 'sr' needs updating - please use bus_type methods
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci->regs = b4020010
au13xx-ehci au13xx-ehci.0: Au13xx EHCI
au13xx-ehci au13xx-ehci.0: new USB bus registered, assigned bus number 1
au13xx-ehci au13xx-ehci.0: irq 98, io mem 0x14020000
au13xx-ehci au13xx-ehci.0: USB 0.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: Au13xx EHCI
usb usb1: Manufacturer: Linux 2.6.29.4-rmi-126-DB1300 ehci_hcd
usb usb1: SerialNumber: au13xx-ehci.0
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver libusual
mice: PS/2 mouse device common for all mice
Probing for MMC
Probing for MMC mmc0
au1xxx-mmc: MMC Controller 1 set up at B0601000 (mode=dma)
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
oprofile: using timer interrupt.
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
turn off boot console early0  //kernel/printk.c  +1254


分析源代码:if ( console_drivers->flags&CON_BOOT)
                        printk("turn off boot console early0")
                   检查flagss是不是CON_BOOT标识 ,如果不是就打印。
请问 CON_BOOT是什么意思, 怎么解决这个 问题呢。
                  


Barry Song

unread,
Mar 26, 2010, 11:46:33 PM3/26/10
to linux...@googlegroups.com
2010/3/24 刘阳 <hangbi...@163.com>:
不知道你要解决什么问题,对于early console,一般本身会设置CON_BOOT,譬如:
147 if (likely(early_console)) {
148 early_console->flags |= CON_BOOT;
149
150 register_console(early_console);
151 printk(KERN_INFO "early printk enabled on %s%d\n",
152 early_console->name,
153 early_console->index);
154 }
155
在init启动后,要关闭early console,这是正确的行为。

>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Linux设备驱动开发者群落" group.
> To post to this group, send email to linux...@googlegroups.com
> To unsubscribe from this group, send email to
> linuxdriver...@googlegroups.com
> For more options, visit this group at
> http://groups.google.gr/group/linuxdriver?hl=zh-CN
>
> To unsubscribe from this group, send email to
> linuxdriver+unsubscribegooglegroups.com or reply to this email with the
> words "REMOVE ME" as the subject.
>

刘阳

unread,
Mar 27, 2010, 1:42:24 AM3/27/10
to linux...@googlegroups.com
谢谢你的回复:
        如果关闭了early console控制台,然后由谁来接管控制台呢。
     我认为是在 console=?? 来定义的。在kernel/printk.c      +1178行
 1178
1179     if (bootconsole && (console->flags & CON_CONSDEV)) {  //如果 bootconsole是CON_CONSDEV
1180         printk(KERN_INFO "console handover: boot [%s%d] -> real [%s%d]\n",//这里很明显是转移到console 定义的控制台。
1181                bootconsole->name, bootconsole->index,
1182                console->name, console->index);
1183         unregister_console(bootconsole); // 然后在卸载early console控制台。
1184         console->flags &= ~CON_PRINTBUFFER;
 
 你看看分析错了。

Barry Song

unread,
Mar 27, 2010, 1:48:34 AM3/27/10
to linux...@googlegroups.com
2010/3/27 刘阳 <hangbi...@163.com>:

> 谢谢你的回复:
>         如果关闭了early console控制台,然后由谁来接管控制台呢。
>      我认为是在 console=?? 来定义的。在kernel/printk.c      +1178行

是的,boot console只是在early printk阶段有效,之后转入console=指定的设备作为printk.

刘阳

unread,
Mar 27, 2010, 2:00:41 AM3/27/10
to linux...@googlegroups.com
 我出现的问题是:
。。。。。。。。。。。。。。。。。。。。。。。。

>> RPC: Registered udp transport module.
>>> RPC: Registered tcp transport module.
>>> turn off boot console early0
 内核跑到这里来就死掉了。 所以没有打印信息了。
但是我在console已经定义了ttyS2 。虽然 console early0已经关闭掉了,但是ttyS2应该有信息打印出来啊。可惜结果没有。 用的8250.c 的驱动,支持1665这个标准的。

还有一个问题 “>>> turn off boot console early0”之前的打印语句应该都是 console early0 打印出来的吧?

Barry Song

unread,
Mar 27, 2010, 2:17:55 AM3/27/10
to linux...@googlegroups.com
2010/3/27 刘阳 <hangbi...@163.com>:

> 我出现的问题是:
> 。。。。。。。。。。。。。。。。。。。。。。。。
>>> RPC: Registered udp transport module.
>>>> RPC: Registered tcp transport module.
>>>> turn off boot console early0
> 内核跑到这里来就死掉了。 所以没有打印信息了。
> 但是我在console已经定义了ttyS2 。虽然 console early0已经关闭掉了,但是ttyS2应该有信息打印出来啊。可惜结果没有。
> 用的8250.c 的驱动,支持1665这个标准的。

把你的cmd line贴出来,另外,你内核配置使能了CONFIG_SERIAL_8250_CONSOLE吗?
drivers/serial/Kconfig:

config SERIAL_8250_CONSOLE
bool "Console on 8250/16550 and compatible serial port"
depends on SERIAL_8250=y
select SERIAL_CORE_CONSOLE
---help---
If you say Y here, it will be possible to use a serial port as the
system console (the system console is the device which receives all
kernel messages and warnings and which allows logins in single user
mode). This could be useful if some terminal or printer is connected
to that serial port.

Even if you say Y here, the currently visible virtual console
(/dev/tty0) will still be used as the system console by default, but
you can alter that using a kernel command line option such as
"console=ttyS1". (Try "man bootparam" or see the documentation of
your boot loader (grub or lilo or loadlin) about how to pass options
to the kernel at boot time.)

If you don't have a VGA card installed and you say Y here, the
kernel will automatically use the first serial line, /dev/ttyS0, as
system console.

You can set that using a kernel command line option such as
"console=uart8250,io,0x3f8,9600n8"
"console=uart8250,mmio,0xff5e0000,115200n8".
and it will switch to normal serial console when the corresponding
port is ready.
"earlycon=uart8250,io,0x3f8,9600n8"
"earlycon=uart8250,mmio,0xff5e0000,115200n8".
it will not only setup early console.

If unsure, say N.

刘阳

unread,
Mar 27, 2010, 2:54:01 AM3/27/10
to linux...@googlegroups.com
yamon的cmd line:
start       (R/W)  load;go 80104730 console=ttyS2,115200n8 root=/dev/nfs /nfsro
                   ot=192.168.1.134:/nfsroot/rdpfs ip=192.168.1.6 mem=64M rw
CONFIG_SERIAL_8250_CONSOLE这个肯定配置了的.

Reply all
Reply to author
Forward
0 new messages