Commit Graph

2074 Commits

Author SHA1 Message Date
Sonny Rao
d4feba845d Add mod for test script which sets the PAGER default correctly
This will set the PAGER to /usr/local/bin/less instead of /usr/bin/less

BUG=none
TEST=PAGER variable points to the correct place by default

Change-Id: I7becfe39ea1817fd17195d8eee46d23d4b8b0d00
Reviewed-on: https://gerrit.chromium.org/gerrit/26602
Reviewed-by: Anush Elangovan <anush@google.com>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
2012-07-02 18:02:09 -07:00
David James
0079158f73 Stop gvfs daemons earlier during enter_chroot.
The killall commands for stopping gvfs weren't working
consistently for two reasons:
  1) They ran too late, after it already picked up the
     mounts in cros_sdk.
  2) killall sometimes can only access the first 15 characters
     of a process name, so we should only match on these characters.

BUG=chromium-os:23443
TEST=Verify gvfs is properly stopped when entering the chroot
     on precise systems.

Change-Id: I16aff4b0d9ac101083b63e06e55d50869479a152
Reviewed-on: https://gerrit.chromium.org/gerrit/26369
Reviewed-by: Pawel Osciak <posciak@google.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2012-06-29 09:57:10 -07:00
Mike Frysinger
926a4b901c enter_chroot: make sure ccache dir perms are correct
For fresh sdk builds, gcc won't update and automatically see the
ccache tree for us.  So make sure the perms are sane when people
enter the chroot.  This will also automatically fix perms if/when
people manually delete the ccache dir (which sometimes happens on
the buildbots when people try to free up space).

BUG=None
TEST=`rm -rf distfiles/ccache/; cros_sdk` and see ccache dir get setup nicely

Change-Id: I5bcc86ebf696549b142a7ceb312eb8ec4be5e2bf
Reviewed-on: https://gerrit.chromium.org/gerrit/26257
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-06-27 20:04:52 -07:00
Mike Frysinger
c51e1f941d build_image: use pbzip2 on glibc debug info
Gives a minor speed up.

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

Change-Id: I2c5251b788c557e9c76d05140aaed255003bb1e3
Reviewed-on: https://gerrit.chromium.org/gerrit/26258
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-06-27 19:17:10 -07:00
Mike Frysinger
e94c0766a3 build_image: fix /usr/lib/debug handling with dev images
gdb only looks in /usr/lib/debug, not anywhere in /usr/local.  So
unpack the C library stuff into the common /usr/local/usr/lib/debug
and symlink /usr/lib/debug to the /usr/local tree.  This way gdb can
find all these things automatically.

BUG=None
TEST=run gdb on board and see it find .debug files automatically

Change-Id: I93bd352ccac52d9d0179537d2eb520da6f684697
Reviewed-on: https://gerrit.chromium.org/gerrit/25270
Reviewed-by: Caroline Tice <cmtice@chromium.org>
Reviewed-by: Brian Harring <ferringb@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-06-26 16:08:44 -07:00
Liam McLoughlin
924dae0521 Correct flag name for hybrid MBR option
BUG=chromium-os:32150
TEST=Build image using --hybrid_mbr flag

Change-Id: Iecd9204ab005ea03b131b86d9bd0019b720f1019
Reviewed-on: https://gerrit.chromium.org/gerrit/26144
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Ready: Liam McLoughlin <lmcloughlin@chromium.org>
Tested-by: Liam McLoughlin <lmcloughlin@chromium.org>
2012-06-26 15:47:58 -07:00
Mike Frysinger
aa58465a3f update hooks: add feedback messages to slow chrome cleanup
Some people think this upgrade hook gets stuck when in reality, it has
to delete a lot of files (gigs worth).  Add some progress messages so
people know it's doing something.

BUG=chromium-os:32052
TEST=manually running 25_suppress_incremental_build_across_chroot showed pretty messages

Change-Id: Ie20980fb2c60c980b617e98d68b0e5f9633fbb2a
Reviewed-on: https://gerrit.chromium.org/gerrit/26111
Reviewed-by: Brian Harring <ferringb@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-06-26 15:47:55 -07:00
Matt Tennant
298f61ab25 build_packages: Upload command stats after each run.
This changelist adds code in common.sh to support collecting command
statistics before calling upload_command_stats to upload those stats
to an appspot instance.

The presence of a file at ~/.disable_build_stats_upload will disable
all uploading of build command stats.

BUG=chromium-os:27355
TEST=`build_packages --board=x86-generic` with missing appspot instance
  shows upload error but still goes through with build.
TEST=`build_packages --board=x86-generic` with real appspot instance
  completes upload with all expected stats and does not affect build.
TEST=From outside chroot:
`touch ~/.disable_build_stats_upload`
`cros_sdk`
'build_packages --board=x86-generic`
Nothing uploaded due to .disable file
TEST=Verified that putting 'set -u' in my fake build_packages
caused an exit in print_time_elapsed, then fixed unbound variable
in print_time_elapsed, then rerun passed.
TEST=`cbuildbot -g <cl> --lkgm mario-paladin` passed
TEST=`cbuildbot -g <cl> --lkgm link-release` passed

Change-Id: Ieb714522cb32d7558b661e4ee1a197d1fce2c516
Reviewed-on: https://gerrit.chromium.org/gerrit/26084
Tested-by: Matt Tennant <mtennant@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Matt Tennant <mtennant@chromium.org>
2012-06-26 13:58:51 -07:00
Liam McLoughlin
07279034a9 Add option to create a hybrid MBR
This allows booting on boards that require their bootloader be on
the first partition of a MBR formatted disk

BUG=chromium-os:32150
TEST=Build an image using the --hybrid_mbr_hack flag, verify that
the ESP is visible on a system with GPT support

Change-Id: I4b137ef672b9ed7327bd42ec0a260d82a8c9d470
Reviewed-on: https://gerrit.chromium.org/gerrit/26071
Tested-by: Liam McLoughlin <lmcloughlin@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Commit-Ready: Liam McLoughlin <lmcloughlin@chromium.org>
Reviewed-by: Liam McLoughlin <lmcloughlin@chromium.org>
2012-06-26 13:58:51 -07:00
Mike Frysinger
41a20345b0 build_packages: drop native emerge --info
Posting the emerge info for the native build isn't terribly useful, so
just punt it to clean up the build output slightly.

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

Change-Id: If4ddb437b68c5624f3bc1a7519ef409134ba687b
Reviewed-on: https://gerrit.chromium.org/gerrit/26044
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-06-26 11:07:44 -07:00
David James
9d9efefe27 Revert "build_packages: Upload command stats after each run."
This reverts commit 615fe57ff0.

This CL broke mod_image_for_recovery.sh with the following failure:
  common.sh: line 684: $2: unbound variable

This bug is easy to fix, but suggests the CL needs more testing, so
we're going to revert for now and re-submit the CL once it's been
verified to pass on release trybots.

Example failure:
  http://chromegw.corp.google.com/i/chromeos/builders/x86-mario%20canary/builds/2214/steps/Archive/logs/stdio

BUG=chromium-os:27355
TEST=None, since this is reverting a change that broke the tree.

Change-Id: I61d182e3dcee267a8d9dea3b547fa6a75140d974
Reviewed-on: https://gerrit.chromium.org/gerrit/26077
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2012-06-25 18:57:10 -07:00
Matt Tennant
615fe57ff0 build_packages: Upload command stats after each run.
This changelist adds code in common.sh to support collecting command
statistics before calling upload_command_stats to upload those stats
to an appspot instance.

The presence of a file at ~/.disable_build_stats_upload will disable
all uploading of build command stats.

BUG=chromium-os:27355
TEST=`build_packages --board=x86-generic` with missing appspot instance
  shows upload error but still goes through with build.
TEST=`build_packages --board=x86-generic` with real appspot instance
  completes upload with all expected stats and does not affect build.
TEST=From outside chroot:
`touch ~/.disable_build_stats_upload`
`cros_sdk`
'build_packages --board=x86-generic`
Nothing uploaded due to .disable file

Change-Id: Iac071d1cc55a44335fc7c846960c7ae45fc93ed8
Reviewed-on: https://gerrit.chromium.org/gerrit/19401
Tested-by: Matt Tennant <mtennant@chromium.org>
Reviewed-by: Matt Tennant <mtennant@chromium.org>
Commit-Ready: Matt Tennant <mtennant@chromium.org>
2012-06-25 15:16:36 -07:00
Gilad Arnold
a7536efa24 Temporarily reinstate support for --to=/dev/sdX
This is part of some user's workflow and should be deprecated with
proper advance notice.

- Added a deprecation warning when --to=/dev/sdX is used in
  image_to_usb.sh.

- Removed mention of /dev/sdX from the output of build_image. Also
  simplified this output a bit (it should be obvious to a user who just
  invoked build_image that the other scripts should be invoked
  similarly, from inside the chroot's scripts directory).

BUG=chromium-os:32023
TEST=Invoked image_to_usb.sh with different --to values

Change-Id: Ib93d1b55f425b0978c4a9680be7755ae031c46e6
Reviewed-on: https://gerrit.chromium.org/gerrit/25819
Reviewed-by: Olof Johansson <olofj@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
Commit-Ready: Gilad Arnold <garnold@chromium.org>
2012-06-25 07:15:45 -07:00
Mike Frysinger
f5a383d366 setup_board: look up sdk targets only
We don't care about non-sdk targets when setting up the host boards,
so only load those for processing.

BUG=None
TEST=`cbuildbot chromiumos-sdk` passed

Change-Id: Ifa0f82a8c9704862a714fd9f35cbd11d809e295f
Reviewed-on: https://gerrit.chromium.org/gerrit/25626
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-06-19 17:11:06 -07:00
Mike Frysinger
7f2ebbde6b pass down board info to cros_setup_toolchains
If the board we're building includes extra toolchains that aren't part
of our official set, we need to make sure cros_setup_toolchains still
tries to set them up for us.

BUG=None
TEST=`cbuildbot chromiumos-sdk` works
TEST=`./setup_board --board=x32-generic` installs an extra toolchain

Change-Id: I85f70177f82bdf295eb2cd8668a031317a3b6e61
Reviewed-on: https://gerrit.chromium.org/gerrit/24336
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-06-17 22:13:40 -07:00
Gilad Arnold
20d65a5c90 image_to_usb.sh: disallow --yes/-y without an explicit target (--to)
This should prevent situations where a wrongfully detected target device
(e.g. a hard drive) is being written to without any prompt. With this
change, the semantics of --yes changes to "don't ask me if I'm sure,
just write to the target device in --to". The help line was changed to
reflect this semantics.

Minor changes:

- Replaced die calls with die_notrace.

- Changed the default value for --to into an empty string (why should it
  be /dev/sdX anyway?).

- Fixed an unmount warning message so it's more descriptive (and fits in
  80 columns).

- Check that --install is only used inside the chroot earlier in the
  script.

BUG=None
TEST=Ran the script with different combinations of -y and --to.

Change-Id: I7a4d6eac9697f25d7e1eddb6c34f3c1725a83ef4
Reviewed-on: https://gerrit.chromium.org/gerrit/25404
Reviewed-by: Brian Harring <ferringb@chromium.org>
Commit-Ready: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
2012-06-17 04:06:06 -07:00
Luigi Semenzato
2443fdd62e Add hook for personalizing chroot.
This places a simple hook in cros_sdk by executing commands
in $HOME/.cros_chroot_init when a chroot is built.  This
lets users copy files to the chroot (for instance, scripts), as
well as add lines to .bash_profile and other rc files.

BUG=chromium-os:31295
TEST=tested manually and verified .cros_chroot_init is executed when present

Change-Id: I2a5b070a9827272f7bb7b3d340ad6937b0bef329
Reviewed-on: https://gerrit.chromium.org/gerrit/23668
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Commit-Ready: Luigi Semenzato <semenzato@chromium.org>
2012-06-14 11:24:37 -07:00
Mike Frysinger
db0a3903d1 setup_board: switch over to cros_setup_toolchains for toolchain listing
We want to centralize toolchain.conf parsing in cros_setup_toolchains.

BUG=None
TEST=`cbuildbot chromiumos-sdk` worked

Change-Id: I650616725595388515c8b1acbf7479b9ddcdd44e
Reviewed-on: https://gerrit.chromium.org/gerrit/24334
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-06-13 18:56:31 -07:00
David James
654a00bd61 Stop the gvfsd-trash daemon during enter_chroot.
The gvfsd-trash daemon interferes with mounting and unmounting
images, so it should also be disabled for user chroots.

The gvfsd-trash daemon automagically creates 'trash' subdirectory inside
any directory you mount and holds on to it for a little while, preventing
you from being able to unmount your mount point.

BUG=chromium-os:23443
TEST=Verify that this fix fixes cros_make_image_bootable for daisy on
     Ubuntu precise.

Change-Id: I8df4c999ed57d7025b63c971390448c93d404e83
Reviewed-on: https://gerrit.chromium.org/gerrit/25243
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Anush Elangovan <anush@google.com>
Tested-by: David James <davidjames@chromium.org>
2012-06-13 15:44:58 -07:00
David James
fae0a59e8b Stop the automounting daemon whenever we're inside the chroot.
If automounting is enabled while we're inside the chroot, simple mount /
unmount commands will fail, causing image building commands to fail flakily.

This allows for quick mount / unmount.

BUG=chromium-os:23443
TEST='cros_sdk true' works now and does not print warnings on systems that
     previously had race conditions in this case.

Change-Id: I18d725324cc42ab7c527d3b52479b6a90bc4172c
Reviewed-on: https://gerrit.chromium.org/gerrit/25166
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: David James <davidjames@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
2012-06-13 12:04:57 -07:00
Brian Harring
334050f24e Ensure .repo/alternates is writable by the invoking user.
The only way to trigger this is if references were set up, but
never instantiated.

BUG=chromium-os:31682
TEST=manual permission checking.

Change-Id: Ibfc9dadf838f554cd10411753b5769117b1b1d42
Reviewed-on: https://gerrit.chromium.org/gerrit/24932
Reviewed-by: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
Commit-Ready: Brian Harring <ferringb@chromium.org>
2012-06-10 01:38:08 -07:00
Mike Frysinger
9c7eff8fca update hooks: add an upgrade for stale daisy
The daisy PFQ did not regenerate itself, so for people who tried to build
daisy again, they got a mix of stale binpkgs.  Now that things have been
manually cleaned up, we can deploy another upgrade hook just for daisy.

BUG=None
TEST=`./update_chroot` w/out daisy ran quick -> nothing to do
TEST=`./update_chroot` w/up-to-date daisy ran quick -> nothing to do
TEST=`./update_chroot` w/out-of-date daisy -> deleted & re-installed daisy

Change-Id: Id707a492f9cea7fb4c8b204d84c4fc3bca84c4b3
Reviewed-on: https://gerrit.chromium.org/gerrit/24908
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-06-08 16:59:41 -07:00
Mike Frysinger
3ba74cefcb update hooks: skip old dirs automatically
If we have old dirs (such as a previous migration), we might detect they
need migration for ldso too, but their name isn't a valid board.  So skip
those old dirs, and punt old ldso dirs in case they exist (failed previous
upgrade).

BUG=None
TEST=`./update_chroot` moved my old tegra2_kaen and arm-generic boards away, skipped the old softfloat ones, and deleted the previous ldso moves

Change-Id: I9ff316d6de2d9e982f93880426955bb0b49f00a1
Reviewed-on: https://gerrit.chromium.org/gerrit/24890
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-06-08 11:48:45 -07:00
Mike Frysinger
e1c7706041 update hooks: migrate arm boards to new ldso path
Now that glibc installs with the new arm hardfp ldso path, and gcc
generates ELFs with the new path, forcibly migrate existing boards
to the new path by having people rebuild everything.

BUG=None
TEST=`./update_chroot` moved my old tegra2_kaen and arm-generic boards away

Change-Id: I5fee57ff49a9533cc10cb82888014f7cb53033ac
Reviewed-on: https://gerrit.chromium.org/gerrit/24731
Reviewed-by: asharif <asharif@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-06-08 11:24:56 -07:00
David James
0103b59138 Clean up update_bootloaders.sh to avoid sleeping.
Right now update_bootloaders.sh occasionally sleeps for 5 seconds if the
developer machine has gvfs-gdu-volume-monitor installed. This sleep was
only necessary because the script pointlessly mounted the device and then
immediately unmounted it, thus triggering a race condition.

In this commit, I've removed the pointless mount/unmount, thus avoiding this
race. This removes the need for the sleep and for retrying the umount.

I also cleaned up the error checking so that failures to cleanup fail
the whole script now.

BUG=none
TEST=Run build_image.sh several times, verify it doesn't sleep for 5 seconds
     anymore. Also run remote trybot runs.

Change-Id: Iaa715e9644292f97356a341d17b147be2a5178d9
Reviewed-on: https://gerrit.chromium.org/gerrit/24632
Commit-Ready: David James <davidjames@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2012-06-07 20:48:51 -07:00
David James
85dd140217 Rebuild host workon packages if they are changed.
Previously, if you were working on a cros_workon package on the host, it
would only get updated once -- after that, the package would never build
again.

With this change, we now rebuild host workon packages any time their
timestamp is modified. This replicates the same feature that we already
have for board packages.

BUG=chromium-os:12771
TEST=Verify that host workon packages are rebuilt when the timestamps change,
     and only when the timestamps change.

Change-Id: I31ef1d83dc591161a7cb55c4af806ee4a4212cdd
Reviewed-on: https://gerrit.chromium.org/gerrit/24782
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2012-06-07 16:01:31 -07:00
David James
4c29c24c77 Only build cros-workon packages when they are changed.
BUG=chromium-os:27493
TEST=Verify that packages are only rebuilt when their modification times
     change (on either the ebuild or the content).

Change-Id: Iac44e86455d12601a25c8d02f14aa69a4829a330
Reviewed-on: https://gerrit.chromium.org/gerrit/24677
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Brian Harring <ferringb@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2012-06-07 14:33:26 -07:00
Mike Frysinger
9377f67b55 migrate to linux-headers
Rather than having a toolchain package we use for the cross-compilers and
installing a different one for the target build dir, use the same package.
This makes updating more logical as we only have to do it in one place.

BUG=chromium-os:24928
TEST=`cbuildbot amd64-generic-full` works
TEST=`cbuildbot arm-generic-full` works
TEST=`cbuildbot x86-generic-full` works
TEST=build_packages+build_image for x86-alex boots & works

Change-Id: Ib083c3d2eae75d6f5437203990599cdc837dd9dc
Reviewed-on: https://gerrit.chromium.org/gerrit/24722
Reviewed-by: Anush Elangovan <anush@google.com>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-06-07 12:07:43 -07:00
J. Richard Barnette
ea82dfb4dc Don't look in chroot-based paths outside the chroot, even in jest.
When bootstrapping a chroot, the test for "is this a private source
tree repo" looked under the source tree in ~/trunk/src.  That test
was reliable inside the chroot (during update_chroot), but from
outside the chroot (during bootstrapping) it depended on whether the
user had a ~/trunk/src with a certain file.

This change enforces correct behavior outside the chroot regardless
of the contents of the user's home directory.

BUG=chromium-os:31602
TEST=run the test case described in the bug report

Change-Id: I2150347fbad9c84af537f8c572908e6e5ce312b4
Reviewed-on: https://gerrit.chromium.org/gerrit/24659
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2012-06-07 12:07:41 -07:00
Denis Glotov
019be8526e Increase memory size of vm's to 2G
This is because ASAN bots autotests usually fail with out-of-memory.

More on the thread: https://groups.google.com/a/google.com/d/topic/chromeos-lab-infrastructure/Tuu4ir5Mc9c/discussion

BUG=chromium-os:24567
TEST=cbuildbot --local amd64-generic-asan -g I3b0f9156

Change-Id: I3b0f91566c45e0ef9e837995e353d7240ab9edea
Reviewed-on: https://gerrit.chromium.org/gerrit/24385
Commit-Ready: Denis Glotov <glotov@chromium.org>
Reviewed-by: Denis Glotov <glotov@chromium.org>
Tested-by: Denis Glotov <glotov@chromium.org>
2012-06-05 03:03:11 -07:00
Mike Frysinger
8b06bd5926 update hooks: migrate paths to userpriv settings (part 2)
The previous upgrade hook didn't change all the perms on files in the host
distdir because the default value expands to a symlink which `find` did not
walk.  Add the -H flag to make that happen.

For people who haven't upgraded yet, stub out the existing 38 hook.

BUG=chromium-os:3616
TEST=add a root owned file to host distdir, run ./update_chroot, see file owners fixed

Change-Id: I3f5f88b4fb1d27ce588a342331ad10e957961bcc
Reviewed-on: https://gerrit.chromium.org/gerrit/24459
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-06-04 20:01:05 -07:00
Chris Sosa
0e1709f295 Move warning message for mod_image_for_test before actual library call.
Users of other calling scripts that no-op in this scripts are seeing
the warning message incorrectly. Moving this message further down
avoids this issue.

BUG=None
TEST=Visual. Also using to test unified commit queue.

Change-Id: I7bc227f37b26bcedbdb8214286a3f8646ddb610c
Reviewed-on: https://gerrit.chromium.org/gerrit/24369
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
2012-06-04 03:08:35 -07:00
Mike Frysinger
6e52ff1f3d update hooks: migrate paths to userpriv settings
Now that we're enabling userpriv for the chroot, we need to fix all the
paths that might be owned by root to the right user.

BUG=chromium-os:3616
TEST=`./update_chroot` on a system with root-owned files
	in the various paths changed them all to my user

Change-Id: I3655c851d5844524ec77c3476cee7a6e9d70ce0d
CQ-DEPEND=Id513c0b8b380d57dd3e150917a969d0bf36883fc
Reviewed-on: https://gerrit.chromium.org/gerrit/24216
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-06-01 12:35:43 -07:00
Zdenek Behan
7d2634e5da update_hooks: add a hook to unmerge old and conflicting cross headers
BUG=none
TEST=./update_chroot

Change-Id: Id67b2f486821558d72a73445621f4685a0cf5a54
Reviewed-on: https://gerrit.chromium.org/gerrit/24235
Tested-by: Zdenek Behan <zbehan@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Zdenek Behan <zbehan@chromium.org>
2012-05-31 19:50:37 -07:00
Kris Rambish
f47611a771 Fix for new (or lack of) locations of pyauto deps.
BUG=chromium-os:31306
TEST=Ran it!

Change-Id: I7a71fcba8504b84c055ba076d8bbceefc0ab45c8
Reviewed-on: https://gerrit.chromium.org/gerrit/24251
Reviewed-by: Nirnimesh <nirnimesh@chromium.org>
Reviewed-by: Kris Rambish <krisr@chromium.org>
Tested-by: Kris Rambish <krisr@chromium.org>
Commit-Ready: Kris Rambish <krisr@chromium.org>
2012-05-31 17:26:15 -07:00
Zdenek Behan
074f9efad4 make_chroot: support multiple tarball compression methods (esp. xz)
BUG=chromium-os:19287
TEST=try building a chroot both using .tbz2, .tar.bz2 and .tar.xz

Change-Id: Idfb13b691201b65c1fa1d5f8597f2aaa401a4051
Reviewed-on: https://gerrit.chromium.org/gerrit/23964
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Zdenek Behan <zbehan@chromium.org>
Tested-by: Zdenek Behan <zbehan@chromium.org>
2012-05-30 17:59:53 -07:00
Mike Frysinger
3ac37b828d setup_board: drop unused toolchain ver flags
With the migration to cros_setup_toolchains, we no longer pass down the
versions of binutils/gcc/etc..., so drop the explicit flags.

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

Change-Id: I87dbb449e3c413c44cd008fc43d3258a2111227b
Reviewed-on: https://gerrit.chromium.org/gerrit/24056
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-05-30 17:30:11 -07:00
Zdenek Behan
42184b4d2c update_chroot: update crossdev before updating toolchains
BUG=none
TEST=run it

Change-Id: Ie2420cf3fa9ca9295b7ee51300166cc65dd82fcd
Reviewed-on: https://gerrit.chromium.org/gerrit/24040
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Zdenek Behan <zbehan@chromium.org>
Tested-by: Zdenek Behan <zbehan@chromium.org>
2012-05-30 11:01:50 -07:00
Michael Krebs
df2a1e2bd4 scripts: Fix possible cause of cros_generate_breakpad_symbols crash
Use the ":" builtin command to prevent the increment of $ERROR_COUNT from
ever failing under strict mode (i.e. "set -e").
cros_generate_breakpad_symbols failed for some reason, and this is my best
guess as to the cause.  That is, the post-increment would otherwise fail
when $ERROR_COUNT is zero because it would have a non-zero exit status.

BUG=chromium-os:31332
TEST=Manually ran script

Change-Id: Iec7fd9358c339414ccd3c2ca1fd598f124375f0b
Reviewed-on: https://gerrit.chromium.org/gerrit/23979
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Brian Harring <ferringb@chromium.org>
Commit-Ready: Michael Krebs <mkrebs@chromium.org>
Tested-by: Michael Krebs <mkrebs@chromium.org>
2012-05-29 22:30:02 -07:00
Brian Harring
021858a82f Work around tar/pbzip2 idiocy limiting it to single core.
For the builders/goobuntu, they're running pbzip2 ~1.0.5 w/ tar 1.22;
for whatever reason, that configuration reproducibly limits to single
core for:

tar -I /usr/bin/pbzip2 -xf /the/sdk

This is annoying; 2 minutes instead of 10s for 48 core builder for
example.  Thus does *not* occur w/in the chroot (differing versions),
nor for tar=1.26 w/ pbzip2 1.1.6.  The changelogs for both programs
are a bit spartan, but I'm suspecting tar just wasn't feeding it
particularly well (pbzip2 1.0.5 will parallelize if stdin is a pipe).

Regardless, we either try to force everyone to upgrade, or we just
use a form that behaves fine, which is what this CL does.

BUG=chromium-os:31320
TEST=manual validation of it.

Change-Id: I77a434bd2c70873459cbf373192fe73feadb2547
Reviewed-on: https://gerrit.chromium.org/gerrit/23811
Tested-by: Brian Harring <ferringb@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Brian Harring <ferringb@chromium.org>
2012-05-27 13:47:32 -07:00
Elly Jones
983cd2058b [scripts] rebuild openssl
We need to rebuild binpkgs that depend on openssl.

Change-Id: I13c59a79700e5704b463b7d03ffbf19d83c5e2e7
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/23743
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2012-05-25 16:05:23 -07:00
Ahmad Sharif
e0ca2dfdbd Passed down --skip_toolchain_update to update_chroot.
BUG=chromium-os:30938
TEST=Installed gcc-9999 and did ./build_packages --skip_toolchain_update

Change-Id: I5c2c969bf59768e8a9ee3ff9f0cbcd4adcd99177
Reviewed-on: https://gerrit.chromium.org/gerrit/23671
Tested-by: asharif <asharif@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Brian Harring <ferringb@chromium.org>
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Commit-Ready: asharif <asharif@chromium.org>
2012-05-25 14:12:56 -07:00
Chris Sosa
a1f914f544 Deprecate use of mod_image_for_test with a large warning.
We'll phase out later.

BUG=chromium-os:31183
TEST=Ran it.

Change-Id: I7ddf44b661f52ca9186e429ed3955884c4b2cbd4
Reviewed-on: https://gerrit.chromium.org/gerrit/23653
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
2012-05-25 10:40:54 -07:00
Vic Yang
4051405da9 Add 'vfat' flag when building kernel with initramfs
We are about to separate VFAT support from 'initramfs' flag. Let's add
'vfat' flag first so that when this happens nothing gets broken.

BUG=chrome-os-partner:9805
TEST=Build success. Factory install shim still works.

Change-Id: Ia432e3b1a6186f4f7c817a1283c86066ced5fef1
Reviewed-on: https://gerrit.chromium.org/gerrit/23193
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Vic Yang <victoryang@chromium.org>
Tested-by: Vic Yang <victoryang@chromium.org>
2012-05-23 17:49:46 -07:00
Kris Rambish
c0ee2dd34e Update --prepackaged_autotest to --autotest_dir
BUG=None
TEST=Ran it

Change-Id: I63f8c351a974f988ae06af931d201bab97e467af
Reviewed-on: https://gerrit.chromium.org/gerrit/23423
Reviewed-by: Kris Rambish <krisr@chromium.org>
Tested-by: Kris Rambish <krisr@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Kris Rambish <krisr@chromium.org>
2012-05-23 16:42:32 -07:00
Jason Glasgow
e4c4c35d12 Make shill and flimflam Ignore pseudomodem0p on test builds
Make shill and flimflam ignore pseudomodem0p on test builds so that
the network devices called pseudomodem0p can be used to test the
cellular classes of shill on virtual machines.

BUG=none
TEST=run network_3GModemControl on a vm
Change-Id: I61cc89d114dcb82bb01b864b68f220fbaf21509d
Reviewed-on: https://gerrit.chromium.org/gerrit/23059
Commit-Ready: Jason Glasgow <jglasgow@chromium.org>
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
Tested-by: Jason Glasgow <jglasgow@chromium.org>
2012-05-22 08:19:38 -07:00
Vic Yang
c321a9a026 Modify USE flags used when building network boot kernel
We need VFAT, ramdisk, and frame buffer console in network boot kernel.

BUG=chrome-os-partner:9805
TEST=Build success. Network boot and install success.

Change-Id: I267f305e2cedf44d002bb1acdf790b4279e20f2c
Reviewed-on: https://gerrit.chromium.org/gerrit/23196
Commit-Ready: Vic Yang <victoryang@chromium.org>
Reviewed-by: Vic Yang <victoryang@chromium.org>
Tested-by: Vic Yang <victoryang@chromium.org>
2012-05-22 08:00:35 -07:00
Mike Frysinger
279f103240 make_chroot: drop ccache install
Now that this is part of hard-host-depends, an we don't build the chroot
itself with ccache, so there's no need to force it in early.

BUG=None
TEST=`cbuildbot chromiumos-sdk` passed

Change-Id: I8b7c2a8c6f6df5eedac0c06ebb847f3011eb86d0
Reviewed-on: https://gerrit.chromium.org/gerrit/22954
Reviewed-by: Anush Elangovan <anush@google.com>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-05-18 09:38:54 -07:00
Vic Yang
3450deb3ea Add x86 network boot support to make_netboot.sh
Current make_netboot.sh only supports ARM. As we are using network boot
for x86 now, let's fix make_netboot.sh to support both.

BUG=chrome-os-partner:9805
TEST=Generates images and network boot install shim.

Change-Id: Ib445f68255fe8e8a1ee6b7901c9bd67a4a36636d
Reviewed-on: https://gerrit.chromium.org/gerrit/23010
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Ready: Vic Yang <victoryang@chromium.org>
Tested-by: Vic Yang <victoryang@chromium.org>
2012-05-18 03:14:12 -07:00
Zdenek Behan
05780783a9 crosutils: disallow running build_packages/setup_board as root
Running these as root does not make sense. Furthermore, it will fail
on calling cros-workon, which sometimes fails but most certainly will
not give correct information anyway.

BUG=chromium-os:30384
TEST=run build_packages/setup_board with/without sudo

Change-Id: I0cba72334369e35ba0e864c53fd81037ee9e0efa
Reviewed-on: https://gerrit.chromium.org/gerrit/23003
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Zdenek Behan <zbehan@chromium.org>
Tested-by: Zdenek Behan <zbehan@chromium.org>
2012-05-17 20:11:33 -07:00