From: Alper Nebi Yasak <alpernebiyasak@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH 2/3] binman: Use target-specific tools when cross-compiling
Date: Sun, 6 Sep 2020 02:04:02 +0300 [thread overview]
Message-ID: <4bba3731-2bc2-08a9-e590-f525ccbdd737@gmail.com> (raw)
In-Reply-To: <CAPnjgZ2PYgzK+jy_3TVWd3PyfyWULxxs4rfTcpM1D_99bYFr6A@mail.gmail.com>
On 05/09/2020 19:37, Simon Glass wrote:
> This looks good, but it drops the use of DTC to specify the
> device-tree compiler. Can you add it back?
I think you're referring to this hunk:
> # If we don't have a directory, put it in the tools tempdir
> search_list = []
> for path in search_paths:
> search_list.extend(['-i', path])
> - args = ['-I', 'dts', '-o', dtb_output, '-O', 'dtb',
> + dtc, args = tools.GetTargetCompileTool('dtc')
> + args += ['-I', 'dts', '-o', dtb_output, '-O', 'dtb',
> '-W', 'no-unit_address_vs_reg']
> args.extend(search_list)
> args.append(dts_input)
> - dtc = os.environ.get('DTC') or 'dtc'
> command.Run(dtc, *args, capture_stderr=capture_stderr)
> return dtb_output
where I removed the os.environ.get('DTC'). Instead of that, I get the
command for dtc from GetTargetCompileTool('dtc'), which does check the
'DTC' environment variable:
> +def GetTargetCompileTool(name, cross_compile=None):
> [...]
> + env = dict(os.environ)
> +
> + target_name = None
> + extra_args = []
> + if name in ('as', 'ld', 'cc', 'cpp', 'ar', 'nm', 'ldr', 'strip',
> + 'objcopy', 'objdump', 'dtc'):
> + target_name, *extra_args = env.get(name.upper(), '').split(' ')
> +
> + if target_name:
> + return target_name, extra_args
If that's not convincing enough: running 'DTC=false binman test' gets me
a lot of test errors that I don't get without the 'DTC=false'.
next prev parent reply other threads:[~2020-09-05 23:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-05 14:43 [PATCH 0/3] binman: Make tests work on non-x86 architectures via cross-compilation Alper Nebi Yasak
2020-09-05 14:43 ` [PATCH 1/3] binman: Support cross-compiling test files to x86 Alper Nebi Yasak
2020-09-05 16:36 ` Simon Glass
2020-09-05 22:51 ` Alper Nebi Yasak
2020-09-06 0:17 ` Simon Glass
2020-09-05 14:43 ` [PATCH 2/3] binman: Use target-specific tools when cross-compiling Alper Nebi Yasak
2020-09-05 16:37 ` Simon Glass
2020-09-05 23:04 ` Alper Nebi Yasak [this message]
2020-09-06 0:17 ` Simon Glass
2020-09-05 14:43 ` [PATCH 3/3] binman: Allow resolving host-specific tools from env vars Alper Nebi Yasak
2020-09-05 16:37 ` Simon Glass
2020-09-05 23:16 ` Alper Nebi Yasak
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=4bba3731-2bc2-08a9-e590-f525ccbdd737@gmail.com \
--to=alpernebiyasak@gmail.com \
--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