diff options
author | kx <kx@radix.pro> | 2023-11-06 12:07:18 +0300 |
---|---|---|
committer | kx <kx@radix.pro> | 2023-11-06 12:07:18 +0300 |
commit | cb2922a8bbea107d008d670b79e20ecc67cb9180 (patch) | |
tree | eaac5991a52dde8737b9c93a47d33c9381e04eeb /U-Boot/StarFive/u-boot | |
parent | 65ec48ee4c286fbc12dd6b4034245e760e659597 (diff) | |
download | sources-cb2922a8bbea107d008d670b79e20ecc67cb9180.tar.xz |
StarFive: u-boot, opensbi
Diffstat (limited to 'U-Boot/StarFive/u-boot')
-rw-r--r-- | U-Boot/StarFive/u-boot/Makefile | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/U-Boot/StarFive/u-boot/Makefile b/U-Boot/StarFive/u-boot/Makefile new file mode 100644 index 0000000..97356d3 --- /dev/null +++ b/U-Boot/StarFive/u-boot/Makefile @@ -0,0 +1,68 @@ +# +# Project Home: +# ============ +# https://github.com/starfive-tech/u-boot.git +# +# Git Mirror: +# ========== +# https://git.radix.pro/starfive-tech/u-boot.git +# + +url = https://github.com/starfive-tech + +repo_name = u-boot + +# +# List of tags to be extracted (branch JH7110_VisionFive2_devel): +# ==================================================================== +# +# hash | version | tag +# ----------------------------------------+-------------+--------- +revisions = 84c81d3d0254adb8ae88d5e0633bf01c12436898:2021.10-3.8.2:VF2_6.1_v3.8.2 + +git_repo = .git_clone + +pkgname = u-boot +suffix = tar.xz + +versions = $(foreach tag, $(revisions), $(shell echo $(tag) | cut -f 2 -d ':')) +tarballs = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions))) +sha1s = $(addsuffix .sha1sum, $(tarballs)) + +TARGETS = repository_clean + +all: $(TARGETS) + +.PHONY: downloads_clean repository_clean + +$(git_repo): + @echo -e "\n======= Clone $(repo_name).git repository =======\n" + @rm -rf $(repo_name) + @git clone $(url)/$(repo_name).git $(repo_name) + @touch $@ + +$(tarballs): $(git_repo) + @for revision in $(revisions) ; do \ + hash=`echo $$revision | cut -f 1 -d ':'` ; \ + version=`echo $$revision | cut -f 2 -d ':'` ; \ + if [ ! -f $(pkgname)-$$version.$(suffix) ]; then \ + echo -e "\n======= Creating '$(pkgname)-$$version.$(suffix)' snapshot =======" ; \ + ( cd $(repo_name) && \ + git archive --format=tar --prefix=$(pkgname)-$$version/ $$hash | \ + xz >../$(pkgname)-$$version.$(suffix) ) ; \ + fi ; \ + done + +$(sha1s): %.$(suffix).sha1sum : %.$(suffix) + @for tarball in $< ; do \ + echo -e "\n======= Calculation the '$$tarball' sha1sum =======" ; \ + sha1sum --binary $$tarball > $$tarball.sha1sum ; \ + done + +repository_clean: $(sha1s) + @echo -e "\n======= Remove cloned $(repo_name).git repository =======\n" + @rm -rf $(git_repo) $(repo_name) + +downloads_clean: + @rm -rf $(tarballs) $(sha1s) + @rm -rf $(git_repo) $(repo_name) |