Commit Graph

25366 Commits

Author SHA1 Message Date
Stéphane Marchesin
38aac63013 Update util-macros to 1.14.0
This is needed for the xorg-2.eclass update, which is needed for the xserver update.

Change-Id: Ic4e839f05f55e4023864364236d36cfc93aa816c
Reviewed-on: http://gerrit.chromium.org/gerrit/8468
Reviewed-by: Antoine Labour <piman@chromium.org>
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
2011-09-28 17:36:41 -07:00
Scott James Remnant
0f5ebfe76b udev: update to udev-171-r2 from gentoo
Pull udev-171-r2 and accompanying files/ directory from cros/gentoo
in portage to here, as we don't need to modify anymore.

BUG=none
TEST=emerge, build_packages and build_image (with USE flags & A_K)

Change-Id: I1ba6d5809b74c5853b3609995d98a232cb16629f
Reviewed-on: http://gerrit.chromium.org/gerrit/8391
Tested-by: Scott James Remnant <keybuk@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2011-09-28 11:37:39 -07:00
Elly Jones
9ca3e4c0fe mod_image_for_recovery: reuse salt.
This will prevent the recovery kernel from having a different salt from the
rootfs it corresponds to.

BUG=chromium-os:20766
TESTED_ON=kaen
TEST=Adhoc
Build a recovery image and do recovery from it.

Change-Id: I96f735e527d807247e09e17aac1ed5b51367f0ef
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/8288
2011-09-28 10:50:10 -07:00
Scott Zawalski
53eb7a03b8 Modify build_image_util to preface CHROME_BRANCH with an R 2011-09-28 08:29:19 -07:00
Mike Frysinger
2a97059dfc cros_sdk: add a mount cache to avoid multiple execs
Since we grab a lock before mounting anything, we know that the relevant
list of mounts won't change (since we haven't changed it yet).  So we can
cache the output of `mount` and re-use that in every subsequent check.

BUG=None
TEST=`cros_sdk --enter` still works with simultaneous runs
TEST=`cros_sdk --enter -- ls` still works

Change-Id: I27c98c923761fb777686632fe6e6604ca543cfb6
Reviewed-on: http://gerrit.chromium.org/gerrit/8030
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2011-09-28 08:09:04 -07:00
Chris Sosa
905f6164a1 Prefix build folder name with CHROME_BRANCH from chromeos_version.sh.
BUG=chromium-os:15703
TEST=Ran build_image saw right folder.

Change-Id: I646dc7f67dac126436e75299e150ee053d25e810
Reviewed-on: http://gerrit.chromium.org/gerrit/8397
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
2011-09-27 19:05:14 -07:00
Mike Frysinger
8264917362 cros_sdk: avoid sudo to chmod when possible
Checking the permission of files is faster than assuming they're broken
and then running `sudo chmod`, so do just that.

BUG=None
TEST=run `cros_sdk --enter` with bad perms and see them fixed
TEST=run `cros_sdk --enter` with correct perms and see sudo skipped
TEST=the buildbot failure was due to other changes, not this one

Change-Id: Ie69b4e766e2e3652944e4723d091ce589d07a4f6
Reviewed-on: http://gerrit.chromium.org/gerrit/8028
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2011-09-27 16:36:53 -07:00
Andrew de los Reyes
8e93647f05 kvm: set cache type to unsafe if possible, else writeback
We try to set the cache type to unsafe, which is a new kvm feature,
else we set the cache type to writeback. The hope is that these cache
types will perform better on the bots, especially in the case of the
guest trying to flush data to disk.

The CL includes code to determine which version of kvm is running, and
the cache type is chosen based on that.

BUG=chromium-os:20305
TEST=trybot

Change-Id: Icf7dbb8f0056a330282ebeb81d0902b3d54f34c5
Reviewed-on: http://gerrit.chromium.org/gerrit/8360
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
2011-09-27 16:30:09 -07:00
Todd Broch
3c35668e4d Revert "Update a bunch of X-related packages."
This reverts commit 19902f17ab5ec171cf7a51e06097324dae784fe8

Change-Id: I5e895d76dda9be5ca097eaf0c448ae8b5ebf07e6
Reviewed-on: http://gerrit.chromium.org/gerrit/8367
Reviewed-by: Todd Broch <tbroch@chromium.org>
Tested-by: Todd Broch <tbroch@chromium.org>
2011-09-27 12:20:44 -07:00
Mike Frysinger
dcb99d0f9d libgpg-error: import newer version from upstream
A fix went into upstream for amd64 multilib installs which we need:
`gpg-error-config` likes to display -L/usr/lib64 when cross-compiling.

BUG=chromium-os:20636
TEST=`emerge-x86-generic libgpg-error`; `/build/x86-generic/usr/bin/gpg-error-config --libs` shows correct output (no -L flag)
TEST=`emerge-x86-generic libgcrypt` still works
TEST=`emerge-amd64-generic libgpg-error`; `/build/amd64-generic/usr/bin/gpg-error-config --libs` shows correct output (no -L flag)
TEST=`emerge-x86-generic libgcrypt` now works

Change-Id: I7a869789c8eb65b99ea9a907912b0befdf81887e
Reviewed-on: http://gerrit.chromium.org/gerrit/8286
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
2011-09-27 07:41:05 -07:00
Chris Sosa
faeee5f47c Add more debugging by re-running ssh commands that failed verbosely.
This CL changes remote_ssh to re-run the command verbosely if the
command failed with an SSH error (code 255).

BUG=chromium-os:19198
TEST=Ran it.  Simulated SSH error by closing KVM instance in cros_run_vm_update
while it was intiializing.  Saw re-run verbosely run correctly.

Change-Id: I9f95aac3fb2d00bc7d26b0b9298409d8ce2db594
Reviewed-on: http://gerrit.chromium.org/gerrit/8313
Commit-Ready: Chris Sosa <sosa@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
2011-09-26 20:19:34 -07:00
Stéphane Marchesin
2ecfe96bec Update a bunch of X-related packages.
Reviving that change now that ARM is fixed.

Change-Id: I9aa03db8b2b1c2d58f292378894628813d0b7ce3
Reviewed-on: http://gerrit.chromium.org/gerrit/8284
Commit-Ready: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2011-09-26 13:56:52 -07:00
Dave Moore
cf2a5616f1 Revert "Upgrade the vim and vim-core packages"
This reverts commit 521fd67202ca2b6756f9ca288e44935b991c0fa9

Change-Id: Ia66162e89ddea170bdce5ea7f81b60a567ce604c
Reviewed-on: http://gerrit.chromium.org/gerrit/8273
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Dave Moore <davemoore@chromium.org>
2011-09-26 10:24:20 -07:00
Matt Tennant
c8e16ac6ad Upgrade the vim and vim-core packages
Upgraded app-editors/vim to version 7.3.189 on amd64, arm, x86
Upgraded app-editors/vim-core to version 7.3.189 on amd64, arm, x86

BUG=chromium-os:20788
TEST=Run vim in chroot, edit python file, looks ok to me.

Change-Id: Ifc3234a261e407d316002fc6945b314c7697341c
Reviewed-on: http://gerrit.chromium.org/gerrit/8245
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Matt Tennant <mtennant@chromium.org>
Reviewed-by: Matt Tennant <mtennant@chromium.org>
Tested-by: Matt Tennant <mtennant@chromium.org>
2011-09-26 10:02:32 -07:00
Mike Frysinger
94717e3099 cros_sdk: unify duplicate git calls for user commit info
No need to call `git var | sed` multiple times when we can call it once
and then use bash string parsing routines to extract the relevant info.

BUG=None
TEST=delete .gitconfig in chroot; enter chroot; verify .gitconfig is up-to-date

Change-Id: I900e4241a5c53bc46c90eb0f2a01152f4bfba577
Reviewed-on: http://gerrit.chromium.org/gerrit/8027
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2011-09-26 08:43:10 -07:00
Gaurav Shah
af7d5d11a5 remote_access.sh: Be verbose when remote accesss setup fails. Silent otherwise.
A parallel change in run_remote_tests.sh (http://gerrit.chromium.org/gerrit/8090)
ensures that the output of the command isn't ignored (since now it is only verbose
when it needs to be).

BUG=chromium-os:20695
TEST=Ran run_remote_tests.sh with both valid and invalid ip (again).

Change-Id: I185c81b0a8193bfa5f88ff2b9eea38dabe24edcc
Reviewed-on: http://gerrit.chromium.org/gerrit/8089
Commit-Ready: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
2011-09-25 14:32:13 -07:00
Matt Tennant
5349219845 Upgrade the app-admin/eselect-ruby Portage package
Upgraded app-admin/eselect-ruby to version 20100603 on amd64

BUG=chromium-os:20781
TEST=This is only used in chroot, so test with trybot chromiumos-sdk

Change-Id: I6c85f120b57afb86ba4b84652b74b9cf10d6ab24
Reviewed-on: http://gerrit.chromium.org/gerrit/8226
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Matt Tennant <mtennant@chromium.org>
Reviewed-by: Matt Tennant <mtennant@chromium.org>
Tested-by: Matt Tennant <mtennant@chromium.org>
2011-09-23 16:43:33 -07:00
Matt Tennant
094d9f9ec0 Upgrade the following 2 Portage packages
Upgraded app-admin/eselect to version 1.2.15 on amd64
Upgraded app-admin/eselect-ctags to version 1.13 on amd64

BUG=chromium-os:20770
TEST=trybot run of chromiumos-sdk

Change-Id: I65874253d3d57d97ff0d047c78e80f7106d7ca53
Reviewed-on: http://gerrit.chromium.org/gerrit/8206
Commit-Ready: Matt Tennant <mtennant@chromium.org>
Reviewed-by: Matt Tennant <mtennant@chromium.org>
Tested-by: Matt Tennant <mtennant@chromium.org>
2011-09-23 13:58:32 -07:00
Ben Chan
fcd4c83b9d net-dialup/xl2tpd: import xl2tpd 1.3.0 from upstream Gentoo
BUG=chromium-os:20746
TEST=emerge xl2tpd-1.3.0 for x86-generic and arm-generic

Change-Id: Iedc3cc3a16484f0fea205f756f8b53d2936b6e92
Reviewed-on: http://gerrit.chromium.org/gerrit/8176
Reviewed-by: Ken Mixter <kmixter@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
2011-09-23 13:40:13 -07:00
Mike Frysinger
b2e897bf46 enter_chroot: tweak awk to match POSIX substr requirements
POSIX says that the first arg to substr() counts from 1 which means
that awk implementations interpret a value of 0 in their own special
way.  With gawk, it does the logical thing (imo), but with mawk, it
does it by one less.

Example:
echo abc | mawk '{print substr($0, 0, 2)}'  -> a
echo abc | gawk '{print substr($0, 0, 2)}'  -> ab
echo abc | mawk '{print substr($0, 1, 2)}'  -> ab
echo abc | gawk '{print substr($0, 1, 2)}'  -> ab

So stick to the POSIX spec and count from 1.

While we're here, using "len" rather than "l" to improve readability.

URL=http://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html
BUG=chrome-os-partner:6026
TEST=set /usr/bin/awk to mawk; run `cros_sdk --enter -- true`; see everything unmounted
TEST=set /usr/bin/awk to gawk; run `cros_sdk --enter -- true`; see everything unmounted

Change-Id: I48f57d642730a0b3d909079027edf6ebf1bb9459
Reviewed-on: http://gerrit.chromium.org/gerrit/8163
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2011-09-22 16:13:51 -07:00
Mike Frysinger
e8aec37165 cros_sdk: skip unmount phase if no mounts are found
Normally safe_umount_tree isn't called if there are no mount points in the
chroot, but there are some edge cases (like early setup errors) where it
may be possible.  So add a simple check to make sure that there are mount
points for us to work on before calling umount.

BUG=None
TEST=add early `die` before mounts; see no umount error output

Change-Id: I57e5022c3242c635097bceed44772f10eecf6a64
Reviewed-on: http://gerrit.chromium.org/gerrit/8026
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2011-09-21 17:15:59 -07:00
Andrew de los Reyes
e08639b859 remote_access.sh: add remote_sh_raw for a non-buffered ssh connection.
BUG=chromium-os:20305
TEST=manual test of image_to_live.sh

Change-Id: I964088673d0dc2867e911368d9cc4ec73085a4f4
Reviewed-on: http://gerrit.chromium.org/gerrit/8082
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
2011-09-21 15:53:30 -07:00
Matt Tennant
1c86a263aa Revert "Update a bunch of X-related packages."
This reverts commit ddd6654fd005ba3912158c46e1e730c34f8e3af1

Build failure on buildbot from this change:
http://build.chromium.org/p/chromiumos/builders/tegra2%20PFQ/builds/942/steps/BuildTarget/logs/stdio
Change-Id: I9975c58f47bfef87887c569c7687a441346c09e2
Reviewed-on: http://gerrit.chromium.org/gerrit/7993
Commit-Ready: Matt Tennant <mtennant@chromium.org>
Reviewed-by: Matt Tennant <mtennant@chromium.org>
Tested-by: Matt Tennant <mtennant@chromium.org>
2011-09-20 12:59:57 -07:00
Stéphane Marchesin
e4ea28b39e Update a bunch of X-related packages.
Change-Id: I4f633d0ae912f3e17ba9a02585c53427e3edbfd5
Reviewed-on: http://gerrit.chromium.org/gerrit/7965
Commit-Ready: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2011-09-20 12:21:24 -07:00
Mike Frysinger
4d258cdf9d enter_chroot: restore auto locale generation
First let's add a chroot upgrade hook that'll declare a small list of
locales to speed up glibc upgrades.

The other blocker was that `cros_sdk --enter` took an inordinate amount
of time to execute (`locale-gen -u` specifically) when the number of
existing locales is huge.  This seems to be a bug in the bash/glibc
stack which is resolved in newer versions, but we can workaround the
issue by forcing locale-gen to run in a C locale.  The tool itself does
not care about its locale and we silence its output.

BUG=chromium-os:20378
TEST=`cros_sdk --enter`; see no locales in /etc/locale.gen; run `./build_packages` and see upgrade hook work
TEST=generate all 400 locales; `cros_sdk --enter`; see that it was quick

Change-Id: I8fcc5e26bd8e1bcfd52b6a6c7ef3cacf0a252081
Reviewed-on: http://gerrit.chromium.org/gerrit/7806
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2011-09-19 21:57:14 -07:00
Stéphane Marchesin
3ff3c8fbf4 Unmask vaapi ebuild.
This is needed for video acceleration on sandy bridge.

Change-Id: I48bed0e7e95e6dafd71c12a68d47806ba6f61170
Reviewed-on: http://gerrit.chromium.org/gerrit/7969
Commit-Ready: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
2011-09-19 19:40:54 -07:00
Mike Frysinger
acc4c9b3fc cros_sdk: optimize fuse loading
Running `sudo` at all is a bit poky, so let's avoid modprobing fuse when
we know it already exists because it's listed in /proc/filesystems.

The relative speed:
 time sudo modprobe fuse -> 0.164s
 time grep -q fuse /proc/filesystems -> 0.002s

BUG=None
TEST=enable `set -x`; run `sudo modprobe fuse`; run `cros_sdk true`; see modprobe skipped

Change-Id: I07213e7b0607ca65df2a8a3ae22eb4a49c8bb888
Reviewed-on: http://gerrit.chromium.org/gerrit/7824
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2011-09-19 10:20:00 -07:00
Mike Frysinger
da7be781c0 cros_sdk: optimize gconftool interaction
It doesn't make much sense to run gconftool when the default automount
value is what we already want: false.  So in this common case, skip the
save/restore logic altogether since we aren't actually changing things.

Further, we can merge the `which` check in by checking the exit status
of the `gconftool` run.  If it fails, the tool doesn't exist.

BUG=None
TEST=enable `set -x`; run `cros_sdk true`; see gconftool run once in common case

Change-Id: I1c6aee945218a8a9df533d9ef207c750f909c252
Reviewed-on: http://gerrit.chromium.org/gerrit/7823
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2011-09-19 09:57:26 -07:00
Hung-Te Lin
d2631cd952 crosutils: add 'archive_factory' to create factory bundles
To generate a bundle with mini-omaha and all utility scripts, we need a new
archive script.

BUG=chrome-os-partner:5979
TEST=./archive_factory --factory_test factory_test \
       --factory_install factory_install --script . --dev ../platform/dev/ \
       --bin ../../chroot/usr/bin
  # output:
  [   0/2.4G]   adding: bin/cgpt  (stored 0%)
  [633K/2.4G]   adding: dev/autoupdate.py  (stored 0%)
  [658K/2.4G]   adding: dev/buildutil.py  (stored 0%)
  [660K/2.4G]   adding: dev/devserver.py  (stored 0%)
  [671K/2.4G]   adding: dev/static/ (stored 0%)
  [671K/2.4G]   adding: factory_test/chromiumos_factory_image.bin
  [1.9G/506M]   adding: factory_test/pack_partitions.sh  (stored 0%)
  [1.9G/506M]   adding: factory_test/unpack_partitions.sh  (stored 0%)
  [1.9G/506M]   adding: hwid/hwid_bundle_zgb_all.sh  (stored 0%)
  [1.9G/502M]   adding: install_shim/factory_install_shim.bin
  [2.4G/119K]   adding: install_shim/pack_partitions.sh  (stored 0%)
  [2.4G/115K]   adding: install_shim/unpack_partitions.sh  (stored 0%)
  [2.4G/112K]   adding: scripts/lib/cros_image_common.sh  (stored 0%)
  [2.4G/102K]   adding: scripts/lib/shflags/shflags  (stored 0%)
  [2.4G/ 71K]   adding: scripts/common.sh  (stored 0%)
  [2.4G/ 49K]   adding: scripts/chromeos-common.sh  (stored 0%)
  [2.4G/ 33K]   adding: scripts/make_factory_package.sh  (stored 0%)
  [2.4G/ 11K]   adding: scripts/make_universal_factory_shim.sh  (stored 0%)
  [2.4G/4.0K]   adding: scripts/mk_memento_images.sh  (stored 0%)

Change-Id: Idd645c908c4fed70408406278163309037c285dd
Reviewed-on: http://gerrit.chromium.org/gerrit/7906
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
2011-09-19 02:01:41 -07:00
Hung-Te Lin
17eeff6fcb crosutils: add boilerplate comments for factory scripts
Adding boilerplate comments for factory scripts that may be executed inside
CrOS source tree or a limited factory bundle extraction.

BUG=chrome-os-partner:5979
TEST=none, only comment update

Change-Id: Ifd5b07e9d44f4ce74073e5e32370040d2d6728d8
Reviewed-on: http://gerrit.chromium.org/gerrit/7908
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2011-09-19 00:44:48 -07:00
Hung-Te Lin
ab4c4e1c69 crosutils: Revert "crosutils: refine make_factory_package"
This partially reverts commit cfc4720c28
( http://gerrit.chromium.org/gerrit/7904 )

Currently we store the hash generated by compress_and_hash_memento_image in a
shell variable, and sub shell "(cmd)" can't export the variables. It would
require more rewriting of scripts to fix this issue, so let's first revert it.

BUG=chrome-os-partner:5979
TEST=./make_factory_package --config config/mp_factory.config
     cd ../platform/dev; python deverserver.py --factory_config mini_omaha.conf
     # then start whole factory installation process on DUT, and passed.

Change-Id: I1c7d8de61427733b1dff61dcd7e1c01fea7c4de6
Reviewed-on: http://gerrit.chromium.org/gerrit/7916
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Tammo Spalink <tammo@chromium.org>
2011-09-19 00:32:12 -07:00
Hung-Te Lin
545dc57e97 crosutils: allow factory scripts to be executed in a limited bundle environment
This CL allows factory related scripts to be executed in a prepared and limited
environment which can be made by extracting a factory bundle:
 - always load scripts from $SCRIPT_ROOT
 - allow running bundled binary programs from $SCRIPT_ROOT/../bin
 - override GCLIENT_ROOT for the layout of a bundle

BUG=chrome-os-partner:5979
TEST=(outside cros environment)
     ./make_factory_package --config mp_factory.conf  # test omaha
     ./make_factory_package --config rma.conf  # test --usbimg
     ./make_factory_package --config mp_ssd.conf  # test --diskimg

Change-Id: Ibf85fa267f6fe53ae88e41fd7f62ef7110b2b0bf
Reviewed-on: http://gerrit.chromium.org/gerrit/7905
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
2011-09-18 21:24:11 -07:00
Hung-Te Lin
cfc4720c28 crosutils: refine make_factory_package
Change non-posix pushd and popd into posix sub commands.
Added a check of --board to be non-zero for omaha setup.

BUG=chrome-os-partner:5979
TEST=./make_factory_package.sh --config bundle/mp_factory.conf

Change-Id: I1aa847ae2df28460319ca0b574ca4921993e41e1
Reviewed-on: http://gerrit.chromium.org/gerrit/7904
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
2011-09-18 21:02:13 -07:00
Mike Frysinger
1aa6124f1d cros_sdk: speed up unmounting when tearing down env
The teardown_env is a little slow when unmounting things because it runs
`sudo umount` once per mount point.  This is so that when things go wrong,
it can easily recover.  However, this slows down the common case at the
expense of the uncommon.

Refactor the code so that in the common case, we run one `sudo umount`.
When things do fail, we're a bit slower as we reparse the entire mount,
list, but that's fine as it's an error case.

BUG=None
TEST=enable `set -x`; run `cros_sdk true`; see all mount points unmounted in one shot

Change-Id: Iec98a7b9f51a77e90c30e6f6acae26e528b8c50d
Reviewed-on: http://gerrit.chromium.org/gerrit/7822
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
2011-09-16 18:58:17 -07:00
Hung-Te Lin
882cae5df4 crosutils: Revert "Cache sudo in make_factory_package"
This reverts commit 0126898d23.

When "sudo -v" is executed inside chroot, it prompts for password; however the
user account inside chroot may be using a different password (ex, "chronos")
from the same account outside chroot.  The /etc/sudoers file inside chroot has
explicitly specified "userid ALL=NOPASSWD: ALL" for the account, so we should
keep doing nothing inside chroot.

BUG=chrome-os-partner:2827
TEST=(inside chroot) ./make_factory_package --release ...... # success

Change-Id: Ibadd5d539df83d70aba0daabc40bb9edba842f07
Reviewed-on: http://gerrit.chromium.org/gerrit/7847
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
2011-09-16 06:14:51 -07:00
ttuttle
de99e8b59a cros_run_cell_tests: Explicitly accept remote, add args workaround
BUG=chromium-os:20349
TEST=runs cellular_Dummy

Change-Id: I8dbe7a99c02d22d68303e71aa2f4df514d800c95
Reviewed-on: http://gerrit.chromium.org/gerrit/7732
Reviewed-by: David Rochberg <rochberg@chromium.org>
Tested-by: ttuttle <ttuttle@chromium.org>
2011-09-15 10:20:14 -07:00
Chinyue Chen
af9c1d9463 Make the path and folder of config file available when parsing config.
The path and folder of config file is available as env variables and can
be used to reference images and updater scripts in config file.

BUG=chrome-os-partner:5850
TEST=1. Create a config file (mp_factory.conf) under src/mp_bundle with
        the following content:

        [x86-zgb]
        --factory ${MFP_CONFIG_DIR}/../build/images/${BOARD}/latest/chromiumos_factory_image.bin
        --release ${MFP_CONFIG_DIR}/../build/images/${BOARD}/latest/[Cc]hromiumos_image.bin
        --hwid_updater ${MFP_CONFIG_DIR}/../platform/[Cc]hromeos-hwid/hwid_bundle_zgb.sh
        --firmware_updater none
        --detect_release_image  # Comment.

        # More comments.
        [x86-zgb-he]
        --subfolder x86-zgb-he
        --factory ${MFP_CONFIG_DIR}/../build/images/${BOARD}/latest/chromiumos_factory_image.bin
        --release ${MFP_CONFIG_DIR}/../build/images/${BOARD}/latest/chromiumos_image.bin
        --hwid_updater ${MFP_CONFIG_DIR}/../platform/chromeos-hwid/hwid_bundle_zgb.sh
        --firmware_updater none
        --detect_release_image

     2. Under src, execute
        BOARD=x86-zgb scripts/make_factory_package.sh --config mp_bundle/mp_factory.conf

Change-Id: I3c9693febe1f7f1efc92ab845d63226911114031
Reviewed-on: http://gerrit.chromium.org/gerrit/7764
Tested-by: Chinyue Chen <chinyue@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2011-09-15 08:21:09 -07:00
David Rochberg
503e8f6dca Remove v flag for untarring of libc. Reduces volume of log output
BUG=none
TEST=./build_image  --board=x86-alex

Change-Id: I0112165e499fe0aa2dd3ff65c7f1d14406b3534b
Reviewed-on: http://gerrit.chromium.org/gerrit/7648
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: David Rochberg <rochberg@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
2011-09-14 10:28:02 -07:00
Chinyue Chen
8e6b452f4e Fix config file section header regex.
Fix section header regex so that bracket expansion syntax won't be
recognized as section header. The only requirement is that section
header must start at the beginning of a line.

BUG=chrome-os-partner:5850
TEST=1. Create a config file (mp_factory.conf) with the following
        content:
        [x86-zgb]
        --factory ~/trunk/src/build/images/${BOARD}/latest/chromiumos_factory_image.bin
        --release ~/trunk/src/build/images/${BOARD}/latest/[Cc]hromiumos_image.bin
        --hwid_updater ~/trunk/src/platform/[Cc]hromeos-hwid/hwid_bundle_zgb.sh
        --firmware_updater none
        --detect_release_image  # Comment.

        # More comments.
        [x86-zgb-he]
        --subfolder x86-zgb-he
        --factory ~/trunk/src/build/images/${BOARD}/latest/chromiumos_factory_image.bin
        --release ~/trunk/src/build/images/${BOARD}/latest/chromiumos_image.bin
        --hwid_updater ~/trunk/src/platform/chromeos-hwid/hwid_bundle_zgb.sh
        --firmware_updater none
        --detect_release_image

     2. BOARD=x86-zgb ./make_factory_package.sh --config mp_factory.conf

Change-Id: I4d1475a5e513e7e0e06a5c3c6d46d13e2120668c
Reviewed-on: http://gerrit.chromium.org/gerrit/7698
Tested-by: Chinyue Chen <chinyue@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2011-09-14 05:59:32 -07:00
Matt Tennant
feb896d363 Upgrade script to insert BOARD_USE into existing make.conf.board_setup files.
The setup_board script now inserts a BOARD_USE value into
/build/<board>/etc/make.conf.board_setup.  This only happens the first
time the board is setup, so this upgrade script inserts that value
for boards that were previously set up.

BUG=chromium-os:20341
TEST=Ran run_chroot_version_hooks in chroot, inspected make.conf.board_setup
files for boards that did and did not have BOARD_USE already set.

Change-Id: I333198a0434076a5e8e50db6affc81ea2076d301
Reviewed-on: http://gerrit.chromium.org/gerrit/7653
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Matt Tennant <mtennant@chromium.org>
2011-09-13 18:03:48 -07:00
Raymes Khoury
4460ea782f Disable locale-gen temporarily to workaround bug
Works around:
http://code.google.com/p/chromium-os/issues/detail?id=20378

which is breaking the tree.

BUG=chromium-os:20378
TEST=cros_sdk --enter

Change-Id: I0d5dc2dd6466efe9baafcc404648d2c53309a3b7
Reviewed-on: http://gerrit.chromium.org/gerrit/7679
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: Thieu Le <thieule@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2011-09-13 17:10:30 -07:00
ttuttle
4b7838e54d Add cros_run_cell_tests.sh
BUG=chromium-os:20349
TEST=working on it

Change-Id: I04d86a270dc33abeec67f797a7612218e585a917
Reviewed-on: http://gerrit.chromium.org/gerrit/7626
Tested-by: ttuttle <ttuttle@chromium.org>
Reviewed-by: ttuttle <ttuttle@chromium.org>
Reviewed-by: David Rochberg <rochberg@chromium.org>
2011-09-13 14:11:09 -07:00
Elly Jones
f4e4833a9e build_kernel_image: use a salt for verity.
BUG=chromium-os:12138
TEST=Adhoc
TESTED_ON=Kaen
Build an image. Look for "Generating root fs hash tree (salt <foo>)." in the
output. Boot the image, grep for 'salt=' in dmesg. All should be well.

Change-Id: Ia7d8504033ff1e62ba451129be5796702809cc7c
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/7335
2011-09-13 12:14:54 -07:00
Nick Sanders
0126898d23 Cache sudo in make_factory_package
BUG=chrome-os-partner:2827
TEST=observe sudo cache

Change-Id: Idf0d63ab07ee2e60f028e44ace4cd9707c2e4d6c
Reviewed-on: http://gerrit.chromium.org/gerrit/7580
Tested-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Chinyue Chen <chinyue@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2011-09-12 22:43:12 -07:00
David James
83848ede89 Remove old versions of dev-libs/gmp to ease chroot upgrades.
BUG=none
TEST=Run it, make sure old versions are unmerged.

Change-Id: I2a281284fc17e221985c9c2b184a5a23ba90d773
2011-09-12 10:45:18 -07:00
Mike Frysinger
f49a9333a5 mpfr: import current stable from upstream Gentoo
This changes ABI of the mpfr library, but the ebuild itself takes care
of preserving the old SONAME so that existing binaries don't break.
Newly linked programs will use the new ABI SONAME automatically.

BUG=None
TEST=tested upgrade path (build_packages/build_image); ran `cbuildbot chromiumos-sdk`

Change-Id: Id35f8369f9d245de12f5c491db61d8dbac7ddc56
Reviewed-on: http://gerrit.chromium.org/gerrit/7442
Reviewed-by: Ken Mixter <kmixter@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2011-09-12 09:19:56 -07:00
Mike Frysinger
a60d15ca11 gmp: import current stable from upstream Gentoo
This changes ABI of the gmp library, but the ebuild itself takes care
of preserving the old SONAME so that existing binaries don't break.
Newly linked programs will use the new ABI SONAME automatically.

BUG=None
TEST=tested upgrade path (build_packages/build_image); rebuilt strongswan; ran `cbuildbot chromiumos-sdk`

Change-Id: I0e51efecd59a9f2127e2d299a4da7e23df5eefd2
Reviewed-on: http://gerrit.chromium.org/gerrit/7441
Reviewed-by: Ken Mixter <kmixter@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2011-09-12 09:19:49 -07:00
Mike Frysinger
8df2a8453b sandbox: import current stable from upstream Gentoo
BUG=None
TEST=ran `cbuildbot chromiumos-sdk` to rebuild all pkgs

Change-Id: Ic98d07cb801b6e8e1b12a5879354723aeaa61b7d
Reviewed-on: http://gerrit.chromium.org/gerrit/7308
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>
2011-09-12 09:18:00 -07:00
Raymes Khoury
cadce8c005 Revert "Added virtual libc ebuild from upstream gentoo."
This reverts commit 8cca16afdc0b722136723a0bd4213d70e73b9e9f which broke the tree

Change-Id: Icf3c1b0ac71452b012d4199c7408c0157d3202b6
Reviewed-on: http://gerrit.chromium.org/gerrit/7485
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Tested-by: Raymes Khoury <raymes@chromium.org>
2011-09-09 10:26:36 -07:00
Chinyue Chen
67594116c0 Read script parameters from config file.
make_factory_package.sh needs many parameters and to support multi-board
installation it has to be run twice (without and with --subfolder). This
change adds the functionality to read sections of parameters from a
config file and executes them in order.

BUG=chrome-os-partner:5850
TEST=1. Create a config file (mp_factory.conf) with the following
        content:
       [x86-zgb]
        --factory ~/trunk/src/build/images/${BOARD}/latest/chromiumos_factory_image.bin
        --release ~/trunk/src/build/images/${BOARD}/latest/chromiumos_image.bin
        --hwid_updater ~/trunk/src/platform/chromeos-hwid/hwid_bundle_zgb.sh
        --firmware_updater none
        --detect_release_image

       [x86-zgb-he]
        --subfolder x86-zgb-he
        --factory ~/trunk/src/build/images/${BOARD}/latest/chromiumos_factory_image.bin
        --release ~/trunk/src/build/images/${BOARD}/latest/chromiumos_image.bin
        --hwid_updater ~/trunk/src/platform/chromeos-hwid/hwid_bundle_zgb.sh
        --firmware_updater none
        --detect_release_image

     2. BOARD=x86-zgb ./make_factory_package.sh --config mp_factory.conf

Change-Id: I3435f3afbf40ec3b8bd02a3514f599a7a535510e
Reviewed-on: http://gerrit.chromium.org/gerrit/7473
Tested-by: Chinyue Chen <chinyue@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2011-09-09 09:23:26 -07:00