Commit Graph

1911 Commits

Author SHA1 Message Date
Elly Jones
377939c760 build_image: keep quiet about the autotest file list
This one rsync command is responsible for over 50% of the length of a typical
buildbot log file.

BUG=chromium-os:18830
TEST=Adhoc
Build a test image, both with build_image and mod_image_for_test.sh.

Change-Id: I8d35b605b0d3f1d0c97698bad815ed3dab36cba0
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/5460
2011-08-08 08:09:24 -07:00
David James
27064994fa Use pbzip2 in archive_build, if it is available.
BUG=chromium-os:16502
TEST=Run cbuildbot run of archive stage with official build.

Change-Id: I03898404dd27d6930c4a01bd9826796ddb07a4cd
Reviewed-on: http://gerrit.chromium.org/gerrit/5445
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2011-08-06 18:58:44 -07:00
J. Richard Barnette
46657a3d09 Delete support for build_image --preserve
A survey of users on chromium-os-dev@chromium.org found no-one uses
the option.  Furthermore, the option was meant merely for
performance improvements, but parallel emerge is more effective for
that purpose.

BUG=None
TEST=build and boot image

Change-Id: I42ab4a9cb5d70f1181915e957a5cc9fc4e3dbed7
Reviewed-on: http://gerrit.chromium.org/gerrit/5356
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
2011-08-05 13:45:06 -07:00
David James
0ea96e4fd6 Install recovery kernel directly to image, not to build dir.
The recovery kernel is different from the regular kernel, and
should be kept sandboxed so that it does not mess with our
build directory.

We also need to give the recovery kernel a different PKGDIR so
that it does not overwrite our prebuilts for the ordinary
kernel.

BUG=chromium-os:18691
TEST=build_image --factory_install, mod_image_for_recovery.sh

Change-Id: I678a94305d5f30bc2c95bf4e53cfe81b2ae9d8ef
Reviewed-on: http://gerrit.chromium.org/gerrit/5305
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2011-08-05 12:33:15 -07:00
Chris Wolfe
d13775f60c Add /usr/src to masked install paths.
This makes it possible for chromeos-kernel to include a source tree,
without the tree being installed to CrOS images.

BUG=None
TEST=Manual with modified chromeos-kernel

Change-Id: I9f1193277638e828ffa116c5a397609a3246c80b
Reviewed-on: http://gerrit.chromium.org/gerrit/4760
Reviewed-by: Chris Wolfe <cwolfe@chromium.org>
Tested-by: Chris Wolfe <cwolfe@chromium.org>
2011-08-05 06:26:18 -07:00
Nick Sanders
daebdee972 Add HWID bundle into buildbot output
Add bundle to factory_shim/hwid

BUG=chromium-os:16734
TEST=archive_build, with and without hwid present

Change-Id: I70eeca5ce9cd99d229081a92af5bc0c3c997dce7
Reviewed-on: http://gerrit.chromium.org/gerrit/5189
Reviewed-by: Rong Chang <rongchang@chromium.org>
Tested-by: Nick Sanders <nsanders@chromium.org>
2011-08-03 23:16:41 -07:00
Gabe Black
83d8b824a3 Add some functions which will help transition to a single firmware directory.
This is the first in three stages of changes to transition from separate
"u-boot" and "coreboot" output directories to a single "firmware"
directory. This change/stage will give scripts a facility to easily be
compatible with both schemes. The second stage will transition all the
scripts to use the mechanism, and then finally the third stage will
switch the directories over. Some additional work may be needed if there
are file name clashes, although those sorts of problems would likely
already be present. These new functions could also optionally be taken back
out after the transition.

This change adds find_fw_component, find_u_boot_component, and
find_coreboot_component functions to common.sh. The first function provides
the bulk of the functionality, while the second and third wrap the first and
pass it parameters appropriate for u-boot or coreboot. The first function
accepts an override which it returns if set, and if not it checks for a file
in each of the directories it's passed in the second parameter one by one and
returns the first one it finds. If it doesn't find any it defaults to the last
one.

BUG=chromium-os:18107
TEST=Modified some u-boot related ebuilds to put some files in the firmware
directory. Ran the ebuilds and verified the files showed up where expected.
Modified the cros_write_firmware.sh script to use these new functions.  Ran
cros_write_firmware and saw it find the files in their new location.
Also verified that the firmware on the target was updated as expected.

Change-Id: Ic664e0e1c4a5b27efc9fb892ff5bd91cf1b5be56
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://gerrit.chromium.org/gerrit/5170
Tested-by: Gabe Black <gabeblack@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
2011-08-02 19:54:17 -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
Brian Harring
44da798e21 punt watchlists; no longer used
BUG=N/A
TEST=N/A

Change-Id: I86f1d29423659823ca177bbfa2dc287f36f01c33
Reviewed-on: http://gerrit.chromium.org/gerrit/4321
Reviewed-by: Anush Elangovan <anush@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
2011-08-01 12:57:58 -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
Hung-Te Lin
1926874a19 make_factory_package: support --firmware in RMA (--usbimg) mode
Support using --firmware in RMA (usbimg) mode.
The firmware updater will be copied into partition 1 (statefu-partition) on RMA
shim.

BUG=chrome-os-partner:5000
TEST=./make_factory_package.sh --release RELEASE.bin --factory FACTORY.bin \
    --install FACTORY_INSTALLER.bin --firmware FIRMWAREUPDATER \
    --usbimg rma_image.bin
    # Then, mount partition 1 in rma_image.bin, find "chromeos-firmwareupdate"
    # file. Also a # "FACTORY_INSTALL_FIRMWARE=/mnt/stateful_partition/chromeos-firmwareupdate"
    # entry is found in dev_image/etc/lsb-factory file.

Change-Id: Id77ab7c8faa5f8e646a07c319d496947949ffa63
Reviewed-on: http://gerrit.chromium.org/gerrit/4637
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
2011-07-31 19:28:52 -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
J. Richard Barnette
bb783007ce Delete dead code in build_image relating to ESP_LOOP_DEV
BUG=None
TEST=build_image

Change-Id: I10aba40538e9c6aeaf803ffc50bb029dcf6d4be5
Reviewed-on: http://gerrit.chromium.org/gerrit/5009
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
2011-07-29 11:55:04 -07:00
David James
5ee38905e5 Don't rm $OUTDIR during archive_build.sh.
BUG=chromium-os:18382
TEST=Run sample buildbot run.

Change-Id: Ib6e81e9ec4b90b8f089da6de50bee1accafec9dd
Reviewed-on: http://gerrit.chromium.org/gerrit/4978
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2011-07-29 09:41:46 -07:00
Taylor Hutt
18594a87ba chromium-os:17680 : Establish Syncer PID file invariants
Details

  This change updates the use of '-s' to have the proper polarity to
  see if the syncer PID file is zero bytes in size.

  As a bit of other cleanup, if a file of size zero is found, it's
  removed.  This allows the second size test of the syncer PID file to
  be removed.

Testing

  o Created zero-length PID file: saw warning message on console.  Saw
    that the file contains a valid pin while the chroot is entered,
    and verified the PID file is deleted after exiting chroot.

       INFO    : You may have suffered from chromium-os:17680 and
       INFO    : could have stray 'enter_chroot.sh' processes running.
       INFO    : Erroneous PID file will be cleaned up.

  o Entered chroot with multiple terminals, saw that the PID file is
    removed & the syncer process is killed when the last client exits
    the chroot.

  o Executed './enter_chroot.sh --verbose', changed ownership of PID file to
    'root'.

    Exited and did not see the following diagnostic message:

       INFO    : Unable to clean up syncer process.

    The message should not be printed because the file is removed
    under 'sudo'.

BUG=chromium-os:17680
TEST=See above.
Signed-off-by: Taylor Hutt <thutt@chromium.org>

Change-Id: I055fe72b9322acee8c774401b3452ef502b30970
Reviewed-on: http://gerrit.chromium.org/gerrit/4936
Tested-by: Taylor Hutt <thutt@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
2011-07-28 13:46:52 -07:00
Kris Rambish
09e87bca4f Add a new script to add pyauto to test images
BUG=chromium-os:16876
TEST=Ran it
STATUS=Fixed

Change-Id: I4b9391371686d304d84528d1959adfff1a1d8e6c
Reviewed-on: http://gerrit.chromium.org/gerrit/4868
Tested-by: Kris Rambish <krisr@chromium.org>
Reviewed-by: Kris Rambish <krisr@chromium.org>
2011-07-28 11:48:55 -07:00
J. Richard Barnette
0fad3d7171 Make build_gpt.sh into a shell function library.
Converted build_library/build_gpt.sh from a shell script to a shell
library defining a function to replace the script.

Converted build_library/emit_gpt_scripts.sh into a shell function
that is defined in build_library/build_gpt.sh.

BUG=chromium-os:17390
TEST=build_image
TEST=inspect and run pack_ and unpack_partitions.sh on new image

Change-Id: Ifdcb58f492f871e120cbec9c67bdeab94d1a4d3f
Reviewed-on: http://gerrit.chromium.org/gerrit/4866
Reviewed-by: Vince Laviano <vlaviano@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
2011-07-28 08:11:28 -07:00
Taylor Hutt
25bf949c63 chromium-os:17680 : Establish Syncer PID file invariants
Details

  I have a set of scripts which run from outside the chroot; they
  execute things inside the chroot, and therefore enter & exit the
  chroot frequently.

  This morning I noticed this morning that I was getting

    kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]

  on the console each time I exited the chroot.

  I tracked this down to the 'sync process' PID file; in my case, it
  was zero bytes in size.

  A little more detective work led to
  412b902b0e and I think I pieced
  together that I had suffered from chromium-os:17680, which resulted
  in an empty file.

  This change is my attempt at repairing the damage if
  chromium-os:17680 has been hit, and preventing other types of
  similar issues with the PID file.

  412b902b0e addressed the main cause of
  issue chromium-os:17680, and this change  addresses mysterious
  behavior in chroots that have suffered from it.

  To allow people to know that they've possibly got stray syncer
  porcesses running, I also output a message to the console which
  indicates such.

Testing

  o Created zero-length PID file: saw warning message on console.  Saw
    that the file contains a valid pin while the chroot is entered,
    and verified the PID file is deleted after exiting chroot.

       INFO    : You may have suffered from chromium-os:17680 and
       INFO    : could have stray 'enter_chroot.sh' processes running.
       INFO    : Erroneous PID file will be cleaned up.

  o Entered chroot with multiple terminals, saw that the PID file is
    removed & the syncer process is killed when the last client exits
    the chroot.

  o Executed './enter_chroot.sh --verbose', changed ownership of PID file to
    'root'.

    Exited and saw the following diagnostic message:

       INFO    : Unable to clean up syncer process.

BUG=chromium-os:17680
TEST=See above
Signed-off-by: Taylor Hutt <thutt@chromium.org>

Change-Id: Idf9059509bbc6e0a926efd549922d05b9b742fa0
Signed-off-by: Taylor Hutt <thutt@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/4837
2011-07-28 07:13:53 -07:00
Gaurav Shah
786ceeb389 Only use colored output if the terminal supports it
This also removes all the tput noise we are seeing in buildbot logs.
("tput: No value for $TERM and no -T specified", "tput: unknown terminal
"unknown", etc.)

BUG=none
TEST=manual below
src/platform/scripts$ TERM=unknown; ./enter_chroot (No more tput errors)

Change-Id: Ic74a0bd66d7e0cedcf7b65ec3a5f43b61b8276f9
Reviewed-on: http://gerrit.chromium.org/gerrit/4763
Tested-by: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
2011-07-27 15:08:29 -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
J. Richard Barnette
f2206118f3 Isolate scripts and files that are used only in build_image
A modest number of different scripts and files have a usage
restricted to build_image.  Move those files to build_library,
to prevent them accumulating unwanted clients.

BUG=chromium-os:17390
TEST=build_image
TEST=grep relevant sources for references to all the files

Change-Id: I3e9f6447ec34c09ea2d61f29ac343386a1e122b9
Reviewed-on: http://gerrit.chromium.org/gerrit/4762
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
2011-07-27 08:46:01 -07:00
Che-Liang Chiou
611d5b7b0a Add a dummy flag to fix buildbot failure
BUG=chrome-os-partner:5177
TEST=./build_image -h | grep crosbug12352_arm_kernel_signing

Change-Id: Id61889f4e16ed7e4e774c00c3cb886811c5ccfd7
Reviewed-on: http://gerrit.chromium.org/gerrit/4805
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
2011-07-27 01:05:37 -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
J. Richard Barnette
5b80a0b22c Incorporate the contents of create_esp.sh inline in build_image
Stripped of its boilerplate, create_esp.sh was a one-line
script called from only one place in the source.  Replace the
script with the one command it represented.

BUG=chromium-os:17390
TEST=build_image
TEST=grep all relevant sources for "create_esp"

Change-Id: Iaa4be285066b524ff169f5185c455e2566177648
Reviewed-on: http://gerrit.chromium.org/gerrit/4756
Reviewed-by: Will Drewry <wad@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
2011-07-26 16:16:47 -07:00
J. Richard Barnette
8447777820 Simplify standard boilerplate for selected scripts
This shortens the standard boilerplate for finding and sourcing
shell function libraries for build_image, mod_image_for_test.sh and
mod_image_for_recovery.sh.

As a side effect of the change, both mod_image_for_test.sh and
mod_image_for_recovery.sh will now restart inside the chroot if
invoked from outside; this is consistent with the pre-existing
behavior of build_image.

BUG=None
TEST=run the three scripts, from both inside and outside the chroot

Change-Id: Idd91cbee323346a871b49deea31a76875f5ee3c4
Reviewed-on: http://gerrit.chromium.org/gerrit/4675
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Vince Laviano <vlaviano@chromium.org>
2011-07-26 14:05:43 -07:00
J. Richard Barnette
1fe3c57d18 scripts: Delete administrative files obviated by gerrit
BUG=None
TEST=None

Change-Id: I5b707c1fff048d8b6e64bfc668b3e7d3ccd3e7a4
Reviewed-on: http://gerrit.chromium.org/gerrit/4746
Reviewed-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
2011-07-26 11:30:13 -07:00
J. Richard Barnette
f16e1028d6 Delete resize_stateful_partition.sh
The file was written as a script, but in fact was merely a shell
library of mostly unused functions.  Remove the file, and move the
one function actually used to the one place it was used in
mod_image_for_recovery.sh.

BUG=None
TEST=run mod_image_for_recovery.sh
TEST=grep all relevant scripts for references to the deleted file

Change-Id: I424f6986089467d2b8cd95bb033851171c1d1e3a
Reviewed-on: http://gerrit.chromium.org/gerrit/4681
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
2011-07-26 10:17:12 -07:00
David James
4e098db36f Close fds in RunCommand to prevent children from inheriting file handles.
RunCommand should only pass in stdin, stdout, and stderr to processes,
not other file handles. Fixing this prevents issues where child
processes can cause the parent to hang by forgetting to close the
file handle when launching daemons.

BUG=chromium-os:18104
TEST=Buildbot run with smoke suite. Unit tests.

Change-Id: Ib85095e1fb592ef05a972a5412348363049e6d86
Reviewed-on: http://gerrit.chromium.org/gerrit/4673
Reviewed-by: Brian Harring <ferringb@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2011-07-25 13:31:30 -07:00
J. Richard Barnette
f5029789d6 Remove unsued code from common.sh
BUG=None
TEST=setup_board, build_packages, build_image
TEST=grep all sources for the unused functions

Change-Id: Iaac5589aaba6f6f48aa00cdab76a7765f8d931ce
Reviewed-on: http://gerrit.chromium.org/gerrit/4580
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
2011-07-22 14:39:39 -07:00
Brian Harring
d5d5dbffa1 Fix/standardize exiting if common.sh can't be found
The problem here is that most were doing their exiting w/in a subshell;
exit within a subshell kills the subshell, not the parent.  Not all scripts
were using set -e (which would pick up the failing subshell); as such
just rewriting them to remove the potential via eliminateing the subshelling.

Beyond that, removed a couple of custom (working, although non-standard)
approaches, and removed a duplicate common.sh sourc'ing w/in mk_memento_images.sh

TEST=force 'find_common_sh' to fail, note the scripts fails to exit
BUG=none

Change-Id: Ia1108a091a6399ad6aedd3cade4a107f4411686c
Reviewed-on: http://gerrit.chromium.org/gerrit/3905
Reviewed-by: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
2011-07-22 12:06:59 -07:00
Brian
242212311d file_copy is no longer used, thus remove it
Last user of it was removed via 4364a2

TEST=N/A
BUG=None

Change-Id: Id43c5571a823d6d56ca2f20c138bc0ed9de3d1d0
Reviewed-on: http://gerrit.chromium.org/gerrit/3893
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
2011-07-22 11:59:32 -07:00
David James
8b9643f7d8 Fix losetup race condition.
The following pattern creates a race condition:

   LOOP_DEV=$(sudo losetup -f)
   ...
   sudo losetup "${LOOP_DEV}" "${ROOT_FS_IMG}"

If two steps similar to the above run in parallel, and both steps pick up
the same free loop device, they may try to mount different images with the
same loop device and one of the two stages will get a "device is busy" error.

To fix this, we should switch to the following pattern:
   LOOP_DEV=$(sudo losetup --show -f "${ROOT_FS_IMG}")

This CL implements the above.`

BUG=chromium-os:18046
TEST=Run buildbot run. Test case where we run out of loop devices and verify
     logic still works.

Change-Id: Ie457701fda61e5fc3b9112c1bfef9fb9713ea265
Reviewed-on: http://gerrit.chromium.org/gerrit/4555
Tested-by: David James <davidjames@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
2011-07-22 00:02:53 -07:00
David James
8b3234a504 Accept change identifier as an argument.
This allows the buildbot to calculate the change identifier and pass it into
archive_build. This makes it easier for us to parallelize the archive_build
step.

BUG=chromium-os:12220
TEST=Verify this argument works. Verify archive_build works without the argument
     too.

Change-Id: I6b757cc7795fb6f2f24a400502fe6f70416ab44f
Reviewed-on: http://gerrit.chromium.org/gerrit/4440
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2011-07-21 10:43:28 -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
Nick Sanders
fa28c16842 Add u-boot env editor to factory bundle
BUG=chrome-os-partner:4606
TEST=no

Change-Id: Ie3f60a33a1bef9513ec8da8a170697eecb752a68
Reviewed-on: http://gerrit.chromium.org/gerrit/4296
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Nick Sanders <nsanders@chromium.org>
2011-07-20 20:47:56 -07:00
David James
bb5f9a9b5e Fix LATEST file to appear in the right place.
BUG=chromium-os:17722
TEST=Run sample archive_build with --debug mode and verify location of gsutil.

Change-Id: Idf39bfc9a80cdcd5f25d63f4839e9168f593adfd
Reviewed-on: http://gerrit.chromium.org/gerrit/4264
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2011-07-18 13:25:33 -07:00
David James
412b902b0e Fix race condition when starting env_syncer in enter_chroot.sh.
Sometimes, two processes might start the env_syncer at the same time.
If this occurs, then the pid file will get overwritten and one of the
processes won't be killed.

I've also fixed the env_syncer to properly daemonize, such that
cbuildbot won't wait on the env_syncer to be killed before exiting.
This requires closing stdin, stderr, and stdout.

BUG=chromium-os:17680
TEST=Reproduce hang, and verify that this fixes the hang. Verify that
     multiple chroots can be entered at the same time and that the
     env_syncer is killed when the last chroot exits. Verify that
     cbuildbot is not kept hanging even if the env_syncer doesn't
     exit.

Change-Id: I3cb9fbdf47a406e818e12cf91593b8e3481aa578
Reviewed-on: http://gerrit.chromium.org/gerrit/4232
Reviewed-by: Ryan Cui <rcui@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2011-07-15 20:28:36 -07:00
David James
342f156c35 enter_chroot should only modify things within a lock.
enter_chroot is often called from multiple processes and we expect that
it doesn't modify anything unless it's within a lock. This CL moves
chroot modifications up to occur during the lock so that we don't have
multiple modifications to .gitconfig occurring at the same time.

This prevents the following warning:
  error: could not lock config file
/b/cbuild/chroot/home/chrome-bot/.gitconfig: File exists

See http://chromeos-botmaster.mtv.corp.google.com:8026/builders/TOT%20Pre-Flight%20Queue/builds/3771/steps/Test/logs/stdio

BUG=chromium-os:17661
TEST=Run enter_chroot.sh and verify gitconfig is still setup.

Change-Id: I73a7755d62cce895c76b8e0f35838b3874e5db33
Reviewed-on: http://gerrit.chromium.org/gerrit/4208
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2011-07-15 15:31:45 -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
Hung-Te Lin
10d572f8c8 make_factory_package: add --usbimg for USB installation images
To make "USB installation image" (useful for RMA images), make_factory_package
now supports --usbimg and --install_shim for the new type of image.

Some internal refactoring is also included in this CL to ease adding new
generation methods.

BUG=chrome-os-partner:4108
TEST=make_factory_package --usbimg rma.bin --factory PATH_TO_FACTORY \
     --release PATH_TO_RELEASE --install PATH_TO_INSTALL_SHIM
     # then turn on developer switch, hold recovery button to boot by the
     # rma.bin. Seeing installation from USB works fine.

Change-Id: I65789bfea92cf04e89ea2b3319fc9beb59a17bd8
Reviewed-on: http://gerrit.chromium.org/gerrit/4026
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2011-07-14 19:03:45 -07:00
Hung-Te Lin
8d5f0e60de make_universal_factory_shim: support "-m" to assign master (base) image
Some images (especially RMA) need to use stateful or other lagacy stuff from
other image files.

This CL adds "-m" to make_universal_factory_shim so that we can change the
master image (the one for all legacy / stateful partition).

BUG=chrome-os-partner:4108
TEST=./make_universal_factory_shim.sh -m factory_test.bin \
     factory_install.bin factory_test.bin release_image.bin

Change-Id: I6c8e096fd7ae921a4fb157c035f575a7c3b33834
Reviewed-on: http://gerrit.chromium.org/gerrit/4020
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2011-07-14 19:03:34 -07:00
Nathan Williams
2f2b9031bc Remove mobile-broadband-provider-info package, which has been replaced
by mobile-providers.

BUG=none
TEST=./build_packages

Change-Id: I07a2fc91f0782d6a03f535333a8925f9fe6283c1
Reviewed-on: http://gerrit.chromium.org/gerrit/3973
Tested-by: Nathan J. Williams <njw@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
2011-07-12 15:37:19 -07:00
David James
986a0f74f0 Remove dash-dash hack from enter_chroot.sh.
Currently, enter_chroot.sh uses a hack to ensure that "--" is preserved in
commands. This is only necessary if you want to run commands that start with
hyphens. E.g. if you wanted to run a command called "--foo", enter_chroot
would break. But we don't have any existing commands that start with hyphens,
so this logic seems unnecessary.

This also makes enter_chroot more flexible, i.e. we now support case #6 below,
which was not supported previously.

Here are use cases:
  1. ./enter_chroot [chroot_flags]   VAR1=val1 VAR2=val2 -- cmd arg1 arg2
     Set env vars and run cmd w/ args
  2. ./enter_chroot [chroot_flags]   VAR1=val1 VAR2=val2
     Set env vars and run shell
  3. ./enter_chroot [chroot_flags]   -- cmd arg1 arg2
     Run cmd w/ args
  4. ./enter_chroot [chroot_flags]   VAR1=val1 VAR2=val2 cmd arg1 arg2
     Like #1 _if_ args aren't flags (if they are, enter_chroot will claim them)
  5. ./enter_chroot [chroot_flags]   cmd arg1 arg2
     Like #3 _if_ args aren't flags (if they are, enter_chroot will claim them)
  6. ./enter_chroot [chroot_flags] --  VAR1=val1 VAR2=val2 cmd arg1 arg2
     Set env vars and run cmd w/ args
  7. ./enter_chroot
     Just enter the chroot.

BUG=chromium-os:17468
TEST=Test above cases

Change-Id: I1801ac3927aacddd6d556c5939d3a42b31252675
Reviewed-on: http://gerrit.chromium.org/gerrit/3910
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2011-07-12 13:06:37 -07:00
Arkaitz Ruiz Alvarez
e2f33fb50a Fix cros_debug not being passed to VMs
When building a VM or USB-run image the boot args come from a preset template
which does not include the cros_debug flag. If this flag is present we maintain
it in this new boot configuration. The way we do it is by replacing the string
"cros_legacy" (which originates with the template) with
"cros_legacy cros_debug".

TEST=Build VM from a developer and test image and check grep "cros_debug"
/proc/cmdline.
BUG=chromium-os:17392

Change-Id: I2cb578274cf9596bf863ec835b1c921fff252a04
Reviewed-on: http://gerrit.chromium.org/gerrit/3808
Reviewed-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Arkaitz Ruiz Alvarez <arkaitzr@chromium.org>
2011-07-11 17:15:41 -07:00
Arkaitz Ruiz Alvarez
049c0520c5 Fix test imgs made by mod_image_for_test boot args
By default, "cros_debug" should be included in the kernel commandline for
developer and test images. This change adds "cros_debug" to the kernel
commandline for test images when using the deprecated mod_image_for_test.sh
and syncs this file with previous change to build_image:
http://gerrit.chromium.org/gerrit/#change,3790

TEST=Use mod_image_for_test.sh to create a test image, boot it and check
/proc/cmdline for "cros_debug".
BUG=chromium-os:17393

Change-Id: I7774dec80707f702036eff0f6277837858b64182
Reviewed-on: http://gerrit.chromium.org/gerrit/3897
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Arkaitz Ruiz Alvarez <arkaitzr@chromium.org>
2011-07-11 17:15:36 -07:00
Arkaitz Ruiz Alvarez
2bf8859cf8 Fix test images kernel commandline arguments
By default, "cros_debug" should be included in the kernel commandline for
developer images. This change adds "cros_debug" to the kernel commandline
for test images, which are based on developer images but overwrite the boot
arguments.

TEST=Build test image, install on machine and grep "cros_debug" /proc/cmdline
BUG=chromium-os:17393

Change-Id: Ie0de11baf60a3a69a7fef0639247e2edae455ffb
Reviewed-on: http://gerrit.chromium.org/gerrit/3790
Tested-by: Arkaitz Ruiz Alvarez <arkaitzr@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
2011-07-08 12:19:20 -07:00
Ahmad Sharif
8c86db51d7 Changed build_image to use toolchain_utils.sh to install gcc libs.
BUG=none
TEST=buildbot.py arm-generic-full
buildbot.py x86-generic-full

Change-Id: I6cdc22d50422afb721ce0d743c8a80398719f9b4
Reviewed-on: http://gerrit.chromium.org/gerrit/3556
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: asharif <asharif@chromium.org>
Tested-by: asharif <asharif@chromium.org>
2011-07-07 18:39:08 -07:00
Don Garrett
bc2f4bfbf9 Remove calls to docgen.
David James removed docgen from the chroot, but missed this script that
invokes it during Release builds. This is causing all Canary builds to
fail during archive_build.

TEST=None (not sure how to test this outside of the release build process)
BUG=None

Change-Id: I922ce30722ef67601a07ea75604850eb2c8fed28
Reviewed-on: http://gerrit.chromium.org/gerrit/3737
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
2011-07-07 11:54:53 -07:00