summaryrefslogtreecommitdiff
path: root/payloads/external/U-Boot
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/external/U-Boot')
-rw-r--r--payloads/external/U-Boot/Kconfig2
-rw-r--r--payloads/external/U-Boot/Makefile19
2 files changed, 12 insertions, 9 deletions
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)