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

Side by Side Diff: update_bootloaders.sh

Issue 5165001: crosutils: fix "umount: /tmp/XXX: not mounted" in build_image (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Created 10 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 update_x86_bootloaders "${old_root}" \ 173 update_x86_bootloaders "${old_root}" \
174 "${kernel_cfg}" \ 174 "${kernel_cfg}" \
175 "${ESP_FS_DIR}" \ 175 "${ESP_FS_DIR}" \
176 "${FLAGS_from}" 176 "${FLAGS_from}"
177 177
178 # Install the syslinux loader on the ESP image (part 12) so it is ready when 178 # Install the syslinux loader on the ESP image (part 12) so it is ready when
179 # we cut over from rootfs booting (extlinux). 179 # we cut over from rootfs booting (extlinux).
180 if [[ ${FLAGS_install_syslinux} -eq ${FLAGS_TRUE} ]]; then 180 if [[ ${FLAGS_install_syslinux} -eq ${FLAGS_TRUE} ]]; then
181 sudo umount "${ESP_FS_DIR}" 181 sudo umount "${ESP_FS_DIR}"
182 sudo syslinux -d /syslinux "${ESP_DEV}" 182 sudo syslinux -d /syslinux "${ESP_DEV}"
183 # mount again for cleanup to free resource gracefully
184 sudo mount -o ro "${ESP_DEV}" "${ESP_FS_DIR}"
183 fi 185 fi
184 elif [[ "${FLAGS_arch}" = "arm" ]]; then 186 elif [[ "${FLAGS_arch}" = "arm" ]]; then
185 # Copy u-boot script to ESP partition 187 # Copy u-boot script to ESP partition
186 if [ -r "${FLAGS_from}/boot-A.scr.uimg" ]; then 188 if [ -r "${FLAGS_from}/boot-A.scr.uimg" ]; then
187 sudo mkdir -p "${ESP_FS_DIR}/u-boot" 189 sudo mkdir -p "${ESP_FS_DIR}/u-boot"
188 sudo cp "${FLAGS_from}/boot-A.scr.uimg" \ 190 sudo cp "${FLAGS_from}/boot-A.scr.uimg" \
189 "${ESP_FS_DIR}/u-boot/boot.scr.uimg" 191 "${ESP_FS_DIR}/u-boot/boot.scr.uimg"
190 fi 192 fi
191 fi 193 fi
192 194
193 set +e 195 set +e
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698