OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # Helper script that generates the signed kernel image | 7 # Helper script that generates the signed kernel image |
8 | 8 |
9 . "$(dirname "$0")/common.sh" | 9 . "$(dirname "$0")/common.sh" |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 DEFINE_integer verity_max_ios 1024 \ | 30 DEFINE_integer verity_max_ios 1024 \ |
31 "Optional number of outstanding I/O operations. (Default: 1024)" | 31 "Optional number of outstanding I/O operations. (Default: 1024)" |
32 | 32 |
33 # Parse flags | 33 # Parse flags |
34 FLAGS "$@" || exit 1 | 34 FLAGS "$@" || exit 1 |
35 eval set -- "${FLAGS_ARGV}" | 35 eval set -- "${FLAGS_ARGV}" |
36 set -e | 36 set -e |
37 | 37 |
38 # Common kernel command-line args | 38 # Common kernel command-line args |
39 common_args="quiet console=tty2 init=/sbin/init boot=local rootwait ro noresume" | 39 common_args="quiet console=tty2 init=/sbin/init boot=local rootwait ro noresume" |
40 common_args="${common_args} noswap loglevel=1" | 40 common_args="${common_args} noswap loglevel=1 ${FLAGS_boot_args}" |
41 | 41 |
42 # Common verified boot command-line args | 42 # Common verified boot command-line args |
43 verity_common="dm_verity.error_behavior=${FLAGS_verity_error_behavior}" | 43 verity_common="dm_verity.error_behavior=${FLAGS_verity_error_behavior}" |
44 verity_common="${verity_common} dm_verity.max_bios=${FLAGS_verity_max_ios}" | 44 verity_common="${verity_common} dm_verity.max_bios=${FLAGS_verity_max_ios}" |
45 | 45 |
46 # Populate the x86 rootfs to support legacy and EFI bios config templates. | 46 # Populate the x86 rootfs to support legacy and EFI bios config templates. |
47 # The templates are used by the installer to populate partition 12 with | 47 # The templates are used by the installer to populate partition 12 with |
48 # the correct bootloader configuration. | 48 # the correct bootloader configuration. |
49 # While we transition to that model, extlinux.conf will still be used | 49 # While we transition to that model, extlinux.conf will still be used |
50 # on the root filesystem. | 50 # on the root filesystem. |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 EOF | 196 EOF |
197 if [[ ${FLAGS_enable_rootfs_verification} -eq ${FLAGS_TRUE} ]]; then | 197 if [[ ${FLAGS_enable_rootfs_verification} -eq ${FLAGS_TRUE} ]]; then |
198 sudo sed -i -e 's/^set default=.*/set default=2/' \ | 198 sudo sed -i -e 's/^set default=.*/set default=2/' \ |
199 "${FLAGS_to}/efi/boot/grub.cfg" | 199 "${FLAGS_to}/efi/boot/grub.cfg" |
200 fi | 200 fi |
201 info "Emitted ${FLAGS_to}/efi/boot/grub.cfg" | 201 info "Emitted ${FLAGS_to}/efi/boot/grub.cfg" |
202 exit 0 | 202 exit 0 |
203 fi | 203 fi |
204 | 204 |
205 info "The target platform does not use bootloader templates." | 205 info "The target platform does not use bootloader templates." |
OLD | NEW |