User avatar
grumpyoldgit
Posts: 1452
Joined: Thu Jan 05, 2012 12:20 pm

Re: Arch Linux Arm and QEMU

Mon Mar 05, 2012 8:43 pm

I haven't seen any instructions yet for loading the Arch Linux Arm image into QEMU yet. I have tried the instructions that worked well for me with Debian with the name of the new image substituted

qemu-system-arm -M versatilepb -cpu arm1136-r2 -hda archlinuxarm-01-03-2012.img -kernel zImage_3.1.9 -m 192 -append "root=/dev/sda2"

However QEMU does not seem to like it and it stops at Starting ssh and gives Respawning Too Fast messages. Any ideas?

llewell
Posts: 10
Joined: Sun Mar 04, 2012 3:52 pm

Re: Arch Linux Arm and QEMU

Tue Mar 06, 2012 4:59 am

I tried it too, and there is an error message about this kernel missing devtmpfs.  Looks like we might need another kernel.  I extracted the kernel.img from the fat partition and neither image will boot their kernel.img.  ARM is a bit of a pain, isn't it?

llewell
Posts: 10
Joined: Sun Mar 04, 2012 3:52 pm

Re: Arch Linux Arm and QEMU

Tue Mar 06, 2012 5:00 am

I tried it too, and there is an error message about this kernel missing devtmpfs.  Looks like we might need another kernel.  I extracted the kernel.img from the fat partition and neither image will boot their kernel.img.  ARM is a bit of a pain, isn't it?

llewell
Posts: 10
Joined: Sun Mar 04, 2012 3:52 pm

Re: Arch Linux Arm and QEMU

Tue Mar 06, 2012 5:00 am

I tried it too, and there is an error message about this kernel missing devtmpfs.  Looks like we might need another kernel.  I extracted the kernel.img from the fat partition and neither image will boot their kernel.img.  ARM is a bit of a pain, isn't it?

llewell
Posts: 10
Joined: Sun Mar 04, 2012 3:52 pm

Re: Arch Linux Arm and QEMU

Tue Mar 06, 2012 5:01 am

Darn, I keep getting the database error and it saved every time.

User avatar
jojopi
Posts: 3272
Joined: Tue Oct 11, 2011 8:38 pm

Re: Arch Linux Arm and QEMU

Tue Mar 06, 2012 5:45 am

It works with the cross-compiled 3.0.4 kernel from the original version of cnxsoft's article (the zImage link is towards the end):

http://www.cnx-software.com/20.....with-qemu/

You can also compile a kernel "natively" inside the working debian qemu, but this takes quite a while!

The arch image does indeed need a kernel with devtmpfs support, whereas debian is still using udev.

smithae
Posts: 2
Joined: Tue Mar 06, 2012 12:11 am

Re: Arch Linux Arm and QEMU

Tue Mar 06, 2012 8:19 am

I just cross-compiled a version of 3.1.9 that seems to work, module dependencies are still broken, but it gets it up and running...

Binary here:

http://www.smithae.pwp.blueyon.....e-devtmpfs

User avatar
grumpyoldgit
Posts: 1452
Joined: Thu Jan 05, 2012 12:20 pm

Re: Arch Linux Arm and QEMU

Tue Mar 06, 2012 8:33 am

So far, so good. I have downloaded and copied the zImage file so that my revised instructions are:-

qemu-system-arm -M versatilepb -cpu arm1176 -hda archlinuxarm-01-03-2012.img -kernel zImage -m 192 -append "root=/dev/sda2"

This gets me as far as the login prompt, which is great. Unfortunately, I cannot upgrade or install lxde, as per the instructions on the front page. I suspect that there is no internet connection as I am getting The requested URL returned error: 404 messages.

With the Debian image I was definitely connected as I tested the browser and installed some software. Any ideas?

User avatar
nick.mccloud
Posts: 804
Joined: Sat Feb 04, 2012 4:18 pm

Re: Arch Linux Arm and QEMU

Tue Mar 06, 2012 9:44 am

The 404 error would of been returned a server somewhere on the internet so you are likely to be connected. Hopefully I can have a hack at it at lunch time and we can muddle through together!

User avatar
cnxsoft
Posts: 191
Joined: Sat Oct 15, 2011 2:33 pm
Location: Chiang Mai, Thailand
Contact: Website

Re: Arch Linux Arm and QEMU

Tue Mar 06, 2012 9:46 am

If you get error 404, the good news is you've got an internet connection.

The package may be missing on the mirror used by pacman.

User avatar
grumpyoldgit
Posts: 1452
Joined: Thu Jan 05, 2012 12:20 pm

Re: Arch Linux Arm and QEMU

Tue Mar 06, 2012 9:52 am

Looking good then. As the possibility of getting my hot sweaty hands on a Pi disappears off into the distant future, getting to grips with the various distros through emulation seems to be the way forward!

AlArenal
Posts: 141
Joined: Sun Feb 26, 2012 6:58 pm
Location: Germany
Contact: Website

Re: Arch Linux Arm and QEMU

Tue Mar 06, 2012 10:43 am

llewell said:


ARM is a bit of a pain, isn't it?



Yeah, but have you ever tried to use a computer without an ARM?

Been with Unix and Linux for.. eh.. 16 years or so. But the experience of having to cross-compile or get a emulator up and running I never had. So this is really something new to me and it's great to have some savvy brains around that show us how to do the more tricky stuff.

P.S.:
Wondering when someone will invent a LEG processor.

smithae
Posts: 2
Joined: Tue Mar 06, 2012 12:11 am

Re: Arch Linux Arm and QEMU

Tue Mar 06, 2012 11:24 am

@grumpyoldgit:

Networking with qemu giving me lots of problems.  I'm using OS X 10.6.7 and qemu-1.0 from macports.


qemu-system-arm -M versatilepb -cpu arm1176 -m 256 -hda rootfs_arch.ext -hdb boot_arch.fat -kernel zImage-devtmpfs -vga std -append "root=/dev/sda" -serial stdio -redir tcp:2222::22 -net nic -net user


forces it to use the userland net connection type. and lets me ssh into it like so:

ssh root@127.0.0.1 -p 2222.

That _should_ be host platform independent.

networking seems to work fine... used pacman to install packages ok etc. etc. .  It can only handle tcp/udp connections though, so ping does not work.  And it is slower than a proper network connection.  We need someone using it on linux to work out how to do it properly.  I suppose it is possible that network modules aren't loading properly because of the module dependency issues that I'm trying to sort out at the mo.

NASberryPi
Posts: 3
Joined: Sat Mar 03, 2012 8:33 pm
Contact: Website

Re: Arch Linux Arm and QEMU

Tue Mar 06, 2012 2:53 pm

This one seems to work fine for Windows Hosts

qemu-system-arm.exe -M versatilepb -cpu arm1136-r2 -hda archlinuxarm-01-03-2012.img -kernel zImage_3.1.9 -m 192 -append "root=/dev/sda2" -vga std -serial stdio -net nic -net user

Ping 10.0.2.2 to make sure NIC is up and running, if you get reply then SLIRP (the network stuff in QEMU) is doing it's thing. I'm on a corp network at the moment so cant actually test much (don't want to be bothered setting up proxy etc!) so will test at home later.

User avatar
grumpyoldgit
Posts: 1452
Joined: Thu Jan 05, 2012 12:20 pm

Re: Arch Linux Arm and QEMU

Tue Mar 06, 2012 6:56 pm

Following on from this morning, I am still getting 404 errors when I try any of the pacman instructions on the first page.

I have pinged 10.0.2.2 and am getting a reply.

I've been up on archlinux.org/pacman and had a look round but cannot any messages about the service being down.

Has anyone else been able to get QEMU up with Arch and been able to install software?

DarkBeanies
Posts: 2
Joined: Fri Feb 17, 2012 12:56 pm

Re: Arch Linux Arm and QEMU

Tue Mar 06, 2012 7:09 pm

Running arch with the shiny new disk image in qemu here.  So far I've got e17, lxde, razor-qt, matchbox and even kde to work (very, very slowly for kde...)

Try doing

nano /etc/pacman.d/mirrorlist

as root

and uncomment some of the other servers like the ones from germany.

User avatar
grumpyoldgit
Posts: 1452
Joined: Thu Jan 05, 2012 12:20 pm

Re: Arch Linux Arm and QEMU

Tue Mar 06, 2012 7:22 pm

Darkbeanies

I think you have nailed it on the head. I've unremmed the two German mirrors and pacman -Syu is now downloading updates. The issue is with mirror.archlinuxarm.org which is still giving me 404s. When this has finished I will rem the line out so the output is clearer.

DarkBeanies
Posts: 2
Joined: Fri Feb 17, 2012 12:56 pm

Re: Arch Linux Arm and QEMU

Tue Mar 06, 2012 7:24 pm

Yeah, comment out the sleepy mirror to avoid the error messages...

Glad it worked!

User avatar
grumpyoldgit
Posts: 1452
Joined: Thu Jan 05, 2012 12:20 pm

Re: Arch Linux Arm and QEMU

Tue Mar 06, 2012 7:30 pm

What would be interesting is if it is possible to cobble the QEMU emulation so it more accurately reflects the real speed of the Pi.

I am using an old P4 2.4MHz with a gig of RAM. I can also try it out on a P3 700MHz with 500 meg of RAM. I see from the FAQ that the speed of the Pi can be likened to a P2 running at 300MHz which is a step down again.

Has anyone had experience in this area.

I do feel, from many of the comments one sees in the press, that expectations for the Pi are quite high and in none of the video demonstrations does they say that the Pi runs like a dog. Is the P2 300MHz analogy accurate?

User avatar
jojopi
Posts: 3272
Joined: Tue Oct 11, 2011 8:38 pm

Re: Arch Linux Arm and QEMU

Tue Mar 06, 2012 8:11 pm

Grumpyoldgit said:

Is the P2 300MHz analogy accurate?
I still have a PII 300, and taking the performance results from the RasPi wiki as a whole, I would say it is comparable, yes.  Plus, 192MiB RAM and an 8GB disk drive would have been plausible values for a PII back in the day.  You were very lucky if the graphics card could handle even standard definition video, though.

Individual benchmarks can vary significantly between x86, ARM, and ARM emulated on x86.  Not to mention all the other hardware differences.  And QEMU is really not designed to be timing-accurate like gaming emulators are.  So I think it would be difficult to get a useful performance match in practice, especially without having the real hardware to compare against.

User avatar
grumpyoldgit
Posts: 1452
Joined: Thu Jan 05, 2012 12:20 pm

Re: Arch Linux Arm and QEMU

Tue Mar 06, 2012 8:36 pm

I'll just have to whack it on my P3 and see how it goes. I've got lxde up an running on it as well now. I just need a couple of applications. It feels a bit bare at the moment! It has the same look and feel as Lubuntu but that comes with a lot more stuff!

NASberryPi
Posts: 3
Joined: Sat Mar 03, 2012 8:33 pm
Contact: Website

Re: Arch Linux Arm and QEMU

Wed Mar 07, 2012 6:58 pm

Built 3.2 kernel, seems to work but has modules missing still, I"ll look into it.

http://nasberrypi.org/2012/03/.....spberrypi/ for a download if you want a play.

edit : seems flakey, wouldnt bother, and 3.2.9 is giving me jip....

Ashleigh

BlackMamba
Posts: 3
Joined: Sat Mar 24, 2012 9:47 pm

Re: Arch Linux Arm and QEMU

Sun Mar 25, 2012 10:41 pm

Grumpyoldgit said:


So far, so good. I have downloaded and copied the zImage file so that my revised instructions are:-

qemu-system-arm -M versatilepb -cpu arm1176 -hda archlinuxarm-01-03-2012.img -kernel zImage -m 192 -append "root=/dev/sda2"

@Grumpy

What made you change the -cpu command from arm1136-r2 to arm1176? If I use that it generates a stderr.txt which says 'Unable to find CPU definition'

I managed to get debian working with the following command, but like you, when I substituted the arch filename I got recurring Respawning Too Fast messages.

qemu-system-arm.exe -M versatilepb -cpu arm1136-r2 -hda debian6-17-02-2012.img -kernel zImage_3.1.9 -m 192 -append "root=/dev/sda2" -net nic -net tap,ifname=my-tap

I am a real novice at linux and want to get the arch distro working with Qemu but I am stuck

Please, please help with an easy to understand explanation (I am a Windows user so telling me to compile stuff myself is a bit of a no-no until I have a bit more experience)

Thank you in advance for any help you can give


User avatar
maribu
Posts: 143
Joined: Mon Feb 13, 2012 9:56 pm

Re: Arch Linux Arm and QEMU

Mon Mar 26, 2012 4:07 am

Hi BlackMamba!

I think the "respawning too fast" is because the X-Server could not sucessfully be started.

Because you say you're new to the linux-world i'll try to explain what the X-Server is and why it probobly fails to start. (Sorry for my lack of English.)

On Linux the graphical environment is not part of the basic operation system, but it is an application. This means it optional - you can install and start it if you want, but you don't have to. You even could theoretical use an other graphical system by replacing the application with an other - but right now only the X.org X-Server is mature enough.

At the end of the boot cycle Debian tries to start the X-Server. Usally the system is so configurated, that if the X-Server crashes it will be restartet (--> respawning). "Respawning too fast" means that the X-Server crashed already a few times just a moment after it was started. This usually means that the graphic driver could not be started.

So why does the graphic driver does not start on a perconfigurated, kown-to-work image? I think this is because it does work on a raspberry pi, but the hardware qemu emulates is very different form the Raspberry Pi. Qemu emulates very x86-style hardware and especially the graphic card on the R. Pi is very different from the qemu one. I think the kernel you are using does not support x86-style graphic cards. So all you have to do is to use an other ARMv6 Linux Kernel which does support this graphic card.

Maybe someone in the forum will post a link to a precompiled, ready-to-use kernel for Debian.

As you never have used Linux so far, you propably want to install it on an x86 computer and learn how Linux works. For Windows users Linux can be very frustrating at the beginning (at least it was that way for me). But after a few weeks it becomes your best fried and you propably will use windows only for video games.

If you want to install Debian make sure you can look in the install-guide while you are installing and make sure you know what package management is.

( --> http://en.wikipedia.org/wiki/Package_management_system)

Good luck,

Marian

BlackMamba
Posts: 3
Joined: Sat Mar 24, 2012 9:47 pm

Re: Arch Linux Arm and QEMU

Mon Mar 26, 2012 1:12 pm

Thank you for your reply Marian. I think we have a communication problem here which is probably my fault as I somehow managed to merge my own comments with the quoted part of Grumpy's post

I have actually managed to get the Qemu + debian squeeze distro loaded using the following command

qemu-system-arm.exe -M versatilepb -cpu arm1136-r2 -hda debian6-17-02-2012.img -kernel zImage_3.1.9 -m 192 -append "root=/dev/sda2" -net nic -net tap,ifname=my-tap

Like Grumpy I tried just substituting the archlinux filename (archlinuxarm-01-03-2012.img) into the command and that is when the respawning error messages started.

I think I understand your explanation for the respawning messages, although I thought the arch distro does not have a graphical interface built in. Also when I installed the debian squeeze distro in Qemu I didn't get these messages and I would have thought the Qemu drivers would be the same for both distros (but correct me if I am wrong because I am very new at this)

The screen scrolls so fast I cannot see how far the installation has got before the respawning messages start. Is there a way to log the results of the installation?

btw your English is extremely good and you have no need to apologise for it



Return to “General discussion”