Add `make fetch-submodules` to update submodules

This also sets rpi-firmware as shallow in case submodules are
updated manually.

Fixes #5619
This commit is contained in:
Scott Shawcroft 2021-11-29 16:19:22 -08:00
parent f8493db217
commit 0a27f7c3ab
No known key found for this signature in database
GPG Key ID: 0DFD512649C052DA
2 changed files with 6 additions and 0 deletions

1
.gitmodules vendored
View File

@ -198,3 +198,4 @@
path = ports/broadcom/firmware
url = https://github.com/raspberrypi/rpi-firmware.git
branch = master
shallow = true

View File

@ -321,3 +321,8 @@ clean-nrf:
clean-stm:
$(MAKE) -C ports/stm BOARD=feather_stm32f405_express clean
.PHONY: fetch-submodules
fetch-submodules:
git submodule update --init -N --depth 1
git submodule foreach 'git fetch --tags --depth 1 origin $$sha1 && git checkout -q $$sha1'