From: Masahiro Yamada <masahiroy@kernel.org>
To: u-boot@lists.denx.de
Subject: [PATCH 1/2] fixdep: handle CONFIG_IS_ENABLE() and friends for TPL
Date: Thu, 16 Apr 2020 14:01:44 +0900 [thread overview]
Message-ID: <20200416050145.492334-2-masahiroy@kernel.org> (raw)
In-Reply-To: <20200416050145.492334-1-masahiroy@kernel.org>
Since commit f1c6e1922eb5 ("spl: dm: use CONFIG_IS_ENABLED to test for
the DM option"), CONFIG_IS_ENABLED() handles CONFIG_TPL_* options, but
fixdep still cannot because it hard-codes the "SPL_" prefix as follows:
char tmp_buf[256] = "SPL_"; /* hack for U-Boot */
Take care of the "TPL_" prefix too.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
scripts/basic/fixdep.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index c9277d782c..555dada47a 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -103,7 +103,7 @@
#include <stdio.h>
#include <ctype.h>
-int is_spl_build = 0; /* hack for U-Boot */
+char tmp_buf[256]; /* hack for U-Boot */
static void usage(void)
{
@@ -230,7 +230,6 @@ static void parse_config_file(const char *p)
{
const char *q, *r;
const char *start = p;
- char tmp_buf[256] = "SPL_"; /* hack for U-Boot */
while ((p = strstr(p, "CONFIG_"))) {
if (p > start && (isalnum(p[-1]) || p[-1] == '_')) {
@@ -260,7 +259,7 @@ static void parse_config_file(const char *p)
while (isalnum(*q) || *q == '_')
q++;
r = q;
- if (r > p && is_spl_build) {
+ if (r > p && tmp_buf[0]) {
memcpy(tmp_buf + 4, p, r - p);
r = tmp_buf + 4 + (r - p);
p = tmp_buf;
@@ -419,8 +418,11 @@ int main(int argc, char *argv[])
cmdline = argv[3];
/* hack for U-Boot */
- if (!strncmp(target, "spl/", 4) || !strncmp(target, "tpl/", 4))
- is_spl_build = 1;
+ if (!strncmp(target, "spl/", 4))
+ strcpy(tmp_buf, "SPL_");
+ else if (!strncmp(target, "tpl/", 4))
+ strcpy(tmp_buf, "TPL_");
+ /* end U-Boot hack */
printf("cmd_%s := %s\n\n", target, cmdline);
--
2.25.1
next prev parent reply other threads:[~2020-04-16 5:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-16 5:01 [PATCH 0/2] fixdep: fix a bug for TPL, and re-sync with Linux Masahiro Yamada
2020-04-16 5:01 ` Masahiro Yamada [this message]
2020-04-24 17:12 ` [PATCH 1/2] fixdep: handle CONFIG_IS_ENABLE() and friends for TPL Tom Rini
2020-04-16 5:01 ` [PATCH 2/2] fixdep: Re-sync with Linux 5.7-rc1 Masahiro Yamada
2020-04-24 17:12 ` Tom Rini
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=20200416050145.492334-2-masahiroy@kernel.org \
--to=masahiroy@kernel.org \
--cc=u-boot@lists.denx.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