From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot,v2,3/3] cmd: rework "license" command
Date: Wed, 8 Feb 2017 22:01:44 -0500 [thread overview]
Message-ID: <20170209030144.GC26129@bill-the-cat> (raw)
In-Reply-To: <1485742328-32398-4-git-send-email-yamada.masahiro@socionext.com>
On Mon, Jan 30, 2017 at 11:12:08AM +0900, Masahiro Yamada wrote:
> The previous commit ("add a new command to show .config contents")
> improves the basic infrastructure of "embed a compressed file into
> the U-Boot image, and print it by a command". The same pattern for
> the "license" command.
>
> This commit reworks the command to improve the following:
>
> [1] Improve log style
>
> Kbuild style log
>
> GZIP cmd/license_data.gz
> CHK cmd/license_data_gz.h
> UPD cmd/license_data_gz.h
> CHK cmd/license_data_size.h
> UPD cmd/license_data_size.h
>
> instead of the bare Make log:
>
> cat ./Licenses/gpl-2.0.txt | gzip -9 -c | \
> tools/bin2header license_gzip > ./include/license.h
>
> [2] Collect related code into the "cmd" directory
>
> Prior to this commit, the license.h was created by tools/Makefile,
> placed under the "include" directory, included from cmd/license.c,
> and deleted by the top-level Makefile. It is not a good idea to
> scatter related code.
>
> [3] Drop the fixed-malloc size LICENSE_MAX
>
> Just allocate the minimum required size of buffer because we know
> the size of the original gpl-2.0.txt.
>
> [4] Fix more issues
>
> Terminate the buffer with zero to prevent puts() from over-running.
> Add "static" to do_license.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170208/1aea0f64/attachment-0001.sig>
prev parent reply other threads:[~2017-02-09 3:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-30 2:12 [U-Boot] [PATCH v2 0/3] cmd: add "config" command, rework "license" command Masahiro Yamada
2017-01-30 2:12 ` [U-Boot] [PATCH v2 1/3] scripts: import bin2c.c from Linux 4.10-rc6 Masahiro Yamada
2017-02-06 15:33 ` Simon Glass
2017-02-07 2:38 ` Bin Meng
2017-02-07 12:23 ` Masahiro Yamada
2017-02-07 12:26 ` Tom Rini
2017-02-09 3:01 ` [U-Boot] [U-Boot, v2, " Tom Rini
2017-01-30 2:12 ` [U-Boot] [PATCH v2 2/3] cmd: add a new command "config" to show .config contents Masahiro Yamada
2017-02-06 15:33 ` Simon Glass
2017-02-06 15:59 ` Masahiro Yamada
2017-02-09 3:01 ` [U-Boot] [U-Boot, v2, " Tom Rini
2017-01-30 2:12 ` [U-Boot] [PATCH v2 3/3] cmd: rework "license" command Masahiro Yamada
2017-02-06 15:33 ` Simon Glass
2017-02-09 3:01 ` Tom Rini [this message]
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=20170209030144.GC26129@bill-the-cat \
--to=trini@konsulko.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