[coreboot-gerrit] Patch set updated for coreboot: nvramcui: Update Makefile

Iru Cai (mytbk920423@gmail.com) gerrit at coreboot.org
Sat Apr 16 05:15:31 CEST 2016


Iru Cai (mytbk920423 at gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14377

-gerrit

commit 5f8239001742b73087f4b2ef08be4f330e709965
Author: Iru Cai <mytbk920423 at gmail.com>
Date:   Fri Apr 15 13:42:11 2016 +0800

    nvramcui: Update Makefile
    
    * use crossgcc to build nvramcui
    * build libpayload dependency
    
    Change-Id: Ife3054aeb03b4da0568ad47f96c633460d6c07ae
    Signed-off-by: Iru Cai <mytbk920423 at gmail.com>
---
 payloads/nvramcui/Makefile | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/payloads/nvramcui/Makefile b/payloads/nvramcui/Makefile
index 10dc362..0f27ff8 100755
--- a/payloads/nvramcui/Makefile
+++ b/payloads/nvramcui/Makefile
@@ -1,12 +1,32 @@
-LPGCC = ../libpayload/install/libpayload/bin/lpgcc
+LIBPAYLOAD_DIR=$(CURDIR)/libpayload
+XCOMPILE=$(LIBPAYLOAD_DIR)/libpayload.xcompile
+# build libpayload and put .config file in $(CURDIR) instead of ../libpayload
+# to avoid pollute the libpayload source directory and possible conflicts
+LPOPTS=obj="$(CURDIR)/build" DESTDIR="$(CURDIR)" DOTCONFIG="$(CURDIR)/.config"
 
 all: nvramcui.elf
 
-%.elf:
+libpayload:
+	$(MAKE) -C ../libpayload $(LPOPTS) defconfig
+	$(MAKE) -C ../libpayload $(LPOPTS)
+	$(MAKE) -C ../libpayload $(LPOPTS) install
+
+ifneq ($(strip $(wildcard libpayload)),)
+include $(XCOMPILE)
+LPGCC = CC="$(GCC_CC_x86_32)" "$(LIBPAYLOAD_DIR)/bin/lpgcc"
+%.elf: %.c
 	$(LPGCC) -o $*.elf $*.c
+else
+# If libpayload is not found, first build libpayload,
+# then do the make, this time it'll find libpayload
+# and generate the nvramcui.elf target
+%.elf: libpayload
+	$(MAKE) all
+endif
 
 .PHONY:
 clean:
 	rm -f nvramcui.elf
 
 distclean: clean
+	rm -rf build libpayload .config



More information about the coreboot-gerrit mailing list