Note: crossposting this in both debian and raspbian forums as it's relavent to both groups.
I've just put together a new virtualbox dev vm for debian and raspbian.
This vm uses qemu in "user" mode, this is far more efficient than using qemu in "system" mode as it avoids emulating the hardware kernel and drivers.
The vm is configured with 1 gigabyte of ram but I would reccomend increasing this if you have lots of ram. The kernel supports PAE so it should have no problem with large ammounts of ram..
There are three chroots, /chroots/squeeze-armel /chroots/wheezy-armel and /chroots/wheezy-raspbian, /proc and /dev/pts are mounted in all chroots, build-essential and debhelper are installed, a policy-rc.d is in place and locales are configured sensiblly.
to login use username: root password: root
The host system is ubuntu precise and was chosen because it's a LTS release and it ships with a nice modern qemu (unlike debian squeeze which is getting rather long in the tooth).
http://archive.raspbian.org/qemu/rpi-qe ... ev.tar.bz2
new dev vm for debian and raspbian
14 posts
- Moderator
- Posts: 1433
- Joined: Wed Dec 28, 2011 11:45 pm
Does this mean that we can build any packages on this VM and they will be identical to those built on the pi? But with more ram available for compiling. What if any are the difficulties with this? Can you do apt-get update in the Raspbian chroot? Finnaly what is the compile speed compared to the pi?
Thank you for doing this.
Thank you for doing this.
- Posts: 47
- Joined: Wed Mar 07, 2012 7:08 am
Am I right in thinking the switch to user mode emulation means the host has to be Linux (and not windows) ?
- Posts: 35
- Joined: Sat Jun 02, 2012 9:52 am
louisb wrote:Does this mean that we can build any packages on this VM and they will be identical to those built on the pi? But with more ram available for compiling.
That is the idea yes.
What if any are the difficulties with this?
The main potential issue is that some system calls may be missing from qemu which may break some programs the build process tries to run. Also build processes that use ill-advised detection techniques may also break or do the wrong thing (that issue also applies to building on higher hardware than the target though).
Can you do apt-get update in the Raspbian chroot?
Yes
Finnaly what is the compile speed compared to the pi?
dunno yet.
bbb wrote:Am I right in thinking the switch to user mode emulation means the host has to be Linux (and not windows) ?
Yes, that is why I set things up inside a virtualbox VM.
- Moderator
- Posts: 1433
- Joined: Wed Dec 28, 2011 11:45 pm
I found an issue with this image on newer virtualbox (the image worked fine on the version of virtualbox I used to set it up). Afaict the machine boots but nothing comes up on the display.
To fix this
hold down shift during boot to display the grub menu
leave the first entry in the menu selected but rather than pressing enter press "e"
remove "$vt_handoff" from the end of the kernel command line
press F10
login with username root and password root
now open /etc/default/grub2 in your favorite editor and remove quiet and splash from GRUB_CMDLINE_LINUX_DEFAULT
now run update-grub2
To fix this
hold down shift during boot to display the grub menu
leave the first entry in the menu selected but rather than pressing enter press "e"
remove "$vt_handoff" from the end of the kernel command line
press F10
login with username root and password root
now open /etc/default/grub2 in your favorite editor and remove quiet and splash from GRUB_CMDLINE_LINUX_DEFAULT
now run update-grub2
- Moderator
- Posts: 1433
- Joined: Wed Dec 28, 2011 11:45 pm
louisb wrote:Finnaly what is the compile speed compared to the pi?
I'm not masochistic enough to compile on a Pi but based on a test build of apt on my pentium G system this seems to be slightly slower than building on an imx.
The real value of a VM like this will come with apps that need lots of memory and would swap heavily on virtually all arm boards (that aren't made of unobtanium).
- Moderator
- Posts: 1433
- Joined: Wed Dec 28, 2011 11:45 pm
plugwash wrote:
I've just put together a new virtualbox dev vm for debian and raspbian.
.....
The host system is ubuntu precise and was chosen because it's a LTS release and it ships with a nice modern qemu (unlike debian squeeze which is getting rather long in the tooth).
http://archive.raspbian.org/qemu/rpi-qe ... ev.tar.bz2
Is there a link for this (should there be?) anywhere on the Raspbian website?
I did not see one, but that may be by intent, of course...
- Posts: 29
- Joined: Thu Nov 17, 2011 10:58 pm
- Location: Edinburgh
Some benchmarks building ioquake3.
I5-2500k overclocked to 4.5Ghz, running Windows 7 x64.
1Gb RAM + 1 CPU given to virtual box and running XFCE4 desktop enviroment.
RPi overclocked to 800 Mhz, SDRAM 500, Core Freq 275, emmc clock 100000000.
Running XChat and openbox WM.
I5-2500k overclocked to 4.5Ghz, running Windows 7 x64.
1Gb RAM + 1 CPU given to virtual box and running XFCE4 desktop enviroment.
- Code: Select all
real 22m31.630s
user 19m34.157s
sys 0m24.718s
RPi overclocked to 800 Mhz, SDRAM 500, Core Freq 275, emmc clock 100000000.
Running XChat and openbox WM.
- Code: Select all
real 59m52.982s
user 57m31.910s
sys 0m55.460s
- Posts: 35
- Joined: Sat Jun 02, 2012 9:52 am
ok, logged in as root..... what next? the earlier emulator had instructions on running qemu...
- Posts: 46
- Joined: Sun Jan 15, 2012 10:49 pm
chroot into one of the build chroots (under /chroots ) and start using it like you would any other chroot.
- Moderator
- Posts: 1433
- Joined: Wed Dec 28, 2011 11:45 pm
also, how do i change the system to a US keyboard?.... methods used for previous vbox images don't work on this one...
- Posts: 46
- Joined: Sun Jan 15, 2012 10:49 pm
answered second question... changed /etc/default/keyboard from "gb" to "us". thanks for including mc, as it makes finding the files i'm looking for a whole lot easier.
- Posts: 46
- Joined: Sun Jan 15, 2012 10:49 pm
There's something strange...
I downloaded the VM, booted it with VirtualBox (on a Mac Host) but I can't get the network to work ! It kind of defeats the purpose since I can't git xbmc in order to build it in chroot...
Anyone can help me ?
ps: when doing a ifconfig, the only interface available is lo.
I downloaded the VM, booted it with VirtualBox (on a Mac Host) but I can't get the network to work ! It kind of defeats the purpose since I can't git xbmc in order to build it in chroot...
Anyone can help me ?
ps: when doing a ifconfig, the only interface available is lo.
- Posts: 1
- Joined: Fri Sep 14, 2012 12:22 pm
GoneWithTheWind wrote:There's something strange...
I downloaded the VM, booted it with VirtualBox (on a Mac Host) but I can't get the network to work ! It kind of defeats the purpose since I can't git xbmc in order to build it in chroot...
Anyone can help me ?
ps: when doing a ifconfig, the only interface available is lo.
remember normal ifconfig only shows interfaces that are up, do "ifconfig -a" to show all interfaces. If you don't have an eth0 but do have an eth1 or so then you probablly want to clear out /etc/udev/rules.d/70-persistent-net.rules
Also make sure the network is set up correctly on the host side.
- Moderator
- Posts: 1433
- Joined: Wed Dec 28, 2011 11:45 pm