summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rwxr-xr-xtests/load_kernel_tests.sh2
-rw-r--r--tests/verify_kernel.c (renamed from futility/cmd_verify_kernel.c)9
3 files changed, 5 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index f18051cd..9b1c2aaa 100644
--- a/Makefile
+++ b/Makefile
@@ -596,7 +596,6 @@ FUTIL_SRCS = \
futility/cmd_vbutil_kernel.c \
futility/cmd_vbutil_key.c \
futility/cmd_vbutil_keyblock.c \
- futility/cmd_verify_kernel.c \
futility/traversal.c \
futility/vb1_helper.c
@@ -662,6 +661,7 @@ TEST_NAMES = \
tests/vboot_firmware_tests \
tests/vboot_kernel_tests \
tests/vboot_nvstorage_test \
+ tests/verify_kernel \
tests/futility/binary_editor \
tests/futility/test_not_really
@@ -1130,6 +1130,7 @@ ${BUILD}/tests/vboot_common2_tests: LDLIBS += ${CRYPTO_LIBS}
${BUILD}/tests/vboot_common3_tests: LDLIBS += ${CRYPTO_LIBS}
${BUILD}/tests/vb20_common2_tests: LDLIBS += ${CRYPTO_LIBS}
${BUILD}/tests/vb20_common3_tests: LDLIBS += ${CRYPTO_LIBS}
+${BUILD}/tests/verify_kernel: LDLIBS += ${CRYPTO_LIBS}
${TEST21_BINS}: LDLIBS += ${CRYPTO_LIBS}
diff --git a/tests/load_kernel_tests.sh b/tests/load_kernel_tests.sh
index c8422fd3..d5f41f25 100755
--- a/tests/load_kernel_tests.sh
+++ b/tests/load_kernel_tests.sh
@@ -69,7 +69,7 @@ dd if=kernel.test of=disk.test bs=512 seek=64 conv=notrunc
# And verify it using futility
echo 'Verifying test disk image'
-${FUTILITY} verify_kernel disk.test \
+${BUILD_RUN}/tests/verify_kernel disk.test \
${SCRIPT_DIR}/devkeys/kernel_subkey.vbpubk
happy 'Image verification succeeded'
diff --git a/futility/cmd_verify_kernel.c b/tests/verify_kernel.c
index ffdf7d0f..2f5943d2 100644
--- a/futility/cmd_verify_kernel.c
+++ b/tests/verify_kernel.c
@@ -14,7 +14,6 @@
#include "vboot_common.h"
#include "vboot_api.h"
#include "vboot_kernel.h"
-#include "futility.h"
static uint8_t *diskbuf;
@@ -55,11 +54,11 @@ VbError_t VbExDiskWrite(VbExDiskHandle_t handle, uint64_t lba_start,
static void print_help(const char *progname)
{
- printf("\nUsage: " MYNAME " %s <disk_image> <kernel.vbpubk>\n\n",
+ printf("\nUsage: %s <disk_image> <kernel.vbpubk>\n\n",
progname);
}
-static int do_verify_kernel(int argc, char *argv[])
+int main(int argc, char *argv[])
{
VbPublicKey *kernkey;
uint64_t disk_bytes = 0;
@@ -136,7 +135,3 @@ static int do_verify_kernel(int argc, char *argv[])
printf("Yaay!\n");
return 0;
}
-
-DECLARE_FUTIL_COMMAND(verify_kernel, do_verify_kernel,
- "Verifies a kernel / disk image",
- print_help);