• Masahiro Yamada's avatar
    cmd: rework "license" command · d726f225
    Masahiro Yamada authored
    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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
    Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
    d726f225
Name
Last commit
Last update
..
binman Loading commit data...
buildman Loading commit data...
dtoc Loading commit data...
easylogo Loading commit data...
env Loading commit data...
gdb Loading commit data...
kermit Loading commit data...
logos Loading commit data...
omap Loading commit data...
patman Loading commit data...
scripts Loading commit data...
tbot Loading commit data...
.gitignore Loading commit data...
Makefile Loading commit data...
aisimage.c Loading commit data...
aisimage.h Loading commit data...
atmel_pmecc_params.c Loading commit data...
atmelimage.c Loading commit data...
bmp_logo.c Loading commit data...
default_image.c Loading commit data...
dumpimage.c Loading commit data...
dumpimage.h Loading commit data...
envcrc.c Loading commit data...
fdt_host.h Loading commit data...
fdtgrep.c Loading commit data...
fit_check_sign.c Loading commit data...
fit_common.c Loading commit data...
fit_common.h Loading commit data...
fit_image.c Loading commit data...
fit_info.c Loading commit data...
gen_eth_addr.c Loading commit data...
genboardscfg.py Loading commit data...
getline.c Loading commit data...
getline.h Loading commit data...
gpheader.h Loading commit data...
gpimage-common.c Loading commit data...
gpimage.c Loading commit data...
ifdtool.c Loading commit data...
ifdtool.h Loading commit data...
image-host.c Loading commit data...
imagetool.c Loading commit data...
imagetool.h Loading commit data...
img2brec.sh Loading commit data...
img2srec.c Loading commit data...
imximage.c Loading commit data...
imximage.h Loading commit data...
jtagconsole Loading commit data...
kwbimage.c Loading commit data...
kwbimage.h Loading commit data...
kwboot.c Loading commit data...
lpc32xximage.c Loading commit data...
microcode-tool Loading commit data...
microcode-tool.py Loading commit data...
mingw_support.c Loading commit data...
mingw_support.h Loading commit data...
mkenvimage.c Loading commit data...
mkexynosspl.c Loading commit data...
mkimage.c Loading commit data...
mkimage.h Loading commit data...
mksunxiboot.c Loading commit data...
moveconfig.py Loading commit data...
mxsboot.c Loading commit data...
mxsimage.c Loading commit data...
mxsimage.h Loading commit data...
ncb.c Loading commit data...
netconsole Loading commit data...
omapimage.c Loading commit data...
omapimage.h Loading commit data...
os_support.c Loading commit data...
os_support.h Loading commit data...
pbl_crc32.c Loading commit data...
pbl_crc32.h Loading commit data...
pblimage.c Loading commit data...
pblimage.h Loading commit data...
proftool.c Loading commit data...
relocate-rela.c Loading commit data...
rkcommon.c Loading commit data...
rkcommon.h Loading commit data...
rkimage.c Loading commit data...
rkmux.py Loading commit data...
rksd.c Loading commit data...
rkspi.c Loading commit data...
socfpgaimage.c Loading commit data...
ublimage.c Loading commit data...
ublimage.h Loading commit data...
ubsha1.c Loading commit data...
vybridimage.c Loading commit data...
xway-swap-bytes.c Loading commit data...
zynqimage.c Loading commit data...
zynqmpimage.c Loading commit data...