summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Kallai <kadam@inf.u-szeged.hu>2018-05-31 08:41:42 +0200
committerchrome-bot <chrome-bot@chromium.org>2018-06-01 17:44:51 -0700
commit2cc35b0f31fe1cf69ce6781e7d502f07c64c93c9 (patch)
tree004005bb789c5e9def87aa3950ddd83e8946d2d9
parent04e3f3125a7ab6c1d104515c6ab788da4bb3f657 (diff)
downloadvboot-2cc35b0f31fe1cf69ce6781e7d502f07c64c93c9.tar.gz
futility: Add --arch=arm64 option to vbutil_kernel
vbutil_kernel already supports 64bit arm architecture, but it just allows "aarch64" option. However other script, for example build_kernel_image uses ARCH environment variable, which for arm64-generic overlay is defined as "arm64". So vbutil_kernel will refuse the call. BUG=None TEST=run vbutil_kernel --arch=arm64 Check that the "Unknown architecture string: arm64" is gone BRANCH=None Change-Id: I94c547d6b6940ab8c622a6b8cff49b5f83c1fcad Reviewed-on: https://chromium-review.googlesource.com/1080529 Commit-Ready: Adam Kallai <kadam@inf.u-szeged.hu> Tested-by: Adam Kallai <kadam@inf.u-szeged.hu> Reviewed-by: Mike Frysinger <vapier@chromium.org>
-rw-r--r--futility/cmd_vbutil_kernel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/futility/cmd_vbutil_kernel.c b/futility/cmd_vbutil_kernel.c
index cdd44923..0f6502a7 100644
--- a/futility/cmd_vbutil_kernel.c
+++ b/futility/cmd_vbutil_kernel.c
@@ -299,7 +299,8 @@ static int do_vbutil_kernel(int argc, char *argv[])
if ((!strncasecmp(optarg, "x86", 3)) ||
(!strcasecmp(optarg, "amd64")))
arch = ARCH_X86;
- else if ((!strcasecmp(optarg, "arm")) ||
+ /* check the first 3 characters to also detect arm64 */
+ else if ((!strncasecmp(optarg, "arm", 3)) ||
(!strcasecmp(optarg, "aarch64")))
arch = ARCH_ARM;
else if (!strcasecmp(optarg, "mips"))