Idiot's guide to QEMU ARM Emulation - loading Debian

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
tom9876543
Member
Member
Posts: 170
Joined: Wed Jul 18, 2007 5:51 am

Idiot's guide to QEMU ARM Emulation - loading Debian

Post by tom9876543 »

Hello

I am running Ubuntu on x86.

I wanted to try and get ARM emulation working for OS Development.

So the first step would be to get Linux working on the virtual ARM machine (QEMU).

I can't figure out how to get Debian working. I got as far as http://www.debian.org/releases/stable/a ... 02.html.en
There are different ARM distributions, but how would I know what works with QEMU???

Is there a step by step guide to getting Linux installed onto a virtual QEMU - ARM machine (full emulation not just elf emulation).
Once I know how to install Linux onto the QEMU - ARM machine then I can work on installing my os on the virtual machine as well.

Is anyone else developing for ARM? Did you get QEMU working? Or buy real hardware?

Again, i would like an IDIOTS guide, with step by step instructions.....

Thank you.
tom9876543
Member
Member
Posts: 170
Joined: Wed Jul 18, 2007 5:51 am

Re: Idiot's guide to QEMU ARM Emulation - loading Debian

Post by tom9876543 »

I found this web page:

http://dev.emcelettronica.com/installin ... n-arm-qemu

It looked really good until the following step:

wget http://ftp.de.debian.org/debian/dists/e ... /initrd.gz

The file doest not exist!!

Would someone be able to provide instructions where you simply download CD/DVD ISO and then the necessary QEMU commands?????

Very frustrating!
tom9876543
Member
Member
Posts: 170
Joined: Wed Jul 18, 2007 5:51 am

Re: Idiot's guide to QEMU ARM Emulation - loading Debian

Post by tom9876543 »

I found a really good howto at:

http://blog.troyastle.com/2010/07/build ... -with.html

Saying that, it is interesting QEMU has to load the kernel, there appears to be no arm BIOS.

I guess I will have to try and work out how to make my own replacement for vmlinuz-2.6.26-2-versatile
User avatar
salil_bhagurkar
Member
Member
Posts: 261
Joined: Mon Feb 19, 2007 10:40 am
Location: India

Re: Idiot's guide to QEMU ARM Emulation - loading Debian

Post by salil_bhagurkar »

If you just want to run your OS on ARM, why do you need Linux? :? Just build a cross compiler.
tom9876543
Member
Member
Posts: 170
Joined: Wed Jul 18, 2007 5:51 am

Re: Idiot's guide to QEMU ARM Emulation - loading Debian

Post by tom9876543 »

salil_bhagurkar wrote:If you just want to run your OS on ARM, why do you need Linux? :? Just build a cross compiler.
If you don't understand how Linux boots on an arm machine, what hope have you got of getting your OS to boot????
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Idiot's guide to QEMU ARM Emulation - loading Debian

Post by Solar »

tom9876543 wrote:If you don't understand how Linux boots on an arm machine, what hope have you got of getting your OS to boot????
I don't know about Linux-on-ARM, but judging by my experiences with Linux on x86, Linux can generally serve as a good example for how not to do things.

Any things.

(Mind you, I am a Linux user myself, and would say the same about Windows... :twisted: )
Every good solution is obvious once you've found it.
fronty
Member
Member
Posts: 188
Joined: Mon Jan 14, 2008 5:53 am
Location: Helsinki

Re: Idiot's guide to QEMU ARM Emulation - loading Debian

Post by fronty »

tom9876543 wrote:If you don't understand how Linux boots on an arm machine, what hope have you got of getting your OS to boot????
Same way as people who write for PC. d _ _ _ _ _ n _ _ _ _ _ n
Dario
Member
Member
Posts: 117
Joined: Sun Aug 31, 2008 12:39 pm

Re: Idiot's guide to QEMU ARM Emulation - loading Debian

Post by Dario »

Solar wrote: I don't know about Linux-on-ARM, but judging by my experiences with Linux on x86, Linux can generally serve as a good example for how not to do things.

Any things.
Can you please elaborate that?
What is so wrong with Linux on x86?
____
Dario
User avatar
inx
Member
Member
Posts: 142
Joined: Wed Mar 05, 2008 12:52 am

Re: Idiot's guide to QEMU ARM Emulation - loading Debian

Post by inx »

Dario wrote:What is so wrong with Linux on x86?
Download the Linux source and try to read it. It contains the answer. =p

As far as Linux on other platforms, it's overcomplicated and nasty. For just one easy example:
On most PowerPC systems, Open Firmware provides a nice C interface that uses the standard PPC C calling conventions.
NetBSD, OpenBSD, and friends all use it, Linux has a pile of 18 or so assembly files to interface with
a C interface.
Dario
Member
Member
Posts: 117
Joined: Sun Aug 31, 2008 12:39 pm

Re: Idiot's guide to QEMU ARM Emulation - loading Debian

Post by Dario »

inx wrote: Download the Linux source and try to read it. It contains the answer. =p
Sure...I will do that during my lunch brake. :)
As far as Linux on other platforms, it's overcomplicated and nasty. For just one easy example:
On most PowerPC systems, Open Firmware provides a nice C interface that uses the standard PPC C calling conventions.
NetBSD, OpenBSD, and friends all use it, Linux has a pile of 18 or so assembly files to interface with
a C interface.
Question is....is that complexity justified. If it makes easier to port Linux and still doesn't hit boot preformance...!?
There must be a reson behind this and I'm sure it's not the lack of knowledge. Also, number of files really don't mean much...as far as I'm concerned there can be one instruction per file. :)

EDIT:
Did:

Code: Select all

[dario@arch:::boot]$ ls *.S | xargs cat | wc -l
1458
in ./arch/powerpc/boot directory

..total 14 files & 1458 LOC.
____
Dario
tom9876543
Member
Member
Posts: 170
Joined: Wed Jul 18, 2007 5:51 am

Re: Idiot's guide to QEMU ARM Emulation - loading Debian

Post by tom9876543 »

Well I found a really good "hello world" tutorial:

http://balau82.wordpress.com/2010/02/28 ... sing-qemu/
TylerH
Member
Member
Posts: 285
Joined: Tue Apr 13, 2010 8:00 pm
Contact:

Re: Idiot's guide to QEMU ARM Emulation - loading Debian

Post by TylerH »

tom9876543 wrote:If you don't understand how Linux boots on an arm machine, what hope have you got of getting your OS to boot????
I have little to say for how overcomplicated Linux may or may not be, but your logic is severely flawed. How did the Linux developers get Linux to boot on ARM, if it is impossible to get an OS to boot on an architecture without understanding how Linux boots on it? It would be valid, but not necessarily correct, to say "If you can't understand [...]", but "don't" makes the statement completely invalid and incorrect.
tom9876543
Member
Member
Posts: 170
Joined: Wed Jul 18, 2007 5:51 am

Re: Idiot's guide to QEMU ARM Emulation - loading Debian

Post by tom9876543 »

TylerH wrote:
tom9876543 wrote:If you don't understand how Linux boots on an arm machine, what hope have you got of getting your OS to boot????
I have little to say for how overcomplicated Linux may or may not be, but your logic is severely flawed. How did the Linux developers get Linux to boot on ARM, if it is impossible to get an OS to boot on an architecture without understanding how Linux boots on it? It would be valid, but not necessarily correct, to say "If you can't understand [...]", but "don't" makes the statement completely invalid and incorrect.

can't, don't....... sorry grammar nazi


Documentation is good but I prefer working examples. The hello world tutorial is a really good example.
ecco
Posts: 19
Joined: Mon Nov 29, 2010 1:21 am
Location: Anchorage, AK

Re: Idiot's guide to QEMU ARM Emulation - loading Debian

Post by ecco »

Solar wrote:I don't know about Linux-on-ARM, but judging by my experiences with Linux on x86, Linux can generally serve as a good example for how not to do things.
It's good to hear that I'm not the only one... Guess I wouldn't be here if I thought there wasn't a better way.
Post Reply