Building grub2 for windows
Hi,
I am trying to build grub2-svn for windows by using mingw32 or cygwin but it fails to generate valid windows executables (grub-setup, grub-mkimage, etc...).
My configure line:
./configure --prefix $HOME/grub-install
using mingw32, msys, gcc 3.4.5 (mingw-vista special r3), binutils 2.19.1
I also tried with cygwin, gcc 3.4.4, binutils 2.18.50.20080625.
So is it possible to build grub2-svn for windows ? If yes, is it possible to build it on linux using mingw32 ? What the configure line should looks like ?
Thank you very much.
Signature · 1 line
Alexandre Bique
Quoted 5 lines · Alexandre Bique
I am trying to build grub2-svn for windows by using mingw32 or cygwin but it fails to generate valid windows executables (grub-setup, grub-mkimage, etc...).
Quoted 7 lines
My configure line:
./configure --prefix $HOME/grub-installusing mingw32, msys, gcc 3.4.5 (mingw-vista special r3), binutils 2.19.1
I also tried with cygwin, gcc 3.4.4, binutils 2.18.50.20080625.
Grub2 should build out of the box on Cygwin. The following works for me with current grub2 svn (revision 2001) on current Cygwin 1.5.25-15:
$ ./configure --enable-grub-fstest --prefix=/tmp/inst $ make $ make install $ /tmp/inst/bin/grub-mkrescue grub-rescue.iso ... boot grub-rescue.iso ...
There is actually one issue in current grub2 svn: Build with --enable-grub-emu configure option does not work. It fails with undefined symbol 'grub_millisleep'.
What is the error message you got on Cygwin ?
Signature · 1 line
Christian Franke
Quoted 23 lines · Christian Franke
Quoted 5 lines · Alexandre Bique
I am trying to build grub2-svn for windows by using mingw32 or cygwin but it fails to generate valid windows executables (grub-setup, grub-mkimage, etc...).
Quoted 7 lines
My configure line:
./configure --prefix $HOME/grub-installusing mingw32, msys, gcc 3.4.5 (mingw-vista special r3), binutils 2.19.1
I also tried with cygwin, gcc 3.4.4, binutils 2.18.50.20080625.Grub2 should build out of the box on Cygwin. The following works for me with current grub2 svn (revision 2001) on current Cygwin 1.5.25-15:
$ ./configure --enable-grub-fstest --prefix=/tmp/inst $ make $ make install $ /tmp/inst/bin/grub-mkrescue grub-rescue.iso ... boot grub-rescue.iso ...
Quoted 5 lines
There is actually one issue in current grub2 svn: Build with --enable-grub-emu configure option does not work. It fails with undefined symbol '
grub_millisleep'.What is the error message you got on Cygwin ?
The problem is that make install installs elf binaries and not win32 binaries. But win32 binaries are compiled. I moved win32 binaries by hand.
There is also a problem if you specify a root directory with space, i think that some variables are not protected with "$my_var" in some shell scripts.
Thank you very much.
Signature · 1 line
Alexandre Bique
Quoted 11 lines · Alexandre Bique
Quoted 2 lines · Christian Franke
What is the error message you got on Cygwin ?
The problem is that make install installs elf binaries and not win32 binaries. But win32 binaries are compiled. I moved win32 binaries by hand.
I could not reproduce this.
Is the Cygwin PATH correct, such that the Cygwin tools /usr/bin/make, /usr/bin/install ... are actually used during build?
Where do those 'elf binaries' come from? The Cygwin gcc toolchain cannot produce elf binaries. That's why grub-pe2elf exists to convert the *.mod files to ELF format.
Quoted 5 lines
There is also a problem if you specify a root directory with space, i think that some variables are not protected with "$my_var" in some shell scripts.
Yes, that is correct and should IMO be fixed in the future.
Signature · 1 line
Christian Franke