Commit Graph

2152 Commits

Author SHA1 Message Date
Chris Wolfe
916b1f1e11 enter_chroot: symlink boto config from chromeos-overlay, if available
The private chromeos-overlay has shared credentials for read-only
access to the archive of CrOS images. When entering the chroot check
whether these credentials are available, and install them to ~/.boto
within the chroot unless that file already exists.

BUG=None
TEST=Applied patch and entered fresh private and public chroots.
  Manually ran 'gsutil config' to replace the credentials;
    this works as long as there is no ~/.boto.bak already.
  Re-entered the chroot with manually-configured credentials.
  Ran 'gsutil ls' with BOTO_CONFIG set to a board-specific boto.

Change-Id: Ib62dc28f90bce692a833b5fc9d4c56981acc98d1
Reviewed-on: https://gerrit.chromium.org/gerrit/21480
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Chris Wolfe <cwolfe@chromium.org>
Commit-Ready: Chris Wolfe <cwolfe@chromium.org>
2012-05-01 08:26:14 -07:00
Mike Frysinger
db80fc54c9 build_packages: drop --oldchromebinary
We have pretty good binpkg support for chrome now, as well as incremental
building (and ccaching), so we should be able to drop this flag now.

BUG=None
TEST=build_packages still works for x86-alex

Change-Id: I3f3bf7e513ef45c091cc8363753035cac07d2f97
Reviewed-on: https://gerrit.chromium.org/gerrit/20967
Reviewed-by: Anush Elangovan <anush@chromium.org>
Reviewed-by: Brian Harring <ferringb@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-04-26 13:21:07 -07:00
Michael Krebs
dc7b317587 scripts: Sleep for 200ms between symbol uploads
To avoid looking like we're DoS'ing the symbol server, force a delay between
symbol uploads.  If this becomes a bottleneck for buildbots, this should be
modified to only upload symbol files that have changed, by checking against
the buildbot's previous debug.tgz.

BUG=chromium-os:26596
TEST=Manually ran upload_symbols against staging symbol server

Change-Id: Iecf11e26a70f0c44838fb13e2ebc6ebb78336c50
Reviewed-on: https://gerrit.chromium.org/gerrit/19566
Commit-Ready: Michael Krebs <mkrebs@chromium.org>
Reviewed-by: Michael Krebs <mkrebs@chromium.org>
Tested-by: Michael Krebs <mkrebs@chromium.org>
2012-04-25 18:41:47 -07:00
Zelidrag Hornung
4c5ed7dfc4 Fixed image download script.
BUG=none
TEST=none

Change-Id: I947a9b63a3822d6bf885096e77c1b66957674183
Reviewed-on: https://gerrit.chromium.org/gerrit/21109
Reviewed-by: Rahul Chaturvedi <rkc@chromium.org>
Commit-Ready: Zelidrag Hornung <zelidrag@chromium.org>
Tested-by: Zelidrag Hornung <zelidrag@chromium.org>
2012-04-25 14:34:24 -07:00
Michael Krebs
a7056f1b07 buildbot scripts: Increase number of retries for uploading
Delay up to 63 seconds when trying to upload a symbol file.  My default of
15 seconds before turned out to not be enough to cover at least one case
that davidjames@ found in ToT buildbots.

BUG=chromium-os:29963
TEST=Ran upload_symbols --testing

Change-Id: I82b038f8845c3f2aaba0ee95f40efd4b70e2ffb1
Reviewed-on: https://gerrit.chromium.org/gerrit/21016
Commit-Ready: Michael Krebs <mkrebs@chromium.org>
Tested-by: Michael Krebs <mkrebs@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
2012-04-24 21:04:18 -07:00
Vadim Bendebury
b90bf4aabf Revert "Use keyboard controller for hard reset instead of CF9"
This reverts commit bc856858be86b1ae7c4dc33b256f43baac51636d

The thing is that ${FLAGS_board} is not set when build_kernel_image.sh runs, so the check never kicks in.

Change-Id: I501cb979c7aef8d2f7061da2b6cf2daedfe65004
Reviewed-on: https://gerrit.chromium.org/gerrit/20977
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Ready: Vadim Bendebury <vbendeb@chromium.org>
2012-04-24 18:52:18 -07:00
Michael Krebs
c91d3ebb17 scripts: Show an error if a symbol file is too big
If the symbol file to be uploaded to the symbol server is close to the limit
at which the symbol server will reject it, show an error so we can do
something about it before it's too late.  This also prints the special
"@@@STEP_WARNINGS@@@" line to make the buildbot show the step as orange.

BUG=chromium-os:19194
TEST=Manually ran upload_symbols to make sure it worked with/without an error

Change-Id: I7942ba20f7bc83d66036f9f9fe66403083b1a1f1
Reviewed-on: https://gerrit.chromium.org/gerrit/20664
Commit-Ready: Michael Krebs <mkrebs@chromium.org>
Tested-by: Michael Krebs <mkrebs@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
2012-04-20 19:39:31 -07:00
Michael Krebs
44a3b35f44 scripts: Don't exit when the sym_upload command fails
My previous commit fixed a presumed oversight where the "set -e"
functionality had been disabled for the upload_file() function.  But
enabling it caused a problem for when sym_upload failed to upload the file
-- which is why I had written all that retry code in the first place.  We
could trap the shell's "ERR" signal instead of exiting, but rather than
complicating the script too much, I'm just removing the check.

I also added a rudimentary testing mode to the script.  I had a basic one
that I used locally, but when I had to expand it to mimic a non-zero exit
status, etc. I figured I might as well productize it.  This can be enabled
by passing "--testing" as the first argument to the script.

BUG=chromium-os:29103
TEST=Ran with new --testing option and various parameters

Change-Id: Ia10b4225d2db026839730510b31f7f4cdd101b98
Reviewed-on: https://gerrit.chromium.org/gerrit/19795
Tested-by: Michael Krebs <mkrebs@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Michael Krebs <mkrebs@chromium.org>
2012-04-17 14:44:23 -07:00
Zdenek Behan
3602abe286 Revert "Make use of cros_setup_toolchains"
Breaks the tree.

This reverts commit f3904d6530d3fd195a3659963a351b6ba8d0abff

Change-Id: Idaf6e59c506efcdf6a19d123ede7eb1cfafc3e2e
Reviewed-on: https://gerrit.chromium.org/gerrit/20182
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Tested-by: Zdenek Behan <zbehan@chromium.org>
2012-04-12 19:48:36 -07:00
Zdenek Behan
24ae1d01d7 Make use of cros_setup_toolchains
It is now used for:
- make_chroot (cros_sdk --bootstrap)
- update_chroot

setup_board is stripped of redundant code which was deprecated by this.

Also stripped is some usepkg logic in make_chroot, as that is now
exclusively source-only.

BUG=chromium-os:23032
TEST=trybot chromiumos-sdk

Change-Id: If62b4f3973f02fd8e1deed35864c824a02ab0c22
Reviewed-on: https://gerrit.chromium.org/gerrit/17910
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Tested-by: Zdenek Behan <zbehan@chromium.org>
Commit-Ready: Zdenek Behan <zbehan@chromium.org>
2012-04-12 18:29:59 -07:00
Chris Sosa
dbc853b2bf Add an advanced option to build_image so that a caller can specify the version.
This change adds the ability for a caller to pass a specific version name
to build_image rather than rely on parsing of chromeos_version.sh + attempt
number.

BUG=chromium-os:29077
TEST=Ran build_image w/ w/out option

Change-Id: I69b76ae4bfc148325686902606476a0aae293e56
Reviewed-on: https://gerrit.chromium.org/gerrit/19861
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
2012-04-10 13:06:46 -07:00
mukesh agrawal
df23c6db56 mod_for_test_scripts: add backchannel interface support for shill
To use a backchannel interface, we need to configure the connection
manager to ignore that interface. shill uses a different syntax
for that command-line option, because base's command-line parser
doesn't support the option syntax flimflam uses.

This CL adds code to rewrite the part of flimflam.conf that holds
shill's configuration options.

CQ-DEPEND=Ic2fdf49ec454995bf9378299e64378f957b9f26c
BUG=chromium-os:23531
TEST=manual (see below)

Manual testing: ran flimflam and shill on test images. Verified
that the connection manager ran with the appropriate command line
flags in both cases.

Change-Id: I57481387e207bf1ad5138a9fce9921539eed080f
Reviewed-on: https://gerrit.chromium.org/gerrit/19712
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
2012-04-06 17:00:20 -07:00
Michael Krebs
fbc6ca69fd scripts: Retry uploading symbol files
If there's an error uploading a symbol file, retry it up to four times
before giving an error.

BUG=chromium-os:28985
TEST=Manually ran upload_symbols to make sure it worked with/without errors

Change-Id: Ia2159d96d0fae9042c81147249986e39f05ca398
Reviewed-on: https://gerrit.chromium.org/gerrit/19625
Commit-Ready: Michael Krebs <mkrebs@chromium.org>
Tested-by: Michael Krebs <mkrebs@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
2012-04-05 17:39:41 -07:00
Mike Frysinger
aabca6c6a3 setup_board: quote flags var
Now that the flags variable can be "[stable]", if we don't quote its
expansion, it can match files like "t" resulting in bad flags being
passed to crossdev.

BUG=None
TEST=`touch t; ./setup_board --board=x86-alex` no longer results in "tgcc"

Change-Id: I866e934776e2d47a2c99bd08964017014aace97f
Reviewed-on: https://gerrit.chromium.org/gerrit/19595
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-04-05 11:41:41 -07:00
Michael Krebs
32294abc01 scripts: Increase size limit at which CFI is stripped
Crash server file size limit has been increased to 300MB

BUG=chromium-os:23765
TEST=Manually ran upload_symbols for chrome.sym

Change-Id: I9c683ad057abda1f8df7550243cd5c870228257c
Reviewed-on: https://gerrit.chromium.org/gerrit/19569
Commit-Ready: Michael Krebs <mkrebs@chromium.org>
Tested-by: Michael Krebs <mkrebs@chromium.org>
Reviewed-by: Eric Blake <eblake@chromium.org>
2012-04-03 21:30:42 -07:00
Mike Frysinger
ba7584561c make_chroot: deploy pbzip2 early
Make sure our chroot has pbzip2 as early as possible so we can leverage
it later on in the build process as the default compressor.

BUG=None
TEST=semi-manual:
	- remove pbzip2 as soon as we've unpacked the chroot in make_chroot
	- run `cros_sdk` and see no pbzip2 warnings

Change-Id: I27d00cdb97c5ffcde79eb04cfabbe6e82a72c706
Reviewed-on: https://gerrit.chromium.org/gerrit/19469
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-04-03 10:22:33 -07:00
Daniel Erat
b51593405b build: Test /etc/localtime symlink in built images.
This makes us fail if /etc/localtime doesn't point at
/var/lib/timezone/localtime.

BUG=chromium-os:27413
TEST=manual: error from build_image after i patched chromeos-base to not create the symlink

Change-Id: I11ef272c2dcd67a189a5d67c46792490ec6d27a1
Reviewed-on: https://gerrit.chromium.org/gerrit/19335
Tested-by: Daniel Erat <derat@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Daniel Erat <derat@chromium.org>
2012-03-30 13:01:26 -07:00
Mike Frysinger
eb1a9b4e4e make_chroot: drop build-docbook-catalog hack
Now that the newer build-docbook-catalog supports ROOT, we don't need
to manually run this ourselves.

BUG=chromium-os:18036
TEST=`cbuildbot chromiumos-sdk` works

Change-Id: I3a89701a49623f9e50e651af9d8d505608fdc615
Reviewed-on: https://gerrit.chromium.org/gerrit/19252
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-03-29 10:04:24 -07:00
Mike Frysinger
7d338f501d setup_board: use correct toolchain tuple for binutils gold selection
The update to support multiple toolchains missed one place -- selection
of gold as the linker.  It would always handle just the default toolchain.
Fix up the logic so it always checks the current toolchain.

BUG=chromium-os:28548
TEST=`./setup_board --board=x86-alex` selected gold for x86_64 and i686 toolchains

Change-Id: I3c09e3a4fd91b68170fe255e37580a3c9f5f6feb
Reviewed-on: https://gerrit.chromium.org/gerrit/19226
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-03-28 15:23:30 -07:00
Mike Frysinger
51409977a2 dev_image_util: make file work by default
File is compiled with a path to the default magic database, but since we
install it into /usr/local rather than the normal /usr, that default path
does not work.  Add a smaller wrapper script around `file` to specify the
new database location so people don't have to manually do so.

BUG=chromium-os:27725
TEST=`./build_image --board=x86-alex dev` produced an image where `file /bin/bash` worked

Change-Id: I3862cb368437a14bf1e4b6ccf4e2df3e4f774817
Reviewed-on: https://gerrit.chromium.org/gerrit/19137
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-03-28 09:29:12 -07:00
Michael Krebs
68da4439ff Don't try to generate symbols for symbolic links
In our build environment, we have lots of symbolic links such as
"debug/.build-id/5c/a06545ff3812557dc5fd259db4e905c5dc3484.debug" that just
link to another .debug file.  In our case, those links don't actually point
to the right place, so we've just been seeing lots of "Binary does not
exist" warnings.  But it would also be undesirable to actually generate
symbols for these even if their targets *did* exist.

BUG=None
TEST=Ran cros_generate_breakpad_symbols

Change-Id: I050c349f7fefbdf922d54250379bad9b3db073d7
Reviewed-on: https://gerrit.chromium.org/gerrit/19182
Commit-Ready: Michael Krebs <mkrebs@chromium.org>
Tested-by: Michael Krebs <mkrebs@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
2012-03-27 16:44:22 -07:00
Mike Frysinger
bf41543707 update_chroot: update gcc-config logic slightly
The latest gcc-config will accept the CHOST setting from the host env,
so export that variable since we already spent the time running portageq
to get it.  This allows gcc-config to never execute portageq, and since
we run it multiple times, it helps in every invocation.

Along those lines, make sure we run gcc-config with `sudo -E` to pass
through the setting.

Since awk can handle regexps, merge the grep|awk into a single awk call.

Finally, there was a slight logic typo where we would always re-run
gcc-config even when the profiles were the same.  This does not match
the comments, nor the spirit of this code, so fix the operator typo.

BUG=None
TEST=`./update_chroot` still works and doesn't re-select the toolchain

Change-Id: If73df81c014219f8f9ab5895e59d055696add777
Reviewed-on: https://gerrit.chromium.org/gerrit/19164
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-03-27 11:34:05 -07:00
Mike Frysinger
0957a18357 virtual/linux-sources: rename from virtual/kernel
Upstream Gentoo renamed this virtual, so follow suite.

BUG=None
TEST=`cbuildbot amd64-generic-full` worked
TEST=`cbuildbot arm-tegra2-full` worked
TEST=`cbuildbot x86-generic-full` worked

Change-Id: I2721c85fe83f4ee8a90533eda14813697430e98e
Reviewed-on: https://gerrit.chromium.org/gerrit/18781
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-03-27 09:12:29 -07:00
Joseph Hwang
ca63e041e5 Install uinput module in test image only
This CL adds uinput module in INSTALL_MASK so that the module
is not installed to non-test image. A mod_image_for_test script
is implemented to install the module in the test image if the
uinput module exists.

BUG=chromium-os:26707
TEST=Build a base image and a test image. Check the directory
  /lib/modules/<version>/kernel/drivers/input/misc
where current <version> is 3.2.7.
In the base image, there should be no uinput.ko,
while in the test image, there should be uinput.ko.
CQ-DEPEND=Ie96242c4d56403866a2298db2ba3bd6459248c1b

Change-Id: I0ca6599f80b9bb72cdc044fc97cdf990ce550edc
Reviewed-on: https://gerrit.chromium.org/gerrit/19032
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Tested-by: Joseph Shyh-In Hwang <josephsih@chromium.org>
Commit-Ready: Joseph Shyh-In Hwang <josephsih@chromium.org>
2012-03-27 06:46:50 -07:00
Michael Krebs
7515d89be7 Dynamically use the 32-bit dump_syms for files when needed
'dump_syms' was recently changed to be built 64-bit, with a 32-bit version
available as 'dump_syms.32'.  This change makes use of the 32b dump_syms if
a file is built 32b.  For almost all targets nowadays, we should only see
64b files, but things like the installer can still be 32b.  Also see
https://gerrit.chromium.org/gerrit/14835.

BUG=chromium-os:22778
TEST=Ran cros_generate_breakpad_symbols on 32/64-bit executables
CQ-DEPEND=I6551fe22fb0caebd3584f76f95a543e9a91b7e1b

Change-Id: I780c20eeb745a919dbe130cf3cede7ec5ca6483a
Reviewed-on: https://gerrit.chromium.org/gerrit/18569
Commit-Ready: Michael Krebs <mkrebs@chromium.org>
Tested-by: Michael Krebs <mkrebs@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
2012-03-26 19:48:21 -07:00
Brian Harring
c03f260bb2 Revert "Install uinput module in test image only"
This reverts commit 5bf16bab5abb1cbf4f4acbc0d51d8aefa2c64091

Induced breakage: http://build.chromium.org/p/chromiumos/builders/x86%20generic%20incremental/builds/1259

Change-Id: I72170bc48cbc1cfe8b4913a9de1e5d8087525845
Reviewed-on: https://gerrit.chromium.org/gerrit/19023
Reviewed-by: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
2012-03-23 22:44:04 -07:00
Joseph Hwang
50420556f8 Install uinput module in test image only
This CL adds uinput module in INSTALL_MASK so that the module
is not installed to non-test image. A mod_image_for_test script
is implemented to install the module in test image.

BUG=chromium-os:26707
TEST=Build a base image and a test image. Check the directory
  /lib/modules/<version>/kernel/drivers/input/misc
where current <version> is 3.2.7.
In the base image, there should be no uinput.ko,
while in the test image, there should be uinput.ko.

Change-Id: I02b557466a56e11c5dcc1649a9275d0c2a896f09
Reviewed-on: https://gerrit.chromium.org/gerrit/17209
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Tested-by: Joseph Shyh-In Hwang <josephsih@chromium.org>
Commit-Ready: Joseph Shyh-In Hwang <josephsih@chromium.org>
2012-03-23 20:35:46 -07:00
Jim Hebert
fb97704081 Move enable-dbus-monitor to be a mod_for_dbusspy behavior
BUG=chromium-os:27091
TEST=mod_test_image_for_dbusspy test.bin

Change-Id: Ia2b84f314bd97f138680b7b05e00ff456d405bb0
Reviewed-on: https://gerrit.chromium.org/gerrit/18678
Reviewed-by: Jim Hebert <jimhebert@chromium.org>
Tested-by: Jim Hebert <jimhebert@chromium.org>
Commit-Ready: Jim Hebert <jimhebert@chromium.org>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
2012-03-21 12:23:48 -07:00
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