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

Side by Side Diff: create_esp.sh

Issue 2829039: [PATCH 4/5] update_bootloaders.sh, create_esp.sh: add two helpers (Closed)
Patch Set: Created 10 years, 5 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 | « no previous file | update_bootloaders.sh » ('j') | update_bootloaders.sh » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/bin/bash
2
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
5 # found in the LICENSE file.
6
7 # Creates an empty ESP image.
8
9 . "$(dirname "$0")/common.sh"
10
11 get_default_board
12
13 # Flags.
14 DEFINE_string to "/tmp/esp.img" \
15 "Path to esp image (Default: /tmp/esp.img)"
16
17 # Parse flags
18 FLAGS "$@" || exit 1
19 eval set -- "${FLAGS_ARGV}"
20 set -e
21
22 if [[ -e "${FLAGS_to}" ]]; then
23 info "ESP already exists: ${FLAGS_to}"
24 exit 0
25 fi
26
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
29 # BIOS). We only need this for x86, but it's simpler and safer to keep the
30 # disk images the same for both x86 and ARM.
31 # NOTE: The size argument for mkfs.vfat is in 1024-byte blocks.
32 # We'll hard-code it to 16M for now.
33 ESP_BLOCKS=16384
34 /usr/sbin/mkfs.vfat -C "${FLAGS_to}" ${ESP_BLOCKS}
OLDNEW
« no previous file with comments | « no previous file | update_bootloaders.sh » ('j') | update_bootloaders.sh » ('J')

Powered by Google App Engine
This is Rietveld 408576698