summaryrefslogtreecommitdiff
path: root/payloads/coreinfo
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2015-06-29 16:44:12 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-07-13 09:10:13 +0200
commitccc55fdc6fae37a085e9f1a8a19a539728907ca1 (patch)
treebeb47458d71996e98f3304bd421efa9f504cf68d /payloads/coreinfo
parent2b374beebc4985376d7c6ee34dd678d74404eb32 (diff)
downloadcoreboot-ccc55fdc6fae37a085e9f1a8a19a539728907ca1.tar.xz
coreinfo: fix compilation
- extra rule for config.h creation - include kconfig.h from libpayload - libpayload symbols are conflicting with gcc builtins (e.g. log2) - ALIGN() is already defined in libpayload these days - move libpayload build directory under build/ Change-Id: I2aefdde26853253d58f6cf6e186e784871c1cb5b Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/10717 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'payloads/coreinfo')
-rw-r--r--payloads/coreinfo/Makefile11
-rw-r--r--payloads/coreinfo/cbfs_module.c2
2 files changed, 7 insertions, 6 deletions
diff --git a/payloads/coreinfo/Makefile b/payloads/coreinfo/Makefile
index 68aeffc65e..3cc0fc9d16 100644
--- a/payloads/coreinfo/Makefile
+++ b/payloads/coreinfo/Makefile
@@ -52,15 +52,15 @@ HOSTCFLAGS := -I$(srck) -I$(objk)
HOSTCXXFLAGS := -I$(srck) -I$(objk)
LIBCONFIG_PATH := ../libpayload
-LIBPAYLOAD_DIR := ./libpayloadbin
+LIBPAYLOAD_DIR := build/libpayload
LPCC := $(LIBPAYLOAD_DIR)/libpayload/bin/lpgcc
LPAS := $(LIBPAYLOAD_DIR)/libpayload/bin/lpas
HAVE_LIBPAYLOAD := $(wildcard $(LIBPAYLOAD_DIR)/libpayload/lib/libpayload.a)
LIB_CONFIG ?= defconfig
OBJCOPY ?= objcopy
-INCLUDES = -I$(obj)
-CFLAGS := -Wall -Werror -Os $(INCLUDES)
+INCLUDES = -I$(obj) -include $(LIBPAYLOAD_DIR)/libpayload/include/kconfig.h
+CFLAGS := -Wall -Werror -Os -fno-builtin $(INCLUDES)
OBJECTS = cpuinfo_module.o cpuid.S.o pci_module.o coreboot_module.o \
nvram_module.o bootlog_module.o ramdump_module.o lar_module.o \
multiboot_module.o cbfs_module.o coreinfo.o
@@ -71,7 +71,7 @@ ifneq ($(strip $(HAVE_DOTCONFIG)),)
include $(src)/.config
all: $(TARGET)
-$(TARGET): $(src)/.config $(OBJS) libpayload
+$(TARGET): $(src)/.config $(obj)/config.h $(OBJS) libpayload
$(Q)printf " LPCC $(subst $(shell pwd)/,,$(@))\n"
$(Q)$(LPCC) -o $@ $(OBJS)
$(Q)$(OBJCOPY) --only-keep-debug $@ $(TARGET).debug
@@ -101,6 +101,9 @@ libpayload:
$(Q)make -C $(LIBCONFIG_PATH) DESTDIR=$(shell pwd)/$(LIBPAYLOAD_DIR) install
endif
+$(obj)/config.h:
+ $(MAKE) oldconfig
+
$(shell mkdir -p $(obj) $(objk)/lxdialog $(KCONFIG_SPLITCONFIG))
clean:
diff --git a/payloads/coreinfo/cbfs_module.c b/payloads/coreinfo/cbfs_module.c
index 2e6db2860d..8cb76a4276 100644
--- a/payloads/coreinfo/cbfs_module.c
+++ b/payloads/coreinfo/cbfs_module.c
@@ -22,8 +22,6 @@
#if IS_ENABLED(CONFIG_MODULE_CBFS)
-#define ALIGN(_v, _a) (((_v) + ((_a) - 1)) & ~((_a) - 1))
-
#define HEADER_MAGIC 0x4F524243
#define HEADER_ADDR 0xfffffffc
#define LARCHIVE_MAGIC 0x455649484352414cLL /* "LARCHIVE" */