blob: cbe09092a805a764102da18387bcd604b8415809 [file] [log] [blame]
# /bin/bash
# Copyright 2017 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.
# Loads script libraries.
SCRIPT_ROOT=$(dirname "$(readlink -f "$0")")
. "${SCRIPT_ROOT}/" || exit 1
Command to rebuild firmware after a config change.
After you make a change to the firmware version in the master configuration,
run this script to test it. It will rebuild the master configuration, update
the Manifest and build the new firmware. You can then submit your CL to update
the master configuration, safe in the knowledge that you have tested it.
cros_update_firmware <board>
where <board> is the board whose firmware needs updating (e.g. 'coral').
# Script must be run inside the chroot.
restart_in_chroot_if_needed "$@"
# Flags
DEFINE_string board "${DEFAULT_BOARD}" "Which board the firmware is for" b
# Parse command line.
FLAGS "$@" || exit 1
eval set -- "${FLAGS_ARGV}"
update_firmware() {
local board="$1"
local base ebuild
cros_workon --board="${board}" start chromeos-config-bsp \
touch "${ebuild}"
"ebuild-${board}" "${ebuild}" manifest
"emerge-${board}" -q chromeos-config-bsp chromeos-config \
main() {
if [[ -z "${FLAGS_board}" ]]; then
die_notrace "-b or --board required."
update_firmware "${FLAGS_board}"
main "$@"