Linux MIPS Architecture development
 help / color / mirror / Atom feed
* QEMU and mips linux
@ 2005-08-11 17:19 Danny Home Educator
  2005-08-11 17:41 ` Ralf Baechle
  0 siblings, 1 reply; 3+ messages in thread
From: Danny Home Educator @ 2005-08-11 17:19 UTC (permalink / raw)
  To: linux-mips

[-- Attachment #1: Type: text/plain, Size: 1333 bytes --]

I've gotten the binutils and gcc per chain tools directions (except for 
mips-unknown-linux-gnu i.e., 32 bit version of the compiler, etc.) and built 
my own mips cross compiler (I'm on Linux/x86). Then I got the kernel source 
from CVS and in the make menuconfig, all I did was change the machine 
selection to be QEMU and CPU selection to be R4x00.

Then I hand edited the .config to enable CONFIG_CROSSCOMPILE and then I 
built the kernel:

make CROSS_COMPILE=mips-unknown-linux-gnu-

And then I got compile failure with:

LD init/built-in.o
LD .tmp_vmlinux1
arch/mips/kernel/built-in.o: In function `show_cpuinfo':
proc.c:(.text+0x9c88): undefined reference to `get_system_type'
proc.c:(.text+0x9c88): relocation truncated to fit: R_MIPS_26 against 
`get_system_type'
make: *** [.tmp_vmlinux1] Error 1


I then edited arch/mips/qemu/q-setup.c to add:

9,14d8
< const char *get_system_type(void)
< {
< return "QEMU MIPS";
< }
<
<

And I was able to build vmlinux. I've gotten qemu-0.7.1, created blank 
bios.bin file and when I try to run it, I get:

% qemu-system-mips -kernel vmlinux -m 16 -nographic
(qemu) mips_r4k_init: start
mips_r4k_init: load BIOS '/usr/local/share/qemu/mips_bios.bin' size 131072

And hangs there.

Has anyone else tried qemu with the latest mips linux? Thanks.

[-- Attachment #2: Type: text/html, Size: 1619 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: QEMU and mips linux
  2005-08-11 17:19 QEMU and mips linux Danny Home Educator
@ 2005-08-11 17:41 ` Ralf Baechle
  2005-08-15 11:07   ` Ralf Baechle
  0 siblings, 1 reply; 3+ messages in thread
From: Ralf Baechle @ 2005-08-11 17:41 UTC (permalink / raw)
  To: Danny Home Educator; +Cc: linux-mips

On Thu, Aug 11, 2005 at 12:19:08PM -0500, Danny Home Educator wrote:

> I've gotten the binutils and gcc per chain tools directions (except for 
> mips-unknown-linux-gnu i.e., 32 bit version of the compiler, etc.) and built 
> my own mips cross compiler (I'm on Linux/x86). Then I got the kernel source 
> from CVS and in the make menuconfig, all I did was change the machine 
> selection to be QEMU and CPU selection to be R4x00.
> 
> Then I hand edited the .config to enable CONFIG_CROSSCOMPILE and then I 
> built the kernel:
> 
> make CROSS_COMPILE=mips-unknown-linux-gnu-
> 
> And then I got compile failure with:
> 
> LD init/built-in.o
> LD .tmp_vmlinux1
> arch/mips/kernel/built-in.o: In function `show_cpuinfo':
> proc.c:(.text+0x9c88): undefined reference to `get_system_type'
> proc.c:(.text+0x9c88): relocation truncated to fit: R_MIPS_26 against 
> `get_system_type'
> make: *** [.tmp_vmlinux1] Error 1
> 
> 
> I then edited arch/mips/qemu/q-setup.c to add:
> 
> 9,14d8
> < const char *get_system_type(void)
> < {
> < return "QEMU MIPS";
> < }
> <
> <

My bad.  I've so far compiled it with procfs disabled.  Will fix.

> And I was able to build vmlinux. I've gotten qemu-0.7.1, created blank 
> bios.bin file and when I try to run it, I get:
> 
> % qemu-system-mips -kernel vmlinux -m 16 -nographic
> (qemu) mips_r4k_init: start
> mips_r4k_init: load BIOS '/usr/local/share/qemu/mips_bios.bin' size 131072
> 
> And hangs there.
> 
> Has anyone else tried qemu with the latest mips linux? Thanks.

You need to enable serial console and add -append console=ttyS0 to the
Qemu options.  That all won't help you too much because the emulator will
hang on the first instruction in user mode.

  Ralf

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: QEMU and mips linux
  2005-08-11 17:41 ` Ralf Baechle
@ 2005-08-15 11:07   ` Ralf Baechle
  0 siblings, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2005-08-15 11:07 UTC (permalink / raw)
  To: Danny Home Educator; +Cc: linux-mips

On Thu, Aug 11, 2005 at 06:41:28PM +0100, Ralf Baechle wrote:

> > % qemu-system-mips -kernel vmlinux -m 16 -nographic
> > (qemu) mips_r4k_init: start
> > mips_r4k_init: load BIOS '/usr/local/share/qemu/mips_bios.bin' size 131072
> > 
> > And hangs there.
> > 
> > Has anyone else tried qemu with the latest mips linux? Thanks.
> 
> You need to enable serial console and add -append console=ttyS0 to the
> Qemu options.  That all won't help you too much because the emulator will
> hang on the first instruction in user mode.

Qemu as of before the weekend which needed slight tweaks to compile was
haning just in the BogoMIPS loop.  With minor fixes it's now getting
beyond that point and sometimes running trivial userspace code ok.

  Ralf

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-08-15 11:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-11 17:19 QEMU and mips linux Danny Home Educator
2005-08-11 17:41 ` Ralf Baechle
2005-08-15 11:07   ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox