启动自己的linux, everything include toolchain, rootfs, kernel...

来源:互联网 发布:银河证券海王星软件 编辑:程序博客网 时间:2024/05/18 01:41
做了好多年嵌入式,应该知道如何启动自己的嵌入式linux,我做一个,记录下来。

还是用工具做吧,我试着自己做,比较费劲。

ptxdist and oselas ,制作toolchain, 内核
http://www.pengutronix.de/software/ptxdist/index_en.html
http://www.pengutronix.de/oselas/toolchain/index_en.html

下载下来,注意配对使用,我用ptxdist-2011.03.1 和 OSELAS.Toolchain-2011.03.1
我用ubuntu11, 先建立你可以访问的文件夹, mkdir /opt, ptxdis会用这个作为默认的。
1)解压ptxdist-2011.03.1, 编译,安装
2)解压OSELAS.Toolchain-2011.03.1, 进入,执行命令:
ptxdist select ptxconfigs/i686-unknown-linux-gnu_gcc-4.5.2_glibc-2.13_binutils-2.21_kernel-2.6.36-sanitized.ptxconfig
ptxdist go

ptxdist 会自动下载tar包进行编译,如果它下载不下来,你来下载,然后放到./src去。

这个时间较长,等一切完成,你就有toolchain和内核了.

1)toolchain
build-target/linux-2.6.36$ ls /opt/OSELAS.Toolchain-2011.03.1/i686-unknown-linux-gnu/gcc-4.5.2-glibc-2.13-binutils-2.21-kernel-2.6.36-sanitized/bin/
i686-unknown-linux-gnu-addr2line  i686-unknown-linux-gnu-g++        i686-unknown-linux-gnu-gprof    i686-unknown-linux-gnu-readelf
i686-unknown-linux-gnu-ar         i686-unknown-linux-gnu-gcc        i686-unknown-linux-gnu-ld       i686-unknown-linux-gnu-size
i686-unknown-linux-gnu-as         i686-unknown-linux-gnu-gcc-4.5.2  i686-unknown-linux-gnu-ld.bfd   i686-unknown-linux-gnu-strings
i686-unknown-linux-gnu-c++        i686-unknown-linux-gnu-gccbug     i686-unknown-linux-gnu-nm       i686-unknown-linux-gnu-strip
i686-unknown-linux-gnu-c++filt    i686-unknown-linux-gnu-gcov       i686-unknown-linux-gnu-objcopy  ptxconfig
i686-unknown-linux-gnu-cpp        i686-unknown-linux-gnu-gdb        i686-unknown-linux-gnu-objdump
i686-unknown-linux-gnu-elfedit    i686-unknown-linux-gnu-gdbtui     i686-unknown-linux-gnu-ranlib
2)kernel

OSELAS.Toolchain-2011.03.1$ ls ./platform-i686-unknown-linux-gnu-gcc-4.5.2-glibc-2.13-binutils-2.21-kernel-2.6.36-sanitized/build-target/linux-2.6.36/
arch     CREDITS        drivers   include  Kbuild  MAINTAINERS  modules.builtin  net             samples   sound       usr      vmlinux.o
block    crypto         firmware  init     kernel  Makefile     modules.order    README          scripts   System.map  virt
COPYING  Documentation  fs        ipc      lib     mm           Module.symvers   REPORTING-BUGS  security  tools       vmlinux
gridwang@wangxuefu:/sdb1/my_toolchain/osela/OSELAS.Toolchain-2011.03.1$

哈哈,把环境变量改改,准备编译吧

export PATH=$PATH:/opt/OSELAS.Toolchain-2011.03.1/i686-unknown-linux-gnu/gcc-4.5.2-glibc-2.13-binutils-2.21-kernel-2.6.36-sanitized/bin/

进入内核
make ARCH=i386 CROSS_COMPILE=i686-unknown-linux-gnu- V=1
你会看到你的编译器i686-unknown-linux-gnu-gcc 在工作鸟................

完成了,我们得到了bzImage, 在arch/x86/boot/bzImage

启动这个东西吧,用qemu
sudo apt-get install qemu
安上。

制作一个启动硬盘,还需要一个文件系统,我太懒了,我偷一个吧。
下载一个老的,linux官方用的linux-0.2.img.bz2,在:
http://wiki.qemu.org/Download

把它mount上,留着用
gridwang@wangxuefu:/sdb1/linux_k/linux-old$ sudo mount linux-0.2.img img -o loop
[sudo] password for gridwang:
gridwang@wangxuefu:/sdb1/linux_k/linux-old$ ls ./img
bin  boot  dev  etc  lib  lost+found  mnt  proc  root  sbin  tmp  usr  var
gridwang@wangxuefu:/sdb1/linux_k/linux-old$

先做一个自己的硬盘,50M
gridwang@wangxuefu:/sdb1/linux_k/linux-old$ sudo dd if=/dev/zero of=hd_test.img bs=1024 count=$((50*1024))
51200+0 records in
51200+0 records out
52428800 bytes (52 MB) copied, 0.267521 s, 196 MB/s
gridwang@wangxuefu:/sdb1/linux_k/linux-old$

加载到虚拟设备上:
gridwang@wangxuefu:/sdb1/linux_k/linux-old$ sudo losetup /dev/loop1 hd_test.img

格了它:
gridwang@wangxuefu:/sdb1/linux_k/linux-old$ sudo fdisk -C 10 -H 16 -S 63 /dev/loop1
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xd788c6fd.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-101, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-101, default 101):
Using default value 101

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
gridwang@wangxuefu:/sdb1/linux_k/linux-old$

查看一下:

gridwang@wangxuefu:/sdb1/linux_k/linux-old$ sudo fdisk -lu /dev/loop1

Disk /dev/loop1: 52 MB, 52428800 bytes
16 heads, 63 sectors/track, 101 cylinders, total 102400 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xd788c6fd

      Device Boot      Start         End      Blocks   Id  System
/dev/loop1p1              63      101807       50872+  83  Linux
gridwang@wangxuefu:/sdb1/linux_k/linux-old$

可以看见,文件系统开始于63扇区,此之前为MBR,所以挂载如下:
gridwang@wangxuefu:/sdb1/linux_k/linux-old$ sudo losetup /dev/loop2 hd_test.img -o $((63*512))

建立文件系统:
gridwang@wangxuefu:/sdb1/linux_k/linux-old$ sudo mkfs.ext3 /dev/loop2
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
12824 inodes, 51168 blocks
2558 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=52428800
7 block groups
8192 blocks per group, 8192 fragments per group
1832 inodes per group
Superblock backups stored on blocks:
    8193, 24577, 40961

Writing inode tables: done                            
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 32 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
gridwang@wangxuefu:/sdb1/linux_k/linux-old$

mount 上,拷贝rootfs:
gridwang@wangxuefu:/sdb1/linux_k/linux-old$ sudo mount /dev/loop2 img2
gridwang@wangxuefu:/sdb1/linux_k/linux-old/img2$ sudo cp -r ../img/* .
gridwang@wangxuefu:/sdb1/linux_k/linux-old/img2$ ls
bin  boot  dev  etc  lib  lost+found  mnt  proc  root  sbin  tmp  usr  var
gridwang@wangxuefu:/sdb1/linux_k/linux-old/img2$

都有了,把bzImage拷贝过来,执行qemu如下, haha, enjoy your kernel, rootfs, toolchain and everything....................

gridwang@wangxuefu:/sdb1/linux_k/linux-old$ cat qemu_k36.sh
qemu -kernel ./k36_bzImage  -hda hd_test.img \
     -append "console=ttyS0 root=/dev/sda1" \
     -nographic
gridwang@wangxuefu:/sdb1/linux_k/linux-old$
gridwang@wangxuefu:/sdb1/linux_k/linux-old$ sh qemu_k36.sh
open /dev/kvm: No such file or directory
Could not initialize KVM, will disable KVM support
qemu: pci_add_option_rom: failed to find romfile "pxe-rtl8139.bin"
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 2.6.36 (gridwang@wangxuefu) (gcc version 4.5.2 (OSELAS.Toolchain-2011.03.1) ) #1 SMP Wed Oct 5 17:25:30 CST 2011
[    0.000000] BIOS-provided physical RAM map:
[    0.000000]  BIOS-e820: 0000000000000000 - 000000000009f400 (usable)
[    0.000000]  BIOS-e820: 000000000009f400 - 00000000000a0000 (reserved)
[    0.000000]  BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
[    0.000000]  BIOS-e820: 0000000000100000 - 0000000017ffd000 (usable)
[    0.000000]  BIOS-e820: 0000000017ffd000 - 0000000018000000 (reserved)
[    0.000000]  BIOS-e820: 00000000fffc0000 - 0000000100000000 (reserved)
[    0.000000] Notice: NX (Execute Disable) protection missing in CPU or disabled in BIOS!
[    0.000000] DMI 2.4 present.
[    0.000000] last_pfn = 0x17ffd max_arch_pfn = 0x100000
[    0.000000] Scanning 1 areas for low memory corruption
[    0.000000] modified physical RAM map:
[    0.000000]  modified: 0000000000000000 - 0000000000001000 (reserved)
[    0.000000]  modified: 0000000000001000 - 0000000000002000 (usable)
[    0.000000]  modified: 0000000000002000 - 0000000000010000 (reserved)
[    0.000000]  modified: 0000000000010000 - 000000000009f400 (usable)
[    0.000000]  modified: 000000000009f400 - 00000000000a0000 (reserved)
[    0.000000]  modified: 00000000000f0000 - 0000000000100000 (reserved)
[    0.000000]  modified: 0000000000100000 - 0000000017ffd000 (usable)
[    0.000000]  modified: 0000000017ffd000 - 0000000018000000 (reserved)
[    0.000000]  modified: 00000000fffc0000 - 0000000100000000 (reserved)
[    0.000000] found SMP MP-table at [c00fd7a0] fd7a0
[    0.000000] init_memory_mapping: 0000000000000000-0000000017ffd000
[    0.000000] ACPI: RSDP 000fd750 00014 (v00 BOCHS )
[    0.000000] ACPI: RSDT 17ffdc40 00034 (v01 BOCHS  BXPCRSDT 00000001 BXPC 00000001)
[    0.000000] ACPI: FACP 17fffe70 00074 (v01 BOCHS  BXPCFACP 00000001 BXPC 00000001)
[    0.000000] ACPI: DSDT 17ffde40 01FB7 (v01   BXPC   BXDSDT 00000001 INTL 20090123)
[    0.000000] ACPI: FACS 17fffe00 00040
[    0.000000] ACPI: SSDT 17ffdda0 0009E (v01 BOCHS  BXPCSSDT 00000001 BXPC 00000001)
[    0.000000] ACPI: APIC 17ffdcc0 00072 (v01 BOCHS  BXPCAPIC 00000001 BXPC 00000001)
[    0.000000] ACPI: HPET 17ffdc80 00038 (v01 BOCHS  BXPCHPET 00000001 BXPC 00000001)
[    0.000000] 0MB HIGHMEM available.
[    0.000000] 383MB LOWMEM available.
[    0.000000]   mapped low ram: 0 - 17ffd000
[    0.000000]   low ram: 0 - 17ffd000
[    0.000000] Zone PFN ranges:
[    0.000000]   DMA      0x00000001 -> 0x00001000
[    0.000000]   Normal   0x00001000 -> 0x00017ffd
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start PFN for each node
[    0.000000] early_node_map[3] active PFN ranges
[    0.000000]     0: 0x00000001 -> 0x00000002
[    0.000000]     0: 0x00000010 -> 0x0000009f
[    0.000000]     0: 0x00000100 -> 0x00017ffd
[    0.000000] Using APIC driver default
[    0.000000] ACPI: PM-Timer IO Port: 0xb008
[    0.000000] ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
[    0.000000] ACPI: IOAPIC (id[0x01] address[0xfec00000] gsi_base[0])
[    0.000000] IOAPIC[0]: apic_id 1, version 17, address 0xfec00000, GSI 0-23
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
[    0.000000] Using ACPI (MADT) for SMP configuration information
[    0.000000] ACPI: HPET id: 0x8086a201 base: 0xfed00000
[    0.000000] SMP: Allowing 1 CPUs, 0 hotplug CPUs
[    0.000000] PM: Registered nosave memory: 0000000000002000 - 0000000000010000
[    0.000000] PM: Registered nosave memory: 000000000009f000 - 00000000000a0000
[    0.000000] PM: Registered nosave memory: 00000000000a0000 - 00000000000f0000
[    0.000000] PM: Registered nosave memory: 00000000000f0000 - 0000000000100000
[    0.000000] Allocating PCI resources starting at 18000000 (gap: 18000000:e7fc0000)
[    0.000000] setup_percpu: NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:1 nr_node_ids:1
[    0.000000] PERCPU: Embedded 13 pages/cpu @c1c00000 s30784 r0 d22464 u4194304
[    0.000000] pcpu-alloc: s30784 r0 d22464 u4194304 alloc=1*4194304
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 97421
[    0.000000] Kernel command line: console=ttyS0 root=/dev/sda1
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Enabling fast FPU save and restore... done.
[    0.000000] Enabling unmasked SIMD FPU exception support... done.
[    0.000000] Initializing CPU#0
[    0.000000] Subtract (40 early reservations)
[    0.000000]   #1 [0000001000 - 0000002000]   EX TRAMPOLINE
[    0.000000]   #2 [0001000000 - 00017d86d8]   TEXT DATA BSS
[    0.000000]   #3 [00017d9000 - 00017e0049]             BRK
[    0.000000]   #4 [000009f400 - 00000fd7a0]   BIOS reserved
[    0.000000]   #5 [00000fd7a0 - 00000fd7b0]    MP-table mpf
[    0.000000]   #6 [00000fd890 - 0000100000]   BIOS reserved
[    0.000000]   #7 [00000fd7b0 - 00000fd890]    MP-table mpc
[    0.000000]   #8 [0000010000 - 0000011000]      TRAMPOLINE
[    0.000000]   #9 [0000011000 - 0000015000]     ACPI WAKEUP
[    0.000000]   #10 [0000015000 - 0000016000]         PGTABLE
[    0.000000]   #11 [00017e1000 - 00017e2000]         BOOTMEM
[    0.000000]   #12 [00017e2000 - 0001ae2000]         BOOTMEM
[    0.000000]   #13 [00017d8700 - 00017d8704]         BOOTMEM
[    0.000000]   #14 [00017d8740 - 00017d8800]         BOOTMEM
[    0.000000]   #15 [00017d8800 - 00017d8824]         BOOTMEM
[    0.000000]   #16 [0001ae2000 - 0001ae3800]         BOOTMEM
[    0.000000]   #17 [00017d8840 - 00017d8865]         BOOTMEM
[    0.000000]   #18 [00017d8880 - 00017d88a7]         BOOTMEM
[    0.000000]   #19 [00017d88c0 - 00017d89bc]         BOOTMEM
[    0.000000]   #20 [00017d89c0 - 00017d8a00]         BOOTMEM
[    0.000000]   #21 [00017d8a00 - 00017d8a40]         BOOTMEM
[    0.000000]   #22 [00017d8a40 - 00017d8a80]         BOOTMEM
[    0.000000]   #23 [00017d8a80 - 00017d8ac0]         BOOTMEM
[    0.000000]   #24 [00017d8ac0 - 00017d8b00]         BOOTMEM
[    0.000000]   #25 [00017d8b00 - 00017d8b40]         BOOTMEM
[    0.000000]   #26 [00017d8b40 - 00017d8b50]         BOOTMEM
[    0.000000]   #27 [00017d8b80 - 00017d8b90]         BOOTMEM
[    0.000000]   #28 [00017d8bc0 - 00017d8bdd]         BOOTMEM
[    0.000000]   #29 [00017d8c00 - 00017d8c1d]         BOOTMEM
[    0.000000]   #30 [0001c00000 - 0001c0d000]         BOOTMEM
[    0.000000]   #31 [00017d8c40 - 00017d8c44]         BOOTMEM
[    0.000000]   #32 [00017d8c80 - 00017d8c84]         BOOTMEM
[    0.000000]   #33 [00017d8cc0 - 00017d8cc4]         BOOTMEM
[    0.000000]   #34 [00017d8d00 - 00017d8d04]         BOOTMEM
[    0.000000]   #35 [00017d8d40 - 00017d8df0]         BOOTMEM
[    0.000000]   #36 [00017d8e00 - 00017d8ea8]         BOOTMEM
[    0.000000]   #37 [0001ae3800 - 0001ae5800]         BOOTMEM
[    0.000000]   #38 [0001ae5800 - 0001b25800]         BOOTMEM
[    0.000000]   #39 [0001b25800 - 0001b45800]         BOOTMEM
[    0.000000] Initializing HighMem for node 0 (00000000:00000000)
[    0.000000] Memory: 381132k/393204k available (4590k kernel code, 11624k reserved, 2323k data, 404k init, 0k highmem)
[    0.000000] virtual kernel memory layout:
[    0.000000]     fixmap  : 0xfff16000 - 0xfffff000   ( 932 kB)
[    0.000000]     pkmap   : 0xff800000 - 0xffc00000   (4096 kB)
[    0.000000]     vmalloc : 0xd87fd000 - 0xff7fe000   ( 624 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xd7ffd000   ( 383 MB)
[    0.000000]       .init : 0xc16c1000 - 0xc1726000   ( 404 kB)
[    0.000000]       .data : 0xc147bb8a - 0xc16c0860   (2323 kB)
[    0.000000]       .text : 0xc1000000 - 0xc147bb8a   (4590 kB)
[    0.000000] Checking if this processor honours the WP bit even in supervisor mode...Ok.
[    0.000000] SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]     RCU-based detection of stalled CPUs is disabled.
[    0.000000]     Verbose stalled-CPUs detection is disabled.
[    0.000000] NR_IRQS:2304 nr_irqs:256
[    0.000000] Console: colour VGA+ 80x25
[    0.000000] console [ttyS0] enabled
[    0.000000] Fast TSC calibration failed
[    0.000000] TSC: Unable to calibrate against PIT
[    0.000000] TSC: using HPET reference calibration
[    0.000000] Detected 2182.070 MHz processor.
[    0.009477] Calibrating delay loop (skipped), value calculated using timer frequency.. 4364.14 BogoMIPS (lpj=2182070)
[    0.011074] pid_max: default: 32768 minimum: 301
[    0.012629] Security Framework initialized
[    0.013712] SELinux:  Initializing.
[    0.015586] Mount-cache hash table entries: 512
[    0.021865] Initializing cgroup subsys ns
[    0.022294] Initializing cgroup subsys cpuacct
[    0.023111] Initializing cgroup subsys freezer
[    0.026549] Performance Events: p6 PMU driver.
[    0.028099] ... version:                0
[    0.028726] ... bit width:              32
[    0.029027] ... generic registers:      2
[    0.030030] ... value mask:             00000000ffffffff
[    0.031028] ... max period:             000000007fffffff
[    0.032024] ... fixed-purpose events:   0
[    0.033045] ... event mask:             0000000000000003
[    0.038131] SMP alternatives: switching to UP code
[    0.048999] Freeing SMP alternatives: 12k freed
[    0.049358] ACPI: Core revision 20100702
[    0.080177] Enabling APIC mode:  Flat.  Using 1 I/O APICs
[    0.084564] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.094712] CPU0: Intel QEMU Virtual CPU version 0.14.0 stepping 03
[    0.097999] APIC calibration not consistent with PM-Timer: 227ms instead of 100ms
[    0.097999] APIC delta adjusted to PM-Timer: 6250137 (14242069)
[    0.104999] Brought up 1 CPUs
[    0.106079] Total of 1 processors activated (4364.14 BogoMIPS).
[    0.117880] kworker/u:0 used greatest stack depth: 7164 bytes left
[    0.127927] Time: 15:16:47  Date: 10/05/11
[    0.131260] NET: Registered protocol family 16
[    0.141999] ACPI: bus type pci registered
[    0.145747] PCI: PCI BIOS revision 2.10 entry at 0xfc566, last bus=0
[    0.146101] PCI: Using configuration type 1 for base access
[    0.203347] kworker/u:0 used greatest stack depth: 7160 bytes left
[    0.209165] bio: create slab <bio-0> at 0
[    0.241610] ACPI: Interpreter enabled
[    0.242064] ACPI: (supports S0 S3 S4 S5)
[    0.244217] ACPI: Using IOAPIC for interrupt routing
[    0.297999] ACPI: No dock devices found.
[    0.298111] PCI: Ignoring host bridge windows from ACPI; if necessary, use "pci=use_crs" and report a bug
[    0.299999] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[    0.303999] pci 0000:00:01.3: quirk: [io  0xb000-0xb03f] claimed by PIIX4 ACPI
[    0.304125] pci 0000:00:01.3: quirk: [io  0xb100-0xb10f] claimed by PIIX4 SMB
[    0.340999] ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
[    0.342127] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
[    0.344168] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
[    0.346197] ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11)
[    0.347883] ACPI: PCI Interrupt Link [LNKS] (IRQs 9) *0
[    0.351999] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
[    0.352112] vgaarb: loaded
[    0.355999] SCSI subsystem initialized
[    0.360516] usbcore: registered new interface driver usbfs
[    0.362679] usbcore: registered new interface driver hub
[    0.365677] usbcore: registered new device driver usb
[    0.373999] Advanced Linux Sound Architecture Driver Version 1.0.23.
[    0.374180] PCI: Using ACPI for IRQ routing
[    0.381615] cfg80211: Calling CRDA to update world regulatory domain
[    0.383999] NetLabel: Initializing
[    0.384164] NetLabel:  domain hash size = 128
[    0.385078] NetLabel:  protocols = UNLABELED CIPSOv4
[    0.388182] NetLabel:  unlabeled traffic allowed by default
[    0.392096] HPET: 3 timers in total, 0 timers will be used for per-cpu timer
[    0.393244] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
[    0.394700] hpet0: 3 comparators, 64-bit 100.000000 MHz counter
[    0.401744] Switching to clocksource tsc
[    0.432834] pnp: PnP ACPI init
[    0.435377] ACPI: bus type pnp registered
[    0.455132] pnp: PnP ACPI: found 8 devices
[    0.456713] ACPI: ACPI bus type pnp unregistered
[    0.556840] NET: Registered protocol family 2
[    0.559847] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.563876] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    0.567328] TCP bind hash table entries: 16384 (order: 5, 131072 bytes)
[    0.569122] TCP: Hash tables configured (established 16384 bind 16384)
[    0.570483] TCP reno registered
[    0.571697] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.573731] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.578209] NET: Registered protocol family 1
[    0.581508] RPC: Registered udp transport module.
[    0.582517] RPC: Registered tcp transport module.
[    0.583644] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.585917] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[    0.587759] pci 0000:00:01.0: PIIX3: Enabling Passive Release
[    0.590556] pci 0000:00:01.0: Activating ISA DMA hang workarounds
[    0.612947] microcode: CPU0 sig=0x633, pf=0x0, revision=0x0
[    0.614934] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
[    0.616716] Scanning for low memory corruption every 60 seconds
[    0.622270] kworker/u:0 used greatest stack depth: 7060 bytes left
[    0.627350] audit: initializing netlink socket (disabled)
[    0.630058] type=2000 audit(1317827807.628:1): initialized
[    0.713408] HugeTLB registered 4 MB page size, pre-allocated 0 pages
[    0.756722] VFS: Disk quotas dquot_6.5.2
[    0.763256] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.782004] msgmni has been set to 744
[    0.792537] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    0.795088] io scheduler noop registered
[    0.796208] io scheduler deadline registered
[    0.797571] io scheduler cfq registered (default)
[    0.803946] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[    0.813239] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
[    0.815394] ACPI: Power Button [PWRF]
[    0.873993] Non-volatile memory driver v1.3
[    0.877040] Linux agpgart interface v0.103
[    0.880282] [drm] Initialized drm 1.1.0 20060810
[    0.881935] [drm:i915_init] *ERROR* drm/i915 can't work without intel_agp module!
[    0.883566] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
�[    1.212503] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    1.246841] 00:06: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    1.279634] brd: module loaded
[    1.306222] loop: module loaded
[    1.319189] scsi0 : ata_piix
[    1.322674] scsi1 : ata_piix
[    1.326450] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc000 irq 14
[    1.328977] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc008 irq 15
[    1.338269] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k6-NAPI
[    1.340564] e1000: Copyright (c) 1999-2006 Intel Corporation.
[    1.342723] e1000e: Intel(R) PRO/1000 Network Driver - 1.2.7-k2
[    1.344044] e1000e: Copyright (c) 1999 - 2010 Intel Corporation.
[    1.348210] e100: Intel(R) PRO/100 Network Driver, 3.5.24-k2-NAPI
[    1.350172] e100: Copyright(c) 1999-2006 Intel Corporation
[    1.355296] sky2: driver version 1.28
[    1.357963] 8139too: 8139too Fast Ethernet driver 0.9.28
[    1.359633] 8139too 0000:00:03.0: This (id 10ec:8139 rev 20) is an enhanced 8139C+ chip, use 8139cp
[    1.363157] console [netcon0] enabled
[    1.364808] netconsole: network logging started
[    1.368536] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.371472] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.373703] uhci_hcd: USB Universal Host Controller Interface driver
[    1.377679] usbcore: registered new interface driver usblp
[    1.379698] Initializing USB Mass Storage driver...
[    1.381919] usbcore: registered new interface driver usb-storage
[    1.383626] USB Mass Storage support registered.
[    1.386012] usbcore: registered new interface driver libusual
[    1.390149] PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
[    1.396771] serio: i8042 KBD port at 0x60,0x64 irq 1
[    1.398142] serio: i8042 AUX port at 0x60,0x64 irq 12
[    1.402961] mice: PS/2 mouse device common for all mice
[    1.409824] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1
[    1.419731] rtc_cmos 00:01: rtc core: registered rtc_cmos as rtc0
[    1.426024] rtc0: alarms up to one day, 114 bytes nvram, hpet irqs
[    1.434148] device-mapper: ioctl: 4.18.0-ioctl (2010-06-29) initialised: dm-devel@redhat.com
[    1.440950] cpuidle: using governor ladder
[    1.442273] cpuidle: using governor menu
[    1.460925] usbcore: registered new interface driver hiddev
[    1.463077] usbcore: registered new interface driver usbhid
[    1.464313] usbhid: USB HID core driver
[    1.490320] ata2.00: ATAPI: QEMU DVD-ROM, 0.14.0, max UDMA/100
[    1.497163] ata1.00: ATA-7: QEMU HARDDISK, 0.14.0, max UDMA/100
[    1.498535] ata1.00: 102400 sectors, multi 16: LBA48
[    1.502345] ALSA device list:
[    1.503373]   No soundcards found.
[    1.505660] Netfilter messages via NETLINK v0.30.
[    1.508166] ata2.00: configured for MWDMA2
[    1.510655] ata1.00: configured for MWDMA2
[    1.521654] nf_conntrack version 0.5.0 (5955 buckets, 23820 max)
[    1.527826] ctnetlink v0.93: registering with nfnetlink.
[    1.530575] scsi 0:0:0:0: Direct-Access     ATA      QEMU HARDDISK    0.14 PQ: 0 ANSI: 5
[    1.546882] ip_tables: (C) 2000-2006 Netfilter Core Team
[    1.552069] sd 0:0:0:0: [sda] 102400 512-byte logical blocks: (52.4 MB/50.0 MiB)
[    1.559245] TCP cubic registered
[    1.560813] Initializing XFRM netlink socket
[    1.562041] sd 0:0:0:0: [sda] Write Protect is off
[    1.563806] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    1.570125] scsi 1:0:0:0: CD-ROM            QEMU     QEMU DVD-ROM     0.14 PQ: 0 ANSI: 5
[    1.572541] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    1.601663] sr0: scsi3-mmc drive: 4x/4x xa/form2 tray
[    1.602898] cdrom: Uniform CD-ROM driver Revision: 3.20
[    1.608663]  sda: sda1
[    1.612493] NET: Registered protocol family 10
[    1.626628] sr 1:0:0:0: Attached scsi generic sg1 type 5
[    1.637364] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    1.641422] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input2
[    1.646442] sd 0:0:0:0: [sda] Attached SCSI disk
[    1.648405] IPv6 over IPv4 tunneling driver
[    1.659603] NET: Registered protocol family 17
[    1.661793] Registering the dns_resolver key type
[    1.666810] Using IPI No-Shortcut mode
[    1.671889] registered taskstats version 1
[    1.675355]   Magic number: 15:708:284
[    1.681291] md: Waiting for all devices to be available before autodetect
[    1.683758] md: If you don't use raid, use raid=noautodetect
[    1.689849] md: Autodetecting RAID arrays.
[    1.690885] md: Scanned 0 and added 0 devices.
[    1.692148] md: autorun ...
[    1.693030] md: ... autorun DONE.
[    1.706018] EXT3-fs: barriers not enabled
[    1.709764] kjournald starting.  Commit interval 5 seconds
[    1.711960] EXT3-fs (sda1): mounted filesystem with writeback data mode
[    1.714653] VFS: Mounted root (ext3 filesystem) readonly on device 8:1.
[    1.719084] Freeing unused kernel memory: 404k freed
[    1.746714] Write protecting the kernel text: 4592k
[    1.748600] Write protecting the kernel read-only data: 1828k
[    1.971855] EXT3-fs (sda1): using internal journal
[    1.976062] mount used greatest stack depth: 6320 bytes left
[    2.122134] cp used greatest stack depth: 6192 bytes left

Linux version 2.6.36 (gridwang@wangxuefu) (gcc version 4.5.2 (OSELAS.Toolchain-2011.03.1) ) #1 SMP Wed Oct 5 17:25:30 CST 2011

QEMU Linux test distribution (based on Redhat 9)

Type 'exit' to halt the system

[    2.210922] ifconfig used greatest stack depth: 6164 bytes left
SIOCSIFADDR: No such device
eth0: unknown interface: No such device
SIOCADDRT: No such process
sh-2.05b#





原创粉丝点击