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

Side by Side Diff: kernel_fetcher.sh

Issue 4027001: kernel_fetcher.sh: use ro for rootfs.image (Closed) Base URL: http://git.chromium.org/git/crosutils.git
Patch Set: 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 | « 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) 2009 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2009 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 # Load common constants. This should be the first executable line. 7 # Load common constants. This should be the first executable line.
8 # The path to common.sh should be relative to your script's location. 8 # The path to common.sh should be relative to your script's location.
9 . "$(dirname "$0")/common.sh" 9 . "$(dirname "$0")/common.sh"
10 10
(...skipping 29 matching lines...) Expand all
40 } 40 }
41 41
42 trap do_cleanup EXIT 42 trap do_cleanup EXIT
43 43
44 # 44 #
45 # Set up loop device. This time it is used to fetch the built kernel from the 45 # Set up loop device. This time it is used to fetch the built kernel from the
46 # root image. This kernel is then written to the fourth partition. 46 # root image. This kernel is then written to the fourth partition.
47 # 47 #
48 echo "Fetching kernel from root image..." 48 echo "Fetching kernel from root image..."
49 mkdir /tmp/kernel_fetch.$$ 49 mkdir /tmp/kernel_fetch.$$
50 sudo mount -o loop "${FLAGS_from}/rootfs.image" /tmp/kernel_fetch.$$ 50 sudo mount -o ro,loop "${FLAGS_from}/rootfs.image" /tmp/kernel_fetch.$$
51 51
52 echo "Writing kernel to ${FLAGS_to} at ${FLAGS_offset}..." 52 echo "Writing kernel to ${FLAGS_to} at ${FLAGS_offset}..."
53 sudo "${SCRIPTS_DIR}"/file_copy.py \ 53 sudo "${SCRIPTS_DIR}"/file_copy.py \
54 if=/tmp/kernel_fetch.$$/boot/vmlinux.uimg \ 54 if=/tmp/kernel_fetch.$$/boot/vmlinux.uimg \
55 of="${FLAGS_to}" \ 55 of="${FLAGS_to}" \
56 seek_bytes="${FLAGS_offset}" 56 seek_bytes="${FLAGS_offset}"
57 echo "Done." 57 echo "Done."
58 58
59 do_cleanup 59 do_cleanup
60 60
61 trap - EXIT 61 trap - EXIT
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