summaryrefslogtreecommitdiff
path: root/U-Boot
diff options
context:
space:
mode:
authorkx <kx@radix.pro>2023-11-18 16:54:41 +0300
committerkx <kx@radix.pro>2023-11-18 16:54:41 +0300
commita831b0d4bcde18bb4da39656af0002e61377930d (patch)
tree09636fd322929c69e2cdb60c5e07bab40874f351 /U-Boot
parent627e896847ce9ec80327d95d64681628a32ac425 (diff)
downloadsources-a831b0d4bcde18bb4da39656af0002e61377930d.tar.xz
OrangePi: RK3588: EDK2
Diffstat (limited to 'U-Boot')
-rw-r--r--U-Boot/Makefile1
-rw-r--r--U-Boot/OrangePi/Makefile24
-rw-r--r--U-Boot/OrangePi/edk2/Makefile75
3 files changed, 100 insertions, 0 deletions
diff --git a/U-Boot/Makefile b/U-Boot/Makefile
index 2d5612d..b323907 100644
--- a/U-Boot/Makefile
+++ b/U-Boot/Makefile
@@ -5,6 +5,7 @@
#
SUBDIRS := ATF \
+ OrangePi \
StarFive \
denx \
rkbin
diff --git a/U-Boot/OrangePi/Makefile b/U-Boot/OrangePi/Makefile
new file mode 100644
index 0000000..56b4520
--- /dev/null
+++ b/U-Boot/OrangePi/Makefile
@@ -0,0 +1,24 @@
+
+#
+# Following command helps to cheate SUBDIRS list:
+# $ tree -fid .
+#
+
+SUBDIRS := edk2
+
+
+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/OrangePi/edk2/Makefile b/U-Boot/OrangePi/edk2/Makefile
new file mode 100644
index 0000000..0ca644e
--- /dev/null
+++ b/U-Boot/OrangePi/edk2/Makefile
@@ -0,0 +1,75 @@
+#
+# Project Home:
+# ============
+# https://github.com/edk2-porting/edk2-rk3588
+#
+# GitHub:
+# ======
+# git clone https://github.com/edk2-porting/edk2-rk3588.git
+#
+
+url = https://github.com/edk2-porting
+
+repo_name = edk2-rk3588
+pkg_name = edk2-rk3588
+
+#
+# List of versions to be extracted (git rev-list -n 1 v0.9.1):
+# ===========================================================
+# hash | tag
+# ----------------------------------------+-----
+revisions = 98e10085990a4363a03e0225ff48f1e0d7984b77:0.9.1
+revisions += e9f0d3363e7db645e84a979542cc96b487d05f01:0.9.1.1
+
+
+git_repo = .git_clone
+
+suffix = tar.xz
+
+versions = $(foreach tag, $(revisions), $(shell echo $(tag) | cut -f 2 -d ':'))
+
+tarballs = $(addsuffix .$(suffix), $(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 \
+ hash=`echo $$revision | cut -f 1 -d ':'` ; \
+ version=`echo $$revision | cut -f 2 -d ':'` ; \
+ if [ ! -f $(pkg_name)-$$version.$(suffix) ]; then \
+ echo -e "\n======= Creating '$(pkg_name)-$$version.$(suffix)' snapshot =======" ; \
+ ( cp -r $(repo_name) $(pkg_name)-$${version} ; \
+ cd $(pkg_name)-$${version} ; \
+ git checkout -b v$${version} $${hash} ; \
+ git submodule update --init --recursive ; \
+ sed -i "s,^\(GITCOMMIT\)=.*,\1=\"v$${version}\"," build.sh ; \
+ ) ; \
+ tar cJf $(pkg_name)-$${version}.tar.xz $(pkg_name)-$${version} ; \
+ rm -rf $(pkg_name)-$${version} ; \
+ 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)