See patch. The hostname/dnsdomainname stuff might need to be reworked a bit, I'll post another patch for that later...
Uwe. -- http://www.hermann-uwe.de | http://www.holsham-traders.de http://www.crazy-hacks.org | http://www.unmaintained-free-software.org
Add support for building LinuxBIOSv3 on Debian GNU/kFreeBSD systems. We need the following fixes: - Debian GNU/kFreeBSD uses 'elf32-i386-freebsd' (instead of 'elf32-i386') as linker output format. - dtc is missing an '#include <stdint.h>' (needed for uint32_t et al). Doesn't seem to be fatal on Linux, but it is on kFreeBSD. - kFreeBSD has 'dnsdomainname' (as has Linux) instead of 'domainname'. Signed-off-by: Uwe Hermann <[EMAIL PROTECTED]> Index: arch/x86/Makefile =================================================================== --- arch/x86/Makefile (revision 495) +++ arch/x86/Makefile (working copy) @@ -142,8 +142,17 @@ $(Q)# strange problems in the past. It seems that only gcc knows how $(Q)# to properly invoke ld. $(Q)printf " CC $(subst $(shell pwd)/,,$(@))\n" + + $(Q)# On Debian GNU/kFreeBSD we need the linker output format + $(Q)# 'elf32-i386-freebsd' instead of just 'elf32-i386'. +ifneq (, $(filter Linux GNU GNU_%, $(shell uname -s))) $(Q)$(CC) -nostdlib -static -T $(src)/arch/x86/ldscript.ld \ $(STAGE0_OBJ) -o $(obj)/stage0.o +else + $(Q)$(CC) -nostdlib -static -T $(src)/arch/x86/ldscript.ld \ + $(STAGE0_OBJ) -Wl,--oformat,elf32-i386-freebsd \ + -o $(obj)/stage0.o +endif $(Q)printf " OBJCOPY $(subst $(shell pwd)/,,$(@))\n" $(Q)$(OBJCOPY) -O binary $(obj)/stage0.o $(obj)/stage0.init Index: util/dtc/endian.h =================================================================== --- util/dtc/endian.h (revision 495) +++ util/dtc/endian.h (working copy) @@ -37,6 +37,8 @@ * See Solaris as an example. */ +#include <stdint.h> + /* define __BYTE_ORDER to __LITTLE_ENDIAN or __BIG_ENDIAN as appropriate */ #ifdef linux #include <endian.h> Index: Makefile =================================================================== --- Makefile (revision 495) +++ Makefile (working copy) @@ -143,7 +143,7 @@ $(Q)printf "#define LINUXBIOS_COMPILE_TIME \"`LANG= date +%T`\"\n" >> $(obj)/build.h $(Q)printf "#define LINUXBIOS_COMPILE_BY \"$(shell PATH=$$PATH:/usr/ucb whoami)\"\n" >> $(obj)/build.h $(Q)printf "#define LINUXBIOS_COMPILE_HOST \"$(shell hostname)\"\n" >> $(obj)/build.h - $(Q)printf "#define LINUXBIOS_COMPILE_DOMAIN \"$(shell test `uname -s` = "Linux" && dnsdomainname || domainname)\"\n" >> $(obj)/build.h + $(Q)printf "#define LINUXBIOS_COMPILE_DOMAIN \"$(shell test `uname -s` = "Linux" -o `uname -s` = "GNU/kFreeBSD" && dnsdomainname || domainname)\"\n" >> $(obj)/build.h clean: $(Q)printf " CLEAN $(subst $(shell pwd)/,,$(obj))\n"
signature.asc
Description: Digital signature
-- linuxbios mailing list [email protected] http://www.linuxbios.org/mailman/listinfo/linuxbios
