From: Pavel Roskin <proski@gnu.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] Fix grub-install to use prefix for modules dir
Date: Tue, 17 Jun 2008 20:04:29 -0400 [thread overview]
Message-ID: <1213747469.18428.14.camel@dv> (raw)
In-Reply-To: <20080617130404.1e225725@gibibit.com>
On Tue, 2008-06-17 at 13:04 -0700, Colin D Bennett wrote:
> I'm not sure. All I know is that I did
> ./configure --prefix=/home/cdb/bin/grub && make && make install,
> then I tried to do /home/cdb/bin/grub/bin/grub-install /media/sdc1 and
> grub-mkimage was getting called with /usr/local/lib/something. Since I
> specified --prefix to configure, I expect grub never ever to refer
> to /usr/local. This patch fixed my problem.
I think I know what you actually did:
./configure
make
./configure --prefix=/home/cdb/bin/grub
make
make install
"/usr/local" was hardcoded into grub-mkimage in the first run. In the
second run, grub-mkimage wasn't rebuilt because it's not a script and
because config.h didn't change.
We don't want wrong path to be hardcoded in grub-mkimage. Working it
around in scripts would keep grub-mkimage incorrect.
I think the best solution would be to add Makefile to
the grub-mkimage.o dependencies. GRUB_LIBDIR is written to Makefile
and grub-mkimage.c uses it. Here's the patch (*.mk changes are not
included):
diff --git a/conf/i386-efi.rmk b/conf/i386-efi.rmk
index 87626c2..311b6ab 100644
--- a/conf/i386-efi.rmk
+++ b/conf/i386-efi.rmk
@@ -17,6 +17,7 @@ sbin_UTILITIES = grub-mkdevicemap
# For grub-mkimage.
grub_mkimage_SOURCES = util/i386/efi/grub-mkimage.c util/misc.c \
util/resolve.c
+util/i386/efi/grub-mkimage.c_DEPENDENCIES = Makefile
# For grub-setup.
#grub_setup_SOURCES = util/i386/pc/grub-setup.c util/biosdisk.c \
diff --git a/conf/i386-ieee1275.rmk b/conf/i386-ieee1275.rmk
index ac2f45d..e4f2a66 100644
--- a/conf/i386-ieee1275.rmk
+++ b/conf/i386-ieee1275.rmk
@@ -50,6 +50,7 @@ endif
grub_mkimage_SOURCES = util/elf/grub-mkimage.c util/misc.c \
util/resolve.c
grub_mkimage_LDFLAGS = $(LIBLZO)
+util/elf/grub-mkimage.c_DEPENDENCIES = Makefile
# For grub-mkdevicemap.
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/misc.c \
diff --git a/conf/i386-linuxbios.rmk b/conf/i386-linuxbios.rmk
index 31f03a9..d2546be 100644
--- a/conf/i386-linuxbios.rmk
+++ b/conf/i386-linuxbios.rmk
@@ -49,6 +49,7 @@ endif
grub_mkimage_SOURCES = util/elf/grub-mkimage.c util/misc.c \
util/resolve.c
grub_mkimage_LDFLAGS = $(LIBLZO)
+util/elf/grub-mkimage.c_DEPENDENCIES = Makefile
# For grub-mkdevicemap.
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/misc.c \
diff --git a/conf/i386-pc.rmk b/conf/i386-pc.rmk
index a3f8467..7b7924f 100644
--- a/conf/i386-pc.rmk
+++ b/conf/i386-pc.rmk
@@ -76,6 +76,7 @@ grub_mkimage_SOURCES = util/i386/pc/grub-mkimage.c util/misc.c \
util/resolve.c
grub_mkimage_CFLAGS = -DGRUB_MEMORY_MACHINE_LINK_ADDR=$(GRUB_MEMORY_MACHINE_LINK_ADDR)
grub_mkimage_LDFLAGS = $(LIBLZO)
+util/i386/pc/grub-mkimage.c_DEPENDENCIES = Makefile
# For grub-setup.
util/i386/pc/grub-setup.c_DEPENDENCIES = grub_setup_init.h
diff --git a/conf/powerpc-ieee1275.rmk b/conf/powerpc-ieee1275.rmk
index 2c16bc1..51442c6 100644
--- a/conf/powerpc-ieee1275.rmk
+++ b/conf/powerpc-ieee1275.rmk
@@ -37,6 +37,7 @@ endif
# For grub-mkimage.
grub_mkimage_SOURCES = util/elf/grub-mkimage.c util/misc.c \
util/resolve.c
+util/elf/grub-mkimage.c_DEPENDENCIES = Makefile
# For grub-mkdevicemap.
grub_mkdevicemap_SOURCES = util/grub-mkdevicemap.c util/misc.c \
--
Regards,
Pavel Roskin
next prev parent reply other threads:[~2008-06-18 0:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-17 17:51 [PATCH] Fix grub-install to use prefix for modules dir Colin D Bennett
2008-06-17 19:46 ` Pavel Roskin
2008-06-17 20:04 ` Colin D Bennett
2008-06-18 0:04 ` Pavel Roskin [this message]
2008-06-18 6:09 ` Colin D Bennett
2008-06-19 5:15 ` Pavel Roskin
2008-06-17 20:11 ` Isaac Dupree
2008-06-17 20:39 ` Colin D Bennett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1213747469.18428.14.camel@dv \
--to=proski@gnu.org \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.