Skip to contentSkip to conversation

The process of kernel cross-compiling in arm-test-0.2.tar.gz

Qemu-devel daixiaoke 2 participants 3 messages May 23, 2011 – May 24, 2011

lore
Share & tools
lore

daixiaoke

author
#0 lore raw

Hi,
I am trying to run uClinux by qemu. The problem is:
The files generated after cross-compiling uClinux can't be used by qemu to run uClinux successfully.

However, qemu can successfully run the system via the files in arm-test-0.2.tar.gz, which can be downloaded from sector "QEMU disk images" on http://wiki.qemu.org/Download.

My process:
1.Installing qemu-0.14.1 and Sourcery G++ in my virtual system(RHEL6.0).

2.Downloading uClinux-dist-20080808-20090112.patch.gz & uClinux-dist-20080808.tar.bz2

3.Compiled uClinux following steps in the attachment(Chapter 4: Building the uClinux image).
“STM3210E-EVAL-jffs” was selected for "Porduct" while Configure uClinux for STM3210E-EVAL.

4.After compiled, 3 files generated: xipImage.bin, rootfs.img.bin and logo.bin

5.Executed following command on command line:
qemu-system-arm -kernel xipImage.bin -initrd rootfs.img.bin -nographic -append "console=ttyAMA0" But it didn't work and nothing was shown out on the command line.

So could Paul Brook or someone else tell me the process of kernel cross-compiling in arm-test-0.2.tar.gz?

Or, how should I compile uClinux to make the files created usefully for qemu?

Thanks,
Dai Xiaoke

#1 lore raw
Quoted 3 lines · On Monday 23 May 2011 19:26:45 daixiaoke wrote:

3.Compiled uClinux following steps in the attachment(Chapter 4: Building the uClinux image). “STM3210E-EVAL-jffs” was selected for "Porduct" while Configure uClinux for STM3210E-EVAL.

So you have built the images to install into a STM3210E board.

Quoted 4 lines

5.Executed following command on command line:
qemu-system-arm -kernel xipImage.bin -initrd rootfs.img.bin -nographic
-append "console=ttyAMA0" But it didn't work and nothing was shown out on the command line.

I think this is the problem: qemu-system-arm isn't emulating an STM3210E board. The default machine type with qemu-system-arm is the "integratorcp" (ARM Integrator/CP (ARM926EJ-S) board). See qemu-system-arm -M ? for a full list of options.

You have to build code that matches the environment you are going to run it in.

Brad

author
#2 lore raw
Quoted 10 lines · Brad Hards
Quoted 3 lines · On Monday 23 May 2011 19:26:45 daixiaoke wrote:

3.Compiled uClinux following steps in the attachment(Chapter 4: Building the uClinux image). “STM3210E-EVAL-jffs” was selected for "Porduct" while Configure uClinux for STM3210E-EVAL.

So you have built the images to install into a STM3210E board.

Quoted 4 lines

5.Executed following command on command line:
qemu-system-arm -kernel xipImage.bin -initrd rootfs.img.bin -nographic
-append "console=ttyAMA0" But it didn't work and nothing was shown out on the command line.

Quoted 7 lines

I think this is the problem: qemu-system-arm isn't emulating an STM3210E board. The default machine type with qemu-system-arm is the "integratorcp" (ARM Integrator/CP (ARM926EJ-S) board). See qemu-system-arm -M ? for a full list of options.

You have to build code that matches the environment you are going to run it in.

OK.
Thanks a lot.

Dai Xiaoke

Quoted 5 lines

Brad