How to build 64-bit, EFI-enabled grub on Mac OS X

# in your dev directory..
mkdir grub; cd grub

mkdir objconv; cd objconv
# "objconv" is required by the grub build. Its home page is http://www.agner.org/optimize
wget http://www.agner.org/optimize/objconv.zip
unzip objconv.zip
unzip source.zip
g++ -o objconv -O2 *.cpp
sudo cp objconv /usr/local/bin

# rehash if you are running csh
cd ..

# you may want to pick a more recent release; release_1_97 was the latest as of this writing
# http://svn.savannah.gnu.org/viewvc/tags/?root=grub&sortby=date#dirlist
svn co svn://svn.sv.gnu.org/grub/tags/release_1_97
cd release_1_97
./autogen.sh
./configure --with-platform=efi --target=x86_64

# edit kern/misc.c and add after line 53:
# void *memcpy (void *dest, const void *src, grub_size_t n);
# void *memmove (void *dest, const void *src, grub_size_t n);

# edit symlist.c and add after line 19:
# #include <string .h>
make -j `hwprefs cpu_count`
sudo make install

# This all results in:
# /usr/local/bin/x86_64-grub-editenv
# /usr/local/bin/x86_64-grub-fstest
# /usr/local/bin/x86_64-grub-mkelfimage
# /usr/local/bin/x86_64-grub-mkfont
# /usr/local/bin/x86_64-grub-mkimage


6 Responses to “How to build 64-bit, EFI-enabled grub on Mac OS X”

  1. Hongkong Tours Says:

    That Sounds interesting, I agree with you.Please keep at your good work, I would come back often.*

  2. Guilin Tour Says:

    That Sounds interesting, I agree with you.Please keep at your good work, I would come back often.*

  3. forex robot Says:

    Nice!

  4. geno09 Says:

    Thanks for the great info.

  5. Xian tour Says:

    Great post, what you said is really helpful to me. I can't agree with you anymore. I have been talking with my friend about, he though it is really interesting as well. Keep up with your good work, I would come back to you.

  6. Satish Narayanan Says:

    Thanx *( sizeof( (1 exabyte)* (1 zettabyte)*(1 zebibyte) * (1 yottabyte)*8)) !!!
    :)

Leave a Reply