Commit Graph

304 Commits

Author SHA1 Message Date
Andrew Chew
6202bf1190 Add support for cros_workon of non-workon packages
Added --remote flag, and some "NonWorkon" methods that complement the "Workon"
methods.

To add a non-workon project to the local_manifest.xml, specify a remote.
The remote tag will be added as part of the new entry in local_manifest.xml.

BUG=chromium-os:32247
TEST=In conjunction with a change in cros_workon, tested that non-workon
projects can be added to the local_manifest.xml.

Change-Id: I1bc4247532647e9bc5962acef988ab57445f4b0e
Signed-off-by: Andrew Chew <achew@nvidia.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/26346
Reviewed-by: Rhyland Klein <rklein@nvidia.com>
Reviewed-by: David James <davidjames@chromium.org>
2012-07-12 19:13:25 -07:00
David James
359d3e119d Simplify boilerplate common.sh code in src/scripts.
Currently, the scripts in src/scripts have multiple implementations
for handling when common.sh fails to load, some of which are buggy.
To simplify the boilerplate, these scripts now just exit if common.sh
fails to load. The shell itself will print the following message if
common.sh is not found:
  /usr/lib/crosutils/common.sh: No such file or directory

BUG=chromium-os:32442
TEST=Run these scripts with and without common.sh installed.

Change-Id: Ie54420b6c649774f9cb039c14c80f4cf6c6ebc07
Reviewed-on: https://gerrit.chromium.org/gerrit/27058
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
2012-07-12 10:55:37 -07:00
Kees Cook
224817fda9 Relocate stateful_parition/var to stateful_partition/var_overlay
To avoid needing to migrate fresh dev images's /var contents when
using the encrypted partition, move the /var bits out of the old
stateful_partition/var location into stateful_partition/var_overlay.

The (initially empty) system /var will continue to either live
in stateful_partition/var (in the unencrypted case), or in
stateful_partition/encrypted/var (in the encrypted case).

The contents needed for gmerge will be symlinked into place at runtime
(via CL I6e68b1f334f5d5b3c4d2977008435bd929191ce7). While the installer
already makes sure that /var is not shipped on an image, this change
additionally make sure that the other contents installed by the ebuilds
will not show up in the actual /var either.

BUG=chromium-os:22172
TEST=link build, boot, install, manual testing.

Change-Id: Ie6480a59929818fe5d36a46abf533b648fb78850
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26355
Reviewed-by: Chris Sosa <sosa@chromium.org>
2012-07-09 09:06:30 -07:00
Kris Rambish
c0ee2dd34e Update --prepackaged_autotest to --autotest_dir
BUG=None
TEST=Ran it

Change-Id: I63f8c351a974f988ae06af931d201bab97e467af
Reviewed-on: https://gerrit.chromium.org/gerrit/23423
Reviewed-by: Kris Rambish <krisr@chromium.org>
Tested-by: Kris Rambish <krisr@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Kris Rambish <krisr@chromium.org>
2012-05-23 16:42:32 -07:00
Vic Yang
d0694f5ac9 Check kernel image size when building image
Kernel and ramdisk image together are copied into a 16MB partition.
This CL logs their size when building image. If they are larger than
14MB, warning message is emitted. If they reached 16MB, building fails.

BUG=chromium-os:27739
TEST=Build success on x86 and arm.
     Check log and see kernel image size logged.
     Lower the size limit to 6MB and build x86 factory install shim and
     see build fail.

Change-Id: I4c4895c2989b302aa0c3624127518468566d1148
Reviewed-on: https://gerrit.chromium.org/gerrit/22543
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Vic Yang <victoryang@chromium.org>
Tested-by: Vic Yang <victoryang@chromium.org>
2012-05-13 19:57:51 -07:00
Mike Frysinger
6b1abb2a6f fix up function style
The "function" keyword is superfluous, not in POSIX, is inconsistent
between bash files, and generally makes me angry.  So convert every
instance to the form:
	foo() {

BUG=None
TEST=`cbuildbot x86-generic-paladin` works

Change-Id: I97f5ca30a3edfef7222b1e08ac23917dc613b556
Reviewed-on: https://gerrit.chromium.org/gerrit/22467
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-05-11 14:10:38 -07:00
Brian Harring
7f175a59e1 common.sh: output a backtrace and debug information on failure.
Currently, if set -e spots a nonzero exit we basically have
no real debug information- it just stops immediately without stating
where or why.  This forces our scripts to be stupidly verbose so
we can track roughly where they were, thus when they fail we can
use that information to localize the rough exit point.

Instead we should be traping that set -e induced exit and
outputing necessary debug information to run it down.  This includes
outputing the relevant stack trace, or at least what we can get of
it.

The 'die' function is now enhanced to automatically dump the trace
that lead to it.  For most consumers this is desired- however for
commandline parsing induced dies ("--board is missing" for example),
the trace is noise.  For those cases, a 'die_notrace' function was
added that retains the original non-backtrace behaviour.

Example output via instrumenting cros_generate_breakpad_symbols
w/ the failing command '/bin/false' (nonzero exit code).

Before:
./cros_generate_breakpad_symbols  monkeys --board=x86-alex
<no output at all, just exit code 1>

With this CL:
./cros_generate_breakpad_symbols  monkeys --board=x86-alex
ERROR   : script called: ./cros_generate_breakpad_symbols 'monkeys' '--board=x86-alex'
ERROR   : Backtrace:  (most recent call is last)
ERROR   :   file cros_generate_breakpad_symbols, line 207, called: main 'monkeys' '--board=x86-alex'
ERROR   :   file cros_generate_breakpad_symbols, line 163, called: die_err_trap '/bin/false' '1'
ERROR   :
ERROR   : Command failed:
ERROR   :   Command '/bin/false' exited with nonzero code: 1

BUG=chromium-os:30598
TEST=inject a failing command into a script, verify the output.
TEST=inject a 'command not found', verify the output
TEST=cbuildbot x86-generic-full --remote
TEST=cbuildbot arm-tegra2-full --remote
TEST=cbuildbot chromiumos-sdk --remote

Change-Id: I517ffde4d1bb7e2310a74f5a6455b53ba2dea86c
Reviewed-on: https://gerrit.chromium.org/gerrit/17225
Reviewed-by: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
Commit-Ready: Brian Harring <ferringb@chromium.org>
2012-05-07 17:19:41 -07:00
Zelidrag Hornung
4c5ed7dfc4 Fixed image download script.
BUG=none
TEST=none

Change-Id: I947a9b63a3822d6bf885096e77c1b66957674183
Reviewed-on: https://gerrit.chromium.org/gerrit/21109
Reviewed-by: Rahul Chaturvedi <rkc@chromium.org>
Commit-Ready: Zelidrag Hornung <zelidrag@chromium.org>
Tested-by: Zelidrag Hornung <zelidrag@chromium.org>
2012-04-25 14:34:24 -07:00
David James
dee866c121 Remove --build_root from all scripts except mod_image_for_pyauto.sh.
For all scripts, --build_root defaults to /build and is never used. To
remove option clutter, I've deleted this option.

The only script which still references build_root in src/scripts is
mod_image_for_pyauto.sh, which seems to support it for grabbing pyauto
dependencies from a location other than /build/*. This might conceivably
be useful, so I haven't touched that script.

BUG=chromium-os:27364
TEST=Remote trybot run. git grep for references to build_root.

Change-Id: I502f7df0123a598fc62a4ef4ed847ceb182f65b8
Reviewed-on: https://gerrit.chromium.org/gerrit/18283
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: David James <davidjames@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
2012-03-15 18:55:26 -07:00
Paul Stewart
c8f910a860 Change default port for cros_image_to_target tunnel
Old default conflicted with a new service running on the DUT.

BUG=None
TEST=Rerun cros_image_to_target

Change-Id: I982b68500d6cb59c884a286229688ee41ff6d76d
Reviewed-on: https://gerrit.chromium.org/gerrit/17434
Reviewed-by: Ryan Cairns <rtc@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
2012-03-06 15:19:25 -08:00
Paul Stewart
195494efc0 cros_image_to_target: Fix --port option
Previously this script never honored the user --port option.

BUG=None
TEST=Manual: Run with or without --port option

Change-Id: I971ee69818a37e6706ce70327b1d243fd78d214d
Reviewed-on: https://gerrit.chromium.org/gerrit/16429
Reviewed-by: Ryan Cairns <rtc@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
2012-02-22 18:23:11 -08:00
Zelidrag Hornung
094160701f Added ability to download images othert than x86-generic.
BUG=chromium-os:24907
TEST=make sure ./bin/cros_download_latest_image downloads the correct board

Change-Id: I8c1784edf39a6a04d46bc8cdbf7b62d2a361d593
Reviewed-on: https://gerrit.chromium.org/gerrit/13948
Reviewed-by: Daniel Erat <derat@chromium.org>
Tested-by: Zelidrag Hornung <zelidrag@chromium.org>
2012-01-10 12:29:11 -08:00
Mike Frysinger
a19cf6e2db build_image: handle diff mount output
Newer versions of util-linux's mount utility will not show:
	/dev/loop0 on /some/path type ext3 (mount,opts)
Instead, it finds out the file backing /dev/loop0 and outputs:
	/some/file on /some/path type ext3 (mount,opts)

This breaks the make_image_bootable helper that attempts to look up the
loop device that mount_gpt_image.sh happened to pick.

Let's scuttle the idea of parsing `mount` and move directly to what the
kernel has to say via /proc/mounts.  Hopefully the ABI there should be
quite a bit more stable.

BUG=None
TEST=build_image works with mount from util-linux-2.16
TEST=build_image (before change) fails with mount from util-linux-2.19
TEST=build_image works with mount from util-linux-2.19

Change-Id: I66908800e82ff2e106face9d57773721e400dc2a
Reviewed-on: https://gerrit.chromium.org/gerrit/11869
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2011-12-01 11:46:16 -08: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
mukesh agrawal
5aa31fe38a cros_utils: change default image type for cros_image_to_target
BUG=chromium-os:21822
TEST=manual

testing: ran with --debug, and verified that the chosen image file
is appropriate. (test image is chosen, unless --no-test is specified.
if both --test and --no-test are present, image file is chosen
according to whichever option appears last.)

Change-Id: Ia0a6d0ebac889a347d1b8989b8b2c3db8231dcae
Reviewed-on: http://gerrit.chromium.org/gerrit/10265
Tested-by: mukesh agrawal <quiche@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: mukesh agrawal <quiche@chromium.org>
2011-10-18 19:13:53 -07:00
Sonny Rao
3163cf0605 Change script style for ARCH comparisons to double-bracket bash style
BUG=none
TEST=test setup_board, build_packages, build_image, image_to_vm,
on x86-generic and amd64-generic

Change-Id: I43d9d8e6e0e48cbce4d0086b78721ed86b120d4a
Reviewed-on: http://gerrit.chromium.org/gerrit/10209
Reviewed-by: Vince Laviano <vlaviano@chromium.org>
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
2011-10-17 17:53:48 -07:00
Sonny Rao
1261bc5886 fix up bootloader related scripts to treat amd64 like x86
BUG=chromium-os:21739
TEST=manually verify syslinux is being properly installed on
amd64-generic

Change-Id: I780fba2b9e90a8cf3922b48723f29d96eaf3931e
Reviewed-on: http://gerrit.chromium.org/gerrit/10168
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: Vince Laviano <vlaviano@chromium.org>
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
2011-10-17 14:00:54 -07:00
Hsinyu Chao
4b8a1ebb4d Small cleanup: remove unused local variable.
BUG=None
TEST=`./build_image --board=tegra2_kaen` still work
Change-Id: Ic3936cd2f300716ad48c04e504fbc0e1f36e0683
Reviewed-on: http://gerrit.chromium.org/gerrit/9928
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Tested-by: Hsinyu Chao <hychao@chromium.org>
Commit-Ready: Hsinyu Chao <hychao@chromium.org>
2011-10-12 02:46:49 -07:00
Paul Stewart
14b5aa6747 cros_run_wifi_tests: Add --use_emerged flag
Pass --use_emerged flag on to run_remote_tests

BUG=None
TEST=Run comman with flag

Change-Id: Iacaf967a0a018e1686295179a9ef0a3e8eb9e2d5
Reviewed-on: http://gerrit.chromium.org/gerrit/8817
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
2011-10-06 00:13:28 -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
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
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
David James
d1679ab864 Don't hardcode output directories in boot.desc.
Right now, output directories are hardcoded in boot.desc. This means that
cros_make_image_bootable will still write to the directories mentioned in
build_image, even if it's working on a different directory. This can
mess with the buildbot, because it can cause cros_make_image_bootable
to mess with the files created for existing images.

This change fixes flaky failures where the buildbot fails with warnings
stating that vmlinuz_hd.vblock does not exist. See bug 19956.

BUG=chromium-os:19956
TEST=Run full canary trybot run and verify cros_make_image_bootable uses
     files from the right directory now.

Change-Id: Ib390aa84570b077cbc8b69b757998056acc091ea
Reviewed-on: http://gerrit.chromium.org/gerrit/7282
Reviewed-by: Will Drewry <wad@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2011-09-06 13:50:40 -07:00
Da Zheng
87465ea735 Create squashfs as the rootfs.
This give users the choice to have rootfs formatted with squashfs.
When --squash_image is specified, the rootfs will be formatted to squashfs.

Users can also use --squash_sort_file to specify the file priority when
squashfs is created.

BUG=None
TEST=Manually tested "--squash_image", and the image can be installed
from USB stick. Also tried "--squash_sort_file=sort-prio.list", and files
in squashfs are sorted.

Change-Id: I5fd818ac9d1203598926efa82e94fa105cd86ebc
Reviewed-on: http://gerrit.chromium.org/gerrit/5664
Tested-by: Da Zheng <zhengda@chromium.org>
Reviewed-by: Da Zheng <zhengda@chromium.org>
2011-08-26 13:04:29 -07:00
Zdenek Behan
908a843d78 cros_image_to_target: when in chroot, call the chroot tools relative to /
This fixes a problem with chroots named other than 'chroot', but only
when running inside the chroot.

BUG=chromium-os:19596
TEST=run it inside the chroot

Change-Id: I9532fe7762e2d7e277305fb948e5cabc242a5213
Reviewed-on: http://gerrit.chromium.org/gerrit/6597
Tested-by: Zdenek Behan <zbehan@chromium.org>
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
2011-08-24 18:29:04 -07:00
Zdenek Behan
2811c16f55 crosutils: globally replace enter_chroot with cros_sdk
"cros_sdk" is a drop-in replacement of enter_chroot.sh. The only
important difference is in the calling path, specifically that
cros_sdk is in path but has to be called from $(pwd) being inside the
repo checkout, while enter_chroot.sh is called by explicit path.

Invariably, "./enter_chroot.sh" can be replaced, as pwd=src/scripts.
Calling by absolute path can be replaced by first changing directory
anywhere into the repo checkout, and then calling cros_sdk.

BUG=chromium-os:18750
TEST=run them

Change-Id: Ieff91a27bb419e1121361d5b3a11e4c87ff7a087
Reviewed-on: http://gerrit.chromium.org/gerrit/6273
Tested-by: Zdenek Behan <zbehan@chromium.org>
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
2011-08-19 15:35:32 -07:00
J. Richard Barnette
9fb286ea02 Skip filling in kernel partition until cros_make_image_bootable
When first creating an image, vmlinuz was extracted from /boot, and
installed in its place in the kernel partition.  However, none of
that was necessary, because cros_make_image_bootable walks over the
same ground later in the build process.

BUG=chromium-os:17390
TEST=build_image, boot base and dev images on ZGB and legacy device
TEST=inspect build output directory, to confirm no stray artifacts

Change-Id: Iaf332b6603e0bcb17585adbc95a7b65bb8bfe790
Reviewed-on: http://gerrit.chromium.org/gerrit/5107
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
2011-08-01 16:09:00 -07:00
Richard Barnette
c6818be0da Revert "Skip filling in kernel partition until cros_make_image_bootable"
This reverts commit a966c2bad686f787268f01a7529851a1a2a6ad9b

Change-Id: I0990252c34853f7e1884da19b2649ed32e52e078
Reviewed-on: http://gerrit.chromium.org/gerrit/5091
Reviewed-by: Elly Jones <ellyjones@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
2011-08-01 13:53:34 -07:00
J. Richard Barnette
77ec32a128 Skip filling in kernel partition until cros_make_image_bootable
When first creating an image, vmlinuz was extracted from /boot, and
installed in its place in the kernel partition.  However, none of
that was necessary, because cros_make_image_bootable walks over the
same ground later in the build process.

BUG=chromium-os:17390
TEST=build_image, boot base and dev images on ZGB and legacy device
TEST=inspect build output directory, to confirm no stray artifacts

Change-Id: Icd4902f5a823241f24eb64f68f80c8e5e5198341
Reviewed-on: http://gerrit.chromium.org/gerrit/4928
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
2011-08-01 11:41:17 -07:00
David James
65d88bf903 Update cros_download_latest_image to work again.
cros_download_latest_image was using cros_gsdcurl, which has stopped working,
even when you use application-specific passwords. I've updated it to use
gsutil instead, which is more supported.

BUG=chromium-os:17512
TEST=Try downloading the latest x86-generic image.

Change-Id: Ia7b0704a8c7ff6897508c44e882f87bc44ccbe28
Reviewed-on: http://gerrit.chromium.org/gerrit/5031
Reviewed-by: Rahul Chaturvedi <rkc@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2011-07-29 15:23:49 -07:00
Puneet Kumar
0fffd2bc75 Reenable crosbug12352_arm_kernel_signing flag as a dummy
This is being done so that the image parser run by the bots
can still parse images built with this flag

BUG=chromium-os:18299
TEST=Wait for bots to cycle green with old images

Change-Id: Ibebe62f0db60ab3a57e04964f872398028ee48c8
Reviewed-on: http://gerrit.chromium.org/gerrit/4824
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Puneet Kumar <puneetster@chromium.org>
Reviewed-by: Puneet Kumar <puneetster@chromium.org>
2011-07-27 11:37:23 -07:00
Che-Liang Chiou
e51bdf284c Obsolete --crosbug12352_arm_kernel_signing flag
This reverts commit 451f36e4a8.

Last time I removed the --crosbug12352_arm_kernel_signing flag, buildbot
failed. The reason seemed to be that buildbot still passing this flag to
build_image. However, I cannot find anywhere in the log that indicates
buildbot did pass this flag to build_image. So I think the last failure
should be transient and it is good to obsolete this flag.

BUG=chromium-os:12352
TEST=build_image
TEST=load_kernel_test -b 2 /path/to/image /path/to/recovery_key.vbpubk

Change-Id: Ic757eb2dc4304e7205b483063335f8816b536433
Reviewed-on: http://gerrit.chromium.org/gerrit/4794
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
2011-07-26 21:40:13 -07:00
Che-Liang Chiou
451f36e4a8 Revert "obsolete --crosbug12352_arm_kernel_signing flag"
This reverts commit 2d2e825247.

Change-Id: I62d68c063aeab6beca4393ed51a4e754c8d9cc6a
Reviewed-on: http://gerrit.chromium.org/gerrit/4487
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
2011-07-21 04:54:47 -07:00
Che-Liang Chiou
2d2e825247 obsolete --crosbug12352_arm_kernel_signing flag
BUG=chromium-os:12352
TEST=manual

./build_image --board {tegra2_seaboard,x86-mario}
load_kernel_test -b 2 /path/to/chromiumos_image.bin \
  /usr/share/vboot/devkeys/recovery_key.vbpubk

Change-Id: Ide2b641842ce08ec5540c5195356821afaf7d048
Reviewed-on: http://gerrit.chromium.org/gerrit/2864
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
2011-07-21 03:02:30 -07:00
Taylor Hutt
d6ae1ec95e CHROMIUM: build tools: Allow parallel use of cros_image_to_target.py
This change addresses a defect which prevents simultaneous use of
'cros_image_to_target.py'.

The issue is that the default invocation will always use the same port
number of HTTP communication.  This change, with default parameters,
will now start at the same port number, but will now instead iterate
through a number of ports (the number of ports is set to 10).

If no available port can be found, the script will fail with an
appropriate message.

If the user specifies a specific port, then only that port number will
be used; if the port is not available, the script will fail with an
approrpriate message.

BUG=chromium-os:17558
TEST=Uploaded two images simultaneously to different boards.

Change-Id: Icbbea12468fd766897daeecb0b7f1d3929f52a1c
Signed-off-by: Taylor Hutt <thutt@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/4110
Reviewed-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: Terry Lambert <tlambert@chromium.org>
2011-07-15 11:33:31 -07:00
Che-Liang Chiou
93b6effb0b arm: kernel cmdline use root=PARTUUID=UUID/PARTNROFF=%d
Since now the arm firmware can parse %U as x86 bios, and kernel can
parse PARTNROFF=%d, we are able to generate kernel command line with
such construct.

BUG=chromium-os:14022,15683
TEST=manual

1. Build image with root filesystem verification turns off
2. Boot successfully
3. Run 'cat /proc/cmdline' and validate its output
4. Run 'rootdev' and validate its output

Change-Id: I11de0a30928efe9d9b0149feb3389a2f30063516
Reviewed-on: http://gerrit.chromium.org/gerrit/1104
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: <nsanders@google.com>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
2011-07-01 01:33:10 -07:00
Arkaitz Ruiz Alvarez
26d68ecaa5 Add cros_debug to kernel commandline in dev images
Every developer image (and test images based on the developer image) should
include "cros_debug" in the kernel commandline. This flag is used by the
crossystem application to determine if the image being run is a developer
image. cros_make_image_bootable receives a new flag, --force_developer_mode
that appends "cros_debug" to the boot args.

BUG=chromium-os:16951
TEST=build images. Flash a base image and confirm the absence of "cros_debug"
in /proc/cmdline. Flash the developer image and confirm the existence of the
string.

Change-Id: I9f748638b5dac384be991908239e8b447ddf3b5e
Reviewed-on: http://gerrit.chromium.org/gerrit/3169
Tested-by: Arkaitz Ruiz Alvarez <arkaitzr@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
2011-06-27 10:45:16 -07:00
Antoine Labour
4c64b507db Disable fsck in cros_make_image_bootable
cros_make_image_bootable is called up to 4 times in a typical workflow. The fsck
check can take up to a minute or more because it first copies 2G of the image to
run the fsck on. It adds several minutes to the build.
The check itself is just a sanity check that shouldn't trigger in normal builds.

BUG=none
TEST=build_image

Change-Id: I86512f7efc67027fe687f0c0ad8f6df32579dbe2
Reviewed-on: http://gerrit.chromium.org/gerrit/2250
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
2011-06-07 15:47:06 -07:00
Nick Sanders
b795deba76 Cherry-pick: ARM: enable kernel signing by default
This commit is a part of transition to enable ARM kernel signing. It is
at first an option that is enabled manually, and then (in this commit)
enabled by default. After more tests, the scripts that generate unsigned
ARM kernel partition will probably be removed.

BUG=chromium-os:12352
TEST=./build_image && load_kernel_test -b 2 /path/to/chromiumos_image.bin /usr/share/vboot/devkeys/recovery_key.vbpubk

Change-Id: I7d4ecc566f9c5cc0106a7af59255fc63fdfe017a
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Rong Chang <rongchang@chromium.org>
Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/1319
Tested-by: Nick Sanders <nsanders@chromium.org>
2011-05-25 02:56:21 -07:00
Tom Wai-Hong Tam
a4395b5b1c Revert "ARM: enable kernel signing by default"
This reverts commit 9c5d88573f.

Change-Id: Ica876e1be20dc9ab60666af476294e093fd59498
Reviewed-on: http://gerrit.chromium.org/gerrit/762
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
2011-05-12 12:39:53 -07:00
Mandeep Singh Baines
e4096d75fd loman: Only add a project to local_manifest.xml if not in manifest.xml
Otherwise, repo gets upset

BUG=none
TEST=Unit tests pass.

Change-Id: If1af601f96f27e37259898041e1ac715f6df6d30
Reviewed-on: http://gerrit.chromium.org/gerrit/734
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Tested-by: Mandeep Singh Baines <msb@chromium.org>
2011-05-12 10:50:42 -07:00
Mandeep Singh Baines
6eaddfef05 Revert "loman: work with new gerrit workflow"
This reverts commit c7dc24c89e.

BUG=15076
TEST=Unit tests pass. Scrubbed kernel from local_manifest.xml and then
worked on it again.

Change-Id: Ia0052cf2efa330e1c6422f2876d146bf6f297378
Reviewed-on: http://gerrit.chromium.org/gerrit/625
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Mandeep Singh Baines <msb@chromium.org>
2011-05-10 13:33:24 -07:00
Mandeep Singh Baines
c7dc24c89e loman: work with new gerrit workflow
Fix to handle new repository naming. Instead name="kernel", the kernel
is now name="chromiumos/third_party/kernel".

BUG=15076
TEST=Ran unittests and verified that local_manifest.xml got created
correctly when working on the kernel for the first time.

Change-Id: Ib0eef7ecb0522c3b5bcc111d0f30467c8ca19ec5
Reviewed-on: http://gerrit.chromium.org/gerrit/546
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Mandeep Singh Baines <msb@chromium.org>
2011-05-09 13:01:30 -07:00
Che-Liang Chiou
9c5d88573f ARM: enable kernel signing by default
This commit is a part of transition to enable ARM kernel signing. It is
at first an option that is enabled manually, and then (in this commit)
enabled by default. After more tests, the scripts that generate unsigned
ARM kernel partition will probably be removed.

BUG=chromium-os:12352
TEST=./build_image && load_kernel_test -b 2 /path/to/chromiumos_image.bin /usr/share/vboot/devkeys/recovery_key.vbpubk

Change-Id: I6d48d1603cd7c96514892bcbbf8994b2d4cc2a08
Reviewed-on: http://gerrit.chromium.org/gerrit/512
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
2011-05-09 03:13:56 -07:00
Paul Stewart
99e580e21e Learn board type for package_to_live and image_to_target
In both cases move making contact with the remote board to
an earlier step and default the "board" option to whatever
is reported by the remote.

BUG=n0ne
TEST=Run without board flag or .default_board

Change-Id: I53330ce5ab05b4cff92ac3a384ae0202fc156953
Reviewed-on: http://gerrit.chromium.org/gerrit/433
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
2011-05-06 11:27:07 -07:00
Mandeep Singh Baines
118692ab3f src/scripts: remove all references to verity_depth
This option is now deprecated. Remove from all scripts

To understand the impact of this change ran the following searches:

http://codesearch.google.com/codesearch?as_q=package%3Achromiumos+verity_depth
http://codesearch.google.com/codesearch?hl=en&lr=&q=package%3Achromiumos+verity_tree_depth

BUG=chromium-os:14357
TEST=Ran build_image, mod_image_for_test.sh, chromeos-install, and mod_image_for_recovery.sh.

Change-Id: I79e0e5fe1c917fbb54cc7c7f152d3c97d5f5c9b5

R=wad@chromium.org,scottz@chromium.org,gauravsh@chromium.org

Review URL: http://codereview.chromium.org/6901005
2011-04-28 13:50:33 -07:00
Mandeep Singh Baines
95026958c1 cros_make_image_bootable: default to verity_depth=0
Verity only supports a depth of 0. Passing anything other than 0 will
cause a verity failure.

BUG=14314
TEST=Verified that verity does not fail when do depth is passed.
     Before this change, verity would fail with the error message
     reported in the bug.

Change-Id: I68495c4486284744ee0779b6c9cdc0ef214519c7

R=gauravsh@google.com,scottz@google.com,drewry@google.com

Review URL: http://codereview.chromium.org/6873134
2011-04-20 16:28:54 -07:00
Mandeep Singh Baines
e46aa776a1 cros_workon_make: deprecate
BUG=11507
TEST=Ran and verified that an error is printed.

Change-Id: Icc494be4af8c5e3f462363280d5c17c12e16d24d

R=cmasone@chromium.org,anush@chromium.org

Review URL: http://codereview.chromium.org/6748008
2011-03-29 12:55:32 -07:00
Chris Sosa
fd2cdec118 Remove testing utilities and fix symlinks.
For run_remote_tests this required "fixing" restart_in_chroot if required.  Right now that script ->only<- works if its run on a scripts being called from src/scripts.  This change makes it more generic by doing this for any script called from within our source tree.

I borrow reinterpret_path_for_chroot from image_to_live.  Other CL to remove it from there.

Change-Id: If717beccd777ac178366d58b91521b9a62d55d85

BUG=chromium-os:11172
TEST=Ran them

Review URL: http://codereview.chromium.org/6730012
2011-03-24 16:06:59 -07:00
Chris Sosa
753977c09b Move some dev scripts into dev/host.
Change-Id: I8233aaab234eb6a3a7948abb1d311c4c9c162190

BUG=chromium-os:11172
TEST=Ran from new symlinks from previous locations.

Review URL: http://codereview.chromium.org/6731005
2011-03-23 14:34:53 -07:00