Package: etherboot Version: 5.3.14-1 Severity: wishlist Tags: patch When building 'etherboot' on amd64/unstable, I get the following error:
make[1]: Entering directory `/etherboot-5.3.14/src' gcc -DCONFIG_PCI -DCONFIG_ISA -DASK_BOOT=3 -DBOOT_FIRST=BOOT_NIC -DALLOW_ONLY_ENCAPSULATED -DBACKOFF_LIMIT=7 -DCONGESTED -DTAGGED_IMAGE -DELF_IMAGE -DDOWNLOAD_PROTO_TFTP -DPXE_IMAGE -DPXE_EXPORT -Os -ffreestanding -Wall -W -Wno-format -DPCBIOS -fstrength-reduce -fomit-frame-pointer -march=i386 -falign-jumps=1 -falign-loops=1 -falign-functions=1 -mcpu=i386 -DVERSION_MAJOR=5 -DVERSION_MINOR=3 -DVERSION=\"5.3.14\" -I include -I arch/i386/include -DARCH=i386 -DCONFIG_X86_64 -o bin/undi.o -c arch/i386/drivers/net/undi.c `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead. arch/i386/drivers/net/undi.c:1: error: CPU you selected does not support x86-64 instruction set arch/i386/drivers/net/undi.c:1: error: CPU you selected does not support x86-64 instruction set make[1]: *** [bin/undi.o] Error 1 make[1]: Leaving directory `/etherboot-5.3.14/src' make: *** [build-stamp] Error 2 This occurs because 'etherboot' has to be compiled with the -m32 switch to produce i386 code on amd64. With the attached patch 'etherboot' can be compiled on amd64. The patch also contains some changes which are necessary for compilation with gcc-4.0. Regards Andreas Jochens diff -urN ../tmp-orig/etherboot-5.3.14/debian/control ./debian/control --- ../tmp-orig/etherboot-5.3.14/debian/control 2005-09-06 09:50:05.000000000 +0000 +++ ./debian/control 2005-09-06 09:50:01.000000000 +0000 @@ -2,7 +2,7 @@ Section: admin Priority: optional Maintainer: RISKO Gergely <[EMAIL PROTECTED]> -Build-Depends: debhelper (>> 4.0.0), mkisofs, mtools, syslinux +Build-Depends: debhelper (>> 4.0.0), mkisofs, mtools, syslinux, ia32-libs-dev [amd64] Standards-Version: 3.6.1.1 Package: etherboot @@ -17,7 +17,7 @@ files, you can install the package named etherboot-doc. Package: etherboot-doc -Architecture: all +Architecture: i386 amd64 Section: doc Suggests: etherboot Description: Bootstrapping for various network adapters (documentation) diff -urN ../tmp-orig/etherboot-5.3.14/src/Config ./src/Config --- ../tmp-orig/etherboot-5.3.14/src/Config 2005-02-10 22:43:23.000000000 +0000 +++ ./src/Config 2005-09-06 09:49:46.000000000 +0000 @@ -425,14 +425,14 @@ # CFLAGS+= -DNORELOCATE # you should normally not need to change these -HOST_CC= gcc -CPP= gcc -E -Wp,-Wall +HOST_CC= gcc -m32 +CPP= gcc -m32 -E -Wp,-Wall RM= rm -f TOUCH= touch PERL= /usr/bin/perl -CC= gcc -AS= as -LD= ld +CC= gcc -m32 +AS= as --32 +LD= ld -melf_i386 SIZE= size AR= ar RANLIB= ranlib diff -urN ../tmp-orig/etherboot-5.3.14/src/arch/i386/Config ./src/arch/i386/Config --- ../tmp-orig/etherboot-5.3.14/src/arch/i386/Config 2005-09-06 09:50:05.000000000 +0000 +++ ./src/arch/i386/Config 2005-09-06 09:49:46.000000000 +0000 @@ -107,9 +107,11 @@ CFLAGS+= -falign-jumps=1 -falign-loops=1 -falign-functions=1 endif GCC_MINORVERSION = $(word 2, $(GCC_VERSION)) +ifeq ($(GCC_MAJORVERSION),3) ifneq ($(GCC_MINORVERSION),4) CFLAGS+= -mcpu=i386 endif +endif LDFLAGS+= -N diff -urN ../tmp-orig/etherboot-5.3.14/src/arch/i386/firmware/pcbios/basemem.c ./src/arch/i386/firmware/pcbios/basemem.c --- ../tmp-orig/etherboot-5.3.14/src/arch/i386/firmware/pcbios/basemem.c 2005-02-10 22:43:32.000000000 +0000 +++ ./src/arch/i386/firmware/pcbios/basemem.c 2005-09-06 09:49:46.000000000 +0000 @@ -16,8 +16,8 @@ #define FREE_BASE_MEMORY ( (uint32_t) ( *fbms << 10 ) ) /* Prototypes */ -void * _allot_base_memory ( size_t size ); -void _forget_base_memory ( void *ptr, size_t size ); +static void * _allot_base_memory ( size_t size ); +static void _forget_base_memory ( void *ptr, size_t size ); typedef struct free_base_memory_block { uint32_t magic; @@ -221,7 +221,7 @@ * entity (if we can detect that it has done so) so that we get the * chance to free up our own blocks. */ -static void free_unused_base_memory ( void ) { +void free_unused_base_memory ( void ) { free_base_memory_block_t *free_block = NULL; /* Try to release memory back to the BIOS. Free all diff -urN ../tmp-orig/etherboot-5.3.14/src/drivers/net/natsemi.c ./src/drivers/net/natsemi.c --- ../tmp-orig/etherboot-5.3.14/src/drivers/net/natsemi.c 2004-06-01 13:14:04.000000000 +0000 +++ ./src/drivers/net/natsemi.c 2005-09-06 09:49:46.000000000 +0000 @@ -646,7 +646,7 @@ to = currticks() + TX_TIMEOUT; - while ((((volatile u32) tx_status=txd.cmdsts) & OWN) && (currticks() < to)) + while (((tx_status=txd.cmdsts) & OWN) && (currticks() < to)) /* wait */ ; if (currticks() >= to) { diff -urN ../tmp-orig/etherboot-5.3.14/src/drivers/net/sis900.c ./src/drivers/net/sis900.c --- ../tmp-orig/etherboot-5.3.14/src/drivers/net/sis900.c 2004-11-24 07:04:57.000000000 +0000 +++ ./src/drivers/net/sis900.c 2005-09-06 09:49:46.000000000 +0000 @@ -1132,7 +1132,7 @@ to = currticks() + TX_TIMEOUT; - while ((((volatile u32) tx_status=txd.cmdsts) & OWN) && (currticks() < to)) + while (((tx_status=txd.cmdsts) & OWN) && (currticks() < to)) /* wait */ ; if (currticks() >= to) { -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]