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

Issue 1567013: Clean up temporary files and directories left by build_image, etc. (Closed)

Created:
10 years, 8 months ago by Bill Richardson
Modified:
9 years, 6 months ago
Reviewers:
adlr, kobic
CC:
chromium-os-reviews_chromium.org
Visibility:
Public.

Description

Clean up temporary files and directories, add utilities. Remove the temporary rootfs.image file and others that are left by build_image and related scripts. Also added tool to emit scripts that can pack and unpack the combined disk image.

Patch Set 1 #

Total comments: 1

Patch Set 2 : Emit scripts to pack/unpack the image. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -6 lines) Patch
M src/scripts/build_gpt.sh View 1 3 chunks +8 lines, -0 lines 0 comments Download
M src/scripts/build_image View 3 chunks +5 lines, -3 lines 0 comments Download
A src/scripts/emit_gpt_scripts.sh View 1 chunk +68 lines, -0 lines 4 comments Download
M src/scripts/image_to_usb.sh View 4 chunks +5 lines, -2 lines 0 comments Download
M src/scripts/mod_image_for_test.sh View 2 chunks +4 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
Bill Richardson
10 years, 8 months ago (2010-04-01 00:13:16 UTC) #1
adlr
http://codereview.chromium.org/1567013/diff/1/3 File src/scripts/build_image (right): http://codereview.chromium.org/1567013/diff/1/3#newcode360 src/scripts/build_image:360: rm -f "${ROOT_FS_IMG}" "${STATEFUL_IMG}" "${OUTPUT_DIR}/vmlinuz.image" can you emit a ...
10 years, 8 months ago (2010-04-01 00:24:16 UTC) #2
Bill Richardson
10 years, 8 months ago (2010-04-01 01:28:20 UTC) #3
adlr
LGTM w/ comments http://codereview.chromium.org/1567013/diff/5001/6003 File src/scripts/emit_gpt_scripts.sh (right): http://codereview.chromium.org/1567013/diff/5001/6003#newcode1 src/scripts/emit_gpt_scripts.sh:1: #!/bin/bash -x take out -x http://codereview.chromium.org/1567013/diff/5001/6003#newcode22 ...
10 years, 8 months ago (2010-04-01 02:14:12 UTC) #4
kobic
Just a quick comment about that change. I personally used to like the idea that ...
10 years, 8 months ago (2010-04-01 17:12:12 UTC) #5
kobic
> > Let me know if my issue is unclear and I'll try to rephrase ...
10 years, 8 months ago (2010-04-01 17:14:21 UTC) #6
Bill Richardson
10 years, 8 months ago (2010-04-01 17:26:45 UTC) #7
You can still mount the images directly. Look at the pack/unpack scripts to
see the location of the partition you want, multiply the start by 512 and
pass it as the offset to the loop mount command. For example, if I want to
mount rootfs, I'd do this:


blackadder$ ls
chromiumos_image.bin  pack_partitions.sh*  unpack_partitions.sh*
blackadder$ cat unpack_partitions.sh
#!/bin/sh -eu
# generated file. do not edit.
TARGET=${1:-}
if [[ -z "$TARGET" ]]; then
  echo "Usage: $0 DEVICE" 1>&2
  exit 1
fi
set -x
#     start     size  index  contents
#         0        1         PMBR (Boot GUID:
6b3c805c-4247-464d-9234-2cfa54d3d2a0)
#         1        1         Pri GPT header
#         2       32         Pri GPT table
#        34        6
#        40     5512      2  GPT part - "KERN-A" (ID:
f78add51-46d3-442f-9d78-c3df0c6110cc)
#      5552  1310720      1  GPT part - "STATE" (ID:
1b1a1cea-d3dc-4535-b629-2af06ac8077d)
#   1316272  1310720      3  GPT part - "ROOT-A" (ID:
6b3c805c-4247-464d-9234-2cfa54d3d2a0)
#   2626992       32         Sec GPT table
#   2627024        1         Sec GPT header
sudo dd if="$TARGET" of=part_1 bs=512 skip=5552 count=1310720
sudo dd if="$TARGET" of=part_2 bs=512 skip=40 count=5512
sudo dd if="$TARGET" of=part_3 bs=512 skip=1316272 count=1310720
blackadder$ mkdir rootfs
blackadder$ sudo mount -o loop,offset=$((1316272 * 512))
chromiumos_image.bin rootfs
blackadder$ ls rootfs/
bin/   build/  etc/   ibus.schemas  lost+found/  mnt/  postinst@  root/
 share/  tmp/  var/
boot/  dev/    home/  lib/          media/       opt/  proc/      sbin/
 sys/    usr/
blackadder$


Bill

On Thu, Apr 1, 2010 at 10:14 AM, <kobicaf@gmail.com> wrote:

>
>
>  Let me know if my issue is unclear and I'll try to rephrase it.
>>
>
> Just noticed Bill's posting on chromium os dev. There are scripts to
> extract the
> images.
> That's cool.
>
> thx!
>
> Kobi.
>
> http://codereview.chromium.org/1567013
>

Powered by Google App Engine
This is Rietveld 408576698