summaryrefslogtreecommitdiff
path: root/U-Boot
diff options
context:
space:
mode:
authorkx <kx@radix.pro>2023-11-06 11:55:51 +0300
committerkx <kx@radix.pro>2023-11-06 11:55:51 +0300
commit65ec48ee4c286fbc12dd6b4034245e760e659597 (patch)
tree3fb95901a0db5b98ad55150bd3628c5dccf2f8be /U-Boot
parent8fadba50228a3b20ea0457427ccab75fe06cc9f7 (diff)
downloadsources-65ec48ee4c286fbc12dd6b4034245e760e659597.tar.xz
StarFive: u-boot
Diffstat (limited to 'U-Boot')
-rw-r--r--U-Boot/Makefile1
-rw-r--r--U-Boot/StarFive/Makefile68
2 files changed, 69 insertions, 0 deletions
diff --git a/U-Boot/Makefile b/U-Boot/Makefile
index 1daa836..2d5612d 100644
--- a/U-Boot/Makefile
+++ b/U-Boot/Makefile
@@ -5,6 +5,7 @@
#
SUBDIRS := ATF \
+ StarFive \
denx \
rkbin
diff --git a/U-Boot/StarFive/Makefile b/U-Boot/StarFive/Makefile
new file mode 100644
index 0000000..97356d3
--- /dev/null
+++ b/U-Boot/StarFive/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)