25366 Commits

Author SHA1 Message Date
Simon Que
7607e49afd eclass: add waf-utils.eclass
Pulled from upstream Gentoo.

BUG=chromium-os:25587
TEST=none

Change-Id: I0afd6b7e2170bc6232123f971657283c918bbc50
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/16736
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2012-03-01 11:10:30 -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
5500cea420 newlib: import from portage/
We need this for the bare metal arm cross-compiler.

BUG=chromium-os:26016
TEST=`./setup_board --board=x86-alex` worked for installing newlib

Change-Id: I2c0771b8969c297f25c9e4fcea2e0b5176d871c3
Reviewed-on: https://gerrit.chromium.org/gerrit/16965
Reviewed-by: Matt Tennant <mtennant@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-02-29 12:10:54 -08:00
Mike Frysinger
b74d1845ca linux-headers: mark all stable
This should let us drop the hardcoded version in the setup_board script
and move to normal keyword tracking policy.

BUG=None
TEST=`./setup_board --board=x86-alex --kernel_version '[stable]'` works

Change-Id: I7bb9a44e5cca8fc86d8daef7aa555db9c486a6cf
Reviewed-on: https://gerrit.chromium.org/gerrit/16964
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-02-29 10:33:20 -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
05c7c42ec2 Revert "portage-stable: no masters"
This reverts commit 3aa5c3734fc9e4175fcf034e152758f24b10261e

crossdev itself needs this implicitly.  not sure how this
passed the cros-sdk bot, but it is causing confusing warnings,
so revert until i can fix up crossdev to not generate those.

Change-Id: Id9a63e7da46bb0de05c8ee1b5313a65d312aead8
Reviewed-on: https://gerrit.chromium.org/gerrit/16841
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-02-27 14:07:38 -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
Mike Frysinger
1f406c399f portage-stable: no masters
Now that portage-stable contains everything we need, we can disconnect
the portage/ tree from the search.

Further, the chromiumos-overlay/ tree doesn't offer any eclasses we really
want, so drop that as well.

BUG=chromium-os:26016
TEST=build_packages+build_image for x86-alex boots
TEST=build_packages+build_image for x86-mario/arm-generic/amd64-generic works
TEST=`cbuildbot arm-generic-full` worked
TEST=`cbuildbot chromiumos-sdk` worked

Change-Id: I6925428f80cad01933573dc464680723550ff02f
Reviewed-on: https://gerrit.chromium.org/gerrit/16577
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-02-27 12:11:46 -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
Mike Frysinger
6f46103d91 pcalc: import from portage/
Import a useful (to me) development tool.  Nothing in the tree
depends on it.

BUG=None
TEST=`emerge pcalc && pcalc 0x11` works

Change-Id: I6c338889c14c4ee9d419a4642ae3ecfc0d0c332f
Reviewed-on: https://gerrit.chromium.org/gerrit/16542
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-02-23 16:50:59 -08:00
Mike Frysinger
a820a55b1d speex: import from portage/
Just imported unchanged from portage/ since it gets used now.

BUG=chromium-os:26016
TEST=build_packages for x86-alex works again

Change-Id: Ia3228fe14e256b687fed25607f5541e8433d262e
Reviewed-on: https://gerrit.chromium.org/gerrit/16555
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-02-23 16:50:58 -08:00
Mike Frysinger
c151544d6f profiles/*: pull in portage/ metadata
Pull in all the metadata that we use from portage/ so that portage-stable/
itself can be standalone.  These should be fairly impotent since many of
the files are not directly used, and the updates/ were processed long ago.

BUG=chromium-os:26016
TEST=build_packages+build_image boots x86
TEST=`cbuildbot amd64-generic-full` works
TEST=`cbuildbot arm-generic-full` works
TEST=`cbuildbot x86-generic-full` works
TEST=`cbuildbot chromiumos-sdk` works

Change-Id: Iad437a000b5d11b112c25d2ba178612c885a8679
Reviewed-on: https://gerrit.chromium.org/gerrit/16303
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-23 12:24:58 -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
Ben Chan
c922afe735 app-arch/unrar: import unrar-4.0.7 from portage
BUG=chromium-os:25974
TEST=emerge-{x86,amd64,arm}-generic unrar

Change-Id: Ic22820b4b713ed175726efc8a24e31d955f764e4
Reviewed-on: https://gerrit.chromium.org/gerrit/16321
Commit-Ready: Ben Chan <benchan@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
2012-02-21 16:54:12 -08:00
Brian Harring
7385964e03 Regenerate cache.
BUG=chromium-os:25457
TEST=N/a

Change-Id: Ifd63f1bc0dfc95c6f60dab546670f8984730ec51
Reviewed-on: https://gerrit.chromium.org/gerrit/16260
Commit-Ready: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
Reviewed-by: Brian Harring <ferringb@chromium.org>
2012-02-20 15:35:41 -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
Mike Frysinger
9e30234e50 setup_board: allow toolchain.conf to list multiple toolchains
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>
2012-02-17 18:19:43 -08:00
Mike Frysinger
bc9660ce32 eclass/*: pull in portage/ eclasses
Pull in all the eclasses that we don't have in portage-stable/.

BUG=chromium-os:26016
TEST=build_packages+build_image boots x86
TEST=`cbuildbot amd64-generic-full` works
TEST=`cbuildbot arm-generic-full` works
TEST=`cbuildbot x86-generic-full` works
TEST=`cbuildbot chromiumos-sdk` works

Change-Id: I96cb773a19f2344d3df21235f347b2c7158fd143
Reviewed-on: https://gerrit.chromium.org/gerrit/16153
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-02-17 15:30:05 -08:00
Mike Frysinger
bdc4fb1998 make_chroot: clean up final log info
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>
2012-02-17 15:30:04 -08:00
Gilad Arnold
a829f3392f image_to_usb.sh: prompt when detected image is not the default image.
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>
2012-02-17 11:22:08 -08:00
Mike Frysinger
fe8601bb51 setup_board: add portage-utils wrappers too
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>
2012-02-17 09:37:30 -08:00
Kees Cook
33439af72c Upgraded the e2fsprogs-libs and e2fsprogs Portage packages
Upgraded sys-libs/e2fsprogs-libs to version 1.42 on amd64
Upgraded sys-fs/e2fsprogs to version 1.42 on amd64

Gaining the "-E discard" option during mkfs supports the encrypted
partition work so that mkfs can run faster during OOBE.

BUG=chromium-os:22172
TEST=lumpy64 build & boot, manually confirm mkfs.ext4 supports "-E discard"

Change-Id: I70114b582b46c26b69ab822b8c33b32f03ef9db0
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/15993
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Paul Taysom <taysom@chromium.org>
2012-02-16 16:22:53 -08:00
Mike Frysinger
3281b899f2 strace: pull in x32 updates from upstream Gentoo
We need a patch in order to strace x32 programs.

BUG=None
TEST=`emerge strace` still works

Change-Id: Id0125f76ff08855b1a6aa761e3f0cd6062d6af3d
Reviewed-on: https://gerrit.chromium.org/gerrit/16082
Reviewed-by: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-02-16 15:58:06 -08:00
J. Richard Barnette
8a7aa3e502 Delete unnecessary -d options from umount
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>
2012-02-15 18:23:14 -08:00
Mike Frysinger
c436de9adb mass import remaining target packages from portage/
These are the remaining packages used from portage/ but just for the
target boards.  Import them in one shot.

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

Change-Id: Iddc2024cbddf85400b1d682707e445d0052e115c
Reviewed-on: https://gerrit.chromium.org/gerrit/15859
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-02-15 09:09:01 -08:00
Mike Frysinger
f457ec6a57 pyyaml: update to newer rev of this ebuild
We need a newer rev of this ebuild version to work with the newer python
eclass, so grab it from Gentoo.

BUG=chromium-os:26016
TEST=`emerge-arm-generic pyyaml` works
TEST=`emerge-amd64-generic pyyaml` works
TEST=`emerge-x86-alex pyyaml` works
TEST=`cbuildbot arm-generic-full` works

Change-Id: I82a35db4b32e0e879f4c3ecdb7552b3d90b5f549
Reviewed-on: https://gerrit.chromium.org/gerrit/15827
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-02-15 07:53:43 -08:00
Mike Frysinger
f934f4e31c pyserial: sync amd64 to same version as arm/x86
Some targets were using 2.5_rc1 and others were using 2.5_rc2.  Update
everyone to the latest version to avoid that.

BUG=chromium-os:26016
TEST=`emerge-amd64-generic pyserial` works
TEST=`cbuildbot arm-generic-full` works

Change-Id: I6d449255b215320f5548b78be0fbec717d6622c0
Reviewed-on: https://gerrit.chromium.org/gerrit/15826
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-02-15 07:53:43 -08:00
Gilad Arnold
7293bd8524 image_to_usb.sh: warn before copying to non-existent /dev/sdX device.
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>
2012-02-14 14:41:13 -08:00
Gilad Arnold
dd59d7e9a6 image_to_usb.sh: do not require chromiumos_image.bin when --test_image is used.
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>
2012-02-14 13:08:17 -08:00
Gilad Arnold
a0a02f4c3a Extended device autodetection to work with --to_product.
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>
2012-02-14 10:11:20 -08:00
Han Shen
b91d73d7cf Roll out binutils 2.21-r4 version (setup_board part).
Includes 2 important bug fixes -
- bug fix for 24128 (fix glibc2.14 builds) (bfd)
- fix for ARM toolchain hardening (gold)

-------------------------------------------
Summary
-------------------------------------------
                                            vanilla       newbinutils
Autotest Key                    Iterations  Average       Average       Change
PageCyclerTests
de..ageCyclerTest.Alexa_usFile  5           218.08        217.93        1.00
de..  PageCyclerTest.BloatFile  5           22064.06      22145.45      1.00
de.. PageCyclerTest.MorejsFile  5           524.82        525.95        1.00
de..  PageCyclerTest.Intl1File  5           446.69        448.81        1.00
de..  PageCyclerTest.DhtmlFile  5           630.95        630.09        1.00
de..s   PageCyclerTest.MozFile  5           187.07        187.70        1.00
de../desktopui_PageCyclerTests  5           ALL PASS      ALL PASS      -
de..   PageCyclerTest.Moz2File  5           188.75        187.13        0.99
de..  PageCyclerTest.Intl2File  5           682.23        684.26        1.00
bvt   					    ALL PASS      ALL PASS      -
suite_Smoke                                 ALL PASS      ALL PASS      -

BUG=None
TEST=Built chromeos from scratch, and ran PageCyclerTests, bvt and suite_Smoke.

Change-Id: I85281eaee1702de0cc89e093caf70a5d45ccce14
Reviewed-on: https://gerrit.chromium.org/gerrit/15537
Commit-Ready: Han Shen <shenhan@chromium.org>
Reviewed-by: Han Shen <shenhan@chromium.org>
Tested-by: Han Shen <shenhan@chromium.org>
2012-02-14 10:11:20 -08:00
Mike Frysinger
227b452d3d dev-python/*: import from portage
Just copying the ebuilds from portage/ so hopefully no functional changes.

BUG=chromium-os:26016
TEST=`cbuildbot arm-generic-full` works
TEST=build_packages+build_image boots x86

Change-Id: Iba5f8cdbfd2a518944c7bcf26f91c9ffa826f149
Reviewed-on: https://gerrit.chromium.org/gerrit/15760
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-02-14 07:30:03 -08:00
Mike Frysinger
5f8a90b910 util-linux: import from upstream Gentoo
Grab the latest stable version from upstream.

BUG=chromium-os:24839
TEST=`emerge util-linux` works
TEST=`emerge-arm-generic util-linux` works
TEST=build_packages+build_image for x86-alex boots up
CQ-DEPEND=Ie30c3b74003fa8aa99109ebf60d77f61864a2c1c

Change-Id: Id029e027711451a79baa57f11af8049e545a9551
Reviewed-on: https://gerrit.chromium.org/gerrit/12624
Reviewed-by: Ben Chan <benchan@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-13 20:49:25 -08:00
Ahmad Sharif
211259aacd Changed the logic to discover the gcc atom from the config.
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>
2012-02-13 14:30:30 -08:00
Stuart Abercrombie
60b16d6bf0 Add mtdev, a new dependency of xf86-input-evdev.
BUG=25404

Change-Id: Idf989d4e5587d61cdba2b5800f8364bb19cadf60
Reviewed-on: https://gerrit.chromium.org/gerrit/15709
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Stuart Abercrombie <sabercrombie@chromium.org>
Commit-Ready: Stuart Abercrombie <sabercrombie@chromium.org>
2012-02-13 12:54:41 -08:00
Mike Frysinger
7b6d3d6f56 sys-apps/file: update to latest Gentoo stable
We need a newer version that supports latest python eclass.

BUG=chromium-os:26016
TEST=`emerge file` works
TEST=`emerge-arm-generic file` works
TEST=build_packages+build_image boots x86, and `file` on the target works
TEST=`cbuildbot arm-generic-full` works

Change-Id: I2f9e7cf18aecebdc54d5c3298ac18b8c006c97b0
Reviewed-on: https://gerrit.chromium.org/gerrit/15759
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-02-13 12:32:59 -08:00