• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2
3# Copyright 2019 The Chromium OS Authors. All rights reserved.
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6
7set -e
8
9. $(dirname "$(readlink -f "${0}")")/common.sh
10
11echo "Running test to verify booting into RO works"
12
13echo "Making sure all write protect is enabled"
14enable_sw_write_protect
15check_hw_and_sw_write_protect_enabled
16
17echo "Validating initial state"
18check_has_mp_rw_firmware
19check_has_mp_ro_firmware
20check_running_rw_firmware
21check_is_rollback_set_to_initial_val
22
23echo "Rebooting into RO version"
24reboot_ec_to_ro
25
26echo "Validating that we're now running the RO version"
27check_running_ro_firmware
28
29echo "Validating flash protection hasn't changed"
30check_hw_and_sw_write_protect_enabled
31
32echo "Rebooting back into RW"
33reboot_ec
34
35echo "Validating we're now running RW version"
36check_running_rw_firmware
37
38echo "Validating flash protection hasn't changed"
39check_hw_and_sw_write_protect_enabled
40