payloads/external/U-Boot/Makefile: Add custom repo and tag

Adds the abillity to use a custom u-boot repo and a custom branch.

Change-Id: I15df8a41d3d94ca0559abc964792035651b3d8b2
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89616
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Maximilian Brune 2025-10-17 00:35:15 +02:00 committed by Matt DeVillier
commit 4b50bc9e5f
3 changed files with 15 additions and 24 deletions

View file

@ -298,8 +298,9 @@ $(GRUB_TARGET_PATH): grub2
payloads/external/U-Boot/build/u-boot.bin u-boot: $(DOTCONFIG)
$(MAKE) -C payloads/external/U-Boot \
STABLE_COMMIT_ID=$(CONFIG_UBOOT_STABLE_COMMIT_ID) \
CONFIG_UBOOT_MASTER=$(CONFIG_UBOOT_MASTER) \
CONFIG_UBOOT_STABLE=$(CONFIG_UBOOT_STABLE)
CONFIG_UBOOT_STABLE=$(CONFIG_UBOOT_STABLE) \
CONFIG_UBOOT_BRANCH_OR_TAG=$(CONFIG_UBOOT_BRANCH_OR_TAG) \
CONFIG_UBOOT_REPO_URL=$(CONFIG_UBOOT_REPO_URL)
# TINT

View file

@ -7,25 +7,19 @@ config PAYLOAD_SPECIFIC_OPTIONS
select PAYLOAD_IS_FLAT_BINARY
select WANT_LINEAR_FRAMEBUFFER
config UBOOT_STABLE_COMMIT_ID
string
default "v2025.07"
choice
prompt "U-Boot version"
default UBOOT_STABLE
config UBOOT_STABLE
bool "v2025.07"
help
Stable U-Boot version
config UBOOT_MASTER
bool "master"
help
Newest U-Boot version
config UBOOT_BRANCH_OR_TAG
string "branch/tag to use for u-boot payload"
default "v2025.07" if UBOOT_STABLE
default "master"
endchoice
config UBOOT_REPO_URL
string "URL to uboot repository"
default "http://github.com/u-boot/u-boot/"
config PAYLOAD_CONFIGFILE
string "U-Boot config file"

View file

@ -1,11 +1,7 @@
## SPDX-License-Identifier: GPL-2.0-only
TAG-$(CONFIG_UBOOT_MASTER)=master
TAG-$(CONFIG_UBOOT_STABLE)=$(STABLE_COMMIT_ID)
project_name=U-Boot
project_dir=u-boot
project_git_repo=http://github.com/u-boot/u-boot/
project_build_dir=build
project_config_file=$(project_build_dir)/.config
@ -23,15 +19,15 @@ all: build
$(project_dir):
echo " Cloning $(project_name) from Git"
git clone $(project_git_repo) -b $(TAG-y) $(project_dir)
git clone $(CONFIG_UBOOT_REPO_URL) -b $(CONFIG_UBOOT_BRANCH_OR_TAG) $(project_dir)
fetch: $(project_dir)
echo " Fetching new commits from the $(project_name) git repo"
cd $(project_dir) && git fetch
checkout: fetch
echo " Checking out $(project_name) revision $(TAG-y)"
cd $(project_dir); git checkout master; git branch -D coreboot 2>/dev/null; git checkout -b coreboot $(TAG-y)
echo " Checking out $(project_name) revision $(CONFIG_UBOOT_BRANCH_OR_TAG)"
cd $(project_dir); git checkout $(CONFIG_UBOOT_BRANCH_OR_TAG); git branch -D coreboot 2>/dev/null; git checkout -b coreboot $(CONFIG_UBOOT_BRANCH_OR_TAG)
config: checkout
mkdir -p $(project_build_dir)
@ -49,7 +45,7 @@ else
endif
build: config
echo " MAKE $(project_name) $(TAG-y)"
echo " MAKE $(project_name) $(CONFIG_UBOOT_BRANCH_OR_TAG)"
$(MAKE) $(make_args)
clean:
@ -59,6 +55,6 @@ distclean:
rm -rf $(project_dir)
print-repo-info:
echo "$(project_git_repo) $(project_dir)"
echo "$(CONFIG_UBOOT_REPO_URL) $(project_dir)"
.PHONY: checkout config build clean distclean fetch print-repo-info