Page 1 of 1

Idiot's guide to QEMU ARM Emulation - loading Debian

Posted: Sat Dec 11, 2010 3:53 pm
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.

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

Posted: Sat Dec 11, 2010 4:09 pm
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!

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

Posted: Sun Dec 12, 2010 2:21 am
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

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

Posted: Wed Dec 15, 2010 2:13 am
by salil_bhagurkar
If you just want to run your OS on ARM, why do you need Linux? :? Just build a cross compiler.

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

Posted: Wed Dec 15, 2010 3:16 am
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????

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

Posted: Wed Dec 15, 2010 9:42 am
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: )

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

Posted: Wed Dec 15, 2010 10:24 am
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

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

Posted: Wed Dec 15, 2010 4:09 pm
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?

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

Posted: Thu Dec 16, 2010 1:21 pm
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.

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

Posted: Thu Dec 16, 2010 1:42 pm
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.

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

Posted: Fri Dec 17, 2010 9:14 pm
by tom9876543
Well I found a really good "hello world" tutorial:

http://balau82.wordpress.com/2010/02/28 ... sing-qemu/

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

Posted: Fri Dec 17, 2010 10:24 pm
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.

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

Posted: Sat Dec 18, 2010 5:26 pm
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.

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

Posted: Mon Dec 20, 2010 4:26 pm
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.