Files
OpenCellular/utility/enable_dev_usb_boot
Hung-Te Lin b4b324a8b4 utility: Add "enable_dev_usb_boot".
A shortcut and easier way to enable USB booting without always calling the huge
firmware updater.

BRANCH=none
BUG=none
TEST=./enable_dev_usb_boot # successfully set dev_usb_boot value.

Change-Id: I9ebb3ce79ef58bc0a32926866d5e1827a92b6e74
Reviewed-on: https://gerrit.chromium.org/gerrit/33046
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2012-09-12 20:39:46 -07:00

39 lines
969 B
Bash
Executable File

#!/bin/sh
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
alert() {
echo "$*" >&2
}
die() {
alert "ERROR: $*"
exit 1
}
case "$(crossystem fwid 2>/dev/null || true)" in
Mario.* )
die "Sorry, your platform does not support booting from USB."
;;
Alex.* | ZGB.* )
# For these legacy platforms, we need to re-flash firmware to get USB boot.
chromeos-firmwareupdate --mode=todev || die "Failed to enable USB boot."
;;
"" )
die "Sorry, your firmware does not look like ChromeOS firmware."
;;
* )
crossystem dev_boot_usb=1 2>/dev/null || die "Failed to enable USB boot."
echo "
SUCCESS: Booting any self-signed kernel from SSD/USB/SDCard slot is enabled.
Insert bootable media into USB / SDCard slot and press Ctrl-U in developer
screen to boot your self-signed image.
"
;;
esac