[PATCH] Running GRUB under qemu on PowerPC

2008-01-16 Thread Pavel Roskin
Hello! I'm very close to being able to run GRUB2 on an emulated PowerPC machine. I haven't tried cross compiling. I compile GRUB on a PowerPC system and run it there under qemu. This saves time, as it allows to avoid lengthy reboots. Only the latest qemu 0.9.1 appears to be working wit

Re: [PATCH] Running GRUB under qemu on PowerPC

2008-01-16 Thread Robert Millan
On Wed, Jan 16, 2008 at 03:19:49AM -0500, Pavel Roskin wrote: > > The unresolved problem is that the "/memory/available" property is not > available. I get the "grub rescue" prompt, but all commands fail with > "out of memory". Does this mean all memory is ours to deal with as pleased? :-)

Re: Using GRUB2 with CoreBoot (formerly known as LinuxBIOS) 1/4: Find tables

2008-01-16 Thread Robert Millan
On Tue, Jan 15, 2008 at 06:47:54PM +, Patrick Georgi wrote: > Am Tue, 15 Jan 2008 19:05:47 +0100 schrieb Robert Millan: > > Is the "LBIO" signature schedule to change due to CoreBoot rename? > > Should we check for another one as well? > I'm not sure if the rename extends to that, given that i

Re: Using GRUB2 with CoreBoot (formerly known as LinuxBIOS) 2/4: Keyboard controller

2008-01-16 Thread Robert Millan
See attached patch. I don't like the way I had to hook initialisation in console.c, but solving this properly would require some redesign (converting at_keyboard to a module, and adding abstraction to handle input and output separately, etc). But for now I think it's a valid compromise. I'll wa

Re: Using GRUB2 with CoreBoot (formerly known as LinuxBIOS) 3/3: grub-mkimage should create streamable ELFs

2008-01-16 Thread Robert Millan
On Tue, Jan 15, 2008 at 06:42:20PM +, Patrick Georgi wrote: > Am Tue, 15 Jan 2008 19:09:19 +0100 schrieb Robert Millan: > > - I heard CoreBoot was deprecating ELF for size reasons. > Version 3 splits them up, yes. Version 2 will keep ELF. What do you mean "splits" ? Is ELF supported as a bu

Re: Using GRUB2 with CoreBoot (formerly known as LinuxBIOS) 2/4: Keyboard controller

2008-01-16 Thread Robert Millan
On Wed, Jan 16, 2008 at 02:46:41PM +0100, Robert Millan wrote: > > See attached patch. > > I don't like the way I had to hook initialisation in console.c, but solving > this properly would require some redesign (converting at_keyboard to a > module, and adding abstraction to handle input and outp

Re: Using GRUB2 with CoreBoot (formerly known as LinuxBIOS) 3/3: grub-mkimage should create streamable ELFs

2008-01-16 Thread Patrick Georgi
Am Wed, 16 Jan 2008 14:47:38 +0100 schrieb Robert Millan: > What do you mean "splits" ? Is ELF supported as a build option? You give it an ELF file and it adds per-segment files to the LAR image. Mostly transparent to the user. Regards, Patrick Georgi

Re: [PATCH] Running GRUB under qemu on PowerPC

2008-01-16 Thread Pavel Roskin
On Wed, 2008-01-16 at 11:40 +0100, Robert Millan wrote: > On Wed, Jan 16, 2008 at 03:19:49AM -0500, Pavel Roskin wrote: > > > > The unresolved problem is that the "/memory/available" property is not > > available. I get the "grub rescue" prompt, but all commands fail with > > "out of memory"

Re: [PATCH] Running GRUB under qemu on PowerPC

2008-01-16 Thread Robert Millan
On Wed, Jan 16, 2008 at 01:22:48PM -0500, Pavel Roskin wrote: > > On Wed, 2008-01-16 at 11:40 +0100, Robert Millan wrote: > > On Wed, Jan 16, 2008 at 03:19:49AM -0500, Pavel Roskin wrote: > > > > > > The unresolved problem is that the "/memory/available" property is not > > > available. I get

Re: Using GRUB2 with CoreBoot (formerly known as LinuxBIOS) 1/4: Find tables

2008-01-16 Thread Uwe Hermann
On Wed, Jan 16, 2008 at 02:40:02PM +0100, Robert Millan wrote: > + auto int check_signature (grub_linuxbios_table_header_t); > + int check_signature (grub_linuxbios_table_header_t table_header) > + { > +if (! grub_memcmp (table_header->signature, "LBIO", 4)) > + return 1; > + > +ret

Re: embedding filesystems in core image (Re: moving ata initialisation to a command)

2008-01-16 Thread Marco Gerards
Robert Millan <[EMAIL PROTECTED]> writes: > On Sat, Dec 22, 2007 at 01:24:53PM +0100, Yoshinori K. Okuji wrote: >> On Saturday 22 December 2007 13:18, Robert Millan wrote: >> > Here's a new patch, with some cleanup. The main difference is that >> > memdisk.c doesn't include any arch-specific code

Re: Using GRUB2 with CoreBoot (formerly known as LinuxBIOS) 1/4: Find tables

2008-01-16 Thread Robert Millan
On Wed, Jan 16, 2008 at 08:39:09PM +0100, Uwe Hermann wrote: > On Wed, Jan 16, 2008 at 02:40:02PM +0100, Robert Millan wrote: > > + auto int check_signature (grub_linuxbios_table_header_t); > > + int check_signature (grub_linuxbios_table_header_t table_header) > > + { > > +if (! grub_memcmp

Re: [PATCH] Running GRUB under qemu on PowerPC

2008-01-16 Thread Pavel Roskin
On Wed, 2008-01-16 at 20:33 +0100, Robert Millan wrote: > On Wed, Jan 16, 2008 at 01:22:48PM -0500, Pavel Roskin wrote: > > > > I guess the simplest approach would be to assume that we have a certain > > amount of memory that would be enough for GRUB. > > What a mess. What does Linux do? They h

Re: [PATCH] Running GRUB under qemu on PowerPC

2008-01-16 Thread Robert Millan
On Wed, Jan 16, 2008 at 04:52:46PM -0500, Pavel Roskin wrote: > > It seems to me that Linux uses "#size-cells" and "#address-cells" (see > drivers/of/base.c and arch/powerpc/kernel/prom_parse.c) We use "#size-cells" and "#address-cells" too, but they aren't useful by themselves. They describe th

nested functions used by multiboot2 loader corrupt stack

2008-01-16 Thread Robert Millan
I got pretty confused at this one. Maybe someone can sort this out. I'm afraid I can't :-( It seems that at some point when loading multiboot2 images, our stack is corrupted for no apparent reason and one of the hooks in our nested function calls ends up jumping to the wrong place. This hangs

Re: help with powerpc asm (moving grub_ieee1275_entry_fn initialization to crt0.S)

2008-01-16 Thread Pavel Roskin
Quoting Robert Millan <[EMAIL PROTECTED]>: Here's an incomplete (missing powerpc & sparc) version of the patch that would sanitize this function call. I don't see why it needs to be done across the board. Maybe you have further simplifications in mind? Anyway, it's a good idea not to rely