Skip to contentSkip to conversation

How to Linux kernel for MIPSEL qemu

Qemu-devel PianoPan 2 participants 3 messages May 17, 2007 – May 18, 2007

lore
Share & tools
lore

PianoPan

author
#0 lore raw

Hello every one,

I try to build a mipsel kernel by myself for qemu-system-mipsel. But the qemu can not boot it properly. Is there anyone can give me some suggestion about it.

My method is following,

* Get the kernel of 2.6.18.3 from kernel.org
* Get the config.gz from the mipsel kernel that be provided by Qemu web.
* uncompress config.gz and rename it as .config, copy it to Linux kernel directory .
* in the kernel directory, use following command to build the kernel make ARCH=mips CROSS_COMPILE=/opt/noki/mipsel-unknown-linux/sdktool/bin/mipsel-unknown-linux- oldconfig

make ARCH=mips CROSS_COMPILE=/opt/noki/mipsel-unknown-linux/sdktool/bin/mipsel-unknown-linux- all

after build , I use qemu 0.9 to boot it, and do not successes.

#qemu-system-mipsel -kernel vmlinux -initrd initrd.gz -append "console=ttyS0"
qemu: Warning, could not load MIPS bios '/opt/noki/mipsel-unknown-linux//sdktool//share/qemu/mipsel_bios.bin'
qemu: could not load kernel 'vmlinux'

Best regard!

Pan

#1 lore raw
Quoted 9 lines · PianoPan

Hello every one,

I try to build a mipsel kernel by myself for qemu-system-mipsel. But the qemu can not boot it properly. Is there anyone can give me some suggestion about it.

My method is following,

* Get the kernel of 2.6.18.3 from kernel.org

In general the source tree from www.linux-mips.org is morfe likely to work.

Quoted 11 lines

* Get the config.gz from the mipsel kernel that be provided by Qemu web.
* uncompress config.gz and rename it as .config, copy it to Linux kernel directory .
* in the kernel directory, use following command to build the kernel make ARCH=mips CROSS_COMPILE=/opt/noki/mipsel-unknown-linux/sdktool/bin/mipsel-unknown-linux- oldconfig

make ARCH=mips CROSS_COMPILE=/opt/noki/mipsel-unknown-linux/sdktool/bin/mipsel-unknown-linux- all

Looks ok.

Quoted 7 lines

after build , I use qemu 0.9 to boot it, and do not successes.

#qemu-system-mipsel -kernel vmlinux -initrd initrd.gz -append "console=ttyS0"
qemu: Warning, could not load MIPS bios '/opt/noki/mipsel-unknown-linux//sdktool//share/qemu/mipsel_bios.bin'
qemu: could not load kernel 'vmlinux'

This means Qemu's built-in ELF loader failed to load the vmlinux binary. I've seen that when attempting to load a kernel with the wrong endianness.

Maybe you want to try the Debian installer image, e.g. from
http://ftp.uk.debian.org/debian/dists/etch/main/installer-mipsel/current/images/qemu/netboot/

Thiemo

author
#2 lore raw

Thiemo:

Thanks for your suggestion.

Yes, it is a issue about endianness. I already fix it. The default of kernel for MIPS Qemu is not support the little endian. The arch/mips/Kconfig must be updated for mipsel.

Thanks for ur help!

Best regard!

Pan

Quoted 46 lines · Thiemo Seufer
Quoted 9 lines · PianoPan

Hello every one,

I try to build a mipsel kernel by myself for qemu-system-mipsel. But the qemu can not boot it properly. Is there anyone can give me some suggestion about it.

My method is following,

* Get the kernel of 2.6.18.3 from kernel.org

In general the source tree from www.linux-mips.org is morfe likely to work.

Quoted 11 lines

* Get the config.gz from the mipsel kernel that be provided by Qemu web.
* uncompress config.gz and rename it as .config, copy it to Linux kernel directory .
* in the kernel directory, use following command to build the kernel make ARCH=mips CROSS_COMPILE=/opt/noki/mipsel-unknown-linux/sdktool/bin/mipsel-unknown-linux- oldconfig

make ARCH=mips CROSS_COMPILE=/opt/noki/mipsel-unknown-linux/sdktool/bin/mipsel-unknown-linux- all

Looks ok.

Quoted 7 lines

after build , I use qemu 0.9 to boot it, and do not successes.

#qemu-system-mipsel -kernel vmlinux -initrd initrd.gz -append "console=ttyS0"
qemu: Warning, could not load MIPS bios '/opt/noki/mipsel-unknown-linux//sdktool//share/qemu/mipsel_bios.bin'
qemu: could not load kernel 'vmlinux'

This means Qemu's built-in ELF loader failed to load the vmlinux binary. I've seen that when attempting to load a kernel with the wrong endianness.

Maybe you want to try the Debian installer image, e.g. from
http://ftp.uk.debian.org/debian/dists/etch/main/installer-mipsel/current/images/qemu/netboot/

Thiemo