Skip to content

Commit d5957bb

Browse files
committed
BUILDING: lead with the submodules one board actually needs
The first thing a new contributor is told to run is fetch-all-submodules, which pulls the submodules of every port. Measured on a checkout that has them all, now that the broadcom port is gone: 5.7 GB of git data, against 501 MB for everything a raspberry_pi_pico build touches - about a tenth of it. fetch-port-submodules and fetch-board-submodules already exist and do the narrow thing, and CI uses the same resolver. They were just the second option in the text, and the board one was not mentioned at all; `make help` listed only the fetch-all target. So this reorders the section to lead with the board target, keeps the port one for people building several boards of a port, and leaves fetch-all for people who really do build more than one port. No behaviour change.
1 parent ac3ad80 commit d5957bb

2 files changed

Lines changed: 17 additions & 5 deletions

File tree

‎BUILDING.md‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,20 @@ Please ensure you set up your build environment appropriately, as per the guide.
2525

2626
This project has a bunch of git submodules. You will need to update them regularly.
2727

28-
In the root folder of the CircuitPython repository, execute the following:
28+
Fetch only what the board you are building needs. From the root folder of the CircuitPython
29+
repository:
2930

30-
make fetch-all-submodules
31+
make -C ports/raspberrypi fetch-board-submodules BOARD=raspberry_pi_pico
32+
33+
Or everything one port needs, which is what you want if you build several boards from it:
3134

32-
Or, in the ports directory for the particular port you are building, do:
35+
make -C ports/raspberrypi fetch-port-submodules
3336

34-
make fetch-port-submodules
37+
There is also a target that fetches the submodules of every port at once. That is a few gigabytes
38+
against a few hundred megabytes for one board, so reach for it only if you really are building for
39+
more than one port:
40+
41+
make fetch-all-submodules
3542

3643
### Required Python Packages
3744

‎Makefile‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,13 @@ help:
9393
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
9494
@echo " linkcheck to check all external links for integrity"
9595
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
96-
@echo " fetch-all-submodules to fetch submodules for all ports"
96+
@echo " fetch-all-submodules to fetch submodules for all ports (several GB)"
9797
@echo " remove-all-submodules remove all submodules, including files and .git/ data"
98+
@echo ""
99+
@echo "To build one board you only need its own submodules, which is a much smaller"
100+
@echo "download. From a port directory:"
101+
@echo " make fetch-board-submodules BOARD=<board> submodules for one board"
102+
@echo " make fetch-port-submodules submodules for every board of that port"
98103

99104
clean:
100105
rm -rf $(BUILDDIR)/*

0 commit comments

Comments
 (0)