From 1c1198a3f252a9af91a128263c9ee25682cf7160 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Fri, 17 Sep 2021 19:41:27 +0200 Subject: scripts: allow building USB loader tools for target as well We currently build the USB loader tools only for the host (build) system, but it can be useful to cross compile them as well for the target. We already have some target tools, but support for those is easier, because they don't link against libraries. We use pkg-config to get cc and ld flags, but we always assume that pkg-config is for the host system and there is no well-defined way to request pkg-config for the target system. Support this by introducing a new CROSS_PKG_CONFIG. This will be consulted only for target tools and default to $(CROSS_COMPILE)pkgconfig. Users can override it as necessary, for example, with Yocto, pkg-config will be for the cross environment, so target tools can now be built with: export ARCH=sandbox CROSS_COMPILE=aarch64-linux-gnu- export CROSS_PKG_CONFIG=pkg-config scripts make targettools_defconfig make scripts Signed-off-by: Ahmad Fatoum Link: https://lore.barebox.org/20210917174127.23345-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer --- scripts/.gitignore | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts/.gitignore') diff --git a/scripts/.gitignore b/scripts/.gitignore index 9577d568ed..cf645ec746 100644 --- a/scripts/.gitignore +++ b/scripts/.gitignore @@ -8,6 +8,7 @@ bareboximd kallsyms kwbimage kwboot +kwboot-target gen_netx_image omap_signGP mk-omap-image @@ -27,7 +28,9 @@ mxsboot mxs-usb-loader /omap3-usb-loader omap4_usbboot +omap4_usbboot-target omap3-usb-loader +omap3-usb-loader-target mips-relocs rsatoc stm32image -- cgit v1.2.3