author: kx <kx@radix.pro> 2023-04-06 09:58:44 +0300
committer: kx <kx@radix.pro> 2023-04-06 09:58:44 +0300
commit: c66a32050916ffe56531b9f3a515f824c02a7ec3
parent: fca57b9d9b3cde5c47f3153a1a77d68fcfed3f4b
Commit Summary:
Diffstat:
3 files changed, 107 insertions, 0 deletions
diff --git a/U-Boot/ATF/Makefile b/U-Boot/ATF/Makefile
new file mode 100644
index 0000000..b231bb7
--- /dev/null
+++ b/U-Boot/ATF/Makefile
@@ -0,0 +1,70 @@
+#
+# Project Home:
+# ============
+# https://developer.trustedfirmware.org/dashboard/view/6/
+#
+# Clone:
+# =====
+# git clone https://github.com/ARM-software/arm-trusted-firmware.git
+#
+
+url = https://github.com/ARM-software
+
+repo_name = arm-trusted-firmware
+pkg_name = arm-trusted-firmware
+suffix = tar.xz
+
+#
+# List of tags to be extracted:
+# ============================
+#
+# hash | version
+# ----------------------------------------+--------
+revisions = c158878249f1bd930906ebd744b90d3f2a8265f1:2.5
+revisions += a5394205e94b70faf7ddd34841528ec631711d1a:2.5.1
+revisions += 35f4c7295bafeb32c8bcbdfb6a3f2e74a57e732b:2.7.0
+
+
+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 '$(repo_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)
diff --git a/U-Boot/Makefile b/U-Boot/Makefile
new file mode 100644
index 0000000..56404c0
--- /dev/null
+++ b/U-Boot/Makefile
@@ -0,0 +1,25 @@
+
+#
+# Following command helps to cheate SUBDIRS list:
+# $ tree -fid .
+#
+
+SUBDIRS := ATF \
+ denx
+
+
+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"
+
+all: all-recursive
+
+downloads_clean: downloads_clean-recursive
+
+.PHONY: all-recursive downloads_clean-recursive all downloads_clean
diff --git a/U-Boot/denx/Makefile b/U-Boot/denx/Makefile
new file mode 100644
index 0000000..e121f57
--- /dev/null
+++ b/U-Boot/denx/Makefile
@@ -0,0 +1,42 @@
+#
+# Project Home:
+# ============
+# https://www.denx.de/wiki/U-Boot/
+#
+# FTP snapshots:
+# =============
+# ftp://ftp.denx.de/pub/u-boot/
+#
+# HTTP snapshots:
+# ==============
+# https://ftp.denx.de/pub/u-boot/
+#
+
+url = https://ftp.denx.de/pub/u-boot
+
+versions = 2013.10 2014.01 2014.07 2014.10 2015.01 2015.04 2015.07 2016.01
+versions += 2017.09 2017.11 2018.11 2019.10 2020.10 2021.04 2022.10 2023.04
+
+suffix = tar.bz2
+
+tarballs = $(addsuffix .$(suffix), $(addprefix u-boot-, $(versions)))
+sha1s = $(addsuffix .sha1sum, $(tarballs))
+
+all: $(tarballs) $(sha1s)
+
+.PHONY: downloads_clean
+
+$(tarballs):
+ @echo -e "\n======= Downloading source tarballs =======\n"
+ @for tarball in $(tarballs) ; do \
+ wget -N $(url)/$$tarball ; \
+ done
+
+$(sha1s): %.$(suffix).sha1sum : %.$(suffix)
+ @for tarball in $< ; do \
+ echo -e "\n======= Calculation the '$$tarball' sha1sum =======\n" ; \
+ sha1sum --binary $$tarball > $$tarball.sha1sum ; \
+ done
+
+downloads_clean:
+ @rm -rf $(tarballs) $(sha1s)