summaryrefslogtreecommitdiff
path: root/third_party/rules.mk
Commit message (Collapse)AuthorAgeFilesLines
* make: Fix ec+cryptoc's no-change remake behaviorCraig Hesling2020-12-291-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the cryptoc (specifically libcryptoc.a) target is marked as always PHONY. That means that any project that depends on cryptoc will always rebuild ec.bin on make invocations. For example, running make for bloonchipper will show the following build step repeatedly, even though nothing in libcryptoc changed: $ make BOARD=bloonchipper MAKE cryptoc/libcryptoc.a LD RW/ec.RW.elf NM RW/ec.RW.smap OBJCOPY RW/ec.RW.flat LD RO/ec.RO.elf NM RO/ec.RO.smap OBJCOPY RO/ec.RO.flat SIGN RW/ec.RW.flat.sig CAT ec.obj OBJCOPY ec.bin SIGN ec.bin EXTR_RW ec.bin MV ec.bin *** 80068 bytes in flash ... on bloonchipper RO **** *** 477576 bytes in flash ... on bloonchipper RW **** This fix brings the dirty/clean state of cryptoc into the main EC make process, so that it can assess if libcryptoc.a (and later ec.bin) actually need to be remade. We do something similar for the ec version header file that is generated by the build system itself. https://github.com/coreboot/chrome-ec/blob/ef6a915de0a2b65c18c03074b66717d597675162/Makefile.rules#L593,L595 This change was only possible with the fix to cryptoc's Makefile crrev.com/c/2091999 . With this change, projects that depend on cryptoc will not always force an unnecessary recompilation, so the above bloonchipper example look like the following after the initial build: $ make BOARD=bloonchipper *** 80068 bytes in flash ... on bloonchipper RO **** *** 477576 bytes in flash ... on bloonchipper RW **** BRANCH=none BUG=none TEST=rm -rf build make BOARD=bloonchipper make BOARD=bloonchipper # Check that nothing needed to be made TEST=rm -rf build make buildall -j7 make BOARD=bloonchipper # Check that nothing needed to be made Cq-Depend: chromium:2091999 Change-Id: I3f4d88c9d673f2dc7e29122699521f0f52f7572d Signed-off-by: Craig Hesling <hesling@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2593881 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
* make: Add comment about libcryptocCraig Hesling2020-12-241-0/+3
| | | | | | | | | | | | BRANCH=none BUG=none TEST=none Change-Id: I5ccc42014cfd0b08299c0eff9f39047047cbf07b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2602636 Tested-by: Craig Hesling <hesling@chromium.org> Reviewed-by: Yicheng Li <yichengli@chromium.org> Commit-Queue: Craig Hesling <hesling@chromium.org>
* make: Rename cryptoc path variableCraig Hesling2020-12-241-3/+3
| | | | | | | | | | | | | | | Clarify that the variable means the directory path vs the library name. BRANCH=none BUG=none TEST=make BOARD=bloonchipper TEST=# Create a dummy commit ./util/compare_build.sh -b fp Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I03a1fe03da678a972091925f61bdfafaec0d4a46 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2593880 Reviewed-by: Yicheng Li <yichengli@chromium.org>
* make: Move libcryptoc rules to third_party/rules.mkCraig Hesling2020-12-241-0/+47
This moves the libcryptoc hooks from common/build.mk to third_party/rules.mk. Recall that Makefile.rules actually contains all of the "rules"/recipes for making objects. It alone contains all of the build output beautification commands and control. Makefile.rules is included as the last step in the master Makefile. This brings no firmware change, as verified with compare_build.sh. BRANCH=none BUG=none TEST=./util/compare_build.sh -b fp TEST=./util/compare_build.sh -b fp -p # This fails due to the differing position of # -lcryptoc, -lfpsensor, -lfpalgorithm, and/or -lfpbep. Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I8d8493536a0e56ac6a5a1a32827b99ae97723727 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2092163 Reviewed-by: Yicheng Li <yichengli@chromium.org>