]> git.baikalelectronics.ru Git - uboot.git/commit
common: Move host-only logic in image-sig.c to separate file
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>
Wed, 14 Jul 2021 22:05:37 +0000 (17:05 -0500)
committerTom Rini <trini@konsulko.com>
Fri, 16 Jul 2021 16:58:55 +0000 (12:58 -0400)
commit1676c9c8ed1cd26257d9ec4c9a740f9f1b215145
tree2f2cff5857d93185ce313f11d46c223fd74b35bc
parent8a6ac901c0450bc5d791e4279780b510ac2abf0f
common: Move host-only logic in image-sig.c to separate file

image-sig.c is used to map a hash or crypto algorithm name to a
handler of that algorithm. There is some similarity between the host
and target variants, with the differences worked out by #ifdefs. The
purpose of this change is to remove those ifdefs.

First, copy the file to a host-only version, and remove target
specific code. Although it looks like we are duplicating code,
subsequent patches will change the way target algorithms are searched.
Besides we are only duplicating three string to struct mapping
functions. This isn't something to fuss about.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
tools/Makefile
tools/image-sig-host.c [new file with mode: 0644]