Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(444)

Side by Side Diff: update_bootloaders.sh

Issue 3109018: make_image: Install u-boot scripts to ESP partition. (Closed) Base URL: ssh://git@chromiumos-git//crosutils.git
Patch Set: merge. Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « bin/cros_make_image_bootable ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 fi 199 fi
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 device=1 209 # Copy u-boot script to ESP partition
210 MBR_SCRIPT_UIMG=$(make_arm_mbr \ 210 sudo mkdir -p "${ESP_FS_DIR}/u-boot"
211 ${FLAGS_kernel_partition_offset} \ 211 sudo cp "${FLAGS_from}/boot-A.scr.uimg" "${ESP_FS_DIR}/u-boot/boot.scr.uimg"
212 ${FLAGS_kernel_partition_sectors} \
213 ${device} \
214 "'dm=\"${dm_table}\"'")
215 sudo dd bs=1 count=`stat --printf="%s" ${MBR_SCRIPT_UIMG}` \
216 if="$MBR_SCRIPT_UIMG" of=${FLAGS_to}
217 info "Emitted new ARM MBR to ${FLAGS_to}"
218 fi 212 fi
219 213
220 set +e 214 set +e
OLDNEW
« no previous file with comments | « bin/cros_make_image_bootable ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698