From: Ahmad Fatoum <ahmad@a3f.at>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <ahmad@a3f.at>, Johannes Zink <j.zink@pengutronix.de>
Subject: [PATCH master 1/4] Revert "imx-usb-loader: add commandline option for displaying version number"
Date: Thu, 25 May 2023 20:13:17 +0200 [thread overview]
Message-ID: <20230525181320.2277320-1-ahmad@a3f.at> (raw)
include/generated/utsrelease.h is only generated in the prepare make
target, which is not a dependency of the scripts make target. Builds of
the scripts target, e.g. sandbox $(make hosttools_defconfig; make scripts),
may thus fail because the file had not yet been generated:
<command-line>: fatal error: /build/source/include/generated/utsrelease.h:
No such file or directory
compilation terminated.
That scripts doesn't depend on prepare may be due to scripts/kconfig.
The kernel may side step this issue by having tools not needed for
prepare in a separate tools/.
Until this is resolved, revert commit c1b50061f4b33482ae749f9d6d6c92aa5bf6b37a.
Cc: Johannes Zink <j.zink@pengutronix.de>
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
scripts/imx/Makefile | 2 +-
scripts/imx/imx-usb-loader.c | 22 +---------------------
2 files changed, 2 insertions(+), 22 deletions(-)
diff --git a/scripts/imx/Makefile b/scripts/imx/Makefile
index b3be3886d8eb..dbfa82910a55 100644
--- a/scripts/imx/Makefile
+++ b/scripts/imx/Makefile
@@ -3,7 +3,7 @@
hostprogs-always-$(CONFIG_ARCH_IMX_IMXIMAGE) += imx-image
hostprogs-always-$(CONFIG_ARCH_IMX_USBLOADER) += imx-usb-loader
-HOSTCFLAGS_imx-usb-loader.o = `pkg-config --cflags libusb-1.0` -include $(objtree)/include/generated/utsrelease.h
+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`
diff --git a/scripts/imx/imx-usb-loader.c b/scripts/imx/imx-usb-loader.c
index 676f077c2557..839288f753cc 100644
--- a/scripts/imx/imx-usb-loader.c
+++ b/scripts/imx/imx-usb-loader.c
@@ -46,10 +46,6 @@
#define FT_DCD 0xee
#define FT_LOAD_ONLY 0x00
-#ifndef UTS_RELEASE
-#define UTS_RELEASE "unknown"
-#endif
-
/*
* comment from libusb:
* As per the USB 3.0 specs, the current maximum limit for the depth is 7.
@@ -1530,15 +1526,9 @@ static void usage(const char *prgname)
"-p <devpath> Specify device path: <bus>-<port>[.<port>]...\n"
"-s skip DCD included in image\n"
"-v verbose (give multiple times to increase)\n"
- "--version display version number\n"
"-h this help\n", prgname);
}
-static void version(const char *prgname)
-{
- fprintf(stderr, "%s %s\n", prgname, UTS_RELEASE);
-}
-
int main(int argc, char *argv[])
{
libusb_device **devs;
@@ -1554,20 +1544,10 @@ int main(int argc, char *argv[])
char *initfile = NULL;
char *devpath = NULL;
char *devtype = NULL;
- int opt_version = 0;
- struct option long_options[] = {
- {"version", no_argument, &opt_version, 1},
- { }
- };
w.do_dcd_once = 1;
- while ((opt = getopt_long(argc, argv, "cvhd:i:p:s", long_options, NULL)) != -1) {
- if (opt_version) {
- version(argv[0]);
- exit(EXIT_SUCCESS);
- }
-
+ while ((opt = getopt(argc, argv, "cvhd:i:p:s")) != -1) {
switch (opt) {
case 'c':
verify = 1;
--
2.38.4
next reply other threads:[~2023-05-25 18:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-25 18:13 Ahmad Fatoum [this message]
2023-05-25 18:13 ` [PATCH master 2/4] ARM: rockchip: pine64-quartz64: add sdram-init.bin to .gitignore Ahmad Fatoum
2023-05-25 18:13 ` [PATCH master 3/4] scripts: kwbimage: check return value of asprintf Ahmad Fatoum
2023-05-25 18:13 ` [PATCH master 4/4] scripts: omap3-usb-loader: fix heap overflow Ahmad Fatoum
2023-05-26 5:46 ` [PATCH master 1/4] Revert "imx-usb-loader: add commandline option for displaying version number" Johannes Zink
2023-05-26 6:20 ` Ahmad Fatoum
2023-05-26 7:12 ` Johannes Zink
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230525181320.2277320-1-ahmad@a3f.at \
--to=ahmad@a3f.at \
--cc=barebox@lists.infradead.org \
--cc=j.zink@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox