i ran into three issues when trying to build FILO in the coreboot git
repo, using make menuconfig and make. i found work-arounds for two of
them. here are the issues:
TL;DR:
1.) include/arch doesn't exist (work-around by symlinking)
2.) conflicting types error
3.) invalid git command when building from HEAD. (patch provided)
$ make
...
MAKE FILO STABLE
Found Libpayload
/home/sudoman/src/3rd-party/fsf/coreboot-src/payloads/external/FILO/filo/build/libpayload/lib/libpayload.a.
CC build/i386/context.o
In file included from
/home/sudoman/src/3rd-party/fsf/coreboot-src/payloads/external/FILO/filo/build/libpayload/include/libpayload.h:49:0,
from
/home/sudoman/src/3rd-party/fsf/coreboot-src/payloads/external/FILO/filo/i386/context.c:24:
/home/sudoman/src/3rd-party/fsf/coreboot-src/payloads/external/FILO/filo/build/libpayload/include/stddef.h:2:24:
fatal error: arch/types.h: No such file or directory
#include <arch/types.h>
^
compilation terminated.
make[2]: ***
[/home/sudoman/src/3rd-party/fsf/coreboot-src/payloads/external/FILO/filo/build/i386/context.o]
Error 1
make[1]: *** [filo] Error 2
make: *** [filo] Error 2
$ cd payloads/external/FILO/filo/build/libpayload/include/
$ ln -s x86/arch/
$ make
...
MAKE FILO STABLE
Found Libpayload
/home/sudoman/src/3rd-party/fsf/coreboot-src/payloads/external/FILO/filo/build/libpayload/lib/libpayload.a.
CC build/i386/context.o
In file included from
/home/sudoman/src/3rd-party/fsf/coreboot-src/payloads/external/FILO/filo/i386/context.c:25:0:
include/lib.h:28:6: error: conflicting types for ‘hexdump’
void hexdump(const void *p, unsigned int len);
^
In file included from
/home/sudoman/src/3rd-party/fsf/coreboot-src/payloads/external/FILO/filo/i386/context.c:24:0:
/home/sudoman/src/3rd-party/fsf/coreboot-src/payloads/external/FILO/filo/build/libpayload/include/libpayload.h:297:6:
note: previous declaration of ‘hexdump’ was here
void hexdump(void *memory, int length);
^
make[2]: ***
[/home/sudoman/src/3rd-party/fsf/coreboot-src/payloads/external/FILO/filo/build/i386/context.o]
Error 1
make[1]: *** [filo] Error 2
make: *** [filo] Error 2
If I set FILO to build from HEAD through make menuconfig, i get this error:
...
GIT FILO HEAD
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
Already up-to-date.
fatal: it does not make sense to create 'HEAD' manually
make[1]: *** [checkout] Error 128
make: *** [filo] Error 2
I modified the FILO/Makefile.inc file, to make this work:
diff --git a/payloads/external/FILO/Makefile.inc
b/payloads/external/FILO/Makefile.inc
index 311b3c8..9e62d6c 100644
--- a/payloads/external/FILO/Makefile.inc
+++ b/payloads/external/FILO/Makefile.inc
@@ -14,9 +14,10 @@ checkout:
cd filo && \
git checkout master && \
git pull; \
- test -n $(TAG-y) && \
+ if [ -n "$(TAG-y)" ] ; then \
git branch -f $(NAME-y) $(TAG-y) && \
- git checkout $(NAME-y)
+ git checkout $(NAME-y); \
+ fi
config: libpayload
echo " CONFIG FILO $(NAME-y)"
----
the patch is also attached to this email. after running make again, I
got the "conflicting types" error again.
I tried building FILO out of the coreboot tree, by following the
instructions on the coreboot wiki fairly closely, but got the
same/similar errors.
----
here is my .config:
CONFIG_LOCALVERSION=""
CONFIG_CBFS_PREFIX="fallback"
CONFIG_COMPILER_GCC=y
CONFIG_COMPRESS_RAMSTAGE=y
CONFIG_INCLUDE_CONFIG_FILE=y
CONFIG_VENDOR_ASUS=y
CONFIG_BOARD_SPECIFIC_OPTIONS=y
CONFIG_MAINBOARD_DIR="asus/f2a85-m"
CONFIG_MAINBOARD_PART_NUMBER="F2A85-M"
CONFIG_IRQ_SLOT_COUNT=11
CONFIG_MAINBOARD_VENDOR="ASUS"
CONFIG_APIC_ID_OFFSET=0x0
CONFIG_HW_MEM_HOLE_SIZEK=0x200000
CONFIG_MAX_CPUS=4
CONFIG_MAX_PHYSICAL_CPUS=1
CONFIG_RAMTOP=0x1000000
CONFIG_HEAP_SIZE=0xc0000
CONFIG_RAMBASE=0x200000
CONFIG_VGA_BIOS_ID="1002,9993"
CONFIG_DRIVERS_PS2_KEYBOARD=y
CONFIG_DCACHE_RAM_BASE=0x30000
CONFIG_DCACHE_RAM_SIZE=0x10000
CONFIG_SERIAL_CPU_INIT=y
CONFIG_ACPI_SSDTX_NUM=0
CONFIG_HUDSON_LEGACY_FREE=y
CONFIG_BOARD_ASUS_F2A85_M=y
CONFIG_BOARD_ASUS_F2A85_M_DDR3_VOLT_150=y
CONFIG_BOARD_ASUS_F2A85_M_DDR3_VOLT_VAL=0x0
CONFIG_MMCONF_BASE_ADDRESS=0xF8000000
CONFIG_ID_SECTION_OFFSET=0x80
CONFIG_XIP_ROM_SIZE=0x100000
CONFIG_UDELAY_LAPIC_FIXED_FSB=200
CONFIG_MAINBOARD_SMBIOS_MANUFACTURER="ASUS"
CONFIG_MAINBOARD_VERSION="1.0"
CONFIG_CPU_ADDR_BITS=48
CONFIG_LOGICAL_CPUS=y
CONFIG_IOAPIC=y
CONFIG_SMP=y
CONFIG_TTYS0_BAUD=115200
CONFIG_TTYS0_BASE=0x3f8
CONFIG_TTYS0_LCS=3
CONFIG_DEFAULT_CONSOLE_LOGLEVEL=8
CONFIG_CONSOLE_SERIAL8250=y
CONFIG_BOARD_ROMSIZE_KB_8192=y
CONFIG_COREBOOT_ROMSIZE_KB_2048=y
CONFIG_COREBOOT_ROMSIZE_KB=2048
CONFIG_ROM_SIZE=0x200000
CONFIG_MAINBOARD_SERIAL_NUMBER="123456789"
CONFIG_MAINBOARD_SMBIOS_PRODUCT_NAME="F2A85"
CONFIG_ARCH_X86=y
CONFIG_X86_ARCH_OPTIONS=y
CONFIG_STACK_SIZE=0x1000
CONFIG_MAX_REBOOT_CNT=3
CONFIG_NUM_IPI_STARTS=2
CONFIG_X86_BOOTBLOCK_SIMPLE=y
CONFIG_BOOTBLOCK_SOURCE="bootblock_simple.c"
CONFIG_PC80_SYSTEM=y
CONFIG_BOOTBLOCK_SOUTHBRIDGE_INIT="southbridge/amd/agesa/hudson/bootblock.c"
CONFIG_IOAPIC_INTERRUPTS_ON_FSB=y
CONFIG_HPET_ADDRESS=0xfed00000
CONFIG_HAVE_ARCH_MEMSET=y
CONFIG_HAVE_ARCH_MEMCPY=y
CONFIG_HAVE_ARCH_MEMMOVE=y
CONFIG_CPU_SOCKET_TYPE=0x10
CONFIG_CBB=0x0
CONFIG_CDB=0x18
CONFIG_DIMM_SUPPORT=0x0104
CONFIG_LIFT_BSP_APIC_ID=y
CONFIG_CPU_AMD_AGESA=y
CONFIG_HAVE_INIT_TIMER=y
CONFIG_HIGH_SCRATCH_MEMORY_SIZE=0xA1000
CONFIG_CPU_AMD_AGESA_FAMILY15_TN=y
CONFIG_SMM_TSEG_SIZE=0
CONFIG_UDELAY_LAPIC=y
CONFIG_LAPIC_MONOTONIC_TIMER=y
CONFIG_TSC_SYNC_LFENCE=y
CONFIG_X86_AMD_FIXED_MTRRS=y
CONFIG_CACHE_AS_RAM=y
CONFIG_AP_SIPI_VECTOR=0xfffff000
CONFIG_CPU_MICROCODE_CBFS_NONE=y
CONFIG_SB_HT_CHAIN_UNITID_OFFSET_ONLY=y
CONFIG_VIDEO_MB=0
CONFIG_AMDMCT=y
CONFIG_MMCONF_BUS_NUMBER=64
CONFIG_NORTHBRIDGE_AMD_AGESA=y
CONFIG_NORTHBRIDGE_AMD_AGESA_FAMILY15_TN=y
CONFIG_CBFS_SIZE=0x200000
CONFIG_MAX_PIRQ_LINKS=4
CONFIG_EHCI_BAR=0xfef00000
CONFIG_EHCI_DEBUG_OFFSET=0xe0
CONFIG_S3_DATA_POS=0xFFFF0000
CONFIG_S3_DATA_SIZE=32768
CONFIG_SOUTHBRIDGE_AMD_AGESA_HUDSON=y
CONFIG_HUDSON_XHCI_ENABLE=y
CONFIG_HUDSON_SATA_IDE=y
CONFIG_HUDSON_SATA_MODE=0x0
CONFIG_AMD_SB_SPI_TX_LEN=4
CONFIG_SPI_FLASH=y
CONFIG_SUPERIO_ITE_IT8712F=y
CONFIG_VGA_ROM_RUN=y
CONFIG_ON_DEVICE_ROM_RUN=y
CONFIG_PCI_OPTION_ROM_RUN_REALMODE=y
CONFIG_PCI=y
CONFIG_PCIX_PLUGIN_SUPPORT=y
CONFIG_PCIEXP_PLUGIN_SUPPORT=y
CONFIG_AGP_PLUGIN_SUPPORT=y
CONFIG_CARDBUS_PLUGIN_SUPPORT=y
CONFIG_PCI_BUS_SEGN_BITS=0
CONFIG_PXE_ROM=y
CONFIG_PXE_ROM_FILE="../ipxe/src/bin/10ec8168.rom"
CONFIG_PXE_ROM_ID="10ec,8168"
CONFIG_SUBSYSTEM_VENDOR_ID=0x0000
CONFIG_SUBSYSTEM_DEVICE_ID=0x0000
CONFIG_RTL8168_ROM_DISABLE=y
CONFIG_SPI_FLASH_EON=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_SST=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_SPI_FLASH_GIGADEVICE=y
CONFIG_MMCONF_SUPPORT=y
CONFIG_EARLY_CONSOLE=y
CONFIG_SQUELCH_EARLY_SMP=y
CONFIG_CONSOLE_SERIAL=y
CONFIG_CONSOLE_SERIAL_COM1=y
CONFIG_CONSOLE_SERIAL_115200=y
CONFIG_HAVE_USBDEBUG=y
CONFIG_HAVE_USBDEBUG_OPTIONS=y
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_8=y
CONFIG_IO_POST=y
CONFIG_IO_POST_PORT=0x80
CONFIG_HAVE_UART_IO_MAPPED=y
CONFIG_HAVE_ACPI_RESUME=y
CONFIG_HAVE_HARD_RESET=y
CONFIG_HAVE_MONOTONIC_TIMER=y
CONFIG_HAVE_OPTION_TABLE=y
CONFIG_PCI_IO_CFG_EXT=y
CONFIG_CACHE_ROM_SIZE=0x200000
CONFIG_GFXUMA=y
CONFIG_HAVE_ACPI_TABLES=y
CONFIG_HAVE_MP_TABLE=y
CONFIG_HAVE_PIRQ_TABLE=y
CONFIG_MULTIBOOT=y
CONFIG_GENERATE_ACPI_TABLES=y
CONFIG_GENERATE_MP_TABLE=y
CONFIG_GENERATE_PIRQ_TABLE=y
CONFIG_GENERATE_SMBIOS_TABLES=y
CONFIG_PAYLOAD_FILO=y
CONFIG_FILO_MASTER=y
CONFIG_PAYLOAD_FILE="payloads/external/FILO/filo/build/filo.elf"
CONFIG_COMPRESSED_PAYLOAD_LZMA=y
CONFIG_WARNINGS_ARE_ERRORS=y