[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Building a vmlinux image to be used with a initrd image in qemu-system-mipsel



Hi list

I want to compile a mipsel vmlinux image that works in qemu with a
normal initrd image. Cross-compiling binutils and gcc for the mipsel
architecture posed no problems, and compiling the kernel worked fine as
well. It just didn't work in qemu. These are the commands I used:

cd linux-2.6.36
make ARCH=mips malta_defconfig
make ARCH=mips CROSS_COMPILE=/path/to/mipsel-unknown-linux-gnu- vmlinux

qemu-system-mipsel -m 128 -kernel vmlinux -initrd initrd.gz -hda hda.img
-append "root=/dev/ram console=ttyS0" -nographic

The initrd.gz is from
http://ftp.de.debian.org/debian/dists/lenny/main/installer-mipsel/current/images/malta/netboot/initrd.gz
and the kernel source is straight from kernel.org. I created hda.img
using `qemu-img create -f qcow hda.img 10G'

I have attached the output from running qemu in a file.

The strange thing is, qemu works perfectly fine when I use the vmlinux
image from
http://ftp.de.debian.org/debian/dists/lenny/main/installer-mipsel/current/images/malta/netboot/vmlinux-2.6.26-2-4kc-malta which might mean that this kernel has more options enabled? I noticed that the vmlinux from debian.org takes up 5.5M, while the one I compiled only takes up 5.2M -- and I didn't strip it.

Pre-thanks for any eventual help


-----
Niels
Linux version 2.6.36 (niels@gustace) (gcc version 4.4.4 (GCC) ) #1 SMP Mon Nov 29 21:52:47 CET 2010
bootconsole [early0] enabled
CPU revision is: 00019300 (MIPS 24Kc)
FPU revision is: 00000000
Determined physical RAM map:
 memory: 00001000 @ 00000000 (reserved)
 memory: 000ef000 @ 00001000 (ROM data)
 memory: 00430000 @ 000f0000 (reserved)
 memory: 07ae0000 @ 00520000 (usable)
Wasting 41984 bytes for tracking 1312 unused pages
Zone PFN ranges:
  DMA      0x00000000 -> 0x00001000
  Normal   0x00001000 -> 0x00008000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00008000
PERCPU: Embedded 7 pages/cpu @81103000 s6976 r8192 d13504 u65536
pcpu-alloc: s6976 r8192 d13504 u65536 alloc=16*4096
pcpu-alloc: [0] 0 
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: rd_start=0x80520000 rd_size=3568383 root=/dev/ram console=ttyS0
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Primary instruction cache 2kB, VIPT, 2-way, linesize 16 bytes.
Primary data cache 2kB, 2-way, VIPT, no aliases, linesize 16 bytes
Writing ErrCtl register=00000000
Readback ErrCtl register=00000000
Memory: 124656k/125824k available (3161k kernel code, 1168k reserved, 710k data, 208k init, 0k highmem)
Hierarchical RCU implementation.
	RCU-based detection of stalled CPUs is disabled.
	Verbose stalled-CPUs detection is disabled.
NR_IRQS:256
Trying to install interrupt handler for IRQ16
Trying to install interrupt handler for IRQ17
CPU frequency 200.00 MHz
Console: colour dummy device 80x25
Calibrating delay loop... 470.22 BogoMIPS (lpj=2351104)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
Brought up 1 CPUs
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
vgaarb: loaded
pci 0000:00:0a.3: address space collision: [io  0x1100-0x110f] conflicts with GT-64120 PCI I/O [io  0x1000-0x1fffff]
vgaarb: device added: PCI:0000:00:12.0,decodes=io+mem,owns=none,locks=none
pci 0000:00:0a.3: BAR 8: [io  0x1100-0x110f] has bogus alignment
pci 0000:00:12.0: BAR 0: assigned [mem 0x10000000-0x11ffffff pref]
pci 0000:00:12.0: BAR 0: set to [mem 0x10000000-0x11ffffff pref] (PCI address [0x10000000-0x11ffffff]
pci 0000:00:12.0: BAR 6: assigned [mem 0x12000000-0x1200ffff pref]
pci 0000:00:12.0: BAR 1: assigned [mem 0x12010000-0x12010fff]
pci 0000:00:12.0: BAR 1: set to [mem 0x12010000-0x12010fff] (PCI address [0x12010000-0x12010fff]
pci 0000:00:0a.2: BAR 4: assigned [io  0x1000-0x101f]
pci 0000:00:0a.2: BAR 4: set to [io  0x1000-0x101f] (PCI address [0x1000-0x101f]
pci 0000:00:0b.0: BAR 0: assigned [io  0x1020-0x103f]
pci 0000:00:0b.0: BAR 0: set to [io  0x1020-0x103f] (PCI address [0x1020-0x103f]
pci 0000:00:0b.0: BAR 1: assigned [mem 0x12011000-0x1201101f]
pci 0000:00:0b.0: BAR 1: set to [mem 0x12011000-0x1201101f] (PCI address [0x12011000-0x1201101f]
pci 0000:00:0a.1: BAR 4: assigned [io  0x1040-0x104f]
pci 0000:00:0a.1: BAR 4: set to [io  0x1040-0x104f] (PCI address [0x1040-0x104f]
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: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
UDP hash table entries: 128 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 128 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
msgmni has been set to 243
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
console [ttyS0] enabled, bootconsole disabled
console [ttyS0] enabled, bootconsole disabled
serial8250.0: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
serial8250.0: ttyS2 at MMIO 0x1f000900 (irq = 18) is a 16550A
brd: module loaded
Uniform Multi-Platform E-IDE driver
piix 0000:00:0a.1: IDE controller (0x8086:0x7111 rev 0x00)
PCI: Enabling device 0000:00:0a.1 (0000 -> 0001)
piix 0000:00:0a.1: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0x1040-0x1047
    ide1: BM-DMA at 0x1048-0x104f
hda: QEMU HARDDISK, ATA DISK drive
hda: UDMA/33 mode selected
hdc: QEMU DVD-ROM, ATAPI CD/DVD-ROM drive
hdc: UDMA/33 mode selected
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
ide_generic: please use "probe_mask=0x3f" module parameter for probing all legacy ISA IDE ports
ide-gd driver 1.18
hda: max request size: 512KiB
hda: 20971520 sectors (10737 MB) w/256KiB Cache, CHS=16383/255/63
hda: cache flushes supported
 hda: unknown partition table
ide-cd driver 5.00
ide-cd: hdc: ATAPI 4X CD-ROM drive, 512kB Cache
cdrom: Uniform CD-ROM driver Revision: 3.20
physmap platform flash device: 00400000 at 1e000000
physmap-flash physmap-flash.0: map_probe failed
pcnet32: pcnet32.c:v1.35 21.Apr.2008 tsbogend@alpha.franken.de
PCI: Enabling device 0000:00:0b.0 (0000 -> 0003)
pcnet32: PCnet/PCI II 79C970A at 0x1020, 52:54:00:12:34:56 assigned IRQ 10
pcnet32: eth0: registered as PCnet/PCI II 79C970A
pcnet32: 1 cards_found
mice: PS/2 mouse device common for all mice
rtc_cmos rtc_cmos: rtc core: registered rtc_cmos as rtc0
rtc0: alarms up to one day, 242 bytes nvram
TCP cubic registered
NET: Registered protocol family 17
NET: Registered protocol family 15
rtc_cmos rtc_cmos: setting system clock to 2010-11-29 21:26:44 UTC (1291066004)
List of all partitions:
0300        10485760 hda driver: ide-gd
1600         4194302 hdc driver: ide-cdrom
No filesystem could mount root, tried:  ext3 ext2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)

Reply to: