Commit Graph

2074 Commits

Author SHA1 Message Date
Mike Frysinger
639b34c880 setup_board: only check the toolchain pkgs for updates
When checking for toolchain package updates, we explicitly grep out non
toolchain packages, so might as well use --nodeps to speed up the check.

BUG=None
TEST=`./setup_board --board=x86-alex` still works

Change-Id: Ia8a6a4f2214e45a6dd9cf6cc4ed8283425880088
Reviewed-on: https://gerrit.chromium.org/gerrit/18248
Reviewed-by: Brian Harring <ferringb@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-03-19 08:48:53 -07:00
Mike Frysinger
00c2370856 test_build_root: drop libcros checks
Nothing in the tree needs libcros anymore, so as a precursor to removing
that package, drop the root check on its version info.

BUG=chromium-os:15922
TEST=`cbuildbot arm-generic-full` works
TEST=`cbuildbot x86-generic-full` works

Change-Id: I03668c6dbb4cb79dbadb0c98e3c05dca01a8045d
Reviewed-on: https://gerrit.chromium.org/gerrit/18247
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-03-16 09:04:11 -07:00
Vadim Bendebury
d90bf392cf Use keyboard controller for hard reset instead of CF9
For some still unknown reason writes to location 0xcf9 do not cause
the Link to reboot, they cause it to shut down instead. While this
will have to be investigated and fixed, this change modifies the code
to have the kernel use the keyboard controller (implemented by the EC
on Link) to restart the system.

Once the 0xcf9 problem is resolved, this change could be reverted.

BUG=chrome-os-partner:8397
TEST=manual
      . typing 'reboot' at the shell causes the system to restart. It
        was shutting down before this change.

Change-Id: I515c87c8ffb57c444bfc3e7074d584e7cbefa87f
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/18333
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2012-03-16 01:51:26 -07:00
Brian Harring
aa13ea4658 Shift crosutils scripts to use the common.sh they were written against.
Rather than trying to use an old/stale common.sh, use the common.sh
from the invocation point- if invoked via /usr/lib/crosutils, use that
common.sh.  If invoked via src/scripts/, use that, etc.

Trying to intermix it just introduces potential for bugs and invalidly
freezes common.sh api, thus the efforts to revert this and ultimately
revert the existing of a crosutils ebuild.

BUG=chromium-os:27201
TEST=cbuildbot x86-generic-full

Change-Id: I4c6c5fbade3d28c71752bd4c44dccad49af52ec0
Reviewed-on: https://gerrit.chromium.org/gerrit/18303
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
2012-03-15 23:35:06 -07:00
David James
dee866c121 Remove --build_root from all scripts except mod_image_for_pyauto.sh.
For all scripts, --build_root defaults to /build and is never used. To
remove option clutter, I've deleted this option.

The only script which still references build_root in src/scripts is
mod_image_for_pyauto.sh, which seems to support it for grabbing pyauto
dependencies from a location other than /build/*. This might conceivably
be useful, so I haven't touched that script.

BUG=chromium-os:27364
TEST=Remote trybot run. git grep for references to build_root.

Change-Id: I502f7df0123a598fc62a4ef4ed847ceb182f65b8
Reviewed-on: https://gerrit.chromium.org/gerrit/18283
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: David James <davidjames@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
2012-03-15 18:55:26 -07:00
David James
855afb7561 Clean up options to build scripts.
1. Remove options that are already deprecated:
   --chromefromsource --chromebuild --chromebase
   --crosbug12352_arm_kernel_signing
2. Remove the --retries option and associated function eretry.
3. Move seldomly used options out of --help to avoid confusing
   developers. Developers who need these options can read the
   source.
4. Alphabetize all options.
5. Add description of each script to --help.

BUG=chromium-os:27364
TEST=Run --help with each script. Full canary trybot run.

Change-Id: I95675b069781f7e950d75d32dbad744adce6b830
Reviewed-on: https://gerrit.chromium.org/gerrit/18194
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
2012-03-15 15:54:43 -07:00
David James
0b1baf6055 Use common.sh from the source directory.
Update setup_board and build_packages to use common.sh from source
directory, so that changes in common.sh show up immediately.

BUG=chromium-os:27364
TEST=Run each script, testing that changes to common.sh are picked up.

Change-Id: I6847bbf8c486d14c58dfcbb9361cd606c11c817b
Reviewed-on: https://gerrit.chromium.org/gerrit/18245
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
2012-03-15 15:54:43 -07:00
Mike Frysinger
53d3680f54 test_build_root: use helper funcs for output
We've got nifty output helpers.  Use them.

BUG=None
TEST=build_packages+build_image for x86-alex works

Change-Id: I03172a8b1baba770cd425a52a1061e998a9717b6
Reviewed-on: https://gerrit.chromium.org/gerrit/18246
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-03-15 13:29:22 -07:00
Kris Rambish
51f9606168 Update script to not copy non-pyauto parts.
The size of what is in the chrome_dep has increased to a size that is
too large to fit into the 1GB stateful partition map of the test image.

TEST=Ran it!
BUG=None

Change-Id: Ic9dcfa143ebb52beb1eb9533a63c6e9d851e57bc
Reviewed-on: https://gerrit.chromium.org/gerrit/18065
Reviewed-by: Kris Rambish <krisr@chromium.org>
Tested-by: Kris Rambish <krisr@chromium.org>
Reviewed-by: Stanley Wong <stanleyw@chromium.org>
Commit-Ready: Kris Rambish <krisr@chromium.org>
2012-03-13 18:02:17 -07:00
Vadim Bendebury
093ffc22d3 Increase factory shim EFI partition size
With recent changes (transitioning to 64 bit x86 kernels and the 3.2
kernel) the factory install image EFI partition gets overflown,
resulting in build failures.

This change makes sure that factory shim image gets allocated twice
the room for the EFI partition (32M).

BUG=chromium-os:27639
TEST=manual
  run the following commands while in chroot:
  cd ~/trunk/src/scripts
   ./build_image --board=lumpy
   ./build_image --board=lumpy --replace --symlink=factory_shim --build_attempt=3 factory_install
   cd ~/trunk/src/build/images/lumpy/factory_shim
   ./unpack_partitions.sh factory_install_shim.bin
   ls -l part12
   cd ~/trunk/src/build/images/lumpy/latest
   ./unpack_partitions.sh chromiumos_image.bin
   ls -l part12

 . observe that in factory shim case the part_12 partition size is
   33554432 bytes, and in the regular image case the part_12
   partition size is 16777216

 . try using the factory_shim USB stick in recovery mode, observe the
   system come up (did not have a server set up, so the full install
   process was not verified).

Change-Id: Ibe001ec37c752dca90ec30ae056a67610e39a8fb
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/17907
2012-03-13 11:58:47 -07:00
Zdenek Behan
63989c25ec make_conf_util: initialize make.conf with the real number of CPUs
BUG=none
TEST=cros_sdk --bootstrap, check out make.conf.host_setup

Change-Id: Icca34d4185869092f281de6b53929377c1410f5e
Reviewed-on: https://gerrit.chromium.org/gerrit/17845
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Zdenek Behan <zbehan@chromium.org>
Tested-by: Zdenek Behan <zbehan@chromium.org>
2012-03-12 14:02:56 -07:00
Hung-Te Lin
2a506ffcce Fix typo in build_image factory_test.
The factory test image name is CHROMEOS_FACTORY_TEST_IMAGE_NAME.
Also fixed the error message when FLAGS_factory is not defined.

BUG=chromium-os:27651
TEST=build_image factory_test;
     # ls /usr/local/autotest/site_tests, seeing test packages.

Change-Id: Id8095e48e47382f07d77c85873bf588e489ba8cf
Reviewed-on: https://gerrit.chromium.org/gerrit/17816
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
2012-03-12 13:23:28 -07:00
Chris Sosa
f37f64d929 Fix bug where you can't mount a non-developer image from the most recent image.
Currently if you use -m and -i chromiumos_test_image.bin, you get an error
saying that -i and --from=<block_device> are incompatible.  -m
changes --from to the most recent folder but does this after the check so
this is broken.  This change re-orders the calls to fix this bug.

BUG=None
TEST=Ran it with args that were broken.

Change-Id: I367a74f7b77f127b6ad8eeeb92ab72ae00e5235e
Reviewed-on: https://gerrit.chromium.org/gerrit/17760
Commit-Ready: Chris Sosa <sosa@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
2012-03-12 12:22:47 -07:00
Chris Sosa
e9e2d66366 Remove --nofast --nostatefuldev from build_image as they are never used.
BUG=chromium-os:27362
TEST=Built a test image.

Change-Id: I884acd534f06d9070b28d5cd74862e2774822578
Reviewed-on: https://gerrit.chromium.org/gerrit/17759
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
2012-03-12 10:55:51 -07:00
Mike Frysinger
839e82adc8 build_packages: add --skip_chroot_upgrade for setup_board
Now that the setup_board has an option for skipping the chroot update
logic, it'd be helpful (for buildbots) if build_packages had a flag to
pass through to setup_board for that too.

BUG=None
TEST=`./build_packages --board=tegra2` ran the chroot update
TEST=`./build_packages --board=tegra2 --skip_chroot_upgrade` skipped the chroot update

Change-Id: I662d90811d7bcf9782ef8cb06655940b0e5c7f06
Reviewed-on: https://gerrit.chromium.org/gerrit/17159
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-03-09 13:47:35 -08:00
Chris Sosa
c9422fa467 Deprecate --test, --withdev, --factory, --factory_install from build_image.
Using these flags directly was deprecated a while back and is causing confusion
which way is the right way.  This CL removes all these FLAGS from build_image
(though keeps support of them in mod_image_for_test/image_to_usb invocations
in common.sh).  In this change I've also defaulted build_image to build the
developer image (and only the developer image).

BUG=chromium-os:27362
TEST=Been busy testing.  Have built the following combinations and verified them:

build_image base
build_image
build_image base dev test
build_image dev
build_image dev factory_test
build_image factory_install

Change-Id: Ie534c276a9ec571926964320ac176daa91b12a81
Reviewed-on: https://gerrit.chromium.org/gerrit/17386
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
2012-03-09 12:41:50 -08:00
Chris Sosa
8e071cc2b1 Wipe the autotest package directory before rebasing from client.
This script is a bit of mess in general as it copies client directories
back onto client proper. This creates issues when you add additional
directories that might exist in client to base that either the
FACTORY_TEST_INSTALL_MASK isn't expecting.

BUG=chromium-os:26561
TEST=Ran build_image factory_test with/without packages directory.

Change-Id: I692d44f7c56668d689350d0f3a2a2c2790c6c13a
Reviewed-on: https://gerrit.chromium.org/gerrit/17713
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
2012-03-09 12:41:46 -08:00
Mike Frysinger
5011c7f987 build_packages: log the pkgs we are about to merge
When running build_packages, the toolchain checking operations from the
update_chroot step and the initial merge are hard to differentiate, so
add an explicit `info` message so people can see what's going on.

BUG=None
TEST=`./build_packages --board=x86-alex` shows more info

Change-Id: I3593eb9ca56c620232bf155daf89b15fadb6547d
Reviewed-on: https://gerrit.chromium.org/gerrit/17604
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-03-09 07:45:37 -08:00
Chris Sosa
c596581be1 Detect if args were passed to image_to_usb, die if they are.
build_image interface now only support arg arguments rather than
flags. This might be confusing for users who might expect something
to happen when they run image_to_usb dev.

BUG=chromium-os:27362
TEST=Tested with/without args.

Change-Id: If521cb612fa1fa5716fc1557038780a5366e8bab
Reviewed-on: https://gerrit.chromium.org/gerrit/17625
Commit-Ready: Chris Sosa <sosa@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
2012-03-08 19:17:01 -08:00
David James
17c622a380 Add support for using local binary packages.
This CL adds the --reuse_pkgs_from_local_boards flag to setup_board and
build_packages. With this flag, binary packages are shared between boards
that are built locally, so that the total time required to build several
boards is reduced.

This flag is only useful when you are not able to use remote binary packages,
since remote binary packages are usually more up to date than anything you have
locally. For this reason it is typically only used by buildbots which build
multiple similar full builds on the same machine.

BUG=chromium-os:26232
TEST=Test build using only local binary packages from a different
     board.
CQ-DEPEND=I0353dd34f63f1b5c9c1a08882322279c6c4d82f5

Change-Id: I8a1d2687bd0d177de4464a80703b8b5a0b6c9f52
Reviewed-on: https://gerrit.chromium.org/gerrit/15775
Commit-Ready: David James <davidjames@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2012-03-08 15:23:26 -08:00
Sonny Rao
d6e32cd9c1 Add chroot upgrade script to clear out atom board root(s) when moving to 64bit
BUG=chrome-os-partner:8349
TEST=Ad hoc, apply update to 64bit, run this script, make sure build works

Change-Id: I708addf055faf90b250bb38da5b292ecabc26edb
Reviewed-on: https://gerrit.chromium.org/gerrit/17597
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
2012-03-08 12:35:28 -08:00
J. Richard Barnette
e80f6de440 Include the Chrome OS private overlay in the chroot, if present.
To build recovery images, the initramfs package needs fonts for
various languages.  The Japanese fonts to use depend on whether
it's an internal (Chrome OS) or external (Chromium OS) build.

Including the internal Japanese fonts requires additional settings
in /etc/make.conf in the chroot.  This change updates make_chroot
and update_chroot to ensure that the necessary settings are present
when appropriate.

BUG=chromium-os:26757
TEST=confirm proper packages after chroot creation with private manifest
TEST=confirm proper packages after chroot creation with public manifest
TEST=confirm proper packages after chroot upgrade with private manifest
TEST=confirm proper packages after chroot upgrade with public manifest
CQ-DEPEND=I32c4561c47752d96d2769c5429c5e44fe630f8f9

Change-Id: I2b29b32bf4e6b891a2228dc7f93ae0bb3f85e37f
Reviewed-on: https://gerrit.chromium.org/gerrit/17372
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
2012-03-08 12:17:44 -08:00
Mike Frysinger
69d139f766 update hooks: update metadata dir for installed crossdev overlays
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>
2012-03-07 17:12:07 -08:00
Mike Frysinger
bb214a9f59 setup_board: drop arm-none-eabi gdb workaround
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>
2012-03-07 11:37:30 -08:00
Hung-Te Lin
7119cb1499 build_image: Enable initramfs for factory install shims on amd64.
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>
2012-03-07 08:02:29 -08:00
Paul Stewart
c8f910a860 Change default port for cros_image_to_target tunnel
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>
2012-03-06 15:19:25 -08:00
Mike Frysinger
eb0ece6105 setup_board: migrate to new crossdev style
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>
2012-03-06 09:12:23 -08:00
Mike Frysinger
f1076415da setup_board: use [stable] for linux-headers now
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>
2012-03-02 11:26:43 -08:00
Chris Wolfe
d91df7a1c2 remote_access: Clean up output from remote_reboot
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>
2012-03-02 07:18:52 -08:00
Mike Frysinger
fbcc357e04 setup_board: use --quiet when installing kernel headers
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>
2012-03-01 12:19:18 -08:00
Mike Frysinger
43a7f69db9 update_chroot: run perl-cleaner with --quiet
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>
2012-02-29 18:05:23 -08:00
Sonny Rao
9002975ff0 Add chroot upgrade script to clear out stumpy root when moving to 64bit
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>
2012-02-29 17:32:30 -08:00
Mike Frysinger
47d28794fa update hooks: make sure cross-compilers are not in @world
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>
2012-02-29 09:37:32 -08:00
Chris Wolfe
21a27b75e9 scripts: Add functions to detect an interactive terminal
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>
2012-02-28 13:57:05 -08:00
Sonny Rao
ae6b96f3ab Add chroot upgrade script to clear out build root(s) when moving to 64bit
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>
2012-02-28 12:49:08 -08:00
Mike Frysinger
66fd81f952 make_chroot: use --quiet when doing initial update
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>
2012-02-28 12:45:05 -08:00
David James
544497cb20 Add support for reusing amd64-generic prebuilts on 64-bit platforms.
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>
2012-02-28 12:45:04 -08:00
Sonny Rao
f90b069f64 setup_board: add a skip_chroot_upgrade flag
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>
2012-02-28 11:23:42 -08:00
Mike Frysinger
97e08bd25b update hooks: scrub old unused pkgs
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>
2012-02-28 08:35:55 -08:00
Mike Frysinger
ccfec8f71b setup_board: don't select compilers
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>
2012-02-27 23:21:07 -08:00
Chris Sosa
539b341dec Remove ssh verboseness spew.
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>
2012-02-27 15:28:10 -08:00
Mike Frysinger
650bf873cd use --select for our core packages
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>
2012-02-27 14:07:37 -08:00
Mike Frysinger
2788e07b3f make_chroot: fix typo in emerge jobs variable
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>
2012-02-27 12:43:58 -08:00
Jim Hebert
c858da4ff6 Fix eavesdropping config to avoid masking bad dbus configs
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>
2012-02-24 15:15:55 -08:00
David James
d46beb7f75 Ensure preflight prebuilts are actually clobbered in make_chroot.
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>
2012-02-24 12:25:33 -08:00
David James
184e39019d Fix --jobs flags to actually work.
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>
2012-02-23 21:42:34 -08:00
Darin Petkov
a973d2bdb4 Add checks for blacklisted directories to test_image_content.
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>
2012-02-23 02:18:20 -08:00
Paul Stewart
195494efc0 cros_image_to_target: Fix --port option
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>
2012-02-22 18:23:11 -08:00
Mike Frysinger
551123f7ca setup_board: save/restore package.{mask,keywords} files
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>
2012-02-19 13:00:57 -08:00
Mike Frysinger
a9043f5a99 setup_board: skip arm-none-eabi when copying glibc binpkgs
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>
2012-02-19 11:57:12 -08:00