1 ## SPDX-License-Identifier: GPL-2.0-only
3 TAG-
$(CONFIG_UBOOT_MASTER
)=master
4 TAG-
$(CONFIG_UBOOT_STABLE
)=$(STABLE_COMMIT_ID
)
8 project_git_repo
=http
://github.com
/u-boot
/u-boot
/
9 project_build_dir
=build
10 project_config_file
=$(project_build_dir
)/.config
12 make_args
=-C
$(project_dir
) O
=..
/build
14 unexport KCONFIG_AUTOHEADER
15 unexport KCONFIG_AUTOCONFIG
16 unexport KCONFIG_DEPENDENCIES
17 unexport KCONFIG_SPLITCONFIG
18 unexport KCONFIG_TRISTATE
19 unexport KCONFIG_NEGATIVES
20 unexport $(COREBOOT_EXPORTS
)
25 echo
" Cloning $(project_name) from Git"
26 git clone
$(project_git_repo
) -b
$(TAG-y
) $(project_dir
)
29 ifeq ($(CONFIG_UBOOT_MASTER
),y
)
30 echo
" Fetching new commits from the $(project_name) git repo"
33 #master doesn't get a file, so it's continuously updated
34 rm -f
$(STABLE_COMMIT_ID
)
36 cd
$(project_dir
); git show
$(TAG-y
) >/dev
/null
2>&1 ; if
[ $$?
-ne
0 ]; \
37 then echo
" Fetching new commits from the $(project_name) git repo"; git fetch
; fi
38 touch
$(STABLE_COMMIT_ID
)
42 echo
" Checking out $(project_name) revision $(TAG-y)"
43 cd
$(project_dir
); git checkout master
; git branch
-D coreboot
2>/dev
/null
; git checkout
-b coreboot
$(TAG-y
)
46 mkdir
-p
$(project_build_dir
)
47 rm -f
$(project_config_file
)
48 ifneq ($(CONFIG_PAYLOAD_CONFIGFILE
),)
49 ifneq ("$(wildcard $(CONFIG_PAYLOAD_CONFIGFILE))","")
50 cat
$(CONFIG_PAYLOAD_CONFIGFILE
)" > tag-$(project_config_file)
51 $(MAKE) $(make_args) olddefconfig
53 echo "Error
: File
$(CONFIG_PAYLOAD_CONFIGFILE
) does not exist
"
57 $(MAKE) $(make_args) coreboot_defconfig
61 echo " MAKE
$(project_name
) $(TAG-y
)"
65 test -d $(project_dir) && $(MAKE) $(make_args) clean || exit 0
71 echo "$(project_git_repo
) $(project_dir
)"
73 .PHONY: checkout config build clean distclean fetch print-repo-info