[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Grub2 on Mac OS X
From: |
Marco Gerards |
Subject: |
Re: Grub2 on Mac OS X |
Date: |
Sat, 26 Mar 2005 14:52:24 +0100 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux) |
Antoine Terrienne <address@hidden> writes:
> Ok so I guess we should change the getopt method used by grub-mkimage to argp
> too.
IMHO it should be changed for every utility in that case. If no one
knows argp, I could do that when I have some time and some other
issues are solved. That would be in some months, but it will be done.
> Oop sory I mean stdint.h
> Types like int32_t, uint32_t and intprt_t are defined from stdint.h
If that is used, you could replace int32_t by grub_uint32_t, etc.
> I try to send a new patch several times but it is too big for the mailing list
> size limit (100Kb) so I put it here :
> http://antoine.terrienne.free.fr/grub2/grub2_on_macosx_20050326.patch
Not including generated files will make the patch a lot smaller. I
personally don't have problems with big patches on the mailinglist.
Having the patch in the email will make it a lot easier for me to
review the patch.
> And the mail I sent with it :
>
> Here is a new patch much cleaner (with -u).
Please use -p as well. It will make reviewing the patch a *LOT*
easier.
> Everything compiles now but I didn't test It yet. In fact I don't know how to
> use and install grub2 on a drive. If you have and docs or info about
> installing
> a binary to be open firmware bootable that could help me, thanks ;-)
First you have to compile GRUB 2. After that you can use grub-mkimage
to create an ELF file that is loadable by open firmware. Using
grub-mkimage you should specify the name of the output executable and
which modules should be included. For testing you should at least include
apple.mod, ext2.mod, hfs.mod, ls.mod and normal.mod I think.
After that I just load it using "boot" or tftp.
> The compilation is OK but this patch is still ugly : I left the getopt. I add
> a
> flag -DGRUB_HOST to make a distinction between the host and build parts. The
> GRUB_HOST flag is only used in some specific powerpc include directories so it
> shouldn't affect the i386 part. I also add a grub_machine_fini in
> kern/powerpc/ieee1275/init.c needed by kern/loader.c. Right now
> grub_machine_fini is empty but it should call for someting like
> grub_console_fini (not present in powerpc part) and grub_ofdisk_fini (not
> implemented). I left malloc as an alternative to memalign. As far as I look in
> the code memalign is used to align memory segment from elf files and every
> usual cases in elf segments fits in the 16 byte alignment. So it should work
> well for now waiting for a better implementation to support exotic segment
> alignments.
I thought GRUBOF was not used anymore, but I see you replaced it. I
hope I can find some time to have a look at your patch soon, but
please understand if it will take a while.
> Compilation and installation are OK. I get grub-emu grub-mkimage and every
> modules in the share/grub/ directory and grub-mkimage can produce images.
> Still
> need test and improvements but it seems to work.
Cool! please check if your modification did not add any warnings or
so, we would like to keep GRUB quite clean.
A complete review has to follow... sorry...
Thanks,
Marco
- Re: Grub2 on Mac OS X, antoine terrienne, 2005/03/23
- Re: Grub2 on Mac OS X, Yoshinori K. Okuji, 2005/03/23
- Re: Grub2 on Mac OS X, Antoine Terrienne, 2005/03/23
- Re: Grub2 on Mac OS X, Yoshinori K. Okuji, 2005/03/25
- Re: Grub2 on Mac OS X, Antoine Terrienne, 2005/03/26
- Re: Grub2 on Mac OS X,
Marco Gerards <=
- Re: Grub2 on Mac OS X, Antoine Terrienne, 2005/03/26
- Re: Grub2 on Mac OS X, Marco Gerards, 2005/03/26
- Re: Grub2 on Mac OS X, Antoine Terrienne, 2005/03/26
- Re: Grub2 on Mac OS X, Marco Gerards, 2005/03/26
- Re: Grub2 on Mac OS X, Marco Gerards, 2005/03/26