Radix cross Linux 3pp sources

RcL sources – is a tree of Third Party and Radix source tarballs

343 Commits   0 Branches   0 Tags
author: kx <kx@radix.pro> 2023-11-20 12:42:57 +0300 committer: kx <kx@radix.pro> 2023-11-20 12:42:57 +0300 commit: 4a4a969af37f27cd662c011af871741756a57a92 parent: a831b0d4bcde18bb4da39656af0002e61377930d
Commit Summary:
Orange Pi: u-boot-rockchip-2023.10
Diffstat:
2 files changed, 56 insertions, 1 deletion
diff --git a/U-Boot/OrangePi/Makefile b/U-Boot/OrangePi/Makefile
index 56b4520..0cf0821 100644
--- a/U-Boot/OrangePi/Makefile
+++ b/U-Boot/OrangePi/Makefile
@@ -4,7 +4,8 @@
 # $ tree -fid .
 #
 
-SUBDIRS := edk2
+SUBDIRS := edk2   \
+           u-boot
 
 
 all-recursive downloads_clean-recursive:
diff --git a/U-Boot/OrangePi/u-boot/Makefile b/U-Boot/OrangePi/u-boot/Makefile
new file mode 100644
index 0000000..10fc573
--- /dev/null
+++ b/U-Boot/OrangePi/u-boot/Makefile
@@ -0,0 +1,68 @@
+#
+# Project Home:
+# ============
+#   https://source.denx.de/u-boot/custodians/u-boot-rockchip.git
+#
+# Clone:
+# =====
+#   git clone https://source.denx.de/u-boot/custodians/u-boot-rockchip.git
+#
+
+url        = https://source.denx.de/u-boot/custodians/
+
+repo_name  = u-boot-rockchip
+pkg_name   = u-boot
+suffix     = tar.xz
+
+#
+# List of tags to be extracted (git rev-list -n 1 u-boot-rockchip-20231024):
+# ============================
+#
+#                                               hash | version
+#            ----------------------------------------+--------
+revisions  = d039b1b551e8dbb2c309d35bb19b7866caa4dcc1:2023.10
+
+
+git_repo   = .git_clone
+versions   = $(foreach tag, $(revisions), $(shell echo $(tag) | cut -f 2 -d ':'))
+tarballs   = $(addsuffix .tar.xz, $(addprefix $(pkg_name)-, $(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 \
+	  version=`echo $$revision | cut -f 2 -d ':'` ; \
+	  hash=`echo $$revision | cut -f 1 -d ':'`    ; \
+	  if [ ! -f $(repo_name)-$$version.$(suffix) ]; then \
+	    echo -e "\n======= Creating '$(pkg_name)-$$version.$(suffix)' snapshot =======" ; \
+	    ( cd $(repo_name) && \
+	      git archive --format=tar --prefix=$(pkg_name)-$$version/ $$hash | \
+	      xz >../$(pkg_name)-$$version.$(suffix) ) ; \
+	  fi ; \
+	done
+
+$(sha1s): %.tar.xz.sha1sum : %.tar.xz
+	@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)