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

Side by Side Diff: create_esp.sh

Issue 3448022: build_image: Merge x86 and ARM where possible. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git
Patch Set: Codereview ate my homework. Created 10 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « build_image ('k') | image_to_usb.sh » ('j') | 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 # Creates an empty ESP image. 7 # Creates an empty ESP image.
8 8
9 . "$(dirname "$0")/common.sh" 9 . "$(dirname "$0")/common.sh"
10 10
11 get_default_board 11 get_default_board
12 12
13 # Flags. 13 # Flags.
14 DEFINE_string to "/tmp/esp.img" \ 14 DEFINE_string to "/tmp/esp.img" \
15 "Path to esp image (Default: /tmp/esp.img)" 15 "Path to esp image (Default: /tmp/esp.img)"
16 16
17 # Parse flags 17 # Parse flags
18 FLAGS "$@" || exit 1 18 FLAGS "$@" || exit 1
19 eval set -- "${FLAGS_ARGV}" 19 eval set -- "${FLAGS_ARGV}"
20 set -e 20 set -e
21 21
22 if [[ -e "${FLAGS_to}" ]]; then 22 if [[ -e "${FLAGS_to}" ]]; then
23 info "ESP already exists: ${FLAGS_to}" 23 info "ESP already exists: ${FLAGS_to}"
24 exit 0 24 exit 0
25 fi 25 fi
26 26
27 info "Creating a new esp image at ${FLAGS_to}" anyway. 27 info "Creating a new esp image at ${FLAGS_to}" anyway.
28 # Create EFI System Partition to boot stock EFI BIOS (but not ChromeOS EFI 28 # Create EFI System Partition to boot stock EFI BIOS (but not ChromeOS EFI
29 # BIOS). We only need this for x86, but it's simpler and safer to keep the 29 # BIOS). ARM uses this space to determine which partition is bootable.
30 # disk images the same for both x86 and ARM.
31 # NOTE: The size argument for mkfs.vfat is in 1024-byte blocks. 30 # NOTE: The size argument for mkfs.vfat is in 1024-byte blocks.
32 # We'll hard-code it to 16M for now. 31 # We'll hard-code it to 16M for now.
33 ESP_BLOCKS=16384 32 ESP_BLOCKS=16384
34 /usr/sbin/mkfs.vfat -C "${FLAGS_to}" ${ESP_BLOCKS} 33 /usr/sbin/mkfs.vfat -C "${FLAGS_to}" ${ESP_BLOCKS}
OLDNEW
« no previous file with comments | « build_image ('k') | image_to_usb.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698