summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/submodule/coreboot/coreboot413/vboot/module.cfg2
-rw-r--r--config/submodule/coreboot/default/arm-trusted-firmware/module.cfg2
-rw-r--r--config/submodule/coreboot/default/intel-microcode/module.cfg2
-rw-r--r--config/submodule/coreboot/default/libgfxinit/module.cfg2
-rw-r--r--config/submodule/coreboot/default/libhwbase/module.cfg2
-rw-r--r--config/submodule/coreboot/default/vboot/module.cfg2
-rw-r--r--config/submodule/coreboot/dell/intel-microcode/module.cfg2
-rw-r--r--config/submodule/coreboot/dell/libgfxinit/module.cfg2
-rw-r--r--config/submodule/coreboot/dell/libhwbase/module.cfg2
-rw-r--r--config/submodule/coreboot/dell/vboot/module.cfg2
-rw-r--r--config/submodule/coreboot/fam15h_rdimm/blobs/module.cfg2
-rw-r--r--config/submodule/coreboot/fam15h_rdimm/vboot/module.cfg2
-rw-r--r--config/submodule/coreboot/fam15h_udimm/blobs/module.cfg2
-rw-r--r--config/submodule/coreboot/fam15h_udimm/vboot/module.cfg2
-rw-r--r--config/submodule/coreboot/haswell/intel-microcode/module.cfg2
-rw-r--r--config/submodule/coreboot/haswell/libgfxinit/module.cfg2
-rw-r--r--config/submodule/coreboot/haswell/libhwbase/module.cfg2
-rw-r--r--config/submodule/coreboot/haswell/vboot/module.cfg2
-rw-r--r--config/submodule/coreboot/i945/intel-microcode/module.cfg2
-rw-r--r--config/submodule/coreboot/i945/libgfxinit/module.cfg2
-rw-r--r--config/submodule/coreboot/i945/libhwbase/module.cfg2
-rw-r--r--config/submodule/coreboot/i945/vboot/module.cfg2
-rw-r--r--config/submodule/docs/html/module.cfg2
-rw-r--r--config/submodule/docs/img/module.cfg2
-rw-r--r--config/submodule/docs/untitled/module.cfg2
-rw-r--r--config/submodule/grub/default/gnulib/module.cfg2
-rw-r--r--config/submodule/grub/xhci/gnulib/module.cfg2
-rw-r--r--config/submodule/pico-sdk/tinyusb/module.cfg2
-rw-r--r--config/submodule/stm32-vserprog/libopencm3/module.cfg2
-rwxr-xr-xinclude/git.sh27
30 files changed, 49 insertions, 36 deletions
diff --git a/config/submodule/coreboot/coreboot413/vboot/module.cfg b/config/submodule/coreboot/coreboot413/vboot/module.cfg
index 42e3835d..34656ba9 100644
--- a/config/submodule/coreboot/coreboot413/vboot/module.cfg
+++ b/config/submodule/coreboot/coreboot413/vboot/module.cfg
@@ -1,3 +1,3 @@
subrepo="https://review.coreboot.org/vboot.git"
subrepo_bkup="https://github.com/coreboot/vboot"
-subrev="4c523ed10f25de872ac0513ebd6ca53d3970b9de"
+subhash="4c523ed10f25de872ac0513ebd6ca53d3970b9de"
diff --git a/config/submodule/coreboot/default/arm-trusted-firmware/module.cfg b/config/submodule/coreboot/default/arm-trusted-firmware/module.cfg
index ccf35b1b..3fb78c02 100644
--- a/config/submodule/coreboot/default/arm-trusted-firmware/module.cfg
+++ b/config/submodule/coreboot/default/arm-trusted-firmware/module.cfg
@@ -1,3 +1,3 @@
subrepo="https://review.coreboot.org/arm-trusted-firmware.git"
subrepo_bkup="https://github.com/coreboot/arm-trusted-firmware"
-subrev="23d6774ab53ded09d8065a184b4763504e9c8d9e"
+subhash="23d6774ab53ded09d8065a184b4763504e9c8d9e"
diff --git a/config/submodule/coreboot/default/intel-microcode/module.cfg b/config/submodule/coreboot/default/intel-microcode/module.cfg
index a115badf..05a174b0 100644
--- a/config/submodule/coreboot/default/intel-microcode/module.cfg
+++ b/config/submodule/coreboot/default/intel-microcode/module.cfg
@@ -1,3 +1,3 @@
subrepo="https://review.coreboot.org/intel-microcode.git"
subrepo_bkup="https://github.com/coreboot/intel-microcode"
-subrev="ece0d294a29a1375397941a4e6f2f7217910bc89"
+subhash="ece0d294a29a1375397941a4e6f2f7217910bc89"
diff --git a/config/submodule/coreboot/default/libgfxinit/module.cfg b/config/submodule/coreboot/default/libgfxinit/module.cfg
index c3db628b..7e2536f9 100644
--- a/config/submodule/coreboot/default/libgfxinit/module.cfg
+++ b/config/submodule/coreboot/default/libgfxinit/module.cfg
@@ -1,3 +1,3 @@
subrepo="https://review.coreboot.org/libgfxinit.git"
subrepo_bkup="https://github.com/coreboot/libgfxinit"
-subrev="a4be8a21b0e2c752da0042c79aae5942418f53e2"
+subhash="a4be8a21b0e2c752da0042c79aae5942418f53e2"
diff --git a/config/submodule/coreboot/default/libhwbase/module.cfg b/config/submodule/coreboot/default/libhwbase/module.cfg
index 7996007e..2937b8b7 100644
--- a/config/submodule/coreboot/default/libhwbase/module.cfg
+++ b/config/submodule/coreboot/default/libhwbase/module.cfg
@@ -1,3 +1,3 @@
subrepo="https://review.coreboot.org/libhwbase.git"
subrepo_bkup="https://github.com/coreboot/libhwbase"
-subrev="584629b9f4771b7618951cec57df2ca3af9c6981"
+subhash="584629b9f4771b7618951cec57df2ca3af9c6981"
diff --git a/config/submodule/coreboot/default/vboot/module.cfg b/config/submodule/coreboot/default/vboot/module.cfg
index 53306d64..9a23ee96 100644
--- a/config/submodule/coreboot/default/vboot/module.cfg
+++ b/config/submodule/coreboot/default/vboot/module.cfg
@@ -1,3 +1,3 @@
subrepo="https://review.coreboot.org/vboot.git"
subrepo_bkup="https://github.com/coreboot/vboot"
-subrev="3d37d2aafe1f941c532def2a1fbbb58c8dd84182"
+subhash="3d37d2aafe1f941c532def2a1fbbb58c8dd84182"
diff --git a/config/submodule/coreboot/dell/intel-microcode/module.cfg b/config/submodule/coreboot/dell/intel-microcode/module.cfg
index a115badf..05a174b0 100644
--- a/config/submodule/coreboot/dell/intel-microcode/module.cfg
+++ b/config/submodule/coreboot/dell/intel-microcode/module.cfg
@@ -1,3 +1,3 @@
subrepo="https://review.coreboot.org/intel-microcode.git"
subrepo_bkup="https://github.com/coreboot/intel-microcode"
-subrev="ece0d294a29a1375397941a4e6f2f7217910bc89"
+subhash="ece0d294a29a1375397941a4e6f2f7217910bc89"
diff --git a/config/submodule/coreboot/dell/libgfxinit/module.cfg b/config/submodule/coreboot/dell/libgfxinit/module.cfg
index c3db628b..7e2536f9 100644
--- a/config/submodule/coreboot/dell/libgfxinit/module.cfg
+++ b/config/submodule/coreboot/dell/libgfxinit/module.cfg
@@ -1,3 +1,3 @@
subrepo="https://review.coreboot.org/libgfxinit.git"
subrepo_bkup="https://github.com/coreboot/libgfxinit"
-subrev="a4be8a21b0e2c752da0042c79aae5942418f53e2"
+subhash="a4be8a21b0e2c752da0042c79aae5942418f53e2"
diff --git a/config/submodule/coreboot/dell/libhwbase/module.cfg b/config/submodule/coreboot/dell/libhwbase/module.cfg
index 7996007e..2937b8b7 100644
--- a/config/submodule/coreboot/dell/libhwbase/module.cfg
+++ b/config/submodule/coreboot/dell/libhwbase/module.cfg
@@ -1,3 +1,3 @@
subrepo="https://review.coreboot.org/libhwbase.git"
subrepo_bkup="https://github.com/coreboot/libhwbase"
-subrev="584629b9f4771b7618951cec57df2ca3af9c6981"
+subhash="584629b9f4771b7618951cec57df2ca3af9c6981"
diff --git a/config/submodule/coreboot/dell/vboot/module.cfg b/config/submodule/coreboot/dell/vboot/module.cfg
index 53306d64..9a23ee96 100644
--- a/config/submodule/coreboot/dell/vboot/module.cfg
+++ b/config/submodule/coreboot/dell/vboot/module.cfg
@@ -1,3 +1,3 @@
subrepo="https://review.coreboot.org/vboot.git"
subrepo_bkup="https://github.com/coreboot/vboot"
-subrev="3d37d2aafe1f941c532def2a1fbbb58c8dd84182"
+subhash="3d37d2aafe1f941c532def2a1fbbb58c8dd84182"
diff --git a/config/submodule/coreboot/fam15h_rdimm/blobs/module.cfg b/config/submodule/coreboot/fam15h_rdimm/blobs/module.cfg
index c7ae4683..215caf4d 100644
--- a/config/submodule/coreboot/fam15h_rdimm/blobs/module.cfg
+++ b/config/submodule/coreboot/fam15h_rdimm/blobs/module.cfg
@@ -1,3 +1,3 @@
subrepo="https://review.coreboot.org/blobs.git"
subrepo_bkup="https://github.com/coreboot/blobs"
-subrev="034b27818450428f70aa9316c8bd0d65bacd8ee8"
+subhash="034b27818450428f70aa9316c8bd0d65bacd8ee8"
diff --git a/config/submodule/coreboot/fam15h_rdimm/vboot/module.cfg b/config/submodule/coreboot/fam15h_rdimm/vboot/module.cfg
index 7a7ad3c6..5fac75c3 100644
--- a/config/submodule/coreboot/fam15h_rdimm/vboot/module.cfg
+++ b/config/submodule/coreboot/fam15h_rdimm/vboot/module.cfg
@@ -1,3 +1,3 @@
subrepo="https://review.coreboot.org/vboot.git"
subrepo_bkup="https://github.com/coreboot/vboot"
-subrev="ecdca931ae0637d1a9498f64862939bd5bb99e0b"
+subhash="ecdca931ae0637d1a9498f64862939bd5bb99e0b"
diff --git a/config/submodule/coreboot/fam15h_udimm/blobs/module.cfg b/config/submodule/coreboot/fam15h_udimm/blobs/module.cfg
index c7ae4683..215caf4d 100644
--- a/config/submodule/coreboot/fam15h_udimm/blobs/module.cfg
+++ b/config/submodule/coreboot/fam15h_udimm/blobs/module.cfg
@@ -1,3 +1,3 @@
subrepo="https://review.coreboot.org/blobs.git"
subrepo_bkup="https://github.com/coreboot/blobs"
-subrev="034b27818450428f70aa9316c8bd0d65bacd8ee8"
+subhash="034b27818450428f70aa9316c8bd0d65bacd8ee8"
diff --git a/config/submodule/coreboot/fam15h_udimm/vboot/module.cfg b/config/submodule/coreboot/fam15h_udimm/vboot/module.cfg
index 7a7ad3c6..5fac75c3 100644
--- a/config/submodule/coreboot/fam15h_udimm/vboot/module.cfg
+++ b/config/submodule/coreboot/fam15h_udimm/vboot/module.cfg
@@ -1,3 +1,3 @@
subrepo="https://review.coreboot.org/vboot.git"
subrepo_bkup="https://github.com/coreboot/vboot"
-subrev="ecdca931ae0637d1a9498f64862939bd5bb99e0b"
+subhash="ecdca931ae0637d1a9498f64862939bd5bb99e0b"
diff --git a/config/submodule/coreboot/haswell/intel-microcode/module.cfg b/config/submodule/coreboot/haswell/intel-microcode/module.cfg
index 12b01372..90f7d273 100644
--- a/config/submodule/coreboot/haswell/intel-microcode/module.cfg
+++ b/config/submodule/coreboot/haswell/intel-microcode/module.cfg
@@ -1,3 +1,3 @@
subrepo="https://review.coreboot.org/intel-microcode.git"
subrepo_bkup="https://github.com/coreboot/intel-microcode"
-subrev="41af34500598418150aa298bb04e7edacc547897"
+subhash="41af34500598418150aa298bb04e7edacc547897"
diff --git a/config/submodule/coreboot/haswell/libgfxinit/module.cfg b/config/submodule/coreboot/haswell/libgfxinit/module.cfg
index c3db628b..7e2536f9 100644
--- a/config/submodule/coreboot/haswell/libgfxinit/module.cfg
+++ b/config/submodule/coreboot/haswell/libgfxinit/module.cfg
@@ -1,3 +1,3 @@
subrepo="https://review.coreboot.org/libgfxinit.git"
subrepo_bkup="https://github.com/coreboot/libgfxinit"
-subrev="a4be8a21b0e2c752da0042c79aae5942418f53e2"
+subhash="a4be8a21b0e2c752da0042c79aae5942418f53e2"
diff --git a/config/submodule/coreboot/haswell/libhwbase/module.cfg b/config/submodule/coreboot/haswell/libhwbase/module.cfg
index 7996007e..2937b8b7 100644
--- a/config/submodule/coreboot/haswell/libhwbase/module.cfg
+++ b/config/submodule/coreboot/haswell/libhwbase/module.cfg
@@ -1,3 +1,3 @@
subrepo="https://review.coreboot.org/libhwbase.git"
subrepo_bkup="https://github.com/coreboot/libhwbase"
-subrev="584629b9f4771b7618951cec57df2ca3af9c6981"
+subhash="584629b9f4771b7618951cec57df2ca3af9c6981"
diff --git a/config/submodule/coreboot/haswell/vboot/module.cfg b/config/submodule/coreboot/haswell/vboot/module.cfg
index a30a1cee..5ef2153c 100644
--- a/config/submodule/coreboot/haswell/vboot/module.cfg
+++ b/config/submodule/coreboot/haswell/vboot/module.cfg
@@ -1,3 +1,3 @@
subrepo="https://review.coreboot.org/vboot.git"
subrepo_bkup="https://github.com/coreboot/vboot"
-subrev="09fcd2184f9c714829503e84b8a7dfe7f2584e00"
+subhash="09fcd2184f9c714829503e84b8a7dfe7f2584e00"
diff --git a/config/submodule/coreboot/i945/intel-microcode/module.cfg b/config/submodule/coreboot/i945/intel-microcode/module.cfg
index 07b2995a..6edc2d9f 100644
--- a/config/submodule/coreboot/i945/intel-microcode/module.cfg
+++ b/config/submodule/coreboot/i945/intel-microcode/module.cfg
@@ -1,3 +1,3 @@
subrepo="https://review.coreboot.org/intel-microcode.git"
subrepo_bkup="https://github.com/coreboot/intel-microcode"
-subrev="262f0c97f2fbc3839a59523cc6c6bcf500e2850b"
+subhash="262f0c97f2fbc3839a59523cc6c6bcf500e2850b"
diff --git a/config/submodule/coreboot/i945/libgfxinit/module.cfg b/config/submodule/coreboot/i945/libgfxinit/module.cfg
index d8838af8..50153822 100644
--- a/config/submodule/coreboot/i945/libgfxinit/module.cfg
+++ b/config/submodule/coreboot/i945/libgfxinit/module.cfg
@@ -1,3 +1,3 @@
subrepo="https://review.coreboot.org/libgfxinit.git"
subrepo_bkup="https://github.com/coreboot/libgfxinit"
-subrev="066e52eeaa329d782ccee96265a6a351fc395bf1"
+subhash="066e52eeaa329d782ccee96265a6a351fc395bf1"
diff --git a/config/submodule/coreboot/i945/libhwbase/module.cfg b/config/submodule/coreboot/i945/libhwbase/module.cfg
index 56fefb40..cd975dcb 100644
--- a/config/submodule/coreboot/i945/libhwbase/module.cfg
+++ b/config/submodule/coreboot/i945/libhwbase/module.cfg
@@ -1,3 +1,3 @@
subrepo="https://review.coreboot.org/libhwbase.git"
subrepo_bkup="https://github.com/coreboot/libhwbase"
-subrev="8be5a82b85ceb3ee8a1c4fbf36c75a4bfbda8900"
+subhash="8be5a82b85ceb3ee8a1c4fbf36c75a4bfbda8900"
diff --git a/config/submodule/coreboot/i945/vboot/module.cfg b/config/submodule/coreboot/i945/vboot/module.cfg
index 75ce2cf2..352e4222 100644
--- a/config/submodule/coreboot/i945/vboot/module.cfg
+++ b/config/submodule/coreboot/i945/vboot/module.cfg
@@ -1,3 +1,3 @@
subrepo="https://review.coreboot.org/vboot.git"
subrepo_bkup="https://github.com/coreboot/vboot"
-subrev="5b8596cefd1a61252501943f2534323708338732"
+subhash="5b8596cefd1a61252501943f2534323708338732"
diff --git a/config/submodule/docs/html/module.cfg b/config/submodule/docs/html/module.cfg
index 0c5ee4cd..6f5f0773 100644
--- a/config/submodule/docs/html/module.cfg
+++ b/config/submodule/docs/html/module.cfg
@@ -1,3 +1,3 @@
-subrev="20fd775c855428ecff647a42823746863fd57efe"
+subhash="20fd775c855428ecff647a42823746863fd57efe"
subrepo="https://codeberg.org/libreboot/lbwww"
subrepo_bkup="https://git.disroot.org/libreboot/lbwww"
diff --git a/config/submodule/docs/img/module.cfg b/config/submodule/docs/img/module.cfg
index 82bcf8b1..07c4ab89 100644
--- a/config/submodule/docs/img/module.cfg
+++ b/config/submodule/docs/img/module.cfg
@@ -1,3 +1,3 @@
-subrev="625bb7535d388a235bec47a8ce822cda10b53692"
+subhash="625bb7535d388a235bec47a8ce822cda10b53692"
subrepo="https://codeberg.org/libreboot/lbwww-img"
subrepo_bkup="https://git.disroot.org/libreboot/lbwww-img"
diff --git a/config/submodule/docs/untitled/module.cfg b/config/submodule/docs/untitled/module.cfg
index 5608c457..35e950e7 100644
--- a/config/submodule/docs/untitled/module.cfg
+++ b/config/submodule/docs/untitled/module.cfg
@@ -1,3 +1,3 @@
-subrev="d8e2043c1512eb1171c274559ce82e8093ef393f"
+subhash="d8e2043c1512eb1171c274559ce82e8093ef393f"
subrepo="https://codeberg.org/vimuser/untitled-website"
subrepo_bkup="https://notabug.org/untitled/untitled-website"
diff --git a/config/submodule/grub/default/gnulib/module.cfg b/config/submodule/grub/default/gnulib/module.cfg
index 26c28561..6fd77871 100644
--- a/config/submodule/grub/default/gnulib/module.cfg
+++ b/config/submodule/grub/default/gnulib/module.cfg
@@ -1,3 +1,3 @@
subrepo="git://git.sv.gnu.org/gnulib"
subrepo_bkup="https://codeberg.org/libreboot/gnulib"
-subrev="9f48fb992a3d7e96610c4ce8be969cff2d61a01b"
+subhash="9f48fb992a3d7e96610c4ce8be969cff2d61a01b"
diff --git a/config/submodule/grub/xhci/gnulib/module.cfg b/config/submodule/grub/xhci/gnulib/module.cfg
index 26c28561..6fd77871 100644
--- a/config/submodule/grub/xhci/gnulib/module.cfg
+++ b/config/submodule/grub/xhci/gnulib/module.cfg
@@ -1,3 +1,3 @@
subrepo="git://git.sv.gnu.org/gnulib"
subrepo_bkup="https://codeberg.org/libreboot/gnulib"
-subrev="9f48fb992a3d7e96610c4ce8be969cff2d61a01b"
+subhash="9f48fb992a3d7e96610c4ce8be969cff2d61a01b"
diff --git a/config/submodule/pico-sdk/tinyusb/module.cfg b/config/submodule/pico-sdk/tinyusb/module.cfg
index 68798daa..43b71534 100644
--- a/config/submodule/pico-sdk/tinyusb/module.cfg
+++ b/config/submodule/pico-sdk/tinyusb/module.cfg
@@ -1,3 +1,3 @@
-subrev="86c416d4c0fb38432460b3e11b08b9de76941bf5"
+subhash="86c416d4c0fb38432460b3e11b08b9de76941bf5"
subrepo="https://codeberg.org/libreboot/tinyusb"
subrepo_bkup="https://github.com/hathach/tinyusb.git"
diff --git a/config/submodule/stm32-vserprog/libopencm3/module.cfg b/config/submodule/stm32-vserprog/libopencm3/module.cfg
index b8c46854..9fb3460b 100644
--- a/config/submodule/stm32-vserprog/libopencm3/module.cfg
+++ b/config/submodule/stm32-vserprog/libopencm3/module.cfg
@@ -1,3 +1,3 @@
-subrev="458250dc6147dc807eec9e4d5a6caf38a699ecb1"
+subhash="458250dc6147dc807eec9e4d5a6caf38a699ecb1"
subrepo="https://codeberg.org/libreboot/libopencm3"
subrepo_bkup="https://github.com/libopencm3/libopencm3"
diff --git a/include/git.sh b/include/git.sh
index 1573c7d2..5fe41fb3 100755
--- a/include/git.sh
+++ b/include/git.sh
@@ -3,7 +3,7 @@
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
eval "$(setvars "" _target rev _xm loc url bkup_url depend tree_depend xtree \
- mdir subrev subrepo subrepo_bkup)"
+ mdir subhash subrepo subrepo_bkup subfile subfile_bkup)"
fetch_project_trees()
{
@@ -114,18 +114,31 @@ prep_submodules()
fetch_submodule()
{
mcfgdir="$mdir/${1##*/}"
- eval "$(setvars "" subrev subrepo subrepo_bkup)"
+ eval "$(setvars "" subhash subrepo subrepo_bkup subfile subfile_bkup)"
[ ! -f "$mcfgdir/module.cfg" ] || . "$mcfgdir/module.cfg" || \
$err "! . $mcfgdir/module.cfg"
- [ -z "$subrepo" ] && [ -z "$subrepo_bkup" ] && return 0
- for mvar in subrepo subrepo_bkup subrev; do
+ st=""
+ for _st in repo file; do
+ _seval="if [ -n \"\$sub$_st\" ] || [ -n \"\$sub${_st}_bkup\" ]"
+ eval "$_seval; then st=\"\$st \$_st\"; fi"
+ done
+ st="${st# }"
+ [ "$st" = "repo file" ] && $err "$mdir: repo/file both defined"
+
+ [ -z "$st" ] && return 0 # subrepo/subfile not defined
+
+ for mvar in "sub${st}" "sub${st}_bkup" "subhash"; do
eval "[ -n \"\$$mvar\" ] || $err \"$1, $mdir: $mvar unset\""
done
- rm -Rf "$tmpgit/$1" || $err "!rm '$mdir' '$1'"
- tmpclone "$subrepo" "$subrepo_bkup" "$tmpgit/$1" "$subrev" \
- "$mdir/${1##*/}/patches"
+ if [ "$st" = "repo" ]; then
+ rm -Rf "$tmpgit/$1" || $err "!rm '$mdir' '$1'"
+ tmpclone "$subrepo" "$subrepo_bkup" "$tmpgit/$1" "$subhash" \
+ "$mdir/${1##*/}/patches"
+ else
+ download "$subfile" "$subfile_bkup" "$tmpgit/$1" "$subhash"
+ fi
}
tmpclone()