summaryrefslogtreecommitdiff
path: root/cmd/license.c
AgeCommit message (Collapse)Author
2020-05-18command: Remove the cmd_tbl_t typedefSimon Glass
We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-08-11common: Move gzip functions into a new gzip headerSimon Glass
As part of the effort to remove things from common.h, create a new header for the gzip functions. Move the function declarations to it and add missing documentation. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-02-08cmd: rework "license" commandMasahiro Yamada
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>
2016-03-22cmd: Fix license commandTom Rini
The license command isn't usually built and has a few problems: - The rules to generate license.h haven't worked in a long time, re-write these based on the bmp_logo.h rules. - 'tok' is unused and the license text size has increased - bin2header.c wasn't grabbing unistd.h to know the prototype for read(). Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2016-01-25Remove the cmd_ prefix from command filesSimon Glass
Now that they are in their own directory, we can remove this prefix. This makes it easier to find a file since the prefix does not get in the way. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Stefan Roese <sr@denx.de> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>