diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2021-10-07 14:41:58 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-10-07 14:41:58 +0200 |
commit | ac68239d18f227e56933773a68e2edbe92c6aac7 (patch) | |
tree | 716487b48ff8b453f9d84996036763375bac3ac8 /scripts | |
parent | aa54b4be0a467d6180d4113fc5dbba453202ac6b (diff) | |
parent | 1c1198a3f252a9af91a128263c9ee25682cf7160 (diff) | |
download | barebox-ac68239d18f227e56933773a68e2edbe92c6aac7.tar.gz barebox-ac68239d18f227e56933773a68e2edbe92c6aac7.tar.xz |
Merge branch 'for-next/targettools'
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/.gitignore | 3 | ||||
-rw-r--r-- | scripts/Kconfig | 65 | ||||
-rw-r--r-- | scripts/Makefile | 10 | ||||
-rw-r--r-- | scripts/imx/.gitignore | 1 | ||||
-rw-r--r-- | scripts/imx/Makefile | 10 | ||||
-rw-r--r-- | scripts/imx/imx-target.c | 1 | ||||
-rw-r--r-- | scripts/imx/imx-usb-loader-target.c | 1 | ||||
-rw-r--r-- | scripts/kwboot-target.c | 1 | ||||
-rw-r--r-- | scripts/omap3-usb-loader-target.c | 1 | ||||
-rw-r--r-- | scripts/omap3-usb-loader.c | 2 | ||||
-rw-r--r-- | scripts/omap4_usbboot-target.c | 1 |
11 files changed, 94 insertions, 2 deletions
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 diff --git a/scripts/Kconfig b/scripts/Kconfig index b903486ecd..a490aaa44e 100644 --- a/scripts/Kconfig +++ b/scripts/Kconfig @@ -40,3 +40,68 @@ config OMAP4_HOSTTOOL_USBBOOT You need libusb-1.0 to compile this tool. endmenu + +menu "Target Tools" + +config IMD_TARGET + bool "build bareboximd target tool" + depends on IMD + +config KERNEL_INSTALL_TARGET + bool + prompt "Build kernel-install utility for the target" + help + Enable this to compile the kernel-install script using the cross + compiler. The utility for the target will be under + scripts/kernel-install-target + +config BAREBOXENV_TARGET + bool + prompt "build bareboxenv tool for target" + help + 'bareboxenv' is a tool to access the barebox environment from a running Linux + system. Say yes here to build it for the target. + +config BAREBOXCRC32_TARGET + bool + prompt "build bareboxcrc32 tool for target" + help + 'bareboxcrc32' is a userspacetool to generate the crc32 checksums the same way + barebox does. Say yes here to build it for the target. + +config HAS_TARGET_LIBUSB_1_0 + def_bool $(success,$(CROSS_PKG_CONFIG) --exists libusb-1.0) + help + Ensure $(CROSS_PKG_CONFIG) is set to a valid pkg-config + binary that knows about libusb-1.0 compiled for the + target architecture. + +config MVEBU_KWBOOT_TARGET + bool "kwboot target tool" + help + Say Y here to build the kwboot tool for the target + to bootstrap over UART. + +config ARCH_IMX_USBLOADER_TARGET + depends on HAS_TARGET_LIBUSB_1_0 + bool "imx-usb-loader for target" + help + Say Y here to build the imx-usb-loader tool for the target. + The cross toolchain needs libusb-1.0 to compile this tool. + +config OMAP3_USB_LOADER_TARGET + bool "omap3 USB loader for target" + depends on HAS_TARGET_LIBUSB_1_0 + help + Say Y here to build the omap3 usb loader tool for the target. + The cross toolchain needs libusb-1.0 to compile this tool. + + +config OMAP4_USBBOOT_TARGET + bool "omap4 usbboot for target" + depends on HAS_TARGET_LIBUSB_1_0 + help + Say Y here to build the omap4 usb loader tool for the target. + The cross toolchain needs libusb-1.0 to compile this tool. + +endmenu diff --git a/scripts/Makefile b/scripts/Makefile index eb0f5c5805..1527b07d47 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -41,8 +41,16 @@ userprogs-always-$(CONFIG_BAREBOXENV_TARGET) += bareboxenv-target userprogs-always-$(CONFIG_KERNEL_INSTALL_TARGET) += kernel-install-target userprogs-always-$(CONFIG_BAREBOXCRC32_TARGET) += bareboxcrc32-target userprogs-always-$(CONFIG_IMD_TARGET) += bareboximd-target +userprogs-always-$(CONFIG_OMAP3_USB_LOADER_TARGET) += omap3-usb-loader-target +userprogs-always-$(CONFIG_OMAP4_USBBOOT_TARGET) += omap4_usbboot-target +userprogs-always-$(CONFIG_MVEBU_KWBOOT_TARGET) += kwboot-target -userccflags += -I $(srctree)/$(src)/include +omap3-usb-loader-target-userccflags += `$(CROSS_PKG_CONFIG) --cflags libusb-1.0` +omap3-usb-loader-target-userldlibs += `$(CROSS_PKG_CONFIG) --libs libusb-1.0` +omap4_usbboot-target-userccflags += `$(CROSS_PKG_CONFIG) --cflags libusb-1.0` +omap4_usbboot-target-userldlibs += -lpthread `$(CROSS_PKG_CONFIG) --libs libusb-1.0` + +userccflags += -I $(srctree)/$(src)/include -isystem $(srctree)/scripts/include subdir-y += mod subdir-y += imx diff --git a/scripts/imx/.gitignore b/scripts/imx/.gitignore index 84e6f2b406..341aec9ee4 100644 --- a/scripts/imx/.gitignore +++ b/scripts/imx/.gitignore @@ -1,2 +1,3 @@ imx-usb-loader +imx-usb-loader-target imx-image diff --git a/scripts/imx/Makefile b/scripts/imx/Makefile index 029f9ca9f8..a7f487a045 100644 --- a/scripts/imx/Makefile +++ b/scripts/imx/Makefile @@ -4,13 +4,23 @@ hostprogs-always-$(CONFIG_ARCH_IMX_USBLOADER) += imx-usb-loader HOSTCFLAGS_imx-usb-loader.o = `pkg-config --cflags libusb-1.0` HOSTLDLIBS_imx-usb-loader = `pkg-config --libs libusb-1.0` +imx-usb-loader-target-userccflags += `$(CROSS_PKG_CONFIG) --cflags libusb-1.0` +imx-usb-loader-target-userldlibs += `$(CROSS_PKG_CONFIG) --libs libusb-1.0` + HOSTCFLAGS_imx.o = -I$(srctree)/arch/arm/mach-imx/include +imx-target-userccflags += -I$(srctree)/arch/arm/mach-imx/include HOSTCFLAGS_imx-image.o = -I$(srctree) -I$(srctree)/arch/arm/mach-imx/include HOSTCFLAGS_imx-usb-loader.o += -I$(srctree) -I$(srctree)/arch/arm/mach-imx/include +imx-usb-loader-target-userccflags += -I$(srctree) -I$(srctree)/arch/arm/mach-imx/include ifdef CONFIG_ARCH_IMX_IMXIMAGE_SSL_SUPPORT HOSTCFLAGS_imx-image.o += -DIMXIMAGE_SSL_SUPPORT HOSTLDLIBS_imx-image = `pkg-config --libs openssl` endif imx-usb-loader-objs := imx-usb-loader.o imx.o +imx-usb-loader-target-objs := imx-usb-loader-target.o imx-target.o imx-image-objs := imx-image.o imx.o + +userprogs-always-$(CONFIG_ARCH_IMX_USBLOADER_TARGET) += imx-usb-loader-target + +userccflags += -I $(srctree)/$(src)/include -isystem $(srctree)/scripts/include diff --git a/scripts/imx/imx-target.c b/scripts/imx/imx-target.c new file mode 100644 index 0000000000..4062eed6f6 --- /dev/null +++ b/scripts/imx/imx-target.c @@ -0,0 +1 @@ +#include "imx.c" diff --git a/scripts/imx/imx-usb-loader-target.c b/scripts/imx/imx-usb-loader-target.c new file mode 100644 index 0000000000..f2050aec17 --- /dev/null +++ b/scripts/imx/imx-usb-loader-target.c @@ -0,0 +1 @@ +#include "imx-usb-loader.c" diff --git a/scripts/kwboot-target.c b/scripts/kwboot-target.c new file mode 100644 index 0000000000..68cde2d24c --- /dev/null +++ b/scripts/kwboot-target.c @@ -0,0 +1 @@ +#include "kwboot.c" diff --git a/scripts/omap3-usb-loader-target.c b/scripts/omap3-usb-loader-target.c new file mode 100644 index 0000000000..c99c261a02 --- /dev/null +++ b/scripts/omap3-usb-loader-target.c @@ -0,0 +1 @@ +#include "omap3-usb-loader.c" diff --git a/scripts/omap3-usb-loader.c b/scripts/omap3-usb-loader.c index 599a93856a..0f352c8453 100644 --- a/scripts/omap3-usb-loader.c +++ b/scripts/omap3-usb-loader.c @@ -28,7 +28,7 @@ #include <errno.h> #include <libgen.h> /* for basename */ -#include <libusb-1.0/libusb.h> /* the main event */ +#include <libusb.h> /* the main event */ /* Device specific defines (OMAP) * Primary source: http://www.ti.com/lit/pdf/sprugn4 diff --git a/scripts/omap4_usbboot-target.c b/scripts/omap4_usbboot-target.c new file mode 100644 index 0000000000..3dd6065337 --- /dev/null +++ b/scripts/omap4_usbboot-target.c @@ -0,0 +1 @@ +#include "omap4_usbboot.c" |