| 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 . "$(dirname "$0")/common.sh" | 10 . "$(dirname "$0")/common.sh" |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 # TODO(wad) assume usb_disk contains the arm boot location for now. | 200 # TODO(wad) assume usb_disk contains the arm boot location for now. |
| 201 new_root="${FLAGS_usb_disk}" | 201 new_root="${FLAGS_usb_disk}" |
| 202 info "Replacing dm slave devices with /dev/${new_root}" | 202 info "Replacing dm slave devices with /dev/${new_root}" |
| 203 dm_table="${dm_table//ROOT_DEV/\/dev\/${new_root}}" | 203 dm_table="${dm_table//ROOT_DEV/\/dev\/${new_root}}" |
| 204 dm_table="${dm_table//HASH_DEV/\/dev\/${new_root}}" | 204 dm_table="${dm_table//HASH_DEV/\/dev\/${new_root}}" |
| 205 | 205 |
| 206 warn "FIXME: cannot replace root= here for the arm bootloader yet." | 206 warn "FIXME: cannot replace root= here for the arm bootloader yet." |
| 207 dm_table="" # TODO(wad) Clear it until we can fix root=/dev/dm-0 | 207 dm_table="" # TODO(wad) Clear it until we can fix root=/dev/dm-0 |
| 208 | 208 |
| 209 # Copy u-boot script to ESP partition | 209 # Copy u-boot script to ESP partition |
| 210 sudo mkdir -p "${ESP_FS_DIR}/u-boot" | 210 if [ -r "${FLAGS_from}/boot-A.scr.uimg" ]; then |
| 211 sudo cp "${FLAGS_from}/boot-A.scr.uimg" "${ESP_FS_DIR}/u-boot/boot.scr.uimg" | 211 sudo mkdir -p "${ESP_FS_DIR}/u-boot" |
| 212 sudo cp "${FLAGS_from}/boot-A.scr.uimg" \ |
| 213 "${ESP_FS_DIR}/u-boot/boot.scr.uimg" |
| 214 fi |
| 212 fi | 215 fi |
| 213 | 216 |
| 214 set +e | 217 set +e |
| OLD | NEW |