From 6b50a07f59db7839a0c7aeffbcb92cf05889ffa0 Mon Sep 17 00:00:00 2001 From: Tom Wai-Hong Tam Date: Wed, 25 May 2011 17:00:15 +0800 Subject: [PATCH] Support signing kernel in update_kernel script. This CL is separated from http://gerrit.chromium.org/gerrit/#change,1104 which is depends on the UUID replacement. In order to make update_kernel not break on officail ChromeOS firmware, this CL just signs the kernel and use the original cmdline approach, i.e. /dev/${devname}${rootpart}. TEST=./update_kernel --remote IP BUG=none Change-Id: I6a194da0ebb0b3f5a442b62ffb76186909eb4321 Reviewed-on: http://gerrit.chromium.org/gerrit/1538 Reviewed-by: Che-Liang Chiou Tested-by: Tom Wai-Hong Tam --- update_kernel.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/update_kernel.sh b/update_kernel.sh index a98e88bef5..7de577eb30 100755 --- a/update_kernel.sh +++ b/update_kernel.sh @@ -84,20 +84,23 @@ function learn_partition_and_ro() { } function make_kernelimage() { - + local bootloader_path + local kernel_image if [[ "${FLAGS_arch}" == "arm" ]]; then - ./build_kernel_image.sh --arch=arm \ - --root='/dev/${devname}${rootpart}' \ - --vmlinuz=/build/${FLAGS_board}/boot/vmlinux.uimg --to new_kern.bin + bootloader_path="../build/images/${FLAGS_board}/latest/kernel.scr.uimg" + kernel_image="/build/${FLAGS_board}/boot/vmlinux.uimg" else - vbutil_kernel --pack new_kern.bin \ + bootloader_path="/lib64/bootstub/bootstub.efi" + kernel_image="/build/${FLAGS_board}/boot/vmlinuz" + fi + vbutil_kernel --pack new_kern.bin \ --keyblock /usr/share/vboot/devkeys/kernel.keyblock \ --signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk \ --version 1 \ --config ../build/images/${FLAGS_board}/latest/config.txt \ - --bootloader /lib64/bootstub/bootstub.efi \ - --vmlinuz /build/${FLAGS_board}/boot/vmlinuz - fi + --bootloader "${bootloader_path}" \ + --vmlinuz "${kernel_image}" \ + --arch "${FLAGS_arch}" } function copy_kernelimage() {