Commit Graph

28179 Commits

Author SHA1 Message Date
Jonathan Kliegman
23301afb5f Modify zero-free_space to sync the file and remove within it
There appear to be race conditions in some environments around mounting
and unmounting a file system quickly failing due to a device in use error.

This change removes the extra umount/mount/rm/umount sequence around
rootfs/filler which was done to ensure the file was being synced to disk.

Instead the dd command has added conv=fdatasync which causes it to sync
the file to disk on completion.

This also fixes a possible loopback device leak where the unmount would fail
and then build output directory deletion would fail because the rootfs was
still mounted, leaking both disk space and loopback devices.

BUG=chromium-os:22308
TEST=Ran filefrag on filler, validated that rootfs.image has blocks of 0 bytes
  in each position
  Compressed chromiumos_base_image.bin, compared size to previous build_image
  Booted image on tegra2 device, confirmed it still boots

Change-Id: I097440b7abefd4a0d25f743e968f33a1531a7a21
Reviewed-on: https://gerrit.chromium.org/gerrit/11487
Reviewed-by: Thieu Le <thieule@chromium.org>
Tested-by: Jon Kliegman <kliegs@chromium.org>
Reviewed-by: Paul Taysom <taysom@google.com>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Jon Kliegman <kliegs@chromium.org>
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
2011-11-11 07:57:44 -08:00
Mike Frysinger
5fb0bf4617 app-portage/gentoolkit{,-dev}: import from upstream Gentoo
This grabs the latest stable versions from upstream so we can punt
the versions in the cros overlay.

BUG=None
TEST=`emerge gentoolkit{,-dev}` installs the latest versions
TEST=`python cros_portage_upgrade_unittest.py` passes
TEST=`cbuildbot x86-generic-full` works
TEST=build_packages+build_image for x86-alex boots

Change-Id: I11f75280082c4482b2a1108847f92e56a74dc4d5
Reviewed-on: https://gerrit.chromium.org/gerrit/10977
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2011-11-10 10:26:37 -08:00
Ken Mixter
d8f9130863 scripts: fall back to linkage symbols when debug info not present
dump_syms bails if you give it a debug info path and the file there
does not have debug info, instead of falling back to dumping
public/linkage symbols (and more importantly, call frame info).
Give it the chance to redeem itself.

Also, instead of not ever uploading CFI for x86 modules, strip it
for any architecture but only when the file is above some
threshold.

BUG=chromium-os:22373 chromium-os:22741

Change-Id: Iad6981efec537868296a6713b1d9ca0cdb750d28
Reviewed-on: https://gerrit.chromium.org/gerrit/11443
Commit-Ready: Ken Mixter <kmixter@chromium.org>
Reviewed-by: Ken Mixter <kmixter@chromium.org>
Tested-by: Ken Mixter <kmixter@chromium.org>
2011-11-09 18:27:05 -08:00
Zdenek Behan
99fb742e5a update_chroot: autodiscard all config updates
* This is now safe to do, since the only protected files are exactly
the ones that have been autogenerated during chroot creation and may
not be overwritten.

BUG=chromium-os:13987
TEST=update the chroot

Change-Id: Ica4d8328b21089b23e2b0e8a29530cedddabc299
Reviewed-on: https://gerrit.chromium.org/gerrit/10166
Commit-Ready: Zdenek Behan <zbehan@chromium.org>
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Tested-by: Zdenek Behan <zbehan@chromium.org>
2011-11-09 14:00:11 -08:00
Matt Tennant
f49a498a1a Upgraded the qemu-kvm, seabios Portage packages, and python.eclass.
Upgraded app-emulation/qemu-kvm to version 0.15.1-r1 on amd64
Upgraded sys-apps/seabios to version 1.6.3 on amd64
Upgraded the python.eclass to upstream version.

These packages will not be active until they are marked as stable
by a commit in chromiumos-overlay.  The python.eclass change, however,
is active immediately and that is what the testing is for.

BUG=chromium-os:22309
TEST=Trybot runs:
x86-generic-pre-flight-queue
arm-generic-full
x86-generic-full
chromiumos-sdk

Change-Id: Ied4e1a31512686185e68babd479a45b96140d432
Reviewed-on: https://gerrit.chromium.org/gerrit/11133
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Matt Tennant <mtennant@chromium.org>
Commit-Ready: Matt Tennant <mtennant@chromium.org>
2011-11-09 11:21:35 -08:00
Chris Wolfe
e87403d8f8 image_to_usb: Add flag to choose disk by product.
This adds a --to_product flag which chooses the destination
disk with a product value matching the specified pattern.
For the case where a developer is regularly writing to an
external USB drive, the product name may be more stable than
the raw device name.

Also added a help string for the --to flag. This was
accidentally deleted during some refactoring in 2010.

Tested with local cbuildbot internal pfq and manually:
  ./image_to_usb.sh
  ./image_to_usb.sh --to=/dev/sde
  ./image_to_usb.sh --to_product=\*Memory
  ./image_to_usb.sh --to_product=\*  # errors on multiple

BUG=chromium-os:22674
TEST=None

Change-Id: Ie7137e8c605217a3202c46d75896170fc6b7c4a5
Reviewed-on: https://gerrit.chromium.org/gerrit/11322
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Wolfe <cwolfe@chromium.org>
Commit-Ready: Chris Wolfe <cwolfe@chromium.org>
2011-11-09 06:53:02 -08:00
Hung-Te Lin
19daeedb14 crosutils: move factory setup scripts to ../platform/factory-utils/factory_setup
This CL is the counter part of https://gerrit.chromium.org/gerrit/11190

For creating portable factory archives and simplify scripts folder, we should
move all factory scripts to a tandalone folder. Symlink is set to ease
transition until we've updated all factory documents.

archive_factory was designed for creating bundle so not required anymore.
make_universal_factory_shim and mk_memento_images are only invoked by
make_factory_packages, so they're also simply removed without symlinks.

BUG=chrome-os-partner:5979
TEST=./make_factory_package.sh --config PATH_TO_CONFIG # pass

Change-Id: I1489b012aaf1ade4a9ead91abbb7b625b967dc0f
Reviewed-on: https://gerrit.chromium.org/gerrit/10630
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2011-11-08 23:09:11 -08:00
Katie Roberts-Hoffman
c52bafe621 Append required bootargs for tegra2 recovery images
This is a fix for tegra2 platforms to enable correct bootarg parsing in
recovery images.

BUG=chrome-os-partner:6752
TEST=Manually create recovery image and confirm bootargs are correct

Change-Id: Ibeb68384fcdba52ecfecb87e161c4b049d75b10e
Reviewed-on: https://gerrit.chromium.org/gerrit/11270
Commit-Ready: Katie Roberts-Hoffman <katierh@chromium.org>
Reviewed-by: Katie Roberts-Hoffman <katierh@chromium.org>
Tested-by: Katie Roberts-Hoffman <katierh@chromium.org>
2011-11-08 19:28:56 -08:00
Jonathan Kliegman
e6932d8986 Fix clean_loopback_devices to actually parse board parameter
clean_loopback_devices was never parsing command line arguments or
properly setting the default board. As such it would always use the
x86-wayland overlay as it came last alphabetically in the directory
listing.

BUG=chromium-os:22671
TEST=Ran clean_loopback_devices with various --board arguments
  Validated correct OUTPUT_DIR values for those, including an error
  and abort on null

Change-Id: Ia8826bbeb88ed5bdac0aa7698dd262f72de2749a
Reviewed-on: https://gerrit.chromium.org/gerrit/11332
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Ready: Jon Kliegman <kliegs@chromium.org>
Tested-by: Jon Kliegman <kliegs@chromium.org>
2011-11-08 12:47:34 -08:00
Zdenek Behan
07d2422c91 common.sh: Revert commit 9aa80dc457
This partially reverts and partially clarifies the code in the above
commit. It was still in use, just in an obscure place, so a reference
to that has been added.

BUG=chromium-os:21971
TEST=below
1) build_lib/generate-au-zip.py
2) cd /tmp/au-generator/; unzip au-generator.zip
3) exit chroot; cd $chroot/tmp/au-generator/
4) LD_LIBRARY_PATH="$(pwd)" PATH="${PATH}:$(pwd)" ./cros_generate_update_payload --image something_i_had --output x --outside_chroot

Change-Id: Idfc03937c4f3517c8567efcdebd1cb8ce134fc8e
Reviewed-on: https://gerrit.chromium.org/gerrit/11019
Tested-by: Zdenek Behan <zbehan@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Zdenek Behan <zbehan@chromium.org>
2011-11-07 17:28:59 -08:00
Gary Morain
140cc8b16d Look at all upstart configuation scripts for the #for_test hack.
BUG=chromium-os:22446
TEST=Build images and manually inspect configuration files in test and non-test
iamges.

Change-Id: I8b4ff34e40f24f1250e592e5b96d358f064610a8
Reviewed-on: https://gerrit.chromium.org/gerrit/11161
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Gary Morain <gmorain@chromium.org>
Commit-Ready: Gary Morain <gmorain@chromium.org>
2011-11-07 15:55:52 -08:00
Mike Frysinger
cbc51a0929 update hooks: punt old localtime symlinks
Older core ebuilds would install /etc/localtime symlinks that'd confuse
the build system, so scrub them now that the ebuilds in question have
been fixed up.

See http://gerrit.chromium.org/gerrit/10960 for more info.

BUG=chromium-os:21850
TEST=`./build_packages --board=x86-alex` cleaned my old /etc/._cfg*_localtime symlinks

Change-Id: I3b3d2a42e77d259cf9eda380f791e8108fef7458
Reviewed-on: https://gerrit.chromium.org/gerrit/10965
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2011-11-04 10:55:01 -07:00
Mike Frysinger
6b38b1e1af update hooks: undo /etc/portage/env support
This drops the work that we did in 14_board_portage_env as support for
per-package env in the overlay has been moved to profile.bashrc.  That
do not require modification of any /etc/portage/env dirs.

BUG=chromium-os:21787
TEST=update chroot to ver 15, make sure /build/*/etc/portage/env are gone

Change-Id: I4f1d577f125a66efdeabdbbd8f862562c2e5d2e5
Reviewed-on: https://gerrit.chromium.org/gerrit/11047
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
2011-11-03 16:13:22 -07:00
David James
e996baa382 Add IGNORE_PREFLIGHT_BINHOST env variable for ignoring PREFLIGHT_BINHOST.
This variable is intended to be used by cbuildbot to allow it to ignore
the preflight binhost when clobbering the preflight builder itself, to
ensure it doesn't pick up the old preflight prebuilts again.

BUG=chromium-os:21788
TEST=Set IGNORE_PREFLIGHT_BINHOST and see that preflight binhosts are ignored.

Change-Id: I2a0ca38ad8d35b34d2f14a980d5cd67ab66c0f07
Reviewed-on: https://gerrit.chromium.org/gerrit/11088
Reviewed-by: Ryan Cui <rcui@chromium.org>
Tested-by: Ryan Cui <rcui@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
2011-11-02 18:13:58 -07:00
Chris Sosa
4299eb9d52 Fix bug where we may modify FLAGS_factory_install after we source base_image_util.sh
This also simplifies the factory_install logic to all be in the same place :).

BUG=chromium-os:22371
TEST=Ran trybot with this CL + tegra2 build that used make_netboot.sh that uses
the factory install which failed on the buildbot previously.

Change-Id: Id0847b85c061cf230d0e6cc5bb40de2eba0992b9
Reviewed-on: https://gerrit.chromium.org/gerrit/10986
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
2011-11-02 13:45:50 -07:00
Mike Frysinger
40bb0c3152 enter_chroot: ignore errors from copying user ssh files
The current code that syncs the user's ssh files from ~/.ssh/ to the
chroot assumes the user has these files in the first place.  For the
fresh user and/or install, these might not exist.  So ignore errors
from attempting to copy them.  It's not like we attempt to "recover"
anyways, and this sync is more of a "let's make things smoother" than
a "we need this to run properly".

BUG=chromium-os:15005
TEST=`mv ~/.ssh ~/.ssh.bak; mkdir ~/.ssh; cros_sdk` and see no more warnings

Change-Id: I9cac2ecad7c64c088fbdfe55377c0429b3b7ab03
Reviewed-on: https://gerrit.chromium.org/gerrit/10922
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2011-10-31 21:49:19 -07:00
Caroline Tice
ffcaab314f Get openocd-0.4.0.ebuild from upstream (Gentoo).
BUG=None
TEST=None

Change-Id: I792712228917f9ddd13d7d39881e58840a804509
Reviewed-on: https://gerrit.chromium.org/gerrit/10873
Reviewed-by: Matt Tennant <mtennant@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Caroline Tice <cmtice@chromium.org>
2011-10-31 14:07:31 -07:00
Andrew de los Reyes
728191cf78 Upgraded the bzip2 Portage package
Upgraded app-arch/bzip2 to version 1.0.6-r2 on arm, x86

BUG=chromium-os:6861
TEST=built image, updated to it, updated again

Change-Id: I90cee800f47bf4c5cc7a1d16c53531cb704affc8
Reviewed-on: https://gerrit.chromium.org/gerrit/10825
Reviewed-by: Matt Tennant <mtennant@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
2011-10-31 10:48:53 -07:00
Mike Frysinger
cc0e0a9a90 dev-embedded/libftdi: import from upstream Gentoo
Now that upstream Gentoo has this version, pull that into portage-stable.

BUG=None
TEST=`emerge libftdi` installs same version
TEST=`emerge-amd64-generic libftdi` works
TEST=`emerge-arm-generic libftdi` works
TEST=`emerge-x86-generic libftdi` works

Change-Id: Id83a595b6ab22fe85e582affdd45c92d1d477f53
Reviewed-on: https://gerrit.chromium.org/gerrit/10412
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2011-10-31 09:09:44 -07:00
Mike Frysinger
224776c6b8 sys-libs/libnih: import from upstream Gentoo
The ebuild has been merged upstream, so move it out of the cros overlay.
This includes a multilib fix for .pc file install.

BUG=chromium-os:20636
TEST=`emerge libnih` still works
TEST=build_packages+build_image for x86-alex produces a bootable image
TEST=`emerge-amd64-generic libnih upstart` still works
TEST=`emerge-x86-generic libnih upstart` still works
Change-Id: I064c22609a52be73c077e187515d1ec4eb690639
Reviewed-on: https://gerrit.chromium.org/gerrit/10312
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2011-10-30 23:28:38 -07:00
Chris Sosa
ef4a6452d4 Add Shflags usage for build_image.
BUG=chromium-os:22048
TEST=Ran build_image -h

Change-Id: If495d1784b9ba4491ca55537bf0b81395e88ee3c
Reviewed-on: https://gerrit.chromium.org/gerrit/10822
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
2011-10-28 11:39:47 -07:00
Chris Sosa
131eaf5667 Fix message funcs to use $@ and fix callers to use it correctly.
Fixed all callers in my big CL to no longer have to wrap poorly using
\ and start from the beginning of the next line but rather pass in
an array of args i.e.

info "tacos" " are" " delicious".

BUG=None
TEST=Ran to see the errors in parse_build_image and manual eyeing.

Change-Id: I5eac8a5ae7a8d314dbc4e821ee33cf88213711d0
Reviewed-on: https://gerrit.chromium.org/gerrit/10823
Commit-Ready: Chris Sosa <sosa@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
2011-10-28 11:08:58 -07:00
Chris Sosa
b0f5732449 Add ability to pass in specific images you want built rather than use flags.
This CL does two things.

First it introduces an argument interface that works with all the following
combinations:

factory_install | [base|dev[test|factory_test]] rather than use --test etc.

This does not build extra images.  If you just want a test image you can
run build_image --board=<board> test and all that's in your latest_dir is
chromiumos_test_image.bin.

Second, we only build what we ask and only finalize what we ask so on
an invocation of build_image test we only actually run cros_make_image_bootable
once saving 2 minutes on my machine (from 6:50->4:50 on multiple iterations).

BUG=chromium-os:22048
TEST=build_image test, all possible combinations of args through to start of
build.  Built factory_install using new and old methods and dev test with both
methods.  Also verified mod_image_for_test still works as advertises stand-alone.

Change-Id: I9fe2feb50a941c007214decd9ba1627012c050af
Reviewed-on: https://gerrit.chromium.org/gerrit/10621
Commit-Ready: Chris Sosa <sosa@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
2011-10-27 16:33:07 -07:00
Brian Harring
1dc59c76b0 add pregenerated metadata cache for speed.
BUG=chromium-os:21049
TEST=emerge -s a pkg or two from this repo, checking
     /var/cache/edb/dep/ to ensure the cache isn't regenerated
     incorrectly

Change-Id: Iba27b6b8cbe2cf2b9e5b34bc185ee17819e64478
Reviewed-on: https://gerrit.chromium.org/gerrit/10257
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
Commit-Ready: Brian Harring <ferringb@chromium.org>
2011-10-27 16:01:21 -07:00
Hung-Te Lin
9cd98ea2dc make_factory_package: add --run_omaha to simplify factory setup flow
Adds a shortcut to start mini-omaha server directly.

BUG=chrome-os-partner:21512
TEST=./make_factory_package.sh --release RELEASE --factory FACTORY \
       --hwid none --run_omaha
     # omaha server starts after packages are prepared.
 ./make_factory_package.sh --config CONFIG --run_omaha # success

Change-Id: I444d63cb92e6360e0dd95e79153d10dd0f91d4b8
Reviewed-on: https://gerrit.chromium.org/gerrit/10622
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
2011-10-26 21:06:58 -07:00
Aaron Plattner
130d363aaa Bind-mount /run if it exists
Ubuntu 11.10, for whatever reason, moved /dev/shm to /run/shm.  Since
/run is not mounted in the chroot, /dev/shm is a dangling symlink and
various things that require shared memory start failing.

If /run and /run/shm exist, bind-mount them in the chroot.

Because /run doesn't yet exist in the SDK tarballs, try to create it
(and /run/shm if necessary) as root if it and can't be created as a
normal user.

BUG=chromium-os:19871
TEST=Run cros_sdk, verify that /dev/shm has the expected contents

Change-Id: I61583c1c0d409c1234fa8d8930a9b64544c9a8e7
Reviewed-on: https://gerrit.chromium.org/gerrit/10222
Tested-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
2011-10-26 20:25:20 -07:00
Hung-Te Lin
e7c2d1c82b make_factory_package: support using firmware updater from release rootfs
For most use case, we want to use the firmware updater from release image
rootfs. It'd be more convenient if make_factory_package extracts updater from
release image by default.

BUG=chromium-os:21512
TEST=./make_factory_package --release RELEASE --factory FACTORY --hwid none
     # success, seeing "firmware: XXXX" in output
     ./make_factory_package --release RELEASE --factory FACTORY --hwid none --firmware none
     # success, not seeing firmware in mini-omaha configuration
     ./make_factory_package --release RELEASE --factory FACTORY --hwid none --firmware FIRMWARE
     # success, seeing "firmware: XXXX" in mini-omaha configuration
     ./make_factory_package --release RELEASE --factory FACTORY --hwid none \
       --diskimg ssd.img
     # success, no firmware messages
     ./make_factory_package --release RELEASE --factory FACTORY --hwid none \
       --diskimg ssd.img --firmware FIRMWARE
     # failure as expected - firmware is not supported in --diskimg.

Change-Id: Ic368031a8a5ece89e3e7fd56e2ee4fd1143a67a7
Reviewed-on: https://gerrit.chromium.org/gerrit/10561
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
2011-10-26 20:25:20 -07:00
Kris Rambish
d1b808a6ae Fix comments
TEST=None
BUG=chromium-os:22069

Change-Id: I1f92395a2839ac7d6178598d76161334e00812b0
Reviewed-on: http://gerrit.chromium.org/gerrit/10672
Commit-Ready: Kris Rambish <krisr@chromium.org>
Reviewed-by: Kris Rambish <krisr@chromium.org>
Tested-by: Kris Rambish <krisr@chromium.org>
Reviewed-by: Stanley Wong <stanleyw@chromium.org>
2011-10-25 14:38:29 -07:00
Kris Rambish
1c165c055b Make the autotest sub dir world readable
TEST=Ran it
BUG=chromium-os:22069
STATUS=Fixed

Change-Id: Id6e96e5602c02956b6a1592ff54ad60935e1620e
Reviewed-on: http://gerrit.chromium.org/gerrit/10660
Commit-Ready: Kris Rambish <krisr@chromium.org>
Reviewed-by: Kris Rambish <krisr@chromium.org>
Tested-by: Kris Rambish <krisr@chromium.org>
Reviewed-by: Stanley Wong <stanleyw@chromium.org>
2011-10-25 13:08:26 -07:00
Mandeep Singh Baines
26700c776a Upgraded the libjpeg-turbo Portage package
Upgraded media-libs/libjpeg-turbo to version 1.1.1 on x86

BUG=chromium-os:22044
TEST=compiles. Not pulled into x86-generic.

Change-Id: Ie61f35c7a4528d5d89e9eddb85643ef469be2db3
Reviewed-on: http://gerrit.chromium.org/gerrit/10656
Reviewed-by: Anush Elangovan <anush@chromium.org>
Commit-Ready: Mandeep Singh Baines <msb@chromium.org>
Tested-by: Mandeep Singh Baines <msb@chromium.org>
2011-10-25 11:42:19 -07:00
Zdenek Behan
4748e87341 update_chroot: update toolchain and portage first, also select gcc
BUG=chromium-os:21474
TEST=run the script, see my chroot being updated, cases below:
1) run normally, see the latest gcc being selected
2) run while having an older gcc manually selected, see no updates
3) set an invalid native profile, see it being fixed

Change-Id: Ic84187b8acf39fba11f2e39f36457e6f696ad7e4
Reviewed-on: http://gerrit.chromium.org/gerrit/9832
Tested-by: Zdenek Behan <zbehan@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Zdenek Behan <zbehan@chromium.org>
2011-10-25 11:01:58 -07:00
Chris Sosa
9d9a1b1017 Change the pid logic to reuse a file if the pid no longer exists.
BUG=chromium-os:21610
TEST=Ran cros_start_vm/cros_stop_vm ... start_vm with same pid after manually
closing it, etc.

Change-Id: If4062c452a135d39a280374cbbebfa852e744022
Reviewed-on: http://gerrit.chromium.org/gerrit/9974
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
2011-10-25 08:12:33 -07:00
Jon Salz
67145df2a4 Add cros_factory_install kernel command-line argument when running
the factory install shim.

BUG=chrome-os-partner:6535
TEST=Ran factory install shim on Alex and in VM

Change-Id: I32761736d8565d16323c6962058b478511a3ee8c
Reviewed-on: http://gerrit.chromium.org/gerrit/10398
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Jon Salz <jsalz@chromium.org>
Commit-Ready: Jon Salz <jsalz@chromium.org>
2011-10-25 08:12:32 -07:00
Kees Cook
84a4c7a620 Use fully qualified path for helpers.
Change helper invocation to use discovered script path so image_to_vm.sh
and mount_gpt_image.sh can be run outside of ~/trunk/src/scripts.

Additionally, minimize SCRIPT_ROOT boilerplate to not potentially mix
execution locations, as suggested by David James.

BUG=None
TEST=Built images from outside of ~/trunk/src/scripts

Change-Id: I4851cc74e7da8e08b4e7be79651fb41ce8868aed
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/10241
Reviewed-by: David James <davidjames@chromium.org>
2011-10-24 14:04:24 -07:00
Elly Jones
fa5b8ff89f mod_image_for_recovery: log mounts and loopdevs.
We have problems with loopdev leaks occasionally (see crosbug.com/16651); this
will help us figure out what we're leaking and to whom.

BUG=chromium-os:16651
TEST=build,mod_image_for_recovery

Change-Id: I12ae1fe433f54ffee0ec18bf1ce4db111b53f13d
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/10301
2011-10-21 15:00:55 -07:00
Mike Frysinger
5cbfd2a911 sys-devel/automake-wrapper: import ebuild from upstream
We have a keyword desync between the arches with version 4 and 5, so pull
in the latest upstream version 5 ebuild with all our arches stabilized.

For amd64/x86, there shouldn't be anything different.

BUG=None
TEST=`emerge automake-wrapper` works
TEST=build_packages works for arm-generic/amd64-generic/x86-alex

Change-Id: Idc8b88ad543f807dfd5b7d86472a9344695b627a
Reviewed-on: http://gerrit.chromium.org/gerrit/10414
Reviewed-by: Matt Tennant <mtennant@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2011-10-20 11:06:39 -07:00
Mike Frysinger
328b9eab02 update hooks: add /etc/portage/env support
Newer setup_board now sets up /etc/portage/env in the board root as a
symlink.  Add an update hook to fix up all existing boards.

Also migrate /etc/portage/bashrc in the chroot.

BUG=chromium-os:21787
TEST=update chroot from ver 13 to ver 14; make sure /build/*/etc/portage/env are symlinks

Change-Id: I8b828b8773998e1aa0104c42bad2dd2ac5c8416c
Reviewed-on: http://gerrit.chromium.org/gerrit/10344
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2011-10-20 11:06:39 -07:00
Rahul Chaturvedi
1e4d0c0b3d Add the enable_rootfs_verification flag to cros_download_latest_image.
BUG=chromium-os:10993
TEST=Downloaded a latest image via cros_download_latest_image with
rootfs verification enabled and disabled; confirmed that the results
were as expected.

Change-Id: I489a20452bd29ac13fa45fec66214a045086634d
Reviewed-on: http://gerrit.chromium.org/gerrit/10405
Reviewed-by: Zelidrag Hornung <zelidrag@chromium.org>
Commit-Ready: Rahul Chaturvedi <rkc@chromium.org>
Tested-by: Rahul Chaturvedi <rkc@chromium.org>
2011-10-20 10:27:11 -07:00
Paul Taysom
42970ce313 Upgraded the dosfstools Portage package
Upgraded sys-fs/dosfstools to version 3.0.9 on arm, x86
Removed dosfstools-3.0.11-name-ext.patch

BUG=chromium-os:21245
TEST=booted on alex and kaen and ran dosfsck on each

Change-Id: I395b3983ff3656999dcbe7b7ad06c80915f36496
Reviewed-on: http://gerrit.chromium.org/gerrit/10413
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Paul Taysom <taysom@google.com>
2011-10-20 09:53:43 -07:00
Hung-Te Lin
4c90853861 make_factory_package.sh: fix --diskimg for ARM images
Legacy boot loader like syslinux is only for x86 platforms.
We should ignore the configuration files if they don't exist.

BUG=chromium-os:21887
TEST=./make_factory_package --diskimg OUTPUT \
     --release PATH_TO_ARM_IMAGE \
     --factory PATH_TO_ARM_IMAGE \
     --hwid none  # success
     # do the same for x86 builds, mount ESP (#12)
     # and found 'sda3' in root.A.cfg

Change-Id: I53a8b418045465a69d700298b73793d60187f31a
Reviewed-on: http://gerrit.chromium.org/gerrit/10385
Reviewed-by: Tammo Spalink <tammo@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
2011-10-20 01:45:19 -07:00
Mike Frysinger
c9dfcaf480 get_latest_image: ignore files when searching for latest images
If files are in the board build dir with newer mtimes than the dirs
or symlinks, then the get_latest_image code selects the file instead
of the latest dir.  And then it all falls down:
	Cannot find image directory /path/to/file

So tweak the look up code by having bash do the expansion of dirs
only, and then let ls do the mtime sorting.

BUG=None
TEST=`./image_to_usb.sh --board=x86-alex -y --to=/dev/sdb` still works after deleting "latest"
Change-Id: Ic06a2ddd0206748d35cb7762009df67a267d4746
Reviewed-on: http://gerrit.chromium.org/gerrit/10258
Reviewed-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2011-10-19 19:14:42 -07:00
Mike Frysinger
6bae49985e update hooks: drop useless +x perms on files
These files need not be +x to work since we source them directly.

BUG=None
TEST=update chroot from ver 12 to ver 13

Change-Id: I3133cf532286bed63308e82767f0c95900f54e84
Reviewed-on: http://gerrit.chromium.org/gerrit/10342
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2011-10-19 16:48:55 -07:00
Mike Frysinger
f04350375f sys-libs/timezone-data: import latest stable from upstream
BUG=chromium-os:21850
TEST=`emerge chromeos-base` works cleanly
TEST=`emerge timezone-data` works cleanly
TEST=build_packages+build_image for x86-alex produces a bootable image
TEST=build_packages+build_image for arm-generic works
Change-Id: I35a76e6319ebcc6c95b9a7c1792686c1c2a291dd
Reviewed-on: http://gerrit.chromium.org/gerrit/10315
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Matt Tennant <mtennant@chromium.org>
2011-10-19 15:56:15 -07:00
Mike Frysinger
2ec3272ca5 sys-apps/attr: sync to latest upstream Gentoo
This basically just gets us arm stable.

BUG=None
TEST=`emerge-arm-generic attr` works
TEST=build_packages+build_image for arm-generic works
Change-Id: I0bf9a6da05ef940563181e3aabef48abb6918c1b
Reviewed-on: http://gerrit.chromium.org/gerrit/10330
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2011-10-19 14:15:13 -07:00
Mike Frysinger
9aa80dc457 cros_sdk: always pull shflags from local tree
Since we need this anyways (can't assume the host outside of the chroot
provides shflags), always source the local copy rather than searching
for versions provided by the chroot.

BUG=chromium-os:21742
TEST=`cros_sdk --enter` works
TEST=`./build_packages --board=amd64-generic` works
Change-Id: Ia390042131f59948472b124cfe4e273483eada6a
Reviewed-on: http://gerrit.chromium.org/gerrit/10231
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2011-10-19 14:15:12 -07:00
Mike Frysinger
362b3dd177 sys-devel/flex: sync to latest upstream Gentoo
BUG=None
TEST=build_packages for amd64-generic works
TEST=build_packages+build_image for arm-generic works
TEST=build_packages+build_image for x86-alex works & boots
Change-Id: I95f35ccf7fd62a4b3d52746b17ad18157fcec0a6
Reviewed-on: http://gerrit.chromium.org/gerrit/10329
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2011-10-19 14:15:12 -07:00
Mike Frysinger
093572577a sys-apps/acl: sync to latest upstream Gentoo
This basically just gets us arm stable.

BUG=None
TEST=`emerge-arm-generic acl` works
TEST=build_packages+build_image for arm-generic works
Change-Id: I057883e6b860ca158ed2d25b94165b7347d71110
Reviewed-on: http://gerrit.chromium.org/gerrit/10331
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2011-10-19 14:15:12 -07:00
Kees Cook
43a3213f33 update_kernel: use $TMP for generated outputs
"new_kern.bin" was being generated in the current directory and not
being cleaned up. Additionally, without this change, it is not safe to
run update_kernel.sh concurrently to separate devices.

BUG=None
TEST=Updated a kernel on a running VM, verified /tmp/update_kernel.* was
 created and used for generated outputs.

Change-Id: I27cd236ee9d38263dcca361ce063078a13b11864
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/10240
Reviewed-by: Olof Johansson <olofj@chromium.org>
2011-10-19 11:05:33 -07:00
J. Richard Barnette
8b1328b17c Convert various scripts to use get_latest_image
Convert image_to_usb.sh, mod_image_for_recovery.sh, and
mod_image_for_test.sh to use get_latest image; previously these
scripts wouldn't honor the 'latest' symlink.

BUG=None
TEST=re-link 'latest' to an alternate directory; test scripts

Change-Id: Ibb56bb993eae9b6ff9dbfea5090c7cae46f2c133
Reviewed-on: http://gerrit.chromium.org/gerrit/10267
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
2011-10-19 11:05:33 -07:00
Kees Cook
7d7d2ef0f0 update_kernel: update the syslinux partition too
The KVM examples boot from the syslinux partiton, so update the kernel
that lives there too.

BUG=None
TEST=correctly updated a kernel in a VM

Change-Id: I1526064f85d6c9233696590e9e746bc91bcd6d2a
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/10239
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
2011-10-19 10:13:58 -07:00