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>
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>
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>
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>
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>
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>
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>
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>
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>
It's nice to be able to use rsync for copies (much faster). Add a few
helper functions for doing this, handling fallback to just using tar
to send.
BUG=None
TEST=Use in a future CL
Change-Id: I74c481520fc785138875ab6d5ffdaf9935a0b6d1
Reviewed-on: https://gerrit.chromium.org/gerrit/39392
Tested-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>
This option avoids updating the vboot kernel partition on the target.
This might be useful if you've done something tricky like put a
nv-U-Boot into the vboot kernel partition.
BUG=None
TEST=Put nv-U-Boot in kernel partition and see that ./update_kernel.sh
--novboot doesn't clobber it. Then try without --novboot and see it
clobbered.
TEST=Run update_kernel --novboot on a system with verity and see
error.
Change-Id: I7c25a7e2ab64a136e427952bb0ac04686fbca805
Reviewed-on: https://gerrit.chromium.org/gerrit/39390
Tested-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>
These style nits are in preexisting code but are similar to style
comments that vapier found on
<https://gerrit.chromium.org/gerrit/#/c/39390/2>.
BUG=None
TEST=Use update_kernel.sh
Change-Id: I26cf133a0f0495feee715e934bf819e90c0a688d
Reviewed-on: https://gerrit.chromium.org/gerrit/39432
Tested-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>
On ARM we were copying the kernel twice: one next to the "copying
kernel" message and once in copy_kernelimage() where we just copied
vmlinux.uimg. Avoid the second copy.
BUG=None
TEST=On ARM with no verity, still found that the kernel got copied.
Change-Id: I2a8124b47d018195c7e4b1657d6caf961d3d4d0b
Reviewed-on: https://gerrit.chromium.org/gerrit/39391
Tested-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Commit-Ready: Doug Anderson <dianders@chromium.org>
check_deps checks for libraries using RPATH, but does not take the
similar RUNPATH into account. For the purposes of chasing down
library dependencies, finding a library on either path suffices.
BUG=None
TEST=Build an image that includes binaries and associated libraries in a
non-standard location, with the binaries and libraries setting an
RUNPATH (and not an RPATH) pointing at that non-standard location.
Change-Id: Ic930bbacbe5c8ddeb367c39960dadea8aaba0cb2
Reviewed-on: https://gerrit.chromium.org/gerrit/39397
Tested-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Josh Triplett <josh@joshtriplett.org>
BUG=None
TEST=./build_packages --fetch-only, verify it just fetches.
Change-Id: I290ef23f13446c912724aa37b8c79269a9db6cc0
Reviewed-on: https://gerrit.chromium.org/gerrit/39304
Commit-Ready: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Over time, stale ssh agent dirs build up in /tmp. Have enter_chroot run
a simple rmdir to clean out any empty dirs. Since we mount over top the
dir, this shouldn't kill any valid mount points.
BUG=None
TEST=`cros_sdk` cleaned out empty ssh dirs in /tmp
Change-Id: Ib9f063f99db61825082818a39a39c5eb01f2d24e
Reviewed-on: https://gerrit.chromium.org/gerrit/39004
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: Matt Tennant <mtennant@chromium.org>
Reviewed-by: Brian Harring <ferringb@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
This removes files only used at link time, or when manually debugging,
or by glibc's charset routines (gconv) which are not used by Chromium.
BUG=chromium-os:22939
BUG=chromium-os:23105
TEST=build_image for daisy works
TEST=`cbuildbot {x86,x86_64,arm}-generic-full` worked
TEST=`cbuildbot chromiumos-sdk` worked
TEST=build_image boots & runs fine on an alex
Original-Change-Id: I68d848c2e307c98d53a8faa73924f57571f7887b
Change-Id: I25ffda36d28fd114715053c3a2590cc2248688bf
Reviewed-on: https://gerrit.chromium.org/gerrit/39214
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Darren Krahn <dkrahn@chromium.org>
Tested-by: Darren Krahn <dkrahn@chromium.org>
https://gerrit.chromium.org/gerrit/#/c/38156 introduced a bug where
cross_get_version was moved to install_toolchain but was still
used in setup_board.
setup_board now saves whatever toolchain version is currently configured
and appends that information to the newly generated board config.
BUG=chromium-os:36865
TEST=remote trybot. manual - test case of existence/nonexistence of
board config file and existence/nonexistence of previous toolchain info.
Change-Id: I20e1794c12e7e60fdbbcd5a123ddc5c6bdf86b16
Reviewed-on: https://gerrit.chromium.org/gerrit/39132
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Ryan Cui <rcui@chromium.org>
Tested-by: Ryan Cui <rcui@chromium.org>
BUG=chromium-os:36862
TEST=./build_image factory_install --board=parrot
Change-Id: If1e59d09eec45340e49b2711b4799eb1f83ea007
Reviewed-on: https://gerrit.chromium.org/gerrit/39133
Tested-by: Paul Taysom <taysom@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Paul Taysom <taysom@chromium.org>
If devs run `./build_image --noenable_rootfs_verification`, they also
have to manually specify --noenable_bootcache otherwise the default
kicks in. We can make the default logic slightly smarter and only
enable bootcache by default if rootfs verification is also enabled.
BUG=chromium-os:25441
TEST=`./build_image --board=parrot --enable_rootfs_verification` -> bootcache enabled
TEST=`./build_image --board=parrot --noenable_rootfs_verification` -> bootcache disabled
TEST=`./build_image --board=parrot` -> bootcache enabled
TEST=`./build_image --board=parrot --noenable_bootcache` -> bootcache disabled
Change-Id: I97f40c70c045bca294a903ff73e5eff7554617d4
Reviewed-on: https://gerrit.chromium.org/gerrit/39043
Reviewed-by: Paul Taysom <taysom@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
The current logic has a few libdirs hardcoded (lib & lib64). This fails
if the libdir is named something else (like libx32). Tweak the pkg-config
logic so it returns all pkg-config dirs found in the target. This won't
work if the target is multilib, but we don't have any plans to do that.
BUG=chromium-os:36866
TEST=`cbuildbot {amd64,arm,x86}-generic-full` worked
Change-Id: I1d856c86d279691e85e5794f429bd3da2eb28675
Reviewed-on: https://gerrit.chromium.org/gerrit/39050
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
This removes files only used at link time, or when manually debugging,
or by glibc's charset routines (gconv) which are not used by Chromium.
BUG=chromium-os:22939
BUG=chromium-os:23105
TEST=build_image for daisy works
TEST=`cbuildbot {x86,x86_64,arm}-generic-full` worked
TEST=`cbuildbot chromiumos-sdk` worked
TEST=build_image boots & runs fine on an alex
Change-Id: I68d848c2e307c98d53a8faa73924f57571f7887b
Reviewed-on: https://gerrit.chromium.org/gerrit/37378
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
When running on NFS, the root user may not be able to access ~/.ssh and
~/.gitconfig, so it is necessary to fallback to SUDO_USER to access these
files.
To discourage users from using NFS homedirs, print warnings every time
cros_sdk is run with an NFS homedir.
BUG=chromium-os:36783
TEST=Try cros_sdk --replace and cros_sdk with and without NFS homedirs.
Change-Id: I4cdbceca485d3491656d6f743814da4ebcdd75ad
Reviewed-on: https://gerrit.chromium.org/gerrit/38953
Commit-Ready: David James <davidjames@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
Changes to build_image to allow enabling of bootcache.
./build_image --board=$BOARD --enable_bootcache
A board can be configured to use the bootcache by
the following lines in private-overlays/overlay-<board>-private/scripts
if [[ ${FLAGS_bootcache_use_board_default} -eq ${FLAGS_TRUE} ]]; then
FLAGS_enable_bootcache=${FLAGS_TRUE}
fi
Setting --noenable_bootcache or --enable_bootcache on the comand
line will override the default.
BUG=chromium-os:25441
TEST=built and installed snow, amd-64(latitude), stumpy
Change-Id: Ie081ef94f4799b0071b53e0587d89f1247b4a11f
Reviewed-on: https://gerrit.chromium.org/gerrit/38414
Tested-by: Paul Taysom <taysom@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Paul Taysom <taysom@chromium.org>
Move cross toolchain library install code out of setup_board to a
separate script, and have setup_board use it.
The install_toolchain script will be used by the builders to set up
a separate sysroot (distinct from the /build/<board> root), as part of
the Simplified Chrome Workflow (goto/simple-chrome).
BUG=chromium-os:36299
TEST=locally, trybots.
Change-Id: I88c355f1798da71ead9370a82365304dbf311504
Reviewed-on: https://gerrit.chromium.org/gerrit/38156
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Ryan Cui <rcui@chromium.org>
Tested-by: Ryan Cui <rcui@chromium.org>
This unforks the autoupdate protocol logic used by cros_image_to_target to
have it use common code from the devserver.
BUG=chromium-os:36418
TEST=Pylint + pyflaes, running test now.
CQ-DEPENDS=I73cf6343
Change-Id: I199d5f2989d361c3427058fd6e900c8ec623c88a
Reviewed-on: https://gerrit.chromium.org/gerrit/38158
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
A rootfs built with verification cannot be mounted rw, so have the
mount script try to mount things ro if the rw mount failed.
BUG=None
TEST=`./build_image && ./mount.sh` work
Change-Id: I291ece366e03e218b3cd9ff8f30bd9a6e9cf879d
Reviewed-on: https://gerrit.chromium.org/gerrit/35065
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Liam McLoughlin <lmcloughlin@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Add -n to remote_sh calls in set_up_remote_access and learn_board.
Otherwise the ssh's they start will consume some stdin, making these
functions incompatible with a script which needs its stdin.
BUG=none
TEST=add -n to first remote_sh in cros_adopt_device then "echo y | cros_adopt_device" will work
Change-Id: Ic01f69b0a86581c8650f59056d52766e76de1799
Reviewed-on: https://gerrit.chromium.org/gerrit/37251
Tested-by: Frank Henigman <fjhenigman@chromium.org>
Reviewed-by: Chris Wolfe <cwolfe@chromium.org>
Commit-Ready: Frank Henigman <fjhenigman@chromium.org>
Added 200Meg to the root partitions where needed.
BUG=chromium-os:25441
TEST=secuity_test_image for stumpy and daisy. Installed stumpy, parrot, daisy.
Change-Id: Iaa049968f02b4d262ca5997b0844793f8acf999b
Reviewed-on: https://gerrit.chromium.org/gerrit/37905
Tested-by: Paul Taysom <taysom@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Paul Taysom <taysom@chromium.org>
These packages used to be installed into the chroot, but no longer.
Punt them to avoid random upgrade errors due to them no longer existing.
BUG=None
TEST=`./update_chroot` worked and cleaned out these pkgs
Change-Id: I9b7f7d0f8f9106d2a580393ec428876d332ac701
Reviewed-on: https://gerrit.chromium.org/gerrit/37763
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
When we stopped installing binutils into package.provided, we stopped
needing to check its version at all. While CL:30287 updated the file,
it left the latter in place. Scrub it now.
BUG=chromium-os:21330
TEST=`./setup_board --board=x86-generic` setup gcc/glibc in package.provided and worked
Change-Id: I5c5d7175f17fd2d4ad5231ed3f9f5ddee592aa63
Reviewed-on: https://gerrit.chromium.org/gerrit/37517
Reviewed-by: asharif <asharif@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Changed update_kernel.sh to use /dev/dm* to mean verity
is being used instead of /dev/dm-0.
BUG=chromium-os:25441
TEST=Used update_kernel.sh to update kernel on stumpy
Change-Id: I187fe0b43c65a6bfa7a689d31ae2cfd86fda558f
Reviewed-on: https://gerrit.chromium.org/gerrit/33797
Tested-by: Paul Taysom <taysom@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Commit-Ready: Paul Taysom <taysom@chromium.org>
This allows you to build a VM image using the 4gb-rootfs layout
BUG=none
TEST=Build iamge using 4gb-rootfs and build VM image
Change-Id: I1efa45d1448b22a9905dae764f0e4cdc0538be68
Reviewed-on: https://gerrit.chromium.org/gerrit/37489
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Liam McLoughlin <lmcloughlin@chromium.org>
Tested-by: Liam McLoughlin <lmcloughlin@chromium.org>
Currently, build_packages has a typo that causes it to only include "chromeos"
in dependency checks. This means that if a package outside of chromeos needs
to be updated in order to fix a conflict, build_packages will refuse to do that
and break. This caused a build break on keybuk's machine.
BUG=none
TEST=Try it on keybuk's machine and verify build_packages works again.
TEST=Remote trybot run.
Change-Id: I1acca0be47152ba93c30ba07c0bf643650906199
Reviewed-on: https://gerrit.chromium.org/gerrit/37452
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
This makes a follow up commit easier to document excludes.
BUG=chromium-os:22939
TEST=build_image for daisy installs same set of files
Change-Id: I09a9b3fe6f8c1d1fd9dd4d094f2fb7c81ce24880
Reviewed-on: https://gerrit.chromium.org/gerrit/37377
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
BUG=None
TEST=build_image for daisy worked
Change-Id: If2343bc1f13a23bc1b6bc0eae9a4ed8938b53eb4
Reviewed-on: https://gerrit.chromium.org/gerrit/37361
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
This removes some spurious noise from the build_image output.
BUG=None
TEST=`./build_image` still worked and is quieter
Change-Id: Ic5d89a462dc137a1a710f77dc16cee401e0083b2
Reviewed-on: https://gerrit.chromium.org/gerrit/35426
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
As part of the efforts to support HTTP-based downloads for autoupdate,
we are upgrading update_engine from Omaha v2 to v3. So, we need to
update cros_image_to_target.py to also understand the v3 XML.
BUG=chromium-os:35930
TEST=Successfully updated my ZGB which was running the v3 update_engine.
Change-Id: I2b4831c1e87ccf064e79cd6d34205f19aedc9d57
Reviewed-on: https://gerrit.chromium.org/gerrit/37065
Reviewed-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
Explicitly build curl/openssl/git since the toolchain itself tries to
fetch over http with git.
BUG=None
TEST=`cros_sdk --bootstrap` works
TEST=`cbuildbot chromiumos-sdk` works
Change-Id: I50b3145732f8345d6ad6ada41325648cbea31b84
Reviewed-on: https://gerrit.chromium.org/gerrit/36995
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Han Shen <shenhan@chromium.org>
Tested-by: Han Shen <shenhan@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
No need to setup these hooks in their own set of sudo commands,
so merge with the existing block to avoid another sudo.
Also install all hooks that are available in case we want to add
more in the future (we probably do).
BUG=None
TEST=`./setup_board --board=daisy --skip_chroot_upgrade --regen_configs` created install hooks
Change-Id: Idcd64afc32c81fcc2b4a712992c5ee0edf5ae0d4
Reviewed-on: https://gerrit.chromium.org/gerrit/36474
Reviewed-by: Brian Harring <ferringb@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Collapse the modifications done in 150setupVirtualWiFi into
100setupTestingInterface.
BUG=chromium-os:35909
TEST=Run run script manually by setting ROOT_FS_DIR
Change-Id: I817ef7fcd30ba7c8e9f0883547124ab314101b5f
Reviewed-on: https://gerrit.chromium.org/gerrit/37057
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
BUG=chromium-os:35909
TEST=None
Change-Id: I055068435812043eb1c31fd8a6fd2ca0b5b8017f
Reviewed-on: https://gerrit.chromium.org/gerrit/37022
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
sudo takes 150ms per invocation on Goobuntu, and with 10 invocations in
enter_chroot.sh, this means that we're wasting a lot of time, every time
cros_sdk is invoked. Cutting these unnecessary invocations reduces the time
required to run enter_chroot.sh from 2.3s to 0.8s.
CL:36618 is the companion change that updates cros_sdk to invoke
sudo unshare -m prior to calling enter_chroot.sh.
Summary of changes:
1. Remove all calls to sudo and just run the commands directly.
- Remove the mount queue and any sudo_multi optimizations.
- Rename sudo_chroot -> bare_chroot because we don't run sudo anymore there.
- Remove code for validating sudo timestamp.
2. Allow the scripts to work as root:
- Ensure that files created by cros_sdk that previously were owned by the
user still are owned by the user (either using chown or cp -p).
- Use $SUDO_USER to find the user's account.
- Use $SUDO_HOME instead of $HOME to find the user's home dir.
- Remove outdated code for disabling automount on Lucid, which doesn't work
when run as root.
- Update code for calculating the user's git username to use sudo to switch
to the user. Also move it to make_chroot.sh so that this change doesn't
impact performance.
3. Cleanup
- Remove environment syncer process in favor of just syncing once when chroot
is entered.
- Remove teardown and instead rely on unshare to unmount the mounts. To make
sure that outside processes never notice the mounts, we use mount -n. This
also ensures that /etc/mtab never contains stale mounts.
- Remove path-overrides, since it is no longer needed.
BUG=chromium-os:35714, chromium-os:35679
TEST=Trybot runs.
CQ-DEPEND=CL:36618
Change-Id: I919a8aadb08fafde97348e8511573c28fdd47186
Reviewed-on: https://gerrit.chromium.org/gerrit/36619
Tested-by: David James <davidjames@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
Mounts can sometimes be unmounted from under our feet. I'm not sure
what's causing this problem, but I can reproduce it both on gPrecise
and on our builders (chromiumos-sdk). I've confirmed this patch fixes
the problem.
BUG=chromium-os:35679
TEST=20 chromiumos-sdk trybot runs. Confirmed this code is executing
and catching a race condition in the trybot runs.
Change-Id: Iff019e672e9124053ac62cf3017dba485a4989cb
Reviewed-on: https://gerrit.chromium.org/gerrit/36698
Tested-by: David James <davidjames@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
Install shim images are broken when booting from legacy x86 BIOS. The
install shim relies upon "cros_factory_install" being passed as a boot
flag. This flag is never passed to create_legacy_bootloader_templates,
so the install shim flow is broken.
This change passes the boot args flags to create_legacy_bootloader... so
the install shim will function normally.
TEST=Create factory_install image, verify correct boot w/ x86 BIOS.
BUG=chrome-os-partner:15661
Change-Id: I46b2be188f48b7626bfd3235d5788410c7488c42
Reviewed-on: https://gerrit.chromium.org/gerrit/36590
Tested-by: Shawn Nematbakhsh <shawnn@google.com>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Liam McLoughlin <lmcloughlin@chromium.org>
Commit-Ready: Shawn Nematbakhsh <shawnn@google.com>
BUG=None
TEST=build_image
Change-Id: Ib1ff8ac57b48402d2353d33413b936e5a6627176
Reviewed-on: https://gerrit.chromium.org/gerrit/28120
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>