qemu-discuss
[Top][All Lists]
Advanced

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

[Qemu-discuss] versatilepb, kernel image, external storage and device tr


From: Sebastien Alaiwan
Subject: [Qemu-discuss] versatilepb, kernel image, external storage and device tree
Date: Mon, 23 Feb 2015 17:42:14 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.4.0

Hi,

I'm developping a program which will ultimately run on a ARM versatile
pb board.
I'm using qemu-system-arm to test it.

Using buildroot, I generate a kernel image (Using the defconfig
'versatile').
It's a zImage with an appended DTB blob (The DTB comes from the linux
kernel, file is 'versatile-pb.dts').
Buildroot is configured to embbed the root filesystem in the zImage.

The system boots fine with the following command line:
$ qemu-system-arm -M versatilepb -kernel output/images/zImage -append
'console=ttyAMA0' -nographic

Now, I'd like to inject, into the guest system, the program I'm
developing - preferably without rebuilding the whole zImage.
So I'm trying to add a disk to my emulated system.

I create my disk image like this:
$ qemu-img create -f raw armdisk.img 10M
$ mkfs.ext2 -F armdisk.img

And then I run:
$ qemu-system-arm -M versatilepb -kernel output/images/zImage -append
'console=ttyAMA0' -nographic -hda armdisk.img

However, I can't see my disk in /dev. The node /dev/sda isn't created.

I know the versatile board comes with a SD/MMC card reader, I tried to
use the following command line:
$ qemu-system-arm -M versatilepb -kernel output/images/zImage -append
'console=ttyAMA0' -nographic -drive format=raw,file=armdisk.img,if=sd

But still, no luck.
What am I doing wrong? Are there simple ways to transfer files between
the emulated ARM system and my host PC?

Thanks,
Sebastien

PS: please find below the log.
$ qemu-system-arm -M versatilepb -kernel output/images/zImage -drive
format=raw,file=armdisk.img -append "console=ttyAMA0" -nographic
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 3.18.4 (address@hidden) (gcc version 4.8.3 20140320
(prerelease) (Sourcery CodeBench Lite 2014.05-29) ) #3 Mon Feb 23
17:20:36 CET 2015
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00093177
CPU: VIVT data cache, VIVT instruction cache
Machine: ARM-Versatile PB
Memory policy: Data cache writeback
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956969942ns
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: console=ttyAMA0
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)
Memory: 120572K/131072K available (2894K kernel code, 161K rwdata, 756K
rodata, 5364K init, 125K bss, 10500K reserved)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xffe00000   (2048 kB)
    vmalloc : 0xc8800000 - 0xff000000   ( 872 MB)
    lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc0398f6c   (3652 kB)
      .init : 0xc0399000 - 0xc08d6000   (5364 kB)
      .data : 0xc08d6000 - 0xc08fe460   ( 162 kB)
       .bss : 0xc08fe460 - 0xc091d974   ( 126 kB)
NR_IRQS:224
VIC @f1140000: id 0x00041190, vendor 0x41
FPGA IRQ chip 0 "SIC" @ f1003000, 13 irqs, parent IRQ: 63
Console: colour dummy device 80x30
Calibrating delay loop... 801.17 BogoMIPS (lpj=4005888)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x2c0d08 - 0x2c0d60
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 1 part 10 variant 9 rev 0
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
Serial: AMBA PL011 UART driver
dev:f1: ttyAMA0 at MMIO 0x101f1000 (irq = 44, base_baud = 0) is a PL011 rev1
console [ttyAMA0] enabled
dev:f2: ttyAMA1 at MMIO 0x101f2000 (irq = 45, base_baud = 0) is a PL011 rev1
dev:f3: ttyAMA2 at MMIO 0x101f3000 (irq = 46, base_baud = 0) is a PL011 rev1
fpga:09: ttyAMA3 at MMIO 0x10009000 (irq = 70, base_baud = 0) is a PL011
rev1
Switched to clocksource timer3
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (double precision)
futex hash table entries: 256 (order: -1, 3072 bytes)
Installing knfsd (copyright (C) 1996 address@hidden).
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
romfs: ROMFS MTD (C) 2007 Red Hat, Inc.
msgmni has been set to 235
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)
pl061_gpio dev:e4: PL061 GPIO chip @0x101e4000 registered
pl061_gpio dev:e5: PL061 GPIO chip @0x101e5000 registered
pl061_gpio dev:e6: PL061 GPIO chip @0x101e6000 registered
pl061_gpio dev:e7: PL061 GPIO chip @0x101e7000 registered
clcd-pl11x dev:20: PL110 rev0 at 0x10120000
clcd-pl11x dev:20: Versatile hardware, VGA display
Console: switching to colour frame buffer device 80x60
brd: module loaded
physmap platform flash device: 04000000 at 34000000
physmap-flash.0: Found 1 x32 devices at 0x0 in 32-bit bank. Manufacturer
ID 0x000000 Chip ID 0x000000
Intel/Sharp Extended Query Table at 0x0031 Using buffer write method
smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <address@hidden>
smc91x smc91x.0 eth0: SMC91C11xFD (rev 1) at c89c8000 IRQ 57
 [nowait]
smc91x smc91x.0 eth0: Ethernet addr: 52:54:00:12:34:56
mousedev: PS/2 mouse device common for all mice
ledtrig-cpu: registered to indicate activity on CPUs
TCP: cubic registered
NET: Registered protocol family 17
Freeing unused kernel memory: 5364K (c0399000 - c08d6000)
input: AT Raw Set 2 keyboard as /devices/fpga:06/serio0/input/input0
Starting logging: OK
Populating /dev using udev: udevd[44]: starting version 2.1.1
random: udevd urandom read with 3 bits of entropy available
input: ImExPS/2 Generic Explorer Mouse as
/devices/fpga:07/serio1/input/input2
mmci-pl18x fpga:05: No vmmc regulator found
mmci-pl18x fpga:05: No vqmmc regulator found
mmci-pl18x: probe of fpga:05 failed with error -22
mmci-pl18x fpga:0b: No vmmc regulator found
mmci-pl18x fpga:0b: No vqmmc regulator found
mmci-pl18x: probe of fpga:0b failed with error -22
aaci-pl041 fpga:04: ARM AC'97 Interface PL041 rev0 at 0x10004000, irq 56
aaci-pl041 fpga:04: FIFO 512 entries
done
Initializing random number generator... done.
Starting network...

Welcome to Buildroot
buildroot login: root
# ls --color=no /dev
block               ram0                tty22               tty57
char                ram1                tty23               tty58
console             ram10               tty24               tty59
cpu_dma_latency     ram11               tty25               tty6
fb0                 ram12               tty26               tty60
fd                  ram13               tty27               tty61
full                ram14               tty28               tty62
input               ram15               tty29               tty63
kmem                ram2                tty3                tty7
kmsg                ram3                tty30               tty8
log                 ram4                tty31               tty9
mem                 ram5                tty32               ttyAMA0
memory_bandwidth    ram6                tty33               ttyAMA1
mtd0                ram7                tty34               ttyAMA2
mtd0ro              ram8                tty35               ttyAMA3
mtdblock0           ram9                tty36               ttyp0
network_latency     random              tty37               ttyp1
network_throughput  shm                 tty38               ttyp2
null                snd                 tty39               ttyp3
psaux               stderr              tty4                ttyp4
ptmx                stdin               tty40               ttyp5
pts                 stdout              tty41               ttyp6
ptyp0               tty                 tty42               ttyp7
ptyp1               tty0                tty43               ttyp8
ptyp2               tty1                tty44               ttyp9
ptyp3               tty10               tty45               ttypa
ptyp4               tty11               tty46               ttypb
ptyp5               tty12               tty47               ttypc
ptyp6               tty13               tty48               ttypd
ptyp7               tty14               tty49               ttype
ptyp8               tty15               tty5                ttypf
ptyp9               tty16               tty50               urandom
ptypa               tty17               tty51               vcs
ptypb               tty18               tty52               vcs1
ptypc               tty19               tty53               vcsa
ptypd               tty2                tty54               vcsa1
ptype               tty20               tty55               zero
ptypf               tty21               tty56
# QEMU: Terminated


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]