qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] 2.4.25 linux ppc prep image with changable kernel commandli


From: Martin
Subject: [Qemu-devel] 2.4.25 linux ppc prep image with changable kernel commandline parameters
Date: Mon, 28 Jun 2004 03:30:44 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5


http://www.olifantasia.com/qemu/kernel.html

qemu 2.4.25 linux ppc prep image with changable kernel commandline parameters

I made a linux kernel image for powerpc-prep which you can directly load with qemu-system-ppc. I applied a handy patch from Leigh Brown which enables the embedded kernel commandline to be changed in an already built kernel with a perlscript called preptool.

vmlinuz-2.4.25: the kernel

config-2.4.25: the .config used to build it

System.map-2.4.25

000-cross_compile.diff: local mirror of optional patch to make crosscompiling of a ppc kernel on a x86 host easy

010-boot-args.diff: local mirror of the patch which allows preptool to work

preptool: local mirror of preptool, the tool to see and change the kernel parameters

modules:(Non-working) mol 0.961 kernel modules for this kernel

You can run the kernel in qemu with:

qemy-system-ppc -prep -m 128 -kernel vmlinuz-2.4.25 -hda boot.img

Where boot.img is your image file with a linuxppc distribution on it. Don't forget the -prep if you use a recent cvs snapshot. You can even boot it as

qemu-system-ppc -prep -m 128 -hda vmlinuz-2.4.25

The prep kernel is meant to be copied directly (with dd) to a special prep boot partition so you can also feed it to qemu as a little harddisk. You can, as far as I know, however not use it this way to boot a partition on another disk or partition image so booting a prep kernel directly with -hda is of little use for other things as testing emulators (qemu) and ppc bios bootloading.

preptool

preptool works in conjuction with a patch Leigh Brown made to the 2.4.x kernel that allows you to set and query the kernel arguments set in the boot image. This eliminates the need to manual type in the command line at every boot. preptool is a Perl script so you need to have Perl installed on the system you run it on (can be an x86 machine). However, it should work on just about any system so you can set the arguments on another system before installing it on your own machine. Here is an example of how you might use it:

$ preptool -q vmlinuz-2.4.25
vmlinuz-2.4.25
--------------
Entry point offset  = 0x00000500
Load image length   = 0x0010aa03
Load image Flags    = 0x00
Operating system id = 0x00
Partition name      = []
Command line        = [console=ttyS0 root=/dev/hdb]

$ preptool -s"ide0=0x1f0,0x3f6,13 ide1=0x170,0x376,13 netdev=9,0x300,eth0 console=ttyS0 console=tty0 root=/dev/hda" vmlinuz-2.4.25
$
$ ./preptool -q vmlinuz-2.4.25
vmlinuz-2.4.25
--------------
Entry point offset  = 0x00000500
Load image length   = 0x0010aa03
Load image Flags    = 0x00
Operating system id = 0x00
Partition name      = []
Command line:
ide0=0x1f0,0x3f6,13 ide1=0x170,0x376,13 netdev=9,0x300,eth0 console=ttyS0 console=tty0 root=/dev/hda
 

Other stuff

You can find kernels, patches and other stuff from Leigh Brown about Linux on rs6000 prep 7043-140 machines on his website or his files area.

Links

My name is Martin, you can reach me at meuk _at_ olifantasia |dot| com or on the qemu mailing list.

Main qemu emulator page

Qemu powerpc emulation page


reply via email to

[Prev in Thread] Current Thread [Next in Thread]