summaryrefslogtreecommitdiff
path: root/U-Boot
diff options
context:
space:
mode:
authorkx <kx@radix.pro>2023-11-06 12:07:18 +0300
committerkx <kx@radix.pro>2023-11-06 12:07:18 +0300
commitcb2922a8bbea107d008d670b79e20ecc67cb9180 (patch)
treeeaac5991a52dde8737b9c93a47d33c9381e04eeb /U-Boot
parent65ec48ee4c286fbc12dd6b4034245e760e659597 (diff)
downloadsources-cb2922a8bbea107d008d670b79e20ecc67cb9180.tar.xz
StarFive: u-boot, opensbi
Diffstat (limited to 'U-Boot')
-rw-r--r--U-Boot/StarFive/Makefile75
-rw-r--r--U-Boot/StarFive/opensbi/Makefile68
-rw-r--r--U-Boot/StarFive/u-boot/Makefile68
3 files changed, 152 insertions, 59 deletions
diff --git a/U-Boot/StarFive/Makefile b/U-Boot/StarFive/Makefile
index 97356d3..28afe10 100644
--- a/U-Boot/StarFive/Makefile
+++ b/U-Boot/StarFive/Makefile
@@ -1,68 +1,25 @@
-#
-# 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):
-# ====================================================================
+# Following command helps to cheate SUBDIRS list:
+# $ tree -fid .
#
-# 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
+SUBDIRS := opensbi \
+ u-boot
-$(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
+all-recursive downloads_clean-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ local_target="$$target"; \
+ (cd $$subdir && $(MAKE) $$fnord $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; test -z "$$fail"
-$(sha1s): %.$(suffix).sha1sum : %.$(suffix)
- @for tarball in $< ; do \
- echo -e "\n======= Calculation the '$$tarball' sha1sum =======" ; \
- sha1sum --binary $$tarball > $$tarball.sha1sum ; \
- done
+all: all-recursive
-repository_clean: $(sha1s)
- @echo -e "\n======= Remove cloned $(repo_name).git repository =======\n"
- @rm -rf $(git_repo) $(repo_name)
+downloads_clean: downloads_clean-recursive
-downloads_clean:
- @rm -rf $(tarballs) $(sha1s)
- @rm -rf $(git_repo) $(repo_name)
+.PHONY: all-recursive downloads_clean-recursive all downloads_clean
diff --git a/U-Boot/StarFive/opensbi/Makefile b/U-Boot/StarFive/opensbi/Makefile
new file mode 100644
index 0000000..7e3954d
--- /dev/null
+++ b/U-Boot/StarFive/opensbi/Makefile
@@ -0,0 +1,68 @@
+#
+# Project Home:
+# ============
+# https://github.com/starfive-tech/opensbi.git
+#
+# Git Mirror:
+# ==========
+# https://git.radix.pro/starfive-tech/opensbi.git
+#
+
+url = https://github.com/starfive-tech
+
+repo_name = opensbi
+
+#
+# List of tags to be extracted (branch JH7110_VisionFive2_devel):
+# ====================================================================
+#
+# hash | version | tag
+# ----------------------------------------+---------+---------
+revisions = c6a092cd80112529cb2e92e180767ff5341b22a3:1.2-3.8.2:VF2_6.1_v3.8.2
+
+git_repo = .git_clone
+
+pkgname = opensbi
+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)
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)