Old crossdev would symlink its metadata dir to the chromiumos overlay.
New crossdev manages this itself iff it had created the layout.conf
before. Add an upgrade hook to convert the symlink over to a config
file that crossdev will update.
BUG=chromium-os:26998
TEST=`./update_chroot` with old chroot created metadata overlay that crossdev would update
Change-Id: I03faa78a988e0cd0a94dcd4f0f01151c32bb215b
CQ-DEPEND=I3f2775111da800622591c9b56ba00428d6106207
Reviewed-on: https://gerrit.chromium.org/gerrit/17408
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Now that the bots have run and built gdb binpkgs, release this onto
the wider development community.
BUG=chromium-os:26998
TEST=`./setup_board --board=amd64-generic --usepkg` installed arm-none-eabi/gdb via binpkg
Change-Id: I1f870d7a07662c96d9154d2e4d4777c00f6c9fdc
Reviewed-on: https://gerrit.chromium.org/gerrit/17482
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: asharif <asharif@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
On both x86 and x64(amd64) platforms, we should enable initramfs for
factory install shim so that partner can remove shim.
BUG=chrome-os-partner:8376
TEST=./build_image --board lXXk --factory_install # pass, bootable with initramfs
Change-Id: Ibbb3f71fc287d2db2c9245e11ce5a00cbc353c3a
Reviewed-on: https://gerrit.chromium.org/gerrit/17472
Reviewed-by: Rong Chang <rongchang@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Old default conflicted with a new service running on the DUT.
BUG=None
TEST=Rerun cros_image_to_target
Change-Id: I982b68500d6cb59c884a286229688ee41ff6d76d
Reviewed-on: https://gerrit.chromium.org/gerrit/17434
Reviewed-by: Ryan Cairns <rtc@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
This allows us to simplify the code a bit. Once this shakes out,
there is probably more improvements to be made.
BUG=chromium-os:26998
TEST=`cbuildbot chromiumos-sdk` works
Change-Id: I3f2775111da800622591c9b56ba00428d6106207
CQ-DEPEND=I25153be568e57596dd8ec90cd833da057e08a49a
Reviewed-on: https://gerrit.chromium.org/gerrit/16981
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Now that the linux-headers ebuilds are marked stable, we can drop
the hardcoded version string here and let the scripts do the rest.
BUG=chromium-os:26998
TEST=`cbuildbot chromiumos-sdk` works
Change-Id: I63e91612c711c2a17a3d350fa7703ac5d01116cb
Reviewed-on: https://gerrit.chromium.org/gerrit/16980
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Previously the remote_reboot function produced a large number of
warnings and errors from the ssh process. This replaces it with a
quieter version that periodically (every 5-10s) echos its status.
BUG=None
TEST=Few iterations with x86-alex via a test script and update_kernel.
Change-Id: Id606da64a7e55e902e4119e1dfc9f76cf27d5b5e
Reviewed-on: https://gerrit.chromium.org/gerrit/17139
Commit-Ready: Chris Wolfe <cwolfe@chromium.org>
Reviewed-by: Chris Wolfe <cwolfe@chromium.org>
Tested-by: Chris Wolfe <cwolfe@chromium.org>
No need to output all of the build log by default (including git progress).
BUG=None
TEST=`./setup_board --board=tegra2` works
Change-Id: I12473a0f0d6d13035270640695f3bed53399b6c8
Reviewed-on: https://gerrit.chromium.org/gerrit/17157
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Brian Harring <ferringb@chromium.org>
There's no reason to always show the full build output when updating the
perl modules, so use the --quiet flag. If there is a failure, emerge will
dump the full log like normal.
BUG=None
TEST=`./update_chroot` showed much less output when updating perl modules
Change-Id: I0265443bca0f42a79cc3e44a7f8e9bfeab69f568
Reviewed-on: https://gerrit.chromium.org/gerrit/17080
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
BUG=chrome-os-partner:8235
TEST=Ad hoc, apply update to 64bit, run this script, make sure build works
Change-Id: I43fe93cfc4af2b4904ecb9a3d331769acd2a5e16
Reviewed-on: https://gerrit.chromium.org/gerrit/17115
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
There was a bug in the setup_board where it was selecting cross-compilers
and adding them to @world. Now that's been fixed, undo the damage.
BUG=None
TEST=`./update_chroot && grep ^cross- /var/lib/portage/world` showed nothing
Change-Id: Ide4961def700cf42d95454cc0ce404cb517bdfea
Reviewed-on: https://gerrit.chromium.org/gerrit/16997
Reviewed-by: Brian Harring <ferringb@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
With more interactive features appearing in the scripts, we need to
avoid hanging buildbots waiting for user input. This changes adds
utility functions to test whether and ensure that the execution is
interactive, and adds an assertion to the 'choose' function.
is_interactive: Check that both stdin and stderr are terminals.
assert_interactive: Die with an error if not interactive
Also tweaking 'choose' so that its menu is printed to stderr,
for consistency with read -p and select.
BUG=None
TEST=Modified setup_board to log the value of is_interactive, and
then (unconditionally) attempt to display a menu.
Running setup_board in a terminal showed interactive and the menu.
Manually run cbuildbot x86-generic-pfq showed non-interactive and
the assertion failure.
Change-Id: I768a37b8b85ce036edac7c9bb0fd1e0a2b92ecd5
Reviewed-on: https://gerrit.chromium.org/gerrit/16817
Commit-Ready: Chris Wolfe <cwolfe@chromium.org>
Reviewed-by: Chris Wolfe <cwolfe@chromium.org>
Tested-by: Chris Wolfe <cwolfe@chromium.org>
BUG=chrome-os-partner:8235
TEST=Ad hoc, apply update to 64bit, run this script, make sure build works
Change-Id: If7b39baae1f4f9ab9529b9c00dc7dd49ac2e2987
Reviewed-on: https://gerrit.chromium.org/gerrit/16829
Reviewed-by: Brian Harring <ferringb@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
There's no reason to always show the full build output when updating the
chroot, so use the --quiet flag. If there is a failure, emerge will dump
the full log like normal.
BUG=None
TEST=`cros_sdk --delete && cros_sdk` showed much less output
Change-Id: I062900325d0005db150dbd1267048a7c19df2ac5
Reviewed-on: https://gerrit.chromium.org/gerrit/16977
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: Brian Harring <ferringb@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
BUG=chromium-os:27008
TEST=Verify that link uses amd64-generic prebuilts.
Change-Id: Iefa1beca55382feacf301c982d9e77201f6c25d6
Reviewed-on: https://gerrit.chromium.org/gerrit/16992
Commit-Ready: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
Reviewed-by: Brian Harring <ferringb@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
We need this if we want to call setup_board from a upgrade script.
BUG=chrome-os-partner:8235
TEST=add new upgrade script, run setup_board --skip_version_hooks
ensure new upgrade script isn't run
Change-Id: I31341d0b9a5c378a8288ab42f8506db90c2299fa
Reviewed-on: https://gerrit.chromium.org/gerrit/16941
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
In case people have some of these old pkgs hanging around still, or
happened to manually install them while testing, punt them all from
our board dirs.
BUG=None
TEST=build_packages updated chroot and cleaned out old pkgs in other build dirs
Change-Id: I2b037e668faef39e78f7422f91df2d5493799c0f
Reviewed-on: https://gerrit.chromium.org/gerrit/16818
Reviewed-by: Matt Tennant <mtennant@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
We don't want the compilers listed in @world because we want crossdev to
manually take care of rebuilding everything. Fix bug in previous change
to --select logic where it leaked --select into the compiler install and
the --oneshot didn't override.
BUG=None
TEST=None
Change-Id: I9db3e9149f727a0a74dbb55627d3b71b1064e3b5
Reviewed-on: https://gerrit.chromium.org/gerrit/16940
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
This CL removes verboseness when running ssh commands through
remote_access.sh while preserving the retry.
BUG=chromium-os:20985
TEST=Ran image_to_live.
Change-Id: I26bc5189f369dc2305442755a266b80b27aa2ed7
Reviewed-on: https://gerrit.chromium.org/gerrit/16856
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
We are changing the default emerge options to use --oneshot, so make sure
our scripts select the packages we care about for @world.
BUG=None
TEST=setup_board+build_packages for tegra2 adds pkgs to world
Change-Id: I5fc68c538a1a1c846bd9724f27ef717029d11d42
Reviewed-on: https://gerrit.chromium.org/gerrit/16838
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
BUG=None
TEST=`cros_sdk --delete && cros_sdk` still works
Change-Id: I9a5d5e5eedb950dcfaf9108c22087a5a7fa7cd47
Reviewed-on: https://gerrit.chromium.org/gerrit/16825
Reviewed-by: Brian Harring <ferringb@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
BUG=chromium-os:26824
TEST=repro'd chromium-os:26790 on a test system with this config,
demonstrating that it no longer masks the bug. Confirmed
dbus-monitoring still works while doing so. (Tested with
help from jorgelo.) Confirmed the 26790 fix is not regressed by this
either.
Change-Id: I60ce833ffb14a9a709ca6bfecf40221940845aa0
Reviewed-on: https://gerrit.chromium.org/gerrit/16739
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
Commit-Ready: Jim Hebert <jimhebert@chromium.org>
Tested-by: Jim Hebert <jimhebert@chromium.org>
The logic of IGNORE_PREFLIGHT_PREBUILTS is currently inverted in make_chroot,
causing preflight prebuilts to be ignored by default, but then used in the one
situation where they should be ignored. This CL fixes that.
BUG=chromium-os:26834
TEST=Verify preflight prebuilts are now used by default in make_chroot.
Change-Id: I626319d6de79b6f201f993a05e34610e944b161e
Reviewed-on: https://gerrit.chromium.org/gerrit/16614
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
The --jobs=<n> option wasn't actually being passed to parallel_emerge --
which meant it didn't do anything.
BUG=chromium-os:26827
TEST=Ran with --jobs=N and made sure only N parallel_emerge processes were
started.
Change-Id: I581fc5588b54e246acaefd0c7e528e55adf9ba8a
Reviewed-on: https://gerrit.chromium.org/gerrit/16570
Reviewed-by: Michael Krebs <mkrebs@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
Also, blacklist /usr/share/locale. Most recently this unused directory crept
back into the image after some "sudo" package changes/upgrades.
BUG=chromium-os:11820
TEST=build_image dev for x86-alex, tegra2, amd64-generic
Change-Id: I0a209a5030a3da3674d3a38faf2367032c6e3423
Reviewed-on: https://gerrit.chromium.org/gerrit/16352
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Ready: Darin Petkov <petkov@chromium.org>
Previously this script never honored the user --port option.
BUG=None
TEST=Manual: Run with or without --port option
Change-Id: I971ee69818a37e6706ce70327b1d243fd78d214d
Reviewed-on: https://gerrit.chromium.org/gerrit/16429
Reviewed-by: Ryan Cairns <rtc@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
If we try to setup multiple boards that use the same toolchain, we end up
deleting the package.{mask,keywords} files for the existing toolchain so
that we can detect if there are upgrades available. If there aren't, the
files don't get recreated (since we were relying on crossdev for it), and
the installed toolchain packages may no longer be directly reinstalled if
they aren't incidentally marked stable.
Normally this isn't an issue since people build for target boards only
rather than installing toolchains, but this breaks the sdk bot since it
sets up a bunch of bots and then tries to emerge all the toolchain pkgs
directly. With packages we've pinned that are unstable, portage fails:
The following keyword changes are necessary to proceed:
#required by =cross-arm-none-eabi/newlib-1.18.0 (argument)
>=cross-arm-none-eabi/newlib-1.18.0 **
So backup & restore the files in the update path rather than just blowing
them away. If we end up installing things anyways, crossdev will do the
right thing.
BUG=None
TEST=`cbuildbot chromiumos-sdk` passes
Change-Id: I6efc71179d6f897af91deaefe1ce6c62df10ebf6
Reviewed-on: https://gerrit.chromium.org/gerrit/16220
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
The arm-none-eabi toolchain doesn't use glibc, so trying to copy
the glibc binpkg won't work.
BUG=None
TEST=`cbuildbot chromiumos-sdk` passes
Change-Id: I47d420fa18466128fa319f15702d4864e5f7dce0
Reviewed-on: https://gerrit.chromium.org/gerrit/16225
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
We want to have some 64bit boards also install the 32bit toolchain, so
extend the toolchain.conf file to allow specifying of multiple targets.
BUG=chromium-os:25969
TEST=build_packages for x86-mario installed both i686-pc-linux-gnu and x86_64-cros-linux-gnu
Change-Id: Ic2ca1aeeefa5ea2207d3c963ac856909cb40cae5
CQ-DEPEND=Iea6f682e258d59c0b3b3ca2cad7e15ae521dcc89
CQ-DEPEND=Ib71e7503c3ebc98549d09e35cb0bb9687b8fafb8
Reviewed-on: https://gerrit.chromium.org/gerrit/15902
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
When we create a chroot for the first time, we see:
...
Exiting: Nothing left to do; exiting. :)
Elapsed time: 5m10s
cros_sdk: All set up. To enter the chroot, run:"
cros_sdk: $ cros_sdk --enter "
CAUTION: Do *NOT* rm -rf the chroot directory; if there are stale bind
mounts you may end up deleting your source tree too. To unmount and
delete the chroot cleanly, use:
$ cros_sdk --delete
(cr) (v) vapier@vapier ~/trunk/src/scripts $
Kill the spurious double quotes, add new lines to make the text easier
to pick out from the previous command/new prompt, and only show the
sdk prefix on the first line.
BUG=None
TEST=`cros_sdk --delete && cros_sdk` looks nice
Change-Id: Iba0ee68035fffe6fc946e9b3476cc0d0b55abfc5
Reviewed-on: https://gerrit.chromium.org/gerrit/16075
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Having introduced autodetection and autoselection of images, some users
may be surprised to find that the script will happily choose to copy an
image other than chromiumos_image.bin when only one image is present.
Since this is substantially different from the previous behavior, we now
present a menu (with a single choice) in this case as well.
Also fixing the list of images to be detected and properly prioritizing
a default image over others. The code should already work with the
future image naming scheme, where chromiumos_image.bin will be a symlink
to one of six concrete images (with unique names).
BUG=None
TEST=Ran script with different image configurations and flags.
Change-Id: I5d448c5425754496d256258281694cd7ec2554d2
Reviewed-on: https://gerrit.chromium.org/gerrit/15982
Commit-Ready: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
I use these wrappers all the time on my own system.
BUG=None
TEST=`./setup_board --board=x86-mario && qlist-x86-mario -Iv` works
Change-Id: I609ea07337b2fd14257fae9a0c89b544a40beab9
Reviewed-on: https://gerrit.chromium.org/gerrit/16071
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
The -d option to umount is unnecessary in cases where the original
mount was created with '-o loop' (it says so in the man page).
Moreover, there's a demonstrable bug when using 'umount -d' in this
case: umount complains that it's unable to delete the loop device
in this case. This change silences those messages.
The demonstrated bug in umount is a plausible explanation for build
failures characterized by unexpected failures of 'mount -o loop';
see the BUG, below.
BUG=chromium-os:24975
TEST=run the changed commands, see no loopback devices leaked
Change-Id: I1df9f60b40eabd279164b79ee66994ff9f644ee9
Reviewed-on: https://gerrit.chromium.org/gerrit/15998
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Without this fix, when the script is invoked with (say) --to=/dev/sdk
but /dev/sdk is not a valid block device, we will interpret it as if the
user intended to copy the image to a file of the same name. However, it
is more likely that the user specified the wrong device name. Hence,
this fix catches this type of error and will fail the operation with
a corresponding error message.
Also includes minor changes to printed messages.
BUG=None
TEST=Ran the script with different values of --to
Change-Id: Ie060ff2be77b8c065ba95f635455049e034d4bbc
Reviewed-on: https://gerrit.chromium.org/gerrit/15822
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
Commit-Ready: Gilad Arnold <garnold@chromium.org>
The recent changes to image_to_usb.sh assumed that chromiumos_image.bin
is always used for generating a test image. This wasn't the case before
these changes were applied, where a preexisting test image would have
sufficed. This fix eliminates image autodetection entirely when
--test_image it used and falls back to the old behavior: if a test image
exists, it will use it; otherwise, it will generate it from the image
specified by --image_name, or from the default chromiumos_image.bin.
This is not to say that I like this behavior: it is subtle, may lead to
errors (e.g. using a stale test image whereas the user assumes a new one
should be generated), and inconsistent with other behaviors (e.g.
installing a recovery image, where no image generation takes place at
all). I believe that long term we should eliminate the generation of
test images from image_to_usb.sh and have users invoke the necessary
scripts (like mod_image_for_test.sh) explicitly.
BUG=chromium-os:26239
TEST=Ran script with different combinations of --test_image,
--image_name and image files present.
Change-Id: Ib2491a7e45e23eb51ced6ef31d3f129ec7863a25
Reviewed-on: https://gerrit.chromium.org/gerrit/15764
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
This both fixes an incorrect behavior where --to_product would unsafely
lead to using a target device not intended to by the user; and reuses
the existing logic for device autodetection to work with provided
product strings. As a result, it is easier to find devices, and the
script's behavior is more consistent as far as device detection and
selection. This preserves the pattern matching on product string (now
properly highlighted in usage text and inline comments).
BUG=None
TEST=Ran script with various flag combinations (--to, --to_product),
product strings, and devices connected.
Change-Id: I80bfca086029555853a680e7c97251b11adc912e
Reviewed-on: https://gerrit.chromium.org/gerrit/15757
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
The gcc-config file name could be different from the gcc atom that creates it.
Changed the logic to first find out the binary path of gcc and then to query
portage to see what package owns that path.
BUG=none
TEST=cros_sdk --bootstrap --replace
cros_sdk -- ./setup_board --board=x86-zgb --nousepkg
Change-Id: I3ccfa9948aaba6ba28107f150523c8a5d7cf1260
Reviewed-on: https://gerrit.chromium.org/gerrit/15556
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Tested-by: asharif <asharif@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: asharif <asharif@chromium.org>
Every consumer that I can find of get_latest_image.sh expects this
script to output something useful. Many don't check the result and
end up spitting out unhelpful messages when it doesn't. So make a
missing images dir fatal for this script so everyone on top of us
gets this checking for free.
If, in the future, someone actually wants this to output nothing
when there's nothing found, we can add a dedicated flag. That mode
of operation is a lot less common than having it die by default.
BUG=None
TEST=delete image tree, run ./get_latest_image.sh --board=${BOARD}, see it fail nicely
TEST=delete image tree, run ./image_to_vm.sh --board=${BOARD}, see it fail nicely
Change-Id: I0a2ffd0b9084297b6d2346f02dbdb7bd0ef667bf
Reviewed-on: https://gerrit.chromium.org/gerrit/15589
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
This is needed as part of transition to cros-workon.
Crossdev has a -S option to install the current stable, which is
the preferred future option, but would greatly complicate the logic.
BUG=chromium-os:25338
TEST=setup_board --board=any --force, see it build the right versions
TEST=trybot chromiumos-sdk
Change-Id: I60dfffcfa38e482499f909787ead26fd27ef36e1
Reviewed-on: https://gerrit.chromium.org/gerrit/15702
Commit-Ready: Zdenek Behan <zbehan@chromium.org>
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Tested-by: Zdenek Behan <zbehan@chromium.org>
Now that aura is default, we don't need to special-case it anymore.
BUG=chromium-os:25818
TEST=Verify that default prebuilts uploaded by the x86-generic builder
are used now instead of the aura-specific prebuilts. These prebuilts
have aura enabled now, since it is the default.
Change-Id: I8b78f53f5ceab6e5907390e03554120f20ea96fe
Reviewed-on: https://gerrit.chromium.org/gerrit/15726
Tested-by: Ryan Cui <rcui@chromium.org>
Reviewed-by: Ryan Cui <rcui@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
This reverts commit 19754342048a44304150981b2938f604751605e7
The tree is on fire: the x86 canaries and x86 generic full
bots are dying with internal gold link errors.
http://crosbug.com/26168
Only happens on new sdks, so we're shotgunning a few
suspicious revs and hoping for the best.
Change-Id: Iae05c876ff2a84f4a9f549f74b2ee7e0903f2b5a
Reviewed-on: https://gerrit.chromium.org/gerrit/15669
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
This is needed as part of transition to cros-workon.
Crossdev has a -S option to install the current stable, which is
the preferred future option, but would greatly complicate the logic.
BUG=chromium-os:25338
TEST=setup_board --board=any --force, see it build the right versions
TEST=trybot chromiumos-sdk
Change-Id: I07c1ade5731e9391fb22a572f7fe8517011e6239
Reviewed-on: https://gerrit.chromium.org/gerrit/15176
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Zdenek Behan <zbehan@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Zdenek Behan <zbehan@chromium.org>
The refresh-packages builder needs to start using auth tokens for logging into
Google Docs, rather than email/password each time, so this copies ~/.gdata_token
into the chroot in the same way as ~/gdata_cred.txt.
BUG=chromium-os:23819
TEST=Put a file at ~/.gdata_token outside chroot, then run:
`cros_sdk true ; cmp {chroot/home/$USER/,~/}.gdata_token`, which passes.
Change-Id: Ib688a01aa88e0fd0f0211236bb0354813ef1fbb3
Reviewed-on: https://gerrit.chromium.org/gerrit/15550
Commit-Ready: Matt Tennant <mtennant@chromium.org>
Reviewed-by: Matt Tennant <mtennant@chromium.org>
Tested-by: Matt Tennant <mtennant@chromium.org>
The script does not assume a single source image (chromiumos_image.bin)
but detects which images of a list of candidate images are present, and
lets the user select one. The default choice is the first image in the
list to be detected. If only one image was detected, it will be
automatically selected. The list contains the aforementioned standard
image, as well as the default names for recovery, test, factory and
factory install images. If the script is invoked with --test, --factory
or --factory_install flags, it will only seek for the standard image
(and attempt to generate the desired image from it, as was previously
done).
Also fixed some log messages; option strings; and improved the logic for
unmounting the target device, eliminating an unnecessary message and
a 3 second delay.
BUG=chromium-os:26010
TEST=Tested image_to_usb.sh with different images and flags.
CQ-DEPEND=I53a42a46a3c90fd486fead578bfbae248f64cfc2
Change-Id: I0d2f20dc8d62ce5fa18c10d9f8b51a46b2ddca5d
Reviewed-on: https://gerrit.chromium.org/gerrit/15528
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
Commit-Ready: Gilad Arnold <garnold@chromium.org>
Defined a bash function choose(), which allows to present a menu and
prompting for a selection, with support for default choice. Usage is
commented appropriately.
Originally reviewed in CL I0d2f20dc8d62ce5fa18c10d9f8b51a46b2ddca5d.
BUG=chromium-os:26010
TEST=Tested in conjunction with a use in image_to_usb.sh, works fine.
Change-Id: I53a42a46a3c90fd486fead578bfbae248f64cfc2
Reviewed-on: https://gerrit.chromium.org/gerrit/15586
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
Commit-Ready: Gilad Arnold <garnold@chromium.org>
First, add a enable_strict_sudo helpers that scripts that are
sudo strict can invoke. This does a sanity check bailing immediately
if invoked from a non sudo-keep-alive context.
Second, update enter_chroot.sh and make_chroot.sh to be strict.
While this is strict, that's the point. The aim of this is to block
the previous sudo interactive mess for spreading, let alone reappearing
in scripts/code that has been cleansed.
BUG=chromium-os:18393
TEST=cros_sdk --replace; in the midst of it, do sudo -k.
cros_sdk should thus bail out w/ an appropriate error.
CQ-DEPEND=I01bb1466cf027401fa387af7fad15e42fd33aea4
Change-Id: I76c5b87a812cc78c30a2eb1a0c56b9e438f4a98f
Reviewed-on: https://gerrit.chromium.org/gerrit/15294
Commit-Ready: Brian Harring <ferringb@chromium.org>
Reviewed-by: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
Motivated by the need to share the default recovery image name across
scripts (image_to_usb.sh in this case) and have it setup in common.sh.
Includes some general cleanup steps such flags and usage strings,
migrating function definitions to the beginning of the script, etc.
BUG=chromium-os:26010
TEST=Tested mod_image_for_recovery.sh on local host.
Change-Id: Ife3731915302a2e7be8beb750501d0ae9a0c43a4
Reviewed-on: https://gerrit.chromium.org/gerrit/15523
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
Commit-Ready: Gilad Arnold <garnold@chromium.org>
This is a preparatory step for changes to image_to_usb.sh and
mod_image_for_recovery.sh. In general, by migrating the default
recovery image name to common.sh we can improve the interoperability
between the different scripts.
BUG=chromium-os:26010
TEST=Obvious change; tested to see the mod_image_for_recovery.sh and
image_to_usb.sh still work.
Change-Id: I765d665b656d5d25b2d9b0e40bf5c05048c3f255
Reviewed-on: https://gerrit.chromium.org/gerrit/15507
Commit-Ready: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>