• 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"
14check_hw_and_sw_write_protect_enabled
15
16echo "Validating initial state"
17check_has_mp_rw_firmware
18check_has_mp_ro_firmware
19check_running_rw_firmware
20check_is_rollback_set_to_initial_val
21
22echo "Rebooting into RO version"
23reboot_ec_to_ro
24
25echo "Validating that we're now running the RO version"
26check_running_ro_firmware
27
28echo "Validating flash protection hasn't changed"
29check_hw_and_sw_write_protect_enabled
30
31echo "Rebooting back into RW"
32reboot_ec
33
34echo "Validating we're now running RW version"
35check_running_rw_firmware
36
37echo "Validating flash protection hasn't changed"
38check_hw_and_sw_write_protect_enabled
39