Skip to contentSkip to conversation

Building on Ubuntu 7.10 x86-64

PATCH In review Vesa Jääskeläinen 2 participants 3 messages Nov 10, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Building on Ubuntu 7.10 x86-64

Hi All,

I needed to do following modification in order to build grub2 on my 64bit laptop. In case there is no complaints I will commit it to CVS.

Additionally I needed to install gcc-multilib package (and normal packages like ruby, lzo...).

And after that just doing following made runnable binaries (at least in qemu):

./autogen.sh

mkdir build-x86_64
cd build-x86_64

../configure --with-platform=pc --target=x86_64

make

Thanks,
Vesa Jääskeläinen

Index: ChangeLog
===================================================================
RCS file: /sources/grub/grub2/ChangeLog,v
retrieving revision 1.438

ChangeLog +8 -0
diff -u -r1.438 ChangeLog
@@ -1,3 +1,11 @@
+2007-11-10  Vesa Jaaskelainen  <[email protected]>
+
+	* conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_FLAGS for target
+	flags.
+	(pxeboot_img_LDFLAGS): Likewise.
+	(diskboot_img_LDFLAGS): Likewise.
+	(kernel_img_LDFLAGS): Likewise.
+
 2007-11-06  Robert Millan  <[email protected]>
 
 	* term/i386/pc/serial.c (serial_hw_put): Switch order of arguments

Index: conf/i386-pc.rmk
===================================================================
RCS file: /sources/grub/grub2/conf/i386-pc.rmk,v
retrieving revision 1.91

i386-pc.rmk +4 -4
diff -u -r1.91 i386-pc.rmk
@@ -10,17 +10,17 @@
 # For boot.img.
 boot_img_SOURCES = boot/i386/pc/boot.S
 boot_img_ASFLAGS = $(COMMON_ASFLAGS)
-boot_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,7C00
+boot_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-Ttext,7C00
 
 # For pxeboot.img
 pxeboot_img_SOURCES = boot/i386/pc/pxeboot.S
 pxeboot_img_ASFLAGS = $(COMMON_ASFLAGS)
-pxeboot_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,7C00
+pxeboot_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-Ttext,7C00
 
 # For diskboot.img.
 diskboot_img_SOURCES = boot/i386/pc/diskboot.S
 diskboot_img_ASFLAGS = $(COMMON_ASFLAGS)
-diskboot_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,8000
+diskboot_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-Ttext,8000
 
 # For kernel.img.
 kernel_img_SOURCES = kern/i386/pc/startup.S kern/main.c kern/device.c \
@@ -37,7 +37,7 @@
 	machine/memory.h machine/loader.h machine/vga.h machine/vbe.h
 kernel_img_CFLAGS = $(COMMON_CFLAGS)
 kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
-kernel_img_LDFLAGS = -nostdlib -Wl,-N,-Ttext,8200 $(COMMON_CFLAGS)
+kernel_img_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-N,-Ttext,8200 $(COMMON_CFLAGS)
 
 MOSTLYCLEANFILES += symlist.c kernel_syms.lst
 DEFSYMFILES += kernel_syms.lst
#1 lore raw

Vesa Jääskeläinen <[email protected]> writes:

Hi Vesa,

Quoted 2 lines

I needed to do following modification in order to build grub2 on my 64bit laptop. In case there is no complaints I will commit it to CVS.

This looks ok to me.

--
Marco

#2 lore raw
Quoted 8 lines · Marco Gerards

Vesa Jääskeläinen <[email protected]> writes:

Hi Vesa,

Quoted 2 lines

I needed to do following modification in order to build grub2 on my 64bit laptop. In case there is no complaints I will commit it to CVS.

This looks ok to me.

Committed. New configure was also generated, so please report how well it works.