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

Issue 3581007: crosutils: Improve dd to usb in image_to_usb.sh (Closed)

Created:
10 years, 2 months ago by Hung-Te
Modified:
9 years, 7 months ago
Reviewers:
Kenneth Waters, sosa
CC:
chromium-os-reviews_chromium.org, Mandeep Singh Baines, anush
Visibility:
Public.

Description

crosutils: Improve dd in image_to_usb.sh 1. add oflags=sync to allow interrupting dd without hanging system I/O for a long time (since bs=4M, the speed is almost the same) 2. use pv to provide progress report if available. (add pv into host-depends in http://codereview.chromium.org/3608004) BUG=none TEST=manually: 1. install pv in chroot, then execute image_to_usb.sh --to /dev/sdX and verified there's progress bar 2. ctrl-c to break the dd process and verified it can stop immediately 3. remove pv from chroot, then execute image_to_usb.sh and verify that it still works Change-Id: I62fc373a4feee6d7e61897325d9e1e6d84a74d63 Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=4732d5d

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -1 line) Patch
M image_to_usb.sh View 1 chunk +5 lines, -1 line 1 comment Download

Messages

Total messages: 17 (0 generated)
Hung-Te
10 years, 2 months ago (2010-10-01 12:01:49 UTC) #1
Kenneth Waters
Add either "crosutils:" or "scripts:" to the front of the first line of the change ...
10 years, 2 months ago (2010-10-01 17:16:24 UTC) #2
sosa
Also if you make this change you need to add assert_inside_chroot to the top since ...
10 years, 2 months ago (2010-10-01 17:22:02 UTC) #3
Kenneth Waters
> Also if you make this change you need to add I forgot that this ...
10 years, 2 months ago (2010-10-01 17:25:26 UTC) #4
Hung-Te
The description title and TEST line is fixed. Thanks for the suggestion
10 years, 2 months ago (2010-10-01 17:34:13 UTC) #5
sosa
Yup that sounds good. Note if you want to redirect stdout and stderr to one ...
10 years, 2 months ago (2010-10-01 17:35:36 UTC) #6
Kenneth Waters
> Note if you want to redirect stdout and stderr > to one place you ...
10 years, 2 months ago (2010-10-01 17:36:44 UTC) #7
sosa
I didn't know that. Thanks for the info! On Fri, Oct 1, 2010 at 10:36 ...
10 years, 2 months ago (2010-10-01 17:39:03 UTC) #8
Kenneth Waters
lgtm.
10 years, 2 months ago (2010-10-01 17:39:23 UTC) #9
kliegs
I've seen other CL's using this format (even after being mentioned that its not POSIX). ...
10 years, 2 months ago (2010-10-01 17:43:38 UTC) #10
kliegs
Can image_to_usb run inside the chroot now? Last I heard it couldn't and we were ...
10 years, 2 months ago (2010-10-01 17:44:51 UTC) #11
Kenneth Waters
> Can image_to_usb run inside the chroot now? Last I heard it couldn't and we ...
10 years, 2 months ago (2010-10-01 17:46:08 UTC) #12
Kenneth Waters
> I've seen other CL's using this format (even after being mentioned that its > ...
10 years, 2 months ago (2010-10-01 17:52:51 UTC) #13
kliegs
Yah - I recall you catching me on that CL. I ended up passing your ...
10 years, 2 months ago (2010-10-01 17:57:46 UTC) #14
Kenneth Waters
On 2010/10/01 17:57:46, kliegs wrote: > Yah - I recall you catching me on that ...
10 years, 2 months ago (2010-10-01 18:02:33 UTC) #15
sosa
I would really like to see this too. I have a P1 assigned to me ...
10 years, 2 months ago (2010-10-01 18:05:55 UTC) #16
kliegs
10 years, 2 months ago (2010-10-01 18:12:04 UTC) #17
I definitely support a style guide that at minimum is enforced on any future
CL's even if we don't have the time to back port it.  It will keep us
cleaner moving forward.

Had a tough time tracing a file which didn't indent functions the other day
so any steps towards cleaner shell scripts would be great.

Just because they're scripts doesn't mean they're not code!

-Jon

On Fri, Oct 1, 2010 at 2:05 PM, Chris Sosa <sosa@chromium.org> wrote:

> I would really like to see this too.  I have a P1 assigned to me for
> doing this but haven't had any time to get to it.  Right now our style
> in these scripts is all over the place.
>
> On Fri, Oct 1, 2010 at 11:02 AM,  <kwaters@chromium.org> wrote:
> > On 2010/10/01 17:57:46, kliegs wrote:
> >>
> >> Yah - I recall you catching me on that CL.  I ended up passing your
> >> comments
> >> on to another CL but it got overlooked and I wasn't positive on the
> >> correct
> >> procedure for host vs. target to push on it so was hoping to head
> towards
> >> some consensus here.  I think it'd be good to have a single method for
> >> doing
> >> this.  Scripts can easily migrate between host and target as you said
> >> (explicitly by common include files or implicitly with cut and paste) so
> >> making sure the code runs on both is a good thing.
> >
> > There is no consistent style for our shell scripts.  Every few days I
> > consider
> > publishing one (there is an internal one to start from), and then
> auditing
> > all
> > of our shell.
> >
> > I wish <<-EOF wasn't tied to hard tabs.
> >
> > http://codereview.chromium.org/3581007/show
> >
>

Powered by Google App Engine
This is Rietveld 408576698