summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--payloads/external/Makefile.inc2
-rw-r--r--payloads/external/U-Boot/Kconfig2
-rw-r--r--payloads/external/U-Boot/Makefile19
3 files changed, 13 insertions, 10 deletions
diff --git a/payloads/external/Makefile.inc b/payloads/external/Makefile.inc
index 6db17209aa..151a27c010 100644
--- a/payloads/external/Makefile.inc
+++ b/payloads/external/Makefile.inc
@@ -197,7 +197,7 @@ payloads/external/GRUB2/grub2/build/default_payload.elf: grub2
# U-Boot
-payloads/external/U-Boot/u-boot/u-boot-dtb.bin u-boot: $(DOTCONFIG)
+payloads/external/U-Boot/build/u-boot/u-boot-dtb.bin u-boot: $(DOTCONFIG)
$(MAKE) -C payloads/external/U-Boot \
CONFIG_UBOOT_MASTER=$(CONFIG_UBOOT_MASTER) \
CONFIG_UBOOT_STABLE=$(CONFIG_UBOOT_STABLE)
diff --git a/payloads/external/U-Boot/Kconfig b/payloads/external/U-Boot/Kconfig
index 9e51ae17cc..b635bbb38d 100644
--- a/payloads/external/U-Boot/Kconfig
+++ b/payloads/external/U-Boot/Kconfig
@@ -32,7 +32,7 @@ config PAYLOAD_CONFIGFILE
from the U-Boot config directory
config PAYLOAD_FILE
- default "payloads/external/U-Boot/u-boot/u-boot-dtb.bin"
+ default "payloads/external/U-Boot/build/u-boot/u-boot-dtb.bin"
config PAYLOAD_OPTIONS
default "-l 0x1110000 -e 0x1110015"
diff --git a/payloads/external/U-Boot/Makefile b/payloads/external/U-Boot/Makefile
index 38dfe99a0e..1d1d3324e3 100644
--- a/payloads/external/U-Boot/Makefile
+++ b/payloads/external/U-Boot/Makefile
@@ -9,7 +9,10 @@ TAG-$(CONFIG_UBOOT_STABLE)=$(STABLE_COMMIT_ID)
project_name=U-Boot
project_dir=u-boot
project_git_repo=http://git.denx.de/u-boot.git
-project_config_file=$(project_dir)/.config
+project_build_dir=build
+project_config_file=$(project_build_dir)/.config
+
+make_args=-C $(project_dir) O=../build
unexport KCONFIG_AUTOHEADER
unexport KCONFIG_AUTOCONFIG
@@ -31,11 +34,11 @@ ifeq ($(CONFIG_UBOOT_MASTER),y)
git fetch
#master doesn't get a file, so it's continuously updated
- rm -f $(project_dir)/$(STABLE_COMMIT_ID)
+ rm -f $(STABLE_COMMIT_ID)
else
cd $(project_dir); git show $(TAG-y) >/dev/null 2>&1 ; if [ $$? -ne 0 ]; \
then echo " Fetching new commits from the $(project_name) git repo"; git fetch; fi
- touch $(project_dir)/$(STABLE_COMMIT_ID)
+ touch $(STABLE_COMMIT_ID)
endif
checkout: fetch
@@ -43,26 +46,26 @@ checkout: fetch
cd $(project_dir); git checkout master; git branch -D coreboot 2>/dev/null; git checkout -b coreboot $(TAG-y)
config: checkout
+ mkdir -p $(project_build_dir)
rm -f $(project_config_file)
ifneq ($(CONFIG_PAYLOAD_CONFIGFILE),)
ifneq ("$(wildcard $(CONFIG_PAYLOAD_CONFIGFILE))","")
cat $(CONFIG_PAYLOAD_CONFIGFILE)" > tag-$(project_config_file)
+ $(MAKE) $(make_args) olddefconfig
else
echo "Error: File $(CONFIG_PAYLOAD_CONFIGFILE) does not exist"
false
endif
else
- cat $(project_dir)/configs/coreboot_defconfig >> $(project_config_file)
+ $(MAKE) $(make_args) coreboot_defconfig
endif
- $(MAKE) -C $(project_dir) olddefconfig
-
build: config
echo " MAKE $(project_name) $(TAG-y)"
- $(MAKE) -C $(project_dir)
+ $(MAKE) $(make_args)
clean:
- test -d $(project_dir) && $(MAKE) -C $(project_dir) clean || exit 0
+ test -d $(project_dir) && $(MAKE) $(make_args) clean || exit 0
distclean:
rm -rf $(project_dir)