Skip to content

Commit

Permalink
Add ChromeOS futility tool and automatic signing
Browse files Browse the repository at this point in the history
futility is built from these sources:
https://github.com/jcadduono/platform_external_vboot_reference
Commit reference 4b06fdee95

Signed-off-by: James Christopher Adduono <[email protected]>
  • Loading branch information
jcadduono committed Jan 10, 2017
1 parent c89049d commit 7aa5a05
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
20 changes: 20 additions & 0 deletions nethunter-installer/boot-patcher/boot-patcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,24 @@ samsung_tag() {
fi
}

# sign the boot image with futility if it was a ChromeOS boot image
sign_chromeos() {
[ -f "$split_img/boot.img-chromeos" ] || return
print "Signing ChromeOS boot image..."
cd "$tmp"
mv boot-new.img boot-new-unsigned.img
echo " " > empty
# sign the new boot image (using AOSP dev kernel test-keys)
"$bin/chromeos/futility" vbutil_kernel \
--pack boot-new.img \
--vmlinuz boot-new-unsigned.img \
--config empty --bootloader empty \
--verbose --arch "$ARCH" --version 1 \
--keyblock "$bin/chromeos/kernel.keyblock" \
--signprivate "$bin/chromeos/kernel_data_key.vbprivk" \
--flags 0x1 || abort "Failed to sign ChromeOS boot image!"
}

# backup old boot image
backup_boot() {
[ "$boot_backup" ] || return
Expand Down Expand Up @@ -293,6 +311,8 @@ build_boot

samsung_tag

sign_chromeos

verify_size

backup_boot
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit 7aa5a05

Please sign in to comment.