summaryrefslogtreecommitdiff
path: root/tools/fit_check_sign.c
AgeCommit message (Collapse)AuthorFilesLines
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini1-2/+1
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>
2015-10-24Fix bad return value checks (detected with Coccinelle)Thomas Huth1-1/+1
In the "Getting Started with Coccinelle - KVM edition" presentation that has been held by Julia Lawall at the KVM forum 2015 (see the slides at http://events.linuxfoundation.org/sites/events/files/slides/tutorial_kvm_0.pdf), she pointed out some bad return value checks in U-Boot that can be detected with Coccinelle by using the following config file: @@ identifier x,y; identifier f; statement S; @@ x = f(...); ( if (x < 0) S | if ( - y + x < 0) S ) This patch now fixes these issues. Signed-off-by: Thomas Huth <huth@tuxfamily.org>
2014-06-19Enhance fit_check_sign to check all imagesSimon Glass1-2/+5
At present this tool only checks the configuration signing. Have it also look at each of the images in the configuration and confirm that they verify. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de> (v1)
2014-06-19Reverse the meaning of the fit_config_verify() return codeSimon Glass1-2/+1
It is more common to have 0 mean OK, and -ve mean error. Change this function to work the same way to avoid confusion. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-19tools: Check arguments in fit_check_sign/fit_infoSimon Glass1-0/+9
These tools crash if no arguments are provided. Add checks to avoid this. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de>
2014-06-12mkimage: Automatically make space in FDT when fullSimon Glass1-2/+2
When adding hashes or signatures, the target FDT may be full. Detect this and automatically try again after making 1KB of space. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-12Improve error handling in fit_commonSimon Glass1-2/+2
Make the error handling common, and make sure the file is always closed on error. Rename the parameter to be more description and add comments. Signed-off-by: Simon Glass <sjg@chromium.org>
2014-06-05Prevent a stack overflow in fit_check_signMichael van der Westhuizen1-2/+3
It is trivial to crash fit_check_sign by invoking with an absolute path in a deeply nested directory. This is exposed by vboot_test.sh. Signed-off-by: Michael van der Westhuizen <michael@smart-africa.com> Acked-by: Simon Glass <sjg@chromium.org>
2014-03-22tools, fit_check_sign: verify a signed fit imageHeiko Schocher1-0/+85
add host tool "fit_check_sign" which verifies, if a fit image is signed correct. Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Simon Glass <sjg@chromium.org>