Skip to contentSkip to conversation

PPC porting status

DISCUSSION Maurizio Boriani 3 participants 10 messages Jul 8, 2004 – Aug 12, 2004

lore
Share & tools
lore
#0 lore raw

Hi all,
I'd like to contribute to grub2 ppc port, so I had a look (and compiled
successfully) at sources but haven't figured out which is the actual state of this. So my questions are:

1) The builded grubof can really bootstrap at least monolitics kernel (ex. linux) ?
2) What's the state of multiboot support (I know... for ppc there isn't a specified multiboot proto, or at least I don't know it's existence)?
3) What's the global state of ppc port?
4) What's need to be done?
5) Where do you suggest me to start from?

thanks in advance

Signature · 3 lines
Maurizio Boriani 
GPG key: 0xCC0FBF8F
fingerprint => E429 A37C 5259 763C 9DEE  FC8B 5D61 C796 CC0F BF8F <= fingerprint
#1 lore raw
Quoted 7 lines · Maurizio Boriani

Hi all,
I'd like to contribute to grub2 ppc port, so I had a look (and compiled
successfully) at sources but haven't figured out which is the actual state of this. So my questions are:

1) The builded grubof can really bootstrap at least monolitics kernel (ex. linux) ?

Not yet, but I will work on this in short term. Does grubof work for you?

Quoted 2 lines

2) What's the state of multiboot support (I know... for ppc there isn't a specified multiboot proto, or at least I don't know it's existence)?

We need to write a new multiboot spec, the current one is not portable.

Quoted 1 line

3) What's the global state of ppc port?

- The console needs some improvements:
Perhaps I fixed this already...

- There are bugs in the partition support:
I fixed them and I will soon put the changes in CVS

- There is no support to load modules.

- No HFS[+] support:
Almost finished, see the mailing list archives.

- No loaders at all.
I have written a linux loader, but it does not support a lot of features and it crashes with some kernels. It is not in CVS yet.

- There are some bugs that can crash grubof. Perhaps the patches I mentioned above will fix this.

Quoted 1 line

4) What's need to be done?

Currently I am working on HFS support and the stability of the port. What I won't do in short term is working on the module loading support. It would be really neat if you could work on that.

The other thing you can work on, although I planned working on this (well, still no problem), is the linux loader. I could for example commit what I have after a few improvements. If you could investigate the crashes and improve the loader that will mean GRUB 2 can be used as bootloader.

So feel free to pick a task or suggestion something yourself. What will help me the most is the module loading support because I will not do that in short term. But whatever you do, please tell us before you start and keep us informed about the progress.

Can you please describe the hardware you have? It might help me if I knew what hardware is supported already, what needs to be done and what can be tested.

Quoted 1 line

5) Where do you suggest me to start from?

Please read about our coding standards. We use the GCS, please read the relevant sections from `http://www.gnu.org/prep/standards.html'.

To learn about the things that need to be done, just read the i386/pc specific code for that. It already works and it should help when writing the ppc/ieee1275 code. And of course you should ask questions if you have any.

Thanks,
Marco

#2 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Marco" == Marco Gerards <[email protected]> writes:

Marco> Not yet, but I will work on this in short term. Does Marco> grubof work for you?

not tested yet... I didn't find docs about how use it (I supposed should be copied into the boot part with some kind of configuration file in a yaboot similar way ). How should I test it?

Marco> We need to write a new multiboot spec, the current one is Marco> not portable.

I saw... it specify the use of specific x86 registers and so on... I think should be better to use ram to store information produced by grub2 for the OS

Quoted 1 line
Quoted 1 line

3) What's the global state of ppc port?

[...]

Marco> - There is no support to load modules.

In i386 port this is contained by loader/i386/pc/chainloader.c ?

Marco> - No HFS[+] support: Almost finished, see the mailing list Marco> archives.

saw :)

Marco> - No loaders at all. I have written a linux loader, but it Marco> does not support a lot of features and it crashes with some Marco> kernels. It is not in CVS yet.

could you commit ppc loader? I'd like to work on this :) Actually I prefer to work on chainloader and multiboot but whit a working loader this development should be simpler.

Marco> - There are some bugs that can crash grubof. Perhaps the Marco> patches I mentioned above will fix this.

:)

Quoted 1 line
Quoted 1 line

4) What's need to be done?

Marco> Currently I am working on HFS support and the stability of Marco> the port. What I won't do in short term is working on the Marco> module loading support. It would be really neat if you Marco> could work on that.

I'd like to do so very much :)

Marco> The other thing you can work on, although I planned working Marco> on this (well, still no problem), is the linux loader. I Marco> could for example commit what I have after a few Marco> improvements. If you could investigate the crashes and Marco> improve the loader that will mean GRUB 2 can be used as Marco> bootloader.

I'll be glad doing this

Marco> So feel free to pick a task or suggestion something Marco> yourself. What will help me the most is the module loading Marco> support because I will not do that in short term. But Marco> whatever you do, please tell us before you start and keep Marco> us informed about the progress.

ok :) I'd like to have a look to linux loader and when it'll work (if I'll be able to do so :) ) try to use for booting a little dummy kernel and dummy modules for chailoader development. My real goal is to have a better and comfortable environment on ppc (bootloader and so on) for hurd-l4 development and port. I apologise if in future my works on grub2 will be discontinuous but my spare-time is so (some periods I'm very busy with works which let me live and some others I've nothing to do :)) )

Marco> Can you please describe the hardware you have? It might Marco> help me if I knew what hardware is supported already, what Marco> needs to be done and what can be tested.

I usually works on a NewWorld PowerBoot2,2 MacRISC Power Macintosh (cpu ppc750CX at 466MHz,256K L2 cache and 192MB system memory). In short it is an Ibook graphite :)

Quoted 1 line
Quoted 1 line

5) Where do you suggest me to start from?

Marco> Please read about our coding standards. We use the GCS, Marco> please read the relevant sections from
Marco> `http://www.gnu.org/prep/standards.html'.

ok I already know this and respect like an holy book :)) Also I'm a guile/scheme fanatic :)

Marco> To learn about the things that need to be done, just read Marco> the i386/pc specific code for that. It already works and Marco> it should help when writing the ppc/ieee1275 code. And of Marco> course you should ask questions if you have any.

thanks very much for suggestions

Marco> Thanks, Marco

friendly yours,
Maurizio

Signature · 3 lines
Maurizio Boriani 
GPG key: 0xCC0FBF8F
fingerprint => E429 A37C 5259 763C 9DEE  FC8B 5D61 C796 CC0F BF8F <= fingerprint
#3 lore raw
Quoted 8 lines · Maurizio Boriani
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Marco" == Marco Gerards <[email protected]> writes:

Marco> Not yet, but I will work on this in short term. Does Marco> grubof work for you?

not tested yet... I didn't find docs about how use it (I supposed should be copied into the boot part with some kind of configuration file in a yaboot similar way ). How should I test it?

It is an ELF binary. I load it using tftp (Open Firmware on the apple has network boot support), or else you can load the binary from the Open Firmware console.

It is just like yaboot. Yaboot has an extra files with forth code. Perhaps you can modify it to load GRUB 2.

Quoted 6 lines

Marco> We need to write a new multiboot spec, the current one is Marco> not portable.

I saw... it specify the use of specific x86 registers and so on... I think should be better to use ram to store information produced by grub2 for the OS

I agree.

Quoted 3 lines

Marco> - There is no support to load modules.

In i386 port this is contained by loader/i386/pc/chainloader.c ?

No. With module support I meant modules like ext2.mod, normal.mod, etc. GRUB 2 has a core image, all extra modules are loaded using `insmod' or when they are required.

Just have a look at grub_dl_load and grub_dl_load_file.

Quoted 7 lines

Marco> - No loaders at all. I have written a linux loader, but it Marco> does not support a lot of features and it crashes with some Marco> kernels. It is not in CVS yet.

could you commit ppc loader? I'd like to work on this :) Actually I prefer to work on chainloader and multiboot but whit a working loader this development should be simpler.

I will do this. I really hope you can wait a few days. I do not want to commit it in the terrible state it is in now. ;)

Chainload support is not that important, I think. AFAIK the boot information is stored as a file in a HFS[+] partition. But if I am wrong and if a chainloader is required, please write one.

Quoted 8 lines
Quoted 1 line
Quoted 1 line

4) What's need to be done?

Marco> Currently I am working on HFS support and the stability of Marco> the port. What I won't do in short term is working on the Marco> module loading support. It would be really neat if you Marco> could work on that.

I'd like to do so very much :)

That is really nice.

Quoted 8 lines

Marco> The other thing you can work on, although I planned working Marco> on this (well, still no problem), is the linux loader. I Marco> could for example commit what I have after a few Marco> improvements. If you could investigate the crashes and Marco> improve the loader that will mean GRUB 2 can be used as Marco> bootloader.

I'll be glad doing this

Cool.

Can you tell us after I committed the linux loader what you will do?

Quoted 6 lines

Marco> So feel free to pick a task or suggestion something Marco> yourself. What will help me the most is the module loading Marco> support because I will not do that in short term. But Marco> whatever you do, please tell us before you start and keep Marco> us informed about the progress.

Quoted 7 lines

ok :) I'd like to have a look to linux loader and when it'll work (if I'll be able to do so :) ) try to use for booting a little dummy kernel and dummy modules for chailoader development. My real goal is to have a better and comfortable environment on ppc (bootloader and so on) for hurd-l4 development and port. I apologise if in future my works on grub2 will be discontinuous but my spare-time is so (some periods I'm very busy with works which let me live and some others I've nothing to do :)) )

In that case we have the same goals. I started working on the PPC port to make it possible to load GNU/Hurd on the PPC. The new multiboot spec (or changing the current, I don't want to think about that now ;)) is high on my todo list.

Quoted 7 lines

Marco> Can you please describe the hardware you have? It might Marco> help me if I knew what hardware is supported already, what Marco> needs to be done and what can be tested.

I usually works on a NewWorld PowerBoot2,2 MacRISC Power Macintosh (cpu ppc750CX at 466MHz,256K L2 cache and 192MB system memory). In short it is an Ibook graphite :)

Ah, nice. GRUB 2 *should* work perfectly on your laptop.

Quoted 8 lines
Quoted 1 line
Quoted 1 line

5) Where do you suggest me to start from?

Marco> Please read about our coding standards. We use the GCS, Marco> please read the relevant sections from
Marco> `http://www.gnu.org/prep/standards.html'.

ok I already know this and respect like an holy book :)) Also I'm a guile/scheme fanatic :)

Nice.

Thanks,
Marco

#4 lore raw
In reply to Maurizio Boriani
Quoted 9 lines · Maurizio Boriani

Marco> So feel free to pick a task or suggestion something Marco> yourself. What will help me the most is the module loading Marco> support because I will not do that in short term. But Marco> whatever you do, please tell us before you start and keep Marco> us informed about the progress.

ok :) I'd like to have a look to linux loader and when it'll work (if I'll be able to do so :) ) try to use for booting a little dummy kernel and dummy modules for chailoader development.

The load I wrote was for PUPA. I just thrown it in the CVS checkout of GRUB 2 I have here. It appears to work fine. It loads linux and shows an error about passing init= to the kernel.

That seems fine because I don't set up arguments and the incorrect root partition is used. So it seems the linux loader does not have the bug that it had before.

I think I can better work on linux loading myself because it seems to work now (for unknown reasons, I guess because of some other bugfixes) and it is almost finished. I hope you don't mind and the other tasks were clear to you so you can focus on another part of the port.

thanks,
Marco

#5 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Marco" == Marco Gerards <[email protected]> writes:

Marco> The load I wrote was for PUPA. I just thrown it in the CVS Marco> checkout of GRUB 2 I have here. It appears to work fine. Marco> It loads linux and shows an error about passing init= to Marco> the kernel.

great:)

Marco> That seems fine because I don't set up arguments and the Marco> incorrect root partition is used. So it seems the linux Marco> loader does not have the bug that it had before.

lucky :)

Marco> I think I can better work on linux loading myself because Marco> it seems to work now (for unknown reasons, I guess because Marco> of some other bugfixes) and it is almost finished. I hope Marco> you don't mind and the other tasks were clear to you so you Marco> can focus on another part of the port.

ok, I'll focus on module loading port. I'll let you be informed about state of porting and obviously a lot of questions :)

thanks,

Signature · 3 lines
Maurizio Boriani 
GPG key: 0xCC0FBF8F
fingerprint => E429 A37C 5259 763C 9DEE  FC8B 5D61 C796 CC0F BF8F <= fingerprint
#6 lore raw
Quoted 8 lines · Maurizio Boriani

Marco> I think I can better work on linux loading myself because Marco> it seems to work now (for unknown reasons, I guess because Marco> of some other bugfixes) and it is almost finished. I hope Marco> you don't mind and the other tasks were clear to you so you Marco> can focus on another part of the port.

ok, I'll focus on module loading port. I'll let you be informed about state of porting and obviously a lot of questions :)

Are you working on this or still interested in doing so? Otherwise I will start working on this soon.

--
Marco

#7 lore raw
In reply to Marco Gerards
Quoted 2 lines · Marco Gerards

- There are bugs in the partition support:
I fixed them and I will soon put the changes in CVS

The fixes are committed.

Quoted 2 lines

- There are some bugs that can crash grubof. Perhaps the patches I mentioned above will fix this.

It does not crash anymore for me. I just committed a patch to fix some problems.

Now I will try to put in the linux loader ASAP.

--
Marco

#8 lore raw
In reply to Maurizio Boriani
Quoted 1 line · Maurizio Boriani

3) What's the global state of ppc port?

Just curious, what is the aim of Grub on PPC? All PPC machines I know of have firmwares that allow multiboot already, exception being old pre-openfirmware macs which rely on booting macos
anyways.

Signature · 2 lines
Kolbjørn Barmen
UNINETT Driftsenter
#9 lore raw
Quoted 8 lines · Kolbjørn Barmen
Quoted 1 line · Maurizio Boriani

3) What's the global state of ppc port?

Just curious, what is the aim of Grub on PPC? All PPC machines I know of have firmwares that allow multiboot already,
exception being old pre-openfirmware macs which rely on booting macos anyways.

The problem with open firmware is that it does not support all filesystems. For example, you can not load your kernel from a ext2 or jfs filesystem.

Another disadvantage is that the firmware does not have a nice boot menu.

The most important reason for me to work on this port is because there is a need for multiboot support. I don't mean the multiboot you talked about (multiple OS'es), but I mean the multiboot specification. This is required for some OS'es to boot, GNU/Hurd for example.

--
Marco