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 legacy/efi bootloader partitions. | 7 # Helper script that generates the legacy/efi bootloader partitions. |
8 # It does not populate the templates, but can update a loop device. | 8 # It does not populate the templates, but can update a loop device. |
9 | 9 |
10 # --- BEGIN COMMON.SH BOILERPLATE --- | 10 # --- BEGIN COMMON.SH BOILERPLATE --- |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 # mount again for cleanup to free resource gracefully | 208 # mount again for cleanup to free resource gracefully |
209 sudo mount -o ro "${ESP_DEV}" "${ESP_FS_DIR}" | 209 sudo mount -o ro "${ESP_DEV}" "${ESP_FS_DIR}" |
210 fi | 210 fi |
211 elif [[ "${FLAGS_arch}" = "arm" ]]; then | 211 elif [[ "${FLAGS_arch}" = "arm" ]]; then |
212 # Copy u-boot script to ESP partition | 212 # Copy u-boot script to ESP partition |
213 if [ -r "${FLAGS_from}/boot-A.scr.uimg" ]; then | 213 if [ -r "${FLAGS_from}/boot-A.scr.uimg" ]; then |
214 sudo mkdir -p "${ESP_FS_DIR}/u-boot" | 214 sudo mkdir -p "${ESP_FS_DIR}/u-boot" |
215 sudo cp "${FLAGS_from}/boot-A.scr.uimg" \ | 215 sudo cp "${FLAGS_from}/boot-A.scr.uimg" \ |
216 "${ESP_FS_DIR}/u-boot/boot.scr.uimg" | 216 "${ESP_FS_DIR}/u-boot/boot.scr.uimg" |
217 fi | 217 fi |
218 # Create VbNvContext storage file to ESP partition | |
219 sudo mkdir -p "${ESP_FS_DIR}/u-boot" | |
220 sudo dd if=/dev/zero of="${ESP_FS_DIR}/u-boot/nvcxt.bin" bs=512 count=1 | |
221 fi | 218 fi |
222 | 219 |
223 set +e | 220 set +e |
OLD | NEW |