Commit Graph

2650 Commits

Author SHA1 Message Date
Brandon Philips
6789da97fc chore(build_image): chromeos -> coreos
Change-Id: I8023c038d7019b55115aaa45487ebb7b9927c239
2013-02-14 16:18:56 -08:00
Brandon Philips
56fd29c640 chore(build_packages): use coreos not chromiumos
Change-Id: I2efe4b0c93ca9044aaa284c5c81d62db3e9f1b46
2013-02-14 16:18:56 -08:00
Brandon Philips
6a362d27f9 fix(make_chroot): use the new places for make.conf
make.conf should live in /etc/portage these days

Change-Id: I55372ae3ee6a4ae7abf6873c08c1fcef46d7cd53
2013-02-14 16:18:56 -08:00
Brandon Philips
474313e651 fix(make_chroot): use the portage openssl for now
portage's openssl is up to date, no need to fork it for now.

Change-Id: Ib2a03811803ecf4626813706f6ef79ad4b1956f3
2013-02-14 16:18:56 -08:00
Brandon Philips
e5aeefeb2b chore(update_chroot): chromeos -> coreos
Change-Id: Ib8ab7afcc7bb0a1bcc5db7a7beef1c50df170610
2013-02-14 16:18:56 -08:00
Brandon Philips
bf893c277f fix(make_chroot): default to using python 2.7
the stage3 has python3 which is terrible, don't do that.

Change-Id: I24f82c8eb59ff7c2953033d233d32bb0f959d8da
2013-02-14 16:18:56 -08:00
Brandon Philips
2f17a00183 chore(make_chroot): chromeos to coreos renames
Change-Id: I5f2b4fae96df91dd7d6d01cc393cebc3af011660
2013-02-14 16:18:56 -08:00
Brandon Philips
472ab7b202 fix(make_chroot): don't remove files that dont' exist
These files don't exist in the gentoo stage3, don't try and remove them.

Change-Id: Ie158b4989540482751cbb4de0ee8ef88e4f49759
2013-02-14 16:18:56 -08:00
Brandon Philips
c91cefb941 feat(make_chroot): use a new gentoo stage3
Change-Id: I6364212989ca0723fd78f4658369d6becd47b4bd
2013-02-14 16:18:56 -08:00
Brandon Philips
d6b1b47abb coreos: make chroot fixes
Change-Id: I9dc62495136dbbc9e491e7293822348c1a450481
2013-02-14 16:18:56 -08:00
Brandon Philips
11472e5166 common: make safe_umount retry a few times
on Fedora 18 on Gnome 3.0 something is making the first attempt at
unmounting return busy. Unfortunatly, the return code is 32 everytime
so we have to parse the output of umount :( :( :(

Change-Id: I7f94bf6c2059c7e7cb4fb173d9ffbabd59f2b24f
2013-02-14 16:18:56 -08:00
Mike Frysinger
c1fd42203b clean old chromeos-base/chromeos-bsp-null
We are converting virtual/chromeos-bsp to a new style virtual, but we
have to clean out the old one first as it has a PROVIDE= which messes
up the upgrade process.

BUG=chromium-os:38307
TEST=`./update_chroot` uninstalled this pkg for all generic boards
CQ-DEPEND=CL:42188

Change-Id: Ie23bf462a178bf1085a4700155b779e9651ad24d
Reviewed-on: https://gerrit.chromium.org/gerrit/42528
Reviewed-by: Anush Elangovan <anush@google.com>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2013-02-04 06:56:09 -08:00
Ryan Harrison
b8bd594130 Add /usr/share/profiling to COMMON_INSTALL_MASK
This directory contains profiling/coverage data that is generated by some
packages during the build process. It should not be installed onto the device,
but we want the data to live on in /build to allow developers to consult it.

BUG=chromium-os:37854
TEST=None, this change will be tested in CL 42339 since it currently has not
     effect

Change-Id: I882fa7a7496db52a72bb8c5409b3715490d95879
Reviewed-on: https://gerrit.chromium.org/gerrit/42499
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Tested-by: Ryan Harrison <rharrison@chromium.org>
2013-02-02 11:48:48 -08:00
Denis Glotov
94b00acd95 Revert "Revert "Extend STATEfull partition to 3Gb in 2gb-rootfs-updatable disk layout.""
This reverts commit 285b5338b8

Change-Id: I19f8238cb55f88b358244c09c32841ad9f79dd3f
Reviewed-on: https://gerrit.chromium.org/gerrit/42457
Tested-by: Denis Glotov <glotov@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Denis Glotov <glotov@chromium.org>
2013-02-01 12:00:17 -08:00
Don Garrett
7b69fb2525 Reorder rootfs partitions to be spinning disk friendly.
Change the order of partitions to given better performance for spinning disks.
However, this change affects all devices, not just those with spinning disks.

We will be able to remove the per-board overrides from several devices if/
when this change is accepted.

BUG=chromium-os:38122
TEST=image_to_live, (Will run trybots, and perform a recovery).

Change-Id: Ibe60e384e0392936f9f8ceb326618951367974df
Reviewed-on: https://gerrit.chromium.org/gerrit/41792
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Don Garrett <dgarrett@chromium.org>
2013-02-01 11:39:24 -08:00
Simran Basi
285b5338b8 Revert "Extend STATEfull partition to 3Gb in 2gb-rootfs-updatable disk layout."
Suspecting this CL is killing devices in the lab: crosbug.com/38483

This reverts commit 38fe561a92

Change-Id: I6a6f0c170d5410de79ad0d2b96c7b9c95046cae4
Reviewed-on: https://gerrit.chromium.org/gerrit/42452
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
2013-02-01 09:03:45 -08:00
Denis Glotov
38fe561a92 Extend STATEfull partition to 3Gb in 2gb-rootfs-updatable disk layout.
This is needed for vmtests to have enough space, because default size,
although expandable, is too small in vm images.

BUG=chromium-os:38088
TEST=cbuildbot x86-generic-asan amd-64-generic-asan --remote -g I07d31d8b -gI18fab01e -gI9f55fcd3

Change-Id: I9f55fcd3707859dca8304b8e0c78ebd39afea566
Reviewed-on: https://gerrit.chromium.org/gerrit/42390
Tested-by: Denis Glotov <glotov@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Denis Glotov <glotov@chromium.org>
2013-02-01 02:33:54 -08:00
Gabe Black
0d7b85aacd Add the --include-masked flag when calling the equery which command.
When setting up a new ebuild, the process I've used in the past was to
create a 9999 ebuild and, to test it, cros_workon it so emerge can
choose that version to build. cros_workon uses equery in its
canonicalize_name function, and if it fails then it aborts the call to,
in my case, cros_workon start.

The problem is that equery ignores masked packages by default,
apparently, and because no stable version exists, it can't see the lone
9999 ebuild. Because that fails you can't cros_workon the package, and
because of that you can't build it because you've still only got the
unstable version.

To work around this new behavior, I added the --include-masked option I
found while digging around in equery's source. This option seems to
allow it to see the otherwise unavailable package, and the cros_workon
succeeds.

BUG=None
TEST=Saw that this allowed cros_workon-ing a new ebuild which only had a
9999 version. Ran cros_workon-link start and stop on an existing ebuild
and saw the command complete successfully.

Change-Id: Icfb271ed671b118bbd4ebfa1c3341353e203162a
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/42276
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
2013-01-30 14:25:44 -08:00
Peter Mayo
45ebc4c9fc Copy the netrc into the chroot at entry.
This seems to be needed for acessing some of the chrome repositories.
Without it we get git clone hangs trying to sync.

BUG=chromium-os:38303
TEST=local entry into chroot

Change-Id: Ia68a6486022e8d230572bad0f9031c3e5d36197c
Reviewed-on: https://gerrit.chromium.org/gerrit/42140
Commit-Queue: Peter Mayo <petermayo@chromium.org>
Reviewed-by: Peter Mayo <petermayo@chromium.org>
Tested-by: Peter Mayo <petermayo@chromium.org>
2013-01-28 14:01:37 -08:00
Vic Yang
e72689e500 make_netboot: Fix path to netboot firmware
Now that netboot firmware is named 'nv_image-xxx.bin', let's change it
in make_netboot.sh.

Also, update_firmware_vars.py is already included in factory_setup.
There is no need to copy it to factory_shim. Remove it.

BUG=chrome-os-partner:17471
TEST=Run make_netboot and see nv_image copied.

Change-Id: I513c0377d63e2088b36275ab79ea06c6652e4bb4
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42093
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2013-01-28 08:16:31 -08:00
Denis Glotov
61772d46aa Add 2gb-rootfs-updateble disk layout.
This is to be used with build_image and image_to_vm by cros buildbots
that need more rootfs size.

Unlike 2gb-rootfs, it has both ROOT-A and ROOT-B enlarged to 2gb, so
that image update test (1_update in SimpleTestsUpdateAndVerify) is possible.

BUG=chromium-os:38088
TEST=cbuildbot x86-generic-asan amd-64-generic-asan --remote -g I6f497214 -g I07d31d8b

Change-Id: I6f497214f54f4457cf2b40610beb9272622d1a47
Reviewed-on: https://gerrit.chromium.org/gerrit/41814
Tested-by: Denis Glotov <glotov@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Denis Glotov <glotov@chromium.org>
2013-01-28 08:16:28 -08:00
Mike Frysinger
cf7a09344b setup_board: make sure /usr/local/bin exists
We currently rely on the fact some package happens to install into
/usr/local/bin and creates the dir for us.  If that doesn't happen,
then we fail when generating local wrappers.  So run mkdir first to
make sure everything is sane.

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

Change-Id: I42f9122e1a8aa7aa19a7efb17deaa6dd28e58582
Reviewed-on: https://gerrit.chromium.org/gerrit/41929
Reviewed-by: David James <davidjames@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2013-01-24 14:21:20 -08:00
Mike Frysinger
79ae5b4a06 use new status=none with dd
The latest coreutils introduces a status=none option which suppresses
all information which is more than the current status=noxfer.

BUG=None
TEST=`./build_image` no longer spews any dd info

Change-Id: I3cfefed1d38e7e5ff52342c98e6a306d9a48950a
Reviewed-on: https://gerrit.chromium.org/gerrit/41930
Reviewed-by: David James <davidjames@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2013-01-24 13:58:27 -08:00
Anush Elangovan
87933c73cf Remove chromeos-[dev|test]-init deps
Now that chromeos-dev-init and chromeos-test-init are explicitly
specified in chromeos-dev and chromeos-test remove the hardcoding
in build_packages

BUG=None
TEST=build and run on daisy and trybots on a variety of x86/arm
paladin/full builders
CQ-DEPEND=CL:Iaceab4dbc2c215ba899d17e78c6c22e60c0802c8

Change-Id: I3064117ecf5bbafbc0f340f46cc07d4f6c959559
Reviewed-on: https://gerrit.chromium.org/gerrit/41943
Reviewed-by: David James <davidjames@chromium.org>
Commit-Queue: Anush Elangovan <anush@chromium.org>
Tested-by: Anush Elangovan <anush@chromium.org>
2013-01-24 13:58:22 -08:00
Paul Taysom
5e39bb6cd1 Configure the serial port for debugging
Enable the serial port from the build_image command line.
Currenly, you have to edit build_kernel_image.sh to enable
the serial port for kernel debugging. Now:

./build_image --board=${BOARD} --enable_serial=ttyS0

Will enable sending printks to the specified serial port.

BUG=chromium-os:38026
TEST=built images with and without serial enabled

Change-Id: I9ef4f2a20f0d451e132371339c4eba1faf4c94de
Reviewed-on: https://gerrit.chromium.org/gerrit/41638
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Paul Taysom <taysom@chromium.org>
Tested-by: Paul Taysom <taysom@chromium.org>
2013-01-23 17:44:43 -08:00
Vic Yang
3239b1aacd Add TPM and I2C device USE flags when building initramfs kernel
This is to match the refactoring of kernel eclass.

BUG=chrome-os-partner:17368
TEST=Build factory install shim and install.

Change-Id: Ia47f1c9632f82c127a818ca69fbcc91feacbfdcd
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41755
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2013-01-22 18:57:41 -08:00
David James
4cae07382d Add pylint hook to src/scripts.
BUG=chromium-os:11550
TEST=Verify presubmit hook catches when there are pylint errors.

Change-Id: I6b3d3f7c93d7188dd3edaea56a795567200adea2
Reviewed-on: https://gerrit.chromium.org/gerrit/41620
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Queue: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2013-01-18 11:40:40 -08:00
David James
fc49d8dd19 Fix broken boto file handling.
After CL:39921, I get the following warning every time I enter the chroot:

ln: failed to create symbolic link `.../chroot/root/.boto': File exists

All bots get this error as well. This is caused because CL:39921, causes
~/trunk to no longer resolve outside the chroot, so it's invalid for processes
outside the chroot to try to resolve paths inside there. Fix cases where we do
this inside enter_chroot.sh.

BUG=chromium-os:37347
TEST=cros_sdk doesn't print warnings anymore.

Change-Id: Iaeb9b7407e12397bce1600bd51559be20f998fdf
Reviewed-on: https://gerrit.chromium.org/gerrit/41571
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2013-01-17 15:09:29 -08:00
Mike Frysinger
baae8eb628 common.sh: convert to bash
We don't need to support POSIX shell, so convert to bash.

BUG=None
TEST=`cbuildbot {amd64,x86,arm}-generic-full chromiumos-sdk daisy-release` worked

Change-Id: I33ad25d2310c593f3e346d955e3aa27da41091fc
Reviewed-on: https://gerrit.chromium.org/gerrit/41271
Reviewed-by: David James <davidjames@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2013-01-16 13:59:21 -08:00
Brian Harring
9086a3f9d3 Calculate CHROOT_TRUNK_DIR earlier.
Issues flagged during unittest run; bit unsure how this got missed
since trybots were involved (Presuming human error).

BUG=chromium-os:37347
TEST=trybot run

Change-Id: Ib6e49d28f9427197a0abd0e4da68d2f628dc2803
Reviewed-on: https://gerrit.chromium.org/gerrit/41203
Reviewed-by: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
2013-01-14 01:53:41 -08:00
Brian Harring
871a40aa8f Fix bug introduced via CL:37347
Slipped past during rename of the chroot upgrade script from
49 to 50; name was slightly changed but full re-validation of the
rename wasn't done (thus the typo slipped past testing, and review).

Simplify the code via removal of invoking the upgrade script, instead
just doing the relevant commands (fixing chroot awareness issues in
the process).

BUG=None
TEST=manual cros_sdk invocation

Change-Id: I122de8b4cf7ec0845643e09e7919cbcdbd0bb79a
Reviewed-on: https://gerrit.chromium.org/gerrit/41202
Reviewed-by: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
2013-01-14 01:18:33 -08:00
Brian Harring
2499bfbeb2 Move source access to a standard location, add chromite to PYTHONPATH.
Rather than having to find /home/${SUDO_USER:-${USER}}/trunk, instead
just look for /mnt/host/trunk (defined by common.sh as $CHROOT_TRUNK_DIR).
This simplifies code flow, and is a requirement for shoving chromite
into PYTHONPATH globally w/in the chroot.

BUG=chromium-os:37347
TEST=cros_sdk --replace; cros_sdk w/ chroot upgrade.
Change-Id: I9ee3e6556541a91193f49cbf74ffc5a8e090537f
Reviewed-on: https://gerrit.chromium.org/gerrit/39921
Tested-by: Brian Harring <ferringb@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
2013-01-14 00:44:03 -08:00
Gilad Arnold
11e0f66cc9 image_to_usb.sh: allow writing to character devices
This is useful for debugging, e.g. --to /dev/null. The user will have to
use --force_non_usb to allow this, in which case all bets are off and we
should let her do this.  Also note that, before this fix, using --to
/dev/null would have given a strange error message (target device does
not exist); with it, we're handling all devices in a more comprehensive
way, spitting the right error message when appropriate.

BUG=None
TEST=--to /dev/null dies as expected; works with --force_non_usb

Change-Id: I514e14e1f7cc49b3d6172a2a53aa6da33ef5ecfd
Reviewed-on: https://gerrit.chromium.org/gerrit/41133
Commit-Queue: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
2013-01-12 23:06:32 -08:00
Gilad Arnold
8f861c05b6 common.sh: limit pv progress bar initial width to 80 characters
By default, pv automatically infers and uses the full width of the
terminal. This generally makes sense for a console application, but in
the case of pv it just causes the progress bar to be ridiculously wide
when run on wide terminals, to the point it's hard to read. This CL is
setting it to 80 characters, the widely accepted standard width for
a terminal, in cases where the terminal appears to be larger than
80 columns. Note that:

* Even with -w, pv appears to be resizing the progress bar as the
  terminal width changes midway through the run. This means that if
  a user widens the window, then the progress bar will go wide again and
  there's nothing to be done about it.

* Theoretically, in very rare cases this may lead to a progress bar the
  exceeds the width of the terminal (i.e. set to 80 columns on
  a terminal that has just shrunk to fewer columns). The odds for such
  timing are close to nil and even then the damage is minimal.

* This will work for non-terminal runs, or otherwise runs where stty
  does not produce any output.

* To avoid the initialization overhead for all common.sh inclusion,
  replacing the variable with a function that prints the pv/cat command.

BUG=None
TEST=Ran ./image_to_usb on wide and narrow terminal windows, it works.

Change-Id: I549df1dd29e93909ea646ae9b9e09d9a588ad382
Reviewed-on: https://gerrit.chromium.org/gerrit/40937
Commit-Queue: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
2013-01-12 23:06:31 -08:00
Vic Yang
435611e5ee make_netboot: Enable I2C device driver for netboot kernel
This is needed as I2C device driver is also built-in for install shim
kernel.

BUG=chrome-os-partner:16712
TEST=Build netboot image and check I2C device driver is included.

Change-Id: I71f21eea9cf599454fe18bd8adeeaa629d851db6
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41076
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
2013-01-10 19:23:21 -08:00
David James
7efb76cde5 Remove deprecated mod_image_for_test.sh and references.
mod_image_for_test.sh doesn't work anymore so nobody should be using it.
There are a few places where scripts try to use mod_image_for_test.sh,
and these are timebombs because they fail if a test image needs to actually
be produced.

BUG=chromium-os:31183
TEST=Tested that this script doesn't produce any images anymore, so
     it should be fine to delete it.

Change-Id: If80337407023d62f76117dc44cadfa46801ca236
Reviewed-on: https://gerrit.chromium.org/gerrit/40955
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Queue: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2013-01-09 18:30:52 -08:00
Vic Yang
90e3b25914 Move ARM factory install shim to initramfs
As USB/SD install shim might be used for ARM devices now, it is
reasonable to move ARM factory install shim to initramfs like on x86.
This converges the code path and build process for ARM and x86.

BUG=chrome-os-partner:15884
TEST=Install with install shim and netboot on Spring.

Change-Id: Ic8d7328502181ca909be3d7542be34f2a904523f
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/40931
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2013-01-09 10:32:24 -08:00
Ahmad Sharif
5d75098098 Start update_engine before doing re-imaging.
Sometimes update_engine isn't running on the device because of a possibly bad
Chrome, etc. So don't assume it is running and always attempt to start it before
updating.

BUG=none
TEST=stop update-engine on the device.
    ./bin/cros_image_to_target.py ... works.

Change-Id: I9aeaed80a9a82f9f685e58774fa987877ec635c9
Reviewed-on: https://gerrit.chromium.org/gerrit/40285
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: asharif <asharif@chromium.org>
Tested-by: asharif <asharif@chromium.org>
2013-01-04 16:54:30 -08:00
David James
4a9d94b262 Remove unused functions from crosutils cros_build_lib.
crosutils cros_build_lib is deprecated in favor of
chromite.lib.cros_build_lib. Remove unused functions to encourage folks
to migrate over to chromite.lib.cros_build_lib instead.

Info and GetCallerName are only used internally so we add an underscore
prefix to discourage others from using it.

BUG=chromium-os:24660, chromium-os:21287
TEST=pylint. Unit tests. Trybot runs.
CQ-DEPEND=CL:40300, CL:40311

Change-Id: Ia34d2770db2c2678b8966f6dceb2164b0a3333a2
Reviewed-on: https://gerrit.chromium.org/gerrit/40301
Tested-by: David James <davidjames@chromium.org>
Reviewed-by: Brian Harring <ferringb@chromium.org>
Commit-Queue: David James <davidjames@chromium.org>
2013-01-03 06:55:44 -08:00
Anush Elangovan
c52c5fbb7c Add support for "skip_kernelblock_install"
CrOS could be used in devices that dont have custom firmware to
interpret the Kernelblock (Part2,4). In such devices skip trying
to make the kernelblock

BUG=none
TEST=./build_image --board=chronos test and verify we dont build the kernel block

Change-Id: I3e9a8dd765ea00db2ebf112553d96c08960e544f
Reviewed-on: https://gerrit.chromium.org/gerrit/40219
Commit-Queue: Anush Elangovan <anush@chromium.org>
Reviewed-by: Anush Elangovan <anush@chromium.org>
Tested-by: Anush Elangovan <anush@chromium.org>
2013-01-02 17:03:40 -08:00
Vic Yang
8e0cd07e03 Build factory install shim by ebuild
Now that we have an ebuild for factory install shim, let's move to that
instead of base image.

BUG=chrome-os-partner:16712
TEST=Test network boot, install shim, RMA shim on Link.
     Test install shim on Snow.
CQ-DEPEND=CL:39952

Change-Id: Ib6a7a598087647b44a4aeca970e293ea72023890
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39955
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2012-12-21 18:54:08 -08:00
Kees Cook
74f163b587 install kernel testcase modules on test image only
Similar to the uinput module, install the testcases/ tree of modules
only on test images.

BUG=chromium-os:37353
TEST=daisy test image build has modules, production does not.
CQ-DEPEND=I16eee5afd1664f0ab4a9ab48b6cb2beaa6f30017

Change-Id: I5e7a48936b3fb45f49ff7ca4d592d46150c5610c
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39920
Reviewed-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
2012-12-21 12:42:42 -08:00
John Sheu
b7b095befd Use cirrus driver for QEMU
Moving to the cirrus driver (instead of std) so we can support
cirrus-fb, in preparation for nonroot-X support.

BUG=chromium-os:388
TEST=local build, run with x86-generic

Change-Id: Ic7d5776f673ac3c15680d62331345d55985f1d73
Reviewed-on: https://gerrit.chromium.org/gerrit/39900
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: John Sheu <sheu@chromium.org>
Commit-Queue: John Sheu <sheu@chromium.org>
2012-12-20 15:06:03 -08:00
Ryan Cui
eb4595f1e8 setup_board: add --accept_license flag.
Setting the flag will cause make.conf to set the ACCEPT_LICENSE
environment variable.

BUG=chromium-os:37312
TEST=remote trybots

Change-Id: Id478b7cfb8c37d363da46b1d74f33143e8ea159f
Reviewed-on: https://gerrit.chromium.org/gerrit/39801
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-12-19 12:15:59 -08:00
Allen Martin
642c3be66e Update libtool to keep in sync with toolchain
Force a re-emerge of host libtool

BUG=chromium-os:37334
TEST=Added fake "4.6.x-google" version string to libtool and ran
./update_chroot and verified libtool was re-emerged

Change-Id: I82d3da181831a7718b230305c5aca7899d591c2d
Signed-off-by: Allen Martin <amartin@nvidia.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/39858
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2012-12-18 18:18:26 -08:00
Doug Anderson
adf8a003e8 update_kernel: Save .5 seconds by avoiding tmp copy for kernel image
There's no need to store to a temporary file when updating the kernel
partition.  Just stream straight to the right partition.  This appears
to save about .5 seconds.

BUG=None
TEST=Time update_kernel and see savings; verify that kernel still gets
updated.

Change-Id: I5afead3e70720ee6dc9e6a822ef1a98032d93b79
Reviewed-on: https://gerrit.chromium.org/gerrit/39783
Commit-Ready: Doug Anderson <dianders@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
2012-12-17 13:29:08 -08:00
Brian Harring
3d01db2603 Fix minor style issue.
This was identified in CL:39304, but not corrected before landing.

BUG=None
TEST=bash -n build_packages

Change-Id: I17cefc883e191d33a3569d7f53ab2e0a85417da9
Reviewed-on: https://gerrit.chromium.org/gerrit/39753
Commit-Ready: Brian Harring <ferringb@chromium.org>
Reviewed-by: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
2012-12-15 21:33:02 -08:00
Vic Yang
982556afcc Filter out more things in install shim
This reduces tens of MB of install shim.

BUG=chrome-os-partner:16712
TEST=Build install shim and install with it.

Change-Id: Ic7fab3c6e26d9b78f5181c4f10181217c1c2697a
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39534
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
2012-12-11 03:02:12 -08:00
Kees Cook
9ea1347ed9 update_partition_table: dynamically handle resize
When changing the size of the stateful partition, we must be able to
operate on any image, with any arrangement of partitions. The static
templates cannot be used because we don't know what we're starting with.
As such, this change makes the update function walk the list of
partitions, duplicating all their details, and moves any located after
stateful by the change in size, and copies in the new stateful contents.

BUG=chromium-os:37080
TEST=link build and decryption recovery tested

Change-Id: I1131dd8ee91e5db2556bdf8f7ca12b08f35da32b
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39424
Reviewed-by: Will Drewry <wad@chromium.org>
Reviewed-by: Liam McLoughlin <lmcloughlin@chromium.org>
Tested-by: Liam McLoughlin <lmcloughlin@chromium.org>
2012-12-10 13:56:46 -08:00
Doug Anderson
48b5200b92 update_kernel: Speed copy for kernel, modules, and firmware copy
If possible, we now uses rsync to copy elements from the host to the
device.  Using rsync to copy sped my "no-op" update kernel from 30
seconds down to ~5 seconds.

If rsync isn't available (a non-test build), speed up the fallback
case to:
- Never write tar to disk (on either host or target)--just stream
  straight to/from the network.
- Don't use bzip2 compression.  It's assumed that we've got a fast
  connection to the device so this is overkill and slower.
In this case we're at ~15 seconds for a "no-op" update kernel.

BUG=None
TEST=With old code, run this:
  time ./update_kernel.sh --remote=${REMOTE} --novboot --noreboot
...and see 30 seconds with old code and 4 seconds with new code.
TEST=Use update_kernel for updating kernel.  See that kernel / modules
get updated.

Change-Id: Iafad68221bd459fce5a4c661e07cd649b058d7b9
Reviewed-on: https://gerrit.chromium.org/gerrit/39393
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>
2012-12-10 08:44:29 -08:00