Patch to compile 'grub' on amd64
On 04-Aug-11 02:57, Goswin von Brederlow wrote:
> Andreas Jochens <aj@andaco.de> writes:
> > can now be compiled directly in an amd64 environment. All it needs is
> > an additional Build-Depends on 'gcc-3.4-i386' (and the amd64-specific
> > grub-patch, of course).
>
> There is no amd64-specific grub patch and there won't be, none is needed.
Well, I think you did not try to build grub on amd64?
Please look at the attached patch which adds 'amd64' to the
Architecture field of the 'grub' package in 'debian/control' and
'debian/control.in'. The patch also generalizes four i386-specific
lines in debian/rules. I do not see how you can build 'grub' on amd64
without this (or a similar) patch.
Regards
Andreas Jochens
PS: Did you find a working patch for the grub/initrd/>=4GB boot problem?
diff -urN ../tmp-orig/grub-0.95+cvs20040624/debian/control
./debian/control
--- ../tmp-orig/grub-0.95+cvs20040624/debian/control 2004-08-08
19:34:42.581966563 +0200
+++ ./debian/control 2004-08-08 19:34:44.287635915 +0200
@@ -3,12 +3,12 @@
Priority: optional
Maintainer: Grub Maintainers <pkg-grub-devel@lists.alioth.debian.org>
Uploaders: Jason Thomas <jason@debian.org>, Robert Millan <rmh@debian.org>
-Build-Depends: debhelper (>= 4.0.0), automake1.8, autoconf, texinfo, libncurses5-dev | libncurses-dev, type-handling (>= 0.2.0)
+Build-Depends: debhelper (>= 4.0.0), automake1.8, autoconf, texinfo, libncurses5-dev | libncurses-dev, type-handling (>= 0.2.0), gcc-3.4-i386
[amd64]
Build-Depends-Indep: texi2html, e2tools, e2fsprogs, mkisofs
Standards-Version: 3.6.1.0
Package: grub
-Architecture: i386 i386 i386 i386 i386 i386 i386 i386
+Architecture: amd64 darwin-i386 freebsd-i386 hurd-i386 kfreebsd-i386 knetbsd-i386 i386 netbsd-i386 openbsd-i386
Depends: ${shlibs:Depends}
Suggests: grub-doc, grubconf
Description: GRand Unified Bootloader
diff -urN ../tmp-orig/grub-0.95+cvs20040624/debian/control.in ./debian/control.in
--- ../tmp-orig/grub-0.95+cvs20040624/debian/control.in 2004-08-08 19:34:42.590964819 +0200
+++ ./debian/control.in 2004-08-08 19:34:19.814380109 +0200
@@ -3,12 +3,12 @@
Priority: optional
Maintainer: Grub Maintainers <pkg-grub-devel@lists.alioth.debian.org>
Uploaders: Jason Thomas <jason@debian.org>, Robert Millan <rmh@debian.org>
-Build-Depends: debhelper (>= 4.0.0), automake1.8, autoconf, texinfo, libncurses5-dev | libncurses-dev, type-handling (>= 0.2.0)
+Build-Depends: debhelper (>= 4.0.0), automake1.8, autoconf, texinfo, libncurses5-dev | libncurses-dev, type-handling (>= 0.2.0), gcc-3.4-i386 [amd64]
Build-Depends-Indep: texi2html, e2tools, e2fsprogs, mkisofs
Standards-Version: 3.6.1.0
Package: grub
-Architecture: @i386@
+Architecture: amd64 @i386@
Depends: ${shlibs:Depends}
Suggests: grub-doc, grubconf
Description: GRand Unified Bootloader
diff -urN ../tmp-orig/grub-0.95+cvs20040624/debian/rules ./debian/rules
--- ../tmp-orig/grub-0.95+cvs20040624/debian/rules 2004-08-08
19:34:42.590964819 +0200
+++ ./debian/rules 2004-08-08 19:33:16.957564951 +0200
@@ -178,7 +178,7 @@
# grub-disk
mkdir -p $(CURDIR)/debian/tmp/root/boot/grub
- cp $(CURDIR)/debian/grub/lib/grub/i386-*/{stage1,e2fs_stage1_5,stage2} \
+ cp $(CURDIR)/debian/grub/lib/grub/$(DEB_BUILD_GNU_CPU)-*/{stage1,e2fs_stage1_5,stage2} \
$(CURDIR)/docs/menu.lst \
$(CURDIR)/debian/tmp/root/boot/grub
tar -C $(CURDIR)/debian/tmp/root \
@@ -189,9 +189,8 @@
-f $(CURDIR)/debian/tmp/grub.tar.gz
rm -f $(CURDIR)/debian/tmp/root/boot/grub/*stage*
- cp $(CURDIR)/debian/grub/lib/grub/i386-*/stage2_eltorito \
+ cp $(CURDIR)/debian/grub/lib/grub/$(DEB_BUILD_GNU_CPU)-*/stage2_eltorito \
$(CURDIR)/debian/tmp/root/boot/grub
-
mkisofs \
-b boot/grub/stage2_eltorito \
-no-emul-boot -boot-load-size 4 -boot-info-table \
@@ -222,11 +221,11 @@
# Cleanup filesystems not used natively in Debian.
# (non-native filesystems are supported via stage2)
mkdir debian/grub/lib/grub/tmp/
- mv debian/grub/lib/grub/i386-*/*_stage1_5 \
+ mv debian/grub/lib/grub/$(DEB_BUILD_GNU_CPU)-*/*_stage1_5 \
debian/grub/lib/grub/tmp/
for i in $(filesystems) ; do \
mv debian/grub/lib/grub/tmp/$${i}_stage1_5 \
- debian/grub/lib/grub/i386-*/ ; \
+ debian/grub/lib/grub/$(DEB_BUILD_GNU_CPU)-*/ ; \
done
rm -rf debian/grub/lib/grub/tmp/
Reply to: