From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/4 v2] tools: add a directory to store some useful user-facing tools
Date: Mon, 19 Jun 2017 17:42:27 +0200 [thread overview]
Message-ID: <20170619154227.GA3045@scaer> (raw)
In-Reply-To: <594724d64eae6_575014c74204877b@ultri3.mail>
Ricardo, All,
On 2017-06-18 22:11 -0300, Ricardo Martincoski spake thusly:
> On Sun, Jun 18, 2017 at 11:01 AM, Yann E. MORIN wrote:
> > Add a tools directory to store useful little scripts, tools, etc...
> > Users may add that directory in their PATH if they want to, but this
> > is not mandatory.
> >
> > Add the first tool: brmake, a small script that redirects the build
> > output log to a file, keeping just Buildroot's own messages, with the
> > date+time added at the start of the line.
> >
> > We need to unbuffer the output of make so that, when the script is
> > interrupted (SIGINT, ^C), there is no lingering output not yet digested
> > by the logger loop.
> >
> > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> > Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
> > Cc: Arnout Vandecappelle <arnout@mind.be>
>
> I tested the script and it works very well in general.
>
> - I successfully built the qemu_arm_versatile_defconfig using the script,
> pressing CTRL+C a few times and resuming by calling it again.
> - Also, by inserting an error to a package I got the expected behaviour: the
> error message is in the log file and the script returned the error code.
> - Tested using 'GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)'
>
> BUT if it is called without a .config file, it hangs forever waiting for input,
> and the menuconfig is sent to the log file.
Indeed, my use-case is to only use it in an already-configured tree.
> Maybe we can bailout if no .config is present.
Hmmm... It's not trivial do detect, because the .config file is not
necessarily in the current directory, for example:
brmake -C /pat/to/buil-dir
and I don't want to write a make option interpeter either...
But I'll see what I can do.
> Also, 2 small nits below.
>
> > +++ b/tools/00-README.txt
> > @@ -0,0 +1,9 @@
> > +This directory contains various useful scripts and tools for working
> > +with Buildroot. You need not add this directory in your PATH to use
> > +any of those tools, but you may do so if you want.
> > +
> > +brmake
> > + a script that can be run instead of make, that prepends the date in
> > + front of each line, redirects all of the build output to a file
> > + ("'br.log' in the current directory), and just ouputs the Buildroot
>
> Maybe this file will be dropped as discussed in
> http://patchwork.ozlabs.org/patch/777446/
> If not, there is a typo
>
> ouputs -> outputs
Yup, I already dropped the file locally.
> > + messages (those lines starting with >>>) on stdout.
> > diff --git a/tools/brmake b/tools/brmake
> > new file mode 100755
> > index 0000000000..9f7b4bc65f
> > --- /dev/null
> > +++ b/tools/brmake
> > @@ -0,0 +1,37 @@
> > +#!/bin/bash
> > +# (C) 2016, "Yann E. MORIN" <yann.morin.1998@free.fr>
> > +# License: WTFPL, https://spdx.org/licenses/WTFPL.html
> > +
> > +main() {
> > + local ret start d h m mf fs
>
> fs is unused.
OK. Thanks for the review and tests! :-)
Regards,
Yann E. MORIN.
> Regards,
> Ricardo
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2017-06-19 15:42 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-18 14:01 [Buildroot] [PATCH 0/4 v2] tools: add a directory to contain usefull user-facing tools Yann E. MORIN
2017-06-18 14:01 ` [Buildroot] [PATCH 1/4 v2] tools: add a directory to store some useful " Yann E. MORIN
2017-06-19 1:11 ` Ricardo Martincoski
2017-06-19 15:42 ` Yann E. MORIN [this message]
2017-06-21 2:06 ` Ricardo Martincoski
2017-06-21 5:21 ` Yann E. MORIN
2017-06-21 21:44 ` Arnout Vandecappelle
2017-06-22 19:18 ` Yann E. MORIN
2017-06-18 14:01 ` [Buildroot] [PATCH 2/4 v2] tools: move test-pkg out of support/scripts Yann E. MORIN
2017-06-18 14:12 ` Thomas Petazzoni
2017-06-18 14:16 ` Yann E. MORIN
2017-06-22 7:57 ` Arnout Vandecappelle
2017-06-22 8:13 ` Thomas Petazzoni
2017-06-22 8:30 ` Arnout Vandecappelle
2017-06-22 19:20 ` Yann E. MORIN
2017-06-18 14:01 ` [Buildroot] [PATCH 3/4 v2] tools: move get-developers out of support/scripts/ Yann E. MORIN
2017-06-18 14:01 ` [Buildroot] [PATCH 4/4 v2] tools: move check-package " Yann E. MORIN
2017-06-19 1:13 ` Ricardo Martincoski
2017-06-19 18:46 ` Yann E. MORIN
2017-06-19 3:22 ` Ricardo Martincoski
2017-06-19 18:48 ` Yann E. MORIN
2017-06-19 20:27 ` Ricardo Martincoski
2017-06-18 14:15 ` [Buildroot] [PATCH 0/4 v2] tools: add a directory to contain usefull user-facing tools Thomas Petazzoni
2017-06-18 14:23 ` Yann E. MORIN
2017-06-21 22:04 ` Arnout Vandecappelle
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=20170619154227.GA3045@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/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