diff --git a/.gitmodules b/.gitmodules index 98661eef49..d1f1a31f4d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -198,3 +198,4 @@ path = ports/broadcom/firmware url = https://github.com/raspberrypi/rpi-firmware.git branch = master + shallow = true diff --git a/Makefile b/Makefile index 747592cbc2..8906a80ad7 100644 --- a/Makefile +++ b/Makefile @@ -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'