grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] grub2 for Cygwin


From: Christian Franke
Subject: Re: [PATCH] grub2 for Cygwin
Date: Thu, 03 Apr 2008 21:56:57 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071128 SeaMonkey/1.1.7

Bean wrote:
On Thu, Apr 3, 2008 at 9:28 PM, Christian Franke
<address@hidden> wrote:
...
 The cygwin distro does not include any cross compilation tools. A
 package that require tools not in the distro would not be accepted.

 The package is actually build with native cygwin gcc+binutils.

 The related discussion+patches are already on this list, e.g:
 http://lists.gnu.org/archive/html/grub-devel/2007-11/msg00238.html
 http://lists.gnu.org/archive/html/grub-devel/2007-11/msg00237.html
 http://lists.gnu.org/archive/html/grub-devel/2007-11/msg00174.html
 http://lists.gnu.org/archive/html/grub-devel/2007-11/msg00161.html
 http://lists.gnu.org/archive/html/grub-devel/2007-11/msg00160.html

It seems you have spent a lot of effect to make it work, but some
trick is not very appealing.

Which trick in particular is not appealing ?

The external linker script will be necessary also on other platforms where the builtin "ld -N" script does not work as expected. The hack in the loader is ugly, but was necessary to undo a hack in the PE backend of libbfd.

Here the diffstat for the cygwin changes based on the "-D 2008-03-27" CVS release:

Makefile.in                   |    4 +
aclocal.m4                    |   18 +++++
conf/i386-pc-cygwin-img-ld.sc |   53 +++++++++++++++
conf/i386-pc.rmk              |   12 +--
configure.ac                  |   37 +++++++++++
genkernsyms.sh.in             |    7 +-
genmk.rb                      |    8 +-
gensymlist.sh.in              |    6 +
include/grub/dl.h             |    5 -
include/grub/symbol.h         |    6 +
kern/dl.c                     |   40 +++++++++--
kern/i386/dl.c                |   30 ++++++++
util/biosdisk.c               |   34 +++++++---
util/getroot.c | 141 +++++++++++++++++++++++++++++++++++++++++-
util/grub-mkdevicemap.c       |   19 ++++-
util/grub-probe.c             |   25 ++++++-
util/i386/pc/grub-install.in  |    8 +-
util/update-grub.in           |   25 +++++--
util/update-grub_lib.in       |   22 +-----
19 files changed, 436 insertions(+), 64 deletions(-)

These are IMO not so much changes for a rather different platform without native ELF support.


I personally don't mind, but I don't know
if it can be accepted by others.

OK, if there is no chance to get this accepted, grub2 project managers should tell me soon.

It does not make much sense to spent time sending cygwin releated patches upstream, when all these are eventually rejected.


...
Can you make it work with mingw, for example, use the -mno-cygwin compile flag ?


I have not planned to do this in the near future. Of course, it is possible, but there are more issues to solve: No /dev/... device support, no native shell script support, CR/LF issues, ...
And: The PE->elf conversion problem will remain.

So a backward compatible fix for mingw would likely be much less appealing than the one for cygwin :-)

The cygwin port of grub2 is targeted to users who want a *n[iu]x environment, but (have to) use Windows as main work OS for whatever reason. They likely have already installed cygwin :-)

Christian





reply via email to

[Prev in Thread] Current Thread [Next in Thread]