mimi123
Posts: 583
Joined: Thu Aug 22, 2013 3:32 pm

Re: QEMU patches for RPi emulation - Initial release

Tue Sep 30, 2014 11:21 am

try make -i, qemu-nbd is not needed.

zackp30
Posts: 1
Joined: Sat Jan 03, 2015 1:53 am

Re: QEMU patches for RPi emulation - Initial release

Sat Jan 03, 2015 2:10 am

Hi! Currently trying to get these patches to work... unfortunately QEMU gets stuck at 100% CPU.

Any help would be great, thanks!

pietrushnic
Posts: 6
Joined: Sat Mar 29, 2014 2:04 am

Re: QEMU patches for RPi emulation - Initial release

Sun Feb 01, 2015 12:50 am

There is problem with kernel in latest Raspbian `2014-12-24`. It displays "Uncompressing Linux... done, booting the kernel." and nothing more. Version `2014-09-09` works fine with the same parameters:

Code: Select all

qemu-system-arm -kernel xecdesign_demo/kernel-2014-12-24-wheezy -cpu arm1176 -m 512 -M raspi -serial stdio -append "earlyprintk loglevel=8 console=ttyAMA0,115200"
twitter: https://twitter.com/#!/3mdeb_com
github: https://github.com/3mdeb
blog: https://blog.3mdeb.com/

sebseb7
Posts: 4
Joined: Sun Jun 17, 2012 10:24 am

Re: QEMU patches for RPi emulation - Initial release

Thu Feb 26, 2015 11:27 am

There is problem with kernel in latest Raspbian `2014-12-24`. It displays "Uncompressing Linux... done, booting the kernel." and nothing more. Version `2014-09-09` works fine with the same parameters:
I have the same problem that it stops at "Uncompressing Linux".

I use the 2015-02-16 image.

Where can I download the 2014-09-09 image to test?
Or can send me anyone a kernel that should work?

Thanks!

sebastian

pietrushnic
Posts: 6
Joined: Sat Mar 29, 2014 2:04 am

Re: QEMU patches for RPi emulation - Initial release

Thu Feb 26, 2015 1:52 pm

2014-09-09 is here.
twitter: https://twitter.com/#!/3mdeb_com
github: https://github.com/3mdeb
blog: https://blog.3mdeb.com/

sebseb7
Posts: 4
Joined: Sun Jun 17, 2012 10:24 am

Re: QEMU patches for RPi emulation - Initial release

Thu Feb 26, 2015 4:53 pm

thanks

is there a working way getting network running?


/sebastian

Jeremy Davis
Posts: 43
Joined: Tue Oct 21, 2014 12:55 am

Re: QEMU patches for RPi emulation - Initial release

Fri Feb 27, 2015 7:55 am

Awesome work Torlus and others.

I just built this from source today (commit e496aff991) and it works a treat but only on older Raspbian kernels (as others have mentioned). Also as is know networking still no go.

I tested with linux-image-3.18.0-trunk-rpi (the default in my freshly upgraded system) and no go; also tested linux-image-3.12-1-rpi and that's no go either. But linux-image-3.10-3-rpi works sweet!

For those that are interested, the older kernel can be installed with:

Code: Select all

apt-get update && apt-get install linux-image-3.10-3-rpi
I was launching it like this (on Debian Wheezy host - I adjusted the kernel line to test the others):

Code: Select all

qemu-system-arm \
    -kernel vmlinuz-3.10-3-rpi \
    -cpu arm1176 \
    -m 512 \
    -M raspi \
    -no-reboot \
    -append "root=/dev/mmcblk0p2 \
    rw \
    vga=normal \
    dma.dmachans=0x7f35 \
    bcm2708_fb.fbwidth=1024 \
    bcm2708_fb.fbheight=768 \
    bcm2708.boardrev=0xf bcm2708.serial=0xcad0eedf \
    smsc95xx.macaddr=B8:27:EB:D0:EE:DF \
    sdhci-bcm2708.emmc_clock_freq=100000000 vc_mem.mem_base=0x1c000000 \
    vc_mem.mem_size=0x20000000 \
    dwc_otg.lpm_enable=0 \
    kgdboc=ttyAMA0,115200 \
    console=ttyAMA0s \
    rootfstype=ext4" \
    -sd raspbian-wheezy.img \
    -nographic
Note that I am using a headless server to do this on so YMMV if you copy my exact options...

FWIW if I use the initrd for 3.12-1 (add option -initrd initrd.img-3.12-1-rpi) I can get a boot log. Not sure if its of any value but here it is:

Code: Select all

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.12-1-rpi (debian-kernel@lists.debian.org) (gcc version 4.7.2 (Debian 4.7.2-5+rpi1) ) #1 Debian 3.12.9-1+rpi3 (2015-01-03)
[    0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[    0.000000] CPU: VIPT aliasing data cache, unknown instruction cache
[    0.000000] Machine: BCM2708
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] debug: skip boot console de-registration.
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] On node 0 totalpages: 114688
[    0.000000] free_area_init_node: node 0, pgdat c05f50f4, node_mem_map c0683000
[    0.000000]   Normal zone: 896 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 114688 pages, LIFO batch:31
[    0.000000] Internal error: Oops - undefined instruction: 0 [#1] ARM
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 3.12-1-rpi #1 Debian 3.12.9-1+rpi3
[    0.000000] task: c05b5958 ti: c05aa000 task.ti: c05aa000
[    0.000000] PC is at memcmp+0x4/0x5bc
[    0.000000] LR is at strstr+0x88/0xa8
[    0.000000] pc : [<c02061c4>]    lr : [<c020ec84>]    psr: 800001d3
[    0.000000] sp : c05abf0c  ip : c05abf98  fp : c04d7990
[    0.000000] r10: c05b69b8  r9 : 00000000  r8 : c05d0820
[    0.000000] r7 : c04e0668  r6 : 0000000c  r5 : 000001db  r4 : c05a5118
[    0.000000] r3 : c05a52f4  r2 : 0000000c  r1 : c04e0668  r0 : c05a5118
[    0.000000] Flags: Nzcv  IRQs off  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
[    0.000000] Control: 00c5387d  Table: 00004008  DAC: 00000015
[    0.000000] Process swapper (pid: 0, stack limit = 0xc05aa1b0)
[    0.000000] Stack: (0xc05abf0c to 0xc05ac000)
[    0.000000] bf00:                            c05a5118 000001db 0000000c c04e0668 c05d0820
[    0.000000] bf20: 00000000 c020ec84 00000000 1c000000 00000000 00000000 c05b69b8 c0586068
[    0.000000] bf40: 00000000 00000000 ffffffff c05a4674 1c000000 c06520cc c05b69b8 c05d0820
[    0.000000] bf60: 80000200 c05b69b8 c04d7990 c0586458 c05abf90 c05abf98 00000000 c0a04040
[    0.000000] bf80: 1bffffff c057ed78 c05abf90 c05abf98 00000000 00000000 00000000 00000000
[    0.000000] bfa0: c04d66dc 00000001 c05b201c c05a5724 c05b6c28 00004008 410fb767 005a4640
[    0.000000] bfc0: 00000000 c057c780 00000000 00000000 00000000 00000000 00000000 c05a5728
[    0.000000] bfe0: 00000000 00c5387d c05b201c c05a5724 c05b6c28 0000806c 00000000 00000000
[    0.000000] Code: e2400001 13a00000 e1a0f00e e92d43f0 (f1010200) 
[    0.000000] ---[ end trace 1b75b31a2719ed1c ]---
[    0.000000] Kernel panic - not syncing: Attempted to kill the idle task!

chris57100
Posts: 522
Joined: Wed Sep 12, 2012 7:23 pm
Location: Thionville
Contact: Website

Re: QEMU patches for RPi emulation - Initial release

Mon Mar 09, 2015 1:02 pm

Hello,

Thank you for the amazing work you do for us ! Sounds like chinese for me :-)
I was able to compile on Yosemite but i have a strange issue when trying to list machines : i don't see raspi. So when i try to following command i got an error :

Code: Select all

../Documents/Development/qemu/arm-softmmu/qemu-system-arm -kernel kernel.img -cpu arm1176 -m 512 -M raspi -serial stdio -append "rw dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1024 bcm2708_fb.fbheight=768 bcm2708.boardrev=0xf bcm2708.serial=0xcad0eedf smsc95xx.macaddr=B8:27:EB:D0:EE:DF sdhci-bcm2708.emmc_clock_freq=100000000 vc_mem.mem_base=0x1c000000 vc_mem.mem_size=0x20000000 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait" -snapshot -sd 2014-09-09-wheezy-raspbian.img
qemu-system-arm: -sd 2014-09-09-wheezy-raspbian.img: Unsupported machine type
Use -machine help to list supported machines!

$ ../Documents/Development/qemu/arm-softmmu/qemu-system-arm -machine help
Supported machines are:
akita                Akita PDA (PXA270)
borzoi               Borzoi PDA (PXA270)
canon-a1100          Canon PowerShot A1100 IS
cheetah              Palm Tungsten|E aka. Cheetah PDA (OMAP310)
collie               Collie PDA (SA-1110)
connex               Gumstix Connex (PXA255)
cubieboard           cubietech cubieboard
highbank             Calxeda Highbank (ECX-1000)
integratorcp         ARM Integrator/CP (ARM926EJ-S)
kzm                  ARM KZM Emulation Baseboard (ARM1136)
lm3s6965evb          Stellaris LM3S6965EVB
lm3s811evb           Stellaris LM3S811EVB
mainstone            Mainstone II (PXA27x)
midway               Calxeda Midway (ECX-2000)
musicpal             Marvell 88w8618 / MusicPal (ARM926EJ-S)
n800                 Nokia N800 tablet aka. RX-34 (OMAP2420)
n810                 Nokia N810 tablet aka. RX-44 (OMAP2420)
none                 empty machine
nuri                 Samsung NURI board (Exynos4210)
realview-eb          ARM RealView Emulation Baseboard (ARM926EJ-S)
realview-eb-mpcore   ARM RealView Emulation Baseboard (ARM11MPCore)
realview-pb-a8       ARM RealView Platform Baseboard for Cortex-A8
realview-pbx-a9      ARM RealView Platform Baseboard Explore for Cortex-A9
smdkc210             Samsung SMDKC210 board (Exynos4210)
spitz                Spitz PDA (PXA270)
sx1                  Siemens SX1 (OMAP310) V2
sx1-v1               Siemens SX1 (OMAP310) V1
terrier              Terrier PDA (PXA270)
tosa                 Tosa PDA (PXA255)
verdex               Gumstix Verdex (PXA270)
versatileab          ARM Versatile/AB (ARM926EJ-S)
versatilepb          ARM Versatile/PB (ARM926EJ-S)
vexpress-a15         ARM Versatile Express for Cortex-A15
vexpress-a9          ARM Versatile Express for Cortex-A9
virt                 ARM Virtual Machine
xilinx-zynq-a9       Xilinx Zynq Platform Baseboard for Cortex-A9
z2                   Zipit Z2 (PXA27x)
Is there something else to do once you clone the git repository, before executing the configure and make commands ?

Thank you
Raspberry Pi Home Server : http://www.pihomeserver.fr
Software and electronic tutorials : Samba, Airplay, CUPS, Time machine, Nginx, Owncloud, rTorrent, Wordpress, etc.
Full Wi-Fi hotspot installation on a RPi 3 including a captive portal and freeradius management: https://github.com/pihomeserver/Kupiki-Hotspot-Script

mimi123
Posts: 583
Joined: Thu Aug 22, 2013 3:32 pm

Re: QEMU patches for RPi emulation - Initial release

Fri Mar 13, 2015 8:25 pm

chris57100 wrote:Hello,

Thank you for the amazing work you do for us ! Sounds like chinese for me :-)
I was able to compile on Yosemite but i have a strange issue when trying to list machines : i don't see raspi. So when i try to following command i got an error :

Code: Select all

../Documents/Development/qemu/arm-softmmu/qemu-system-arm -kernel kernel.img -cpu arm1176 -m 512 -M raspi -serial stdio -append "rw dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1024 bcm2708_fb.fbheight=768 bcm2708.boardrev=0xf bcm2708.serial=0xcad0eedf smsc95xx.macaddr=B8:27:EB:D0:EE:DF sdhci-bcm2708.emmc_clock_freq=100000000 vc_mem.mem_base=0x1c000000 vc_mem.mem_size=0x20000000 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait" -snapshot -sd 2014-09-09-wheezy-raspbian.img
qemu-system-arm: -sd 2014-09-09-wheezy-raspbian.img: Unsupported machine type
Use -machine help to list supported machines!

$ ../Documents/Development/qemu/arm-softmmu/qemu-system-arm -machine help
Supported machines are:
akita                Akita PDA (PXA270)
borzoi               Borzoi PDA (PXA270)
canon-a1100          Canon PowerShot A1100 IS
cheetah              Palm Tungsten|E aka. Cheetah PDA (OMAP310)
collie               Collie PDA (SA-1110)
connex               Gumstix Connex (PXA255)
cubieboard           cubietech cubieboard
highbank             Calxeda Highbank (ECX-1000)
integratorcp         ARM Integrator/CP (ARM926EJ-S)
kzm                  ARM KZM Emulation Baseboard (ARM1136)
lm3s6965evb          Stellaris LM3S6965EVB
lm3s811evb           Stellaris LM3S811EVB
mainstone            Mainstone II (PXA27x)
midway               Calxeda Midway (ECX-2000)
musicpal             Marvell 88w8618 / MusicPal (ARM926EJ-S)
n800                 Nokia N800 tablet aka. RX-34 (OMAP2420)
n810                 Nokia N810 tablet aka. RX-44 (OMAP2420)
none                 empty machine
nuri                 Samsung NURI board (Exynos4210)
realview-eb          ARM RealView Emulation Baseboard (ARM926EJ-S)
realview-eb-mpcore   ARM RealView Emulation Baseboard (ARM11MPCore)
realview-pb-a8       ARM RealView Platform Baseboard for Cortex-A8
realview-pbx-a9      ARM RealView Platform Baseboard Explore for Cortex-A9
smdkc210             Samsung SMDKC210 board (Exynos4210)
spitz                Spitz PDA (PXA270)
sx1                  Siemens SX1 (OMAP310) V2
sx1-v1               Siemens SX1 (OMAP310) V1
terrier              Terrier PDA (PXA270)
tosa                 Tosa PDA (PXA255)
verdex               Gumstix Verdex (PXA270)
versatileab          ARM Versatile/AB (ARM926EJ-S)
versatilepb          ARM Versatile/PB (ARM926EJ-S)
vexpress-a15         ARM Versatile Express for Cortex-A15
vexpress-a9          ARM Versatile Express for Cortex-A9
virt                 ARM Virtual Machine
xilinx-zynq-a9       Xilinx Zynq Platform Baseboard for Cortex-A9
z2                   Zipit Z2 (PXA27x)
Is there something else to do once you clone the git repository, before executing the configure and make commands ?

Thank you
Did you clone the right branch?

chris57100
Posts: 522
Joined: Wed Sep 12, 2012 7:23 pm
Location: Thionville
Contact: Website

Re: QEMU patches for RPi emulation - Initial release

Fri Mar 13, 2015 8:33 pm

I'm not mastering GitHub at all ! So i guess that no, i cloned the wrong one. I executed this command :

Code: Select all

git clone https://github.com/Torlus/qemu.git
Raspberry Pi Home Server : http://www.pihomeserver.fr
Software and electronic tutorials : Samba, Airplay, CUPS, Time machine, Nginx, Owncloud, rTorrent, Wordpress, etc.
Full Wi-Fi hotspot installation on a RPi 3 including a captive portal and freeradius management: https://github.com/pihomeserver/Kupiki-Hotspot-Script

seadams
Posts: 1
Joined: Tue Feb 10, 2015 4:46 pm

Re: QEMU patches for RPi emulation - Initial release

Fri Mar 13, 2015 9:28 pm

chris57100,

You have cloned the repository properly.
The part that's missing is that git checks out the 'master' branch by default. The 'master' branch in this repo follows the stock qemu main branch. The RasPI changes are on the 'rpi' branch.

To switch from 'master' to 'rpi', run:

Code: Select all

git checkout rpi
After that, rebuild and try it again.

Jeremy Davis
Posts: 43
Joined: Tue Oct 21, 2014 12:55 am

Re: QEMU patches for RPi emulation - Initial release

Fri Mar 13, 2015 10:00 pm

chris57100 wrote:I'm not mastering GitHub at all ! So i guess that no, i cloned the wrong one. I executed this command :

Code: Select all

git clone https://github.com/Torlus/qemu.git
In your local git repo directory try this (the bit after '#' is a comment that explains what is happening - teach a man to fish and all that! :D

Code: Select all

#fetch all remote/upstream branches
git fetch

# view all available branches - this step not strictly required but you can see where the next line comes from...
git branch -v -a

#checkout the rpi branch
git checkout -b rpi origin/rpi 
Then build as per before...

FWIW in future the best way (IMO) is to clone the branch you want right from the start with the '-b' switch; like this:

Code: Select all

git clone -b rpi https://github.com/Torlus/qemu.git

Jeremy Davis
Posts: 43
Joined: Tue Oct 21, 2014 12:55 am

Re: QEMU patches for RPi emulation - Initial release

Sat Mar 14, 2015 12:25 am

seadams wrote:chris57100,

You have cloned the repository properly.
The part that's missing is that git checks out the 'master' branch by default. The 'master' branch in this repo follows the stock qemu main branch. The RasPI changes are on the 'rpi' branch.

To switch from 'master' to 'rpi', run:

Code: Select all

git checkout rpi
After that, rebuild and try it again.
Sorry seadams I missed your reply while I was writing mine!
Also I could be wrong but AFAIK by default it will only clone the master branch so will be unaware of other upstream branches (hence the detail in my post).

chris57100
Posts: 522
Joined: Wed Sep 12, 2012 7:23 pm
Location: Thionville
Contact: Website

Re: QEMU patches for RPi emulation - Initial release

Sat Mar 14, 2015 11:31 am

Thanks guys, i was not aware that the default branch was not the rip version ... I learn how to fish ;-)
Raspberry Pi Home Server : http://www.pihomeserver.fr
Software and electronic tutorials : Samba, Airplay, CUPS, Time machine, Nginx, Owncloud, rTorrent, Wordpress, etc.
Full Wi-Fi hotspot installation on a RPi 3 including a captive portal and freeradius management: https://github.com/pihomeserver/Kupiki-Hotspot-Script

chris57100
Posts: 522
Joined: Wed Sep 12, 2012 7:23 pm
Location: Thionville
Contact: Website

Re: QEMU patches for RPi emulation - Initial release

Tue Mar 17, 2015 8:17 am

Ok just feeling on another planet and lost ! :?
- I was able to compile under Mac OS X the Qemu for Arm (i had to force only the Soft ARM else MIPS crashes)
- I used the compiled kernel from xecdesign and downloaded the Raspbian image "2014-09-09-wheezy-raspbian" (i saw that newer versions don not work)
- I launched Qemu with the following command :

Code: Select all

qemu/arm-softmmu/qemu-system-arm \
	-kernel kernel-qemu \
	-cpu arm1176 \
    -m 512 \
    -M raspi \
    -no-reboot \
    -append "root=/dev/mmcblk0p2 \
    rw \
    vga=normal \
    kgdboc=ttyAMA0,115200 \
    console=ttyAMA0s \
    rootfstype=ext4" \
    -sd 2014-09-09-wheezy-raspbian.img
I can only have Qemu starting and a black box displayed. I tried to add initrd option, removed dma, fb options, same result.

Can some one tell me what i am doing wrong ? Is the kernel out of date ?

At startup i have a warning message :

Code: Select all

WARNING: Image format was not specified for '2014-09-09-wheezy-raspbian.img' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
Do i have to "prepare" the image ?

Thanks (sorry if questions sound stupid)
Raspberry Pi Home Server : http://www.pihomeserver.fr
Software and electronic tutorials : Samba, Airplay, CUPS, Time machine, Nginx, Owncloud, rTorrent, Wordpress, etc.
Full Wi-Fi hotspot installation on a RPi 3 including a captive portal and freeradius management: https://github.com/pihomeserver/Kupiki-Hotspot-Script

Jeremy Davis
Posts: 43
Joined: Tue Oct 21, 2014 12:55 am

Re: QEMU patches for RPi emulation - Initial release

Tue Mar 17, 2015 8:41 am

I'm not sure but my guess is that the problem is the kernel that you are using. The kernel that you said you are using has been compiled so it will run on the default QEMU emulated hardware. But you're running a (patched) version of QEMU that is providing different hardware (emulated RPi hardware) so you should be using a vanilla RPi kernel. IIRC I used the one from my boot partition (kernel.img).

And the raw image error you're getting I get too on newer versions of QEMU. I tried googling on how to fix it but came up blank (lots of talk of the patch to the code that applied the warning; but none about shat should be done...) so I've just ignored it...

chris57100
Posts: 522
Joined: Wed Sep 12, 2012 7:23 pm
Location: Thionville
Contact: Website

Re: QEMU patches for RPi emulation - Initial release

Tue Mar 17, 2015 10:52 am

Thanks Jeremy. Your guess was correct. I took the kernel from the image, lost few minutes before remembering to update the preload file and all went good for the first boot with the following command :

Code: Select all

#!/bin/sh

../Documents/Development/qemu/arm-softmmu/qemu-system-arm \
-kernel kernel.img \
-cpu arm1176 \
-m 512 \
-M raspi \
-serial stdio \
-append "rw \
earlyprintk \
loglevel=8 \
panic=120 \
keep_bootcon \
rootwait \
dma.dmachans=0x7f35 \
bcm2708_fb.fbwidth=1024 \
bcm2708_fb.fbheight=768 \
bcm2708.boardrev=0xf \
bcm2708.serial=0xcad0eedf \
smsc95xx.macaddr=B8:27:EB:D0:EE:DF \
sdhci-bcm2708.emmc_clock_freq=100000000 \
vc_mem.mem_base=0x1c000000 \
vc_mem.mem_size=0x20000000  \
dwc_otg.lpm_enable=0 \
kgdboc=ttyAMA0,115200 \
console=tty1 \
root=/dev/mmcblk0p2 \
rootfstype=ext4 \
elevator=deadline rootwait" \
-sd 2014-09-09-wheezy-raspbian.img \
-usb -usbdevice net \
-device usb-kbd \
-device usb-mouse
I was able to log in with the pi user, start raspi-config to expand the file system, change timezone and keyboard mapping.
I also switched the default startup to run on boot the graphical interface. Now i have this error :

Code: Select all

WARNING: Image format was not specified for '2014-09-09-wheezy-raspbian.img' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
Uncompressing Linux... done, booting the kernel.
usbnet: failed control transaction: request 0x8006 value 0x600 index 0x0 length 0xa
usbnet: failed control transaction: request 0x8006 value 0x600 index 0x0 length 0xa
usbnet: failed control transaction: request 0x8006 value 0x600 index 0x0 length 0xa
Assertion failed: (!(ch->ti & BCM2708_DMA_TDMODE)), function bcm2835_dma_update, file /Users/xxx/Documents/Development/qemu/hw/dma/bcm2835_dma.c, line 98.
./raspberry.sh: line 33:  1239 Abort trap: 6           /Users/xxx/Documents/Development/qemu/arm-softmmu/qemu-system-arm -kernel kernel.img -cpu arm1176 -m 512 -M raspi -serial stdio -append "rw earlyprintk loglevel=8 panic=120 keep_bootcon rootwait dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1024 bcm2708_fb.fbheight=768 bcm2708.boardrev=0xf bcm2708.serial=0xcad0eedf smsc95xx.macaddr=B8:27:EB:D0:EE:DF sdhci-bcm2708.emmc_clock_freq=100000000 vc_mem.mem_base=0x1c000000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait" -sd 2014-09-09-wheezy-raspbian.img -usb -usbdevice net -device usb-kbd -device usb-mouse
A big crash. I will play with options because could be my fault to use parameters that i do not understand ...

[Edit] Already reported in previous post page http://www.raspberrypi.org/forums/viewt ... 59#p556759
Raspberry Pi Home Server : http://www.pihomeserver.fr
Software and electronic tutorials : Samba, Airplay, CUPS, Time machine, Nginx, Owncloud, rTorrent, Wordpress, etc.
Full Wi-Fi hotspot installation on a RPi 3 including a captive portal and freeradius management: https://github.com/pihomeserver/Kupiki-Hotspot-Script

Jeremy Davis
Posts: 43
Joined: Tue Oct 21, 2014 12:55 am

Re: QEMU patches for RPi emulation - Initial release

Mon Mar 23, 2015 8:33 pm

Ok so some progress...

Out of interest why are you not using the standard QEMU build? Ideally real emulated RPi hardware in QEMU (what these guys have been working solidly on) would be awesome; but in it's current incomplete and a little unstable state I think going with the default is better. And looking at what you're doing that should all work...

With the default QEMU I had a couple of issues; one was the lack of RAM; and the other was how the RAM was managed. I worked around these 2 issues by making img files in the host system RAM (one for swap and one for /tmp) and then passing them into QEMU and mounted them inside the VM.

chris57100
Posts: 522
Joined: Wed Sep 12, 2012 7:23 pm
Location: Thionville
Contact: Website

Re: QEMU patches for RPi emulation - Initial release

Mon Mar 23, 2015 8:44 pm

Thanks Jeremy.

For now i will stay with the standard Qemu version. I will not get the 512mb emulated but should not be an issue !
Thanks for support
Raspberry Pi Home Server : http://www.pihomeserver.fr
Software and electronic tutorials : Samba, Airplay, CUPS, Time machine, Nginx, Owncloud, rTorrent, Wordpress, etc.
Full Wi-Fi hotspot installation on a RPi 3 including a captive portal and freeradius management: https://github.com/pihomeserver/Kupiki-Hotspot-Script

beagile
Posts: 9
Joined: Tue Mar 03, 2015 9:24 pm

Re: QEMU patches for RPi emulation - Initial release

Fri Sep 11, 2015 8:02 am

Hello guys,

I am really amazed to see all the hard work that already has gone into this project!

For being able to run integration tests as part of build pipeline for Raspberry Pi Kernel and SD Card Images I am looking for way to emulate Pi 1 & 2 with Qemu. As part of the integration tests I need to ssh into the emulated PI's and also need to have network connectivity from within. So I wonder if this patch includes network connectivity by now? If not - is somebody working on it?

Cheers, Govinda

dhruvvyas90
Posts: 25
Joined: Thu Nov 21, 2013 2:36 pm

Re: QEMU patches for RPi emulation - Initial release

Mon Nov 23, 2015 4:41 pm

Hello,

Here, someone has mentioned that it doesn't work well post 09-09-2014 wheezy images and respective kernel and I verified it myself. Is there any particular reason what changed in kernel so that it's working anymore ?

pietrushnic
Posts: 6
Joined: Sat Mar 29, 2014 2:04 am

Re: QEMU patches for RPi emulation - Initial release

Fri Jan 01, 2016 11:33 pm

For those who not observe qemu-devel mailing list it looks like Andrew Baumann from Microsoft tries to upstream support for BCM2836 (RPi2). v3 of patches can be found here. I managed to boot Raspbian Jessie 2015-11-21 with very little effort. I described my experience here.

Andrew's maintain fork of QEMU on github and there is also wiki which mostly focus on Windows 10 IoT.
Last edited by pietrushnic on Sat Jan 02, 2016 9:51 am, edited 1 time in total.
twitter: https://twitter.com/#!/3mdeb_com
github: https://github.com/3mdeb
blog: https://blog.3mdeb.com/

JacobL
Posts: 76
Joined: Sun Apr 15, 2012 2:23 pm

Re: QEMU patches for RPi emulation - Initial release

Sat Jan 02, 2016 12:37 am

pietrushnic wrote:I described my experience here.
That link doesn't work. It points to localhost, but I assume you meant to point at something on the internet.

Great info nonetheless.

pietrushnic
Posts: 6
Joined: Sat Mar 29, 2014 2:04 am

Re: QEMU patches for RPi emulation - Initial release

Sat Jan 02, 2016 9:52 am

JacobL wrote:
pietrushnic wrote:I described my experience here.
That link doesn't work. It points to localhost, but I assume you meant to point at something on the internet.

Great info nonetheless.
Thanks for pointing out. Link fixed.
twitter: https://twitter.com/#!/3mdeb_com
github: https://github.com/3mdeb
blog: https://blog.3mdeb.com/

JacobL
Posts: 76
Joined: Sun Apr 15, 2012 2:23 pm

Re: QEMU patches for RPi emulation - Initial release

Sun Jan 03, 2016 8:20 pm

pietrushnic wrote:Thanks for pointing out. Link fixed.
I had a look at that blog post. FYI, the reason for disabling libarmmem.so was explored in depth earlier in this thread. Have a look at viewtopic.php?p=362172#p362172 and the following posts. But basically QEMU does not support the SETEND instruction for ARM, and it is not trivial to add. And no matter how it is implemented, support for SETEND will reduce overall ARM performance for QEMU.

Return to “Bare metal, Assembly language”