From d34e8525744b65b10165e172d9404c9dabeeae09 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Mon, 8 Apr 2024 18:51:07 +0200 Subject: [PATCH] Hook into toolchain-external for legal-info extraction External pre-built toolchains are usually distrubuted as binary-only and currently (Buildroot 2023.02) do not have a license file. Infix use the Bootlin toolchains, built from Buildroot, which contains a summary.csv file with all packages, and licenses, used. This commit adds that csv, under the name toolchain-external-bootlin.csv, to the legal-info output directory. Signed-off-by: Joachim Wiberg --- external.mk | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/external.mk b/external.mk index a5ef8f48..18c3c019 100644 --- a/external.mk +++ b/external.mk @@ -29,3 +29,16 @@ define FRR_POST_BUILD_HOOK endef FRR_POST_BUILD_HOOKS += FRR_POST_BUILD_HOOK + +# +# External pre-built toolchains do not carry their own license. +# +# The Bootlin toolchains used by Infix are built from Buildroot and +# compose a .csv file of all components included in the toolchain. +# +define TOOLCHAIN_BOOTLIN_POST_HOOK + cp $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)/summary.csv \ + $(LEGAL_INFO_DIR)/toolchain-external-bootlin.csv +endef + +TOOLCHAIN_EXTERNAL_BOOTLIN_POST_LEGAL_INFO_HOOKS += TOOLCHAIN_BOOTLIN_POST_HOOK