Commit Graph

192 Commits

Author SHA1 Message Date
J. Richard Barnette
aaef76166f Convert build_library/test_image to a shell library.
Renamed the fuction from "test_image" to "test_image_content";
renamed the source file to match.

BUG=None
TEST=build both x86 and arm images

Change-Id: I158f2c5bc0f2fc260d48bd125a1899e6a21d7b79
Reviewed-on: http://gerrit.chromium.org/gerrit/5821
Reviewed-by: Vince Laviano <vlaviano@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
2011-08-15 14:23:10 -07:00
David James
b01cc8d2d3 Remove unnecessary sync calls from build_image and image_to_vm.sh.
Calling sync in build scripts pauses the build unnecessarily, particularly
when other steps are running in parallel.

BUG=chromium-os:19150
TEST=Run cbuildbot release build and watch faster performance.

Change-Id: Ia2469e3be68fdd38474ab4e6f67b06339c04822f
Reviewed-on: http://gerrit.chromium.org/gerrit/5966
Reviewed-by: Thieu Le <thieule@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: <taysom@google.com>
Tested-by: David James <davidjames@chromium.org>
2011-08-15 10:07:09 -07:00
David James
27d00f3c9e Update build_image to not use -uDN for developer packages.
The main benefit of this change is that it is no longer necessary to specify
custom use flags to build_image because it just merges what you already have
installed in your buildroot. It does not second guess the packages you already
have installed and just installs them, as it should.

1. Packages in the developer image should already be up to date, so there
   is no need to specify '-u' for --update or '-D' for --deep.
2. The developer image should have identical use flags to the base image,
   so there is no need to specify -N for '--newuse'.
3. The --verbose flag is generally useful, so I've updated all emerges to
   use them so you can see what the use flags are used for the emerges.

BUG=chromium-os:19078
TEST=Verify build_image builds same image and installs same packages
     with and without change. Verified specifying USE= is not necessary
     if a few dev packages were customized.

Change-Id: I4c205c961cca84ca3161b49f59cdd37a5a4ed5b1
Reviewed-on: http://gerrit.chromium.org/gerrit/5816
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2011-08-12 10:43:08 -07:00
David James
4dd4c54ccb Fix race condition by using different symlinks for factory images.
Both the tests and archive_build read and write the latest symlink.
This CL fixes a race condition in archive_build by moving away from
using the latest symlink in archive_build.

BUG=chromium-os:18967
TEST=Run release cbuildbot archive_build on x86-mario-release.
     Verify it completes successfully and that latest symlink
     is unchanged now.

Change-Id: Ia32d20903f3ef74e360944fbabdd9834c0edb99a
Reviewed-on: http://gerrit.chromium.org/gerrit/5746
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2011-08-11 12:44:02 -07:00
J. Richard Barnette
e4e3decfc0 Extract some common code for sharing with build_image, et al.
BUG=None
TEST=build regular, test, and recovery images

Change-Id: I2d7d073c27d14fb88be6a63953dcc77fc76a0807
Reviewed-on: http://gerrit.chromium.org/gerrit/5512
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
2011-08-11 09:51:31 -07:00
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
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
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
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
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
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
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
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
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
Paul Taysom
0737a550b9 Clean-up of extlinux and dd preparing for ext4
BUG=chromium-os:14756
TEST=ran it on cr48 and Latitiude 13

Change-Id: I3c46337f0e4741786ec980100cdebc24fdc02ef9
Reviewed-on: http://gerrit.chromium.org/gerrit/3093
Reviewed-by: Paul Taysom <taysom@google.com>
Tested-by: Paul Taysom <taysom@google.com>
2011-07-06 09:28:16 -07:00
David Rochberg
cf93237b86 Port standard_backdoor to build_image --test
BUG=chromium-os:11744
TEST=Built test images with and without the standard backdoor.
   Could log in with it.
   Could not without.

Change-Id: I23fa55cbb1287f9385b0589b04f4c006903b9eef
Reviewed-on: http://gerrit.chromium.org/gerrit/3530
Tested-by: David Rochberg <rochberg@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
2011-06-30 19:19:11 -07:00
Hung-Te Lin
54a83b774c mod_for_factory: remove 500populateQualDbs
The '500populateQualDbs' script is now deprecated by the new chromeos-hwid
ebuild package.

HWQual database are merged into images automatically, no more need for
post-processing.

QUALDB and --qualdb are also removed, with typo in comments fixed.

BUG=chrome-os-partner:4276
TEST=./build_image --factory

Change-Id: I76d9a72943567444e26200fccc6fe5dff95b2687
Reviewed-on: http://gerrit.chromium.org/gerrit/3431
Reviewed-by: Vince Laviano <vlaviano@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
2011-06-30 19:04:38 -07:00
Ahmad Sharif
150b11985a Revert "Changed build_image to use toolchain_utils.sh to install gcc libs."
This reverts commit f51b39a0e3.

Change-Id: I0b05abd75765e146e3413f15ef1ee0c3f5f8b348
Reviewed-on: http://gerrit.chromium.org/gerrit/3514
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: asharif <asharif@chromium.org>
Reviewed-by: asharif <asharif@chromium.org>
2011-06-30 16:07:37 -07:00
Ahmad Sharif
f51b39a0e3 Changed build_image to use toolchain_utils.sh to install gcc libs.
toolchain_utils.sh contains the relevant function to switch cross-gcc's
and copy over the libraries.

BUG=none
TEST=./setup_board --board=x86-mario --nousepkg &&
./build_packages --board=x86-mario &&
./build_image --board=x86-mario &&
./mod_image_for_vm.sh --board=x86-mario &&
tested image on vm.
Also ran:
cbuildbot.py --buildroot=checkout --resume --noarchive --nosync
--nouprev --noprebuilts x86-generic-full and it passed.

Change-Id: Ic38752eaadbf4f033a9ec7ee288a560f24a6c0b2
Reviewed-on: http://gerrit.chromium.org/gerrit/3212
Reviewed-by: asharif <asharif@chromium.org>
Tested-by: asharif <asharif@chromium.org>
2011-06-30 14:38:12 -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
Raymes Khoury
61e2bff39e Made libc debug symbols get copied to image when building a dev image.
libc debug symbols (libpthread in particular) are needed to debug threaded software with gdb. This CL copies
debug symbols for glibc when building a dev image.

This CL also removes an old hack related to selecting the correct path to the glibc tarball.

BUG=chromium-os:16847
TEST=Build dev image (--withdev is the default). Checked that debug info is copied. Booted image and checked
the debugging threaded programs works with gdb. Build non-dev image (--nowithdev) checked that debug info is
not copied.

Change-Id: Id908e8260b1431ed1256a13dfb86b05ac242f263
Reviewed-on: http://gerrit.chromium.org/gerrit/3091
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Raymes Khoury <raymes@chromium.org>
2011-06-24 12:53:54 -07:00
Vince Laviano
6aebf31a00 build_image: incorporate mod_image_for_test
Incorporate mod_image_for_test.sh into build_image to simplify the user
interface to the build system and to remove the redundant setup that
occurs in both scripts.

We're not porting the --force_copy, --inplace, or --yes flags, because
the user is no longer passing in an existing image as input.

BUG=chromium-os:12899
TEST=Run build_image w/ various flag combos, inspect output dir, and
  boot resulting images. Flags tested include: none, --test, --factory,
  --factory_install, --factory_install --test.

Change-Id: Ie3b504b3c58fbe19f1ce351985e5f1043353766a
Reviewed-on: http://gerrit.chromium.org/gerrit/2421
Tested-by: Vince Laviano <vlaviano@chromium.org>
Reviewed-by: Anush Elangovan <anush@chromium.org>
2011-06-16 11:27:35 -07:00
Rong Chang
c291a48995 Add "blkdevram" USE flag when building ARM factory install kernel
Default netroot factory install kernel mounts rootfs in ram. The
USE flag "blkdevram" was implemented in
  http://gerrit.chromium.org/gerrit/#change,1802

BUG=None
TEST=Build factory install kernel and rootfs uimg. Kernel should
be able to mount the in-ram initrd downloaded from tftp.

Change-Id: Idb83375e0587432c5dec87357a8aa8e229f40af2
Reviewed-on: http://gerrit.chromium.org/gerrit/1803
Reviewed-by: Rong Chang <rongchang@chromium.org>
Tested-by: Rong Chang <rongchang@chromium.org>
2011-06-03 00:30:15 -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
David James
72759e8c1e Update build_image to use ldd distributed with target if it's present.
BUG=chromium-os:13977
TEST=Build an image with new compiler, boot image and verify new ldd is used.
     Build image with old compiler and verify old ldd is used.

Change-Id: I8cbc5b87342245106f0a8fd0fa80ae42329eff60
Reviewed-on: http://gerrit.chromium.org/gerrit/1367
Tested-by: David James <davidjames@chromium.org>
Reviewed-by: Raymes Khoury <raymes@chromium.org>
2011-05-23 11:16:03 -07:00
David James
35269d23f8 Run eclean before checking blacklist to ensure correct blacklist check.
As reported in Bug 15561, build_image sometimes reports incorrect blacklist
packages if it reports an error about a package that is not actually installed.

For example, if you install =dev-libs/glib-2.28.6, and then replace it with
=dev-libs/glib-2.26.1-r1, build_image will report a blacklist failure because
glib depends on Python. But that's wrong -- it's looking at the wrong package.

BUG=chromium-os:15561
TEST=Test that build_image does not report an error when the package it's
     complaining about is not installed anymore.

Change-Id: I86b25684d0e211fd144231c7a34276ecf5607ad7
Reviewed-on: http://gerrit.chromium.org/gerrit/1227
Reviewed-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2011-05-20 12:12:30 -07:00
Stéphane Marchesin
2d331404a0 Add 64bit support to the build scripts.
Change-Id: Ibbc743981b4d1d2dd4e1ceb586f2f0a092559a27
Reviewed-on: http://gerrit.chromium.org/gerrit/1098
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Anush Elangovan <anush@chromium.org>
2011-05-18 10:07:46 -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
David James
f86703dd5d Move libcros check from chromeos-chrome into test_build_root.
This is needed for eliminating the dependency between chromeos-chrome and libcros.
This also has the benefit that builds will fail if you take a binary version of
chromeos-chrome with an incompatible version of libcros.

BUG=chromium-os:15145, chromium-os:15148
TEST=build_packages --nousepkg && build_image.
     Test that test_image fails when libcros version is wrong.

Change-Id: I46cbc4494d36b13ba1bdda699eccb6dc7fea162c
Reviewed-on: http://gerrit.chromium.org/gerrit/633
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2011-05-10 15:05:12 -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
Darin Petkov
61173f6bd1 Cleanup set_shared_user_password related transitional code.
BUG=none
TEST=set_shared_user_passwd, build_image, checked password

Change-Id: Ida251e36f32d6cb116425d475882c5cee601b9f6

Review URL: http://codereview.chromium.org/6904093
2011-04-29 10:24:26 -07:00
J. Richard Barnette
b290366b6e Fix build_image --factory_install to work again.
There were two bugs:
 1) The test [ ${ARCH} -eq "arm" ] was wrong because -eq is a
    numeric comparison operator, not legal on strings.
 2) Variable ${ARCH} was used before set.

The code change includes comment changes to clarify the reasons for
the code, and a future-proofing logic change.

Change-Id: I63f502cc33cf8a9a441b4b305fc49ed57d0a55b1

BUG=None
TEST=build_image --factory_install, and boot the resulting image

Review URL: http://codereview.chromium.org/6905119
2011-04-28 17:14:34 -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
Tom Wai-Hong Tam
a6af201ff8 Use initramfs on x86 but not on arm for factory install image.
On x86, booting factory install shim on SD card needs to have the kernel
initrmafs enabled. But on ARM, booting factory install image on network does
not needs initramfs.

TEST=build_image --factory_install
BUG=chromium-os:13211

Change-Id: Id008a3bfaf4f17772e04f02d18844dd09b33fbe1

R=rongchang@chromium.org

Review URL: http://codereview.chromium.org/6901047
2011-04-28 12:12:08 +08:00
Tom Wai-Hong Tam
1f6a0ba388 Enable fbconsole in recovery and factory shims
This CL depends on http://codereview.chromium.org/6765018 which adds fbconsole
USE flag.

Change-Id: I159680e2cd53b6493545f6c0b1caaa8a7e833cb3

BUG=chromium-os:13607
TEST=run mod_image_for_recovery.sh and boot to recovery image to see messages
showed on framebuffer console.

Review URL: http://codereview.chromium.org/6814041
2011-04-26 18:09:16 +08:00
J. Richard Barnette
eb5246f8d9 Standardize invocations of emerge in build_image.
Also includes a style nit fix:  don't quote arguments to numeric
comparison test operators.

BUG=chromium-os:13582
TEST=setup_board --force && build_packages && build_image; boot the result

Review URL: http://codereview.chromium.org/6801027

Change-Id: I689ca9697a05cf93a789fde1242fb2fa50f21612
2011-04-08 10:34:31 -07:00
Mandeep Singh Baines
de162521ed build_image: hard-code verity_depth to 0
Plan is to eventually deprecate depth as a configurable parameter.
depth=0 means compute the depth based on a regular trie with a
single block of hashes at the root node.

BUG=chromium-os:9752
TEST=platform_DMVerity

Change-Id: I5c5f1b1f2c2079d7e1ef6c7a55c859b463a59aee

R=wad@chromium.org,taysom@chromium.org,ups@chromium.org,gauravsh@chromium.org,jimherbert@chromium.org

Review URL: http://codereview.chromium.org/6810006
2011-04-07 10:12:08 -07:00
Zdenek Behan
b3cf233d4c build_image: provide USE flags when installing chromeos-dev
This fixes an issue where passing USE= to build_packages would always
cause build_image to fail.

BUG=none
TEST=create a USE-inconsistent package, run build_image, observe it working

Change-Id: Id9eb3891d9c292423c837a0d097a33155f03b794

R=davidjames@chromium.org,kliegs@chromium.org

Review URL: http://codereview.chromium.org/6677163
2011-04-05 23:20:16 +02:00
Mandeep Singh Baines
63ca269c69 build_image: set verity_depth default to 3
This is in preparation for moving to a level 0 count of 1.

Seems to give about 200ms boot speedup.

Before(verity_depth = 1):

  seconds_power_on_to_login                                       7.73
  seconds_power_on_to_login{1}                                    7.97
  seconds_power_on_to_login{2}                                    7.8
  seconds_power_on_to_login{3}                                    7.86
  seconds_power_on_to_login{4}                                    7.84
  seconds_power_on_to_login{5}                                    7.81
  seconds_power_on_to_login{6}                                    7.85
  seconds_power_on_to_login{7}                                    7.85
  seconds_power_on_to_login{8}                                    7.85
  seconds_power_on_to_login{9}                                    7.82

After(verity_depth = 3)

  seconds_power_on_to_login                                       7.57
  seconds_power_on_to_login{1}                                    7.89
  seconds_power_on_to_login{2}                                    7.54
  seconds_power_on_to_login{3}                                    7.56
  seconds_power_on_to_login{4}                                    7.53
  seconds_power_on_to_login{5}                                    7.56
  seconds_power_on_to_login{6}                                    7.79
  seconds_power_on_to_login{7}                                    7.58
  seconds_power_on_to_login{8}                                    7.56
  seconds_power_on_to_login{9}                                    7.62

BUG=chromium-os:9752
TEST=platform_BootPerfServer

Change-Id: I7f6e39ad2ed2c2e8ebc463860578c3f97b8295a2

R=wad@chromium.org,jrbarnette@chromium.org

Review URL: http://codereview.chromium.org/6759016
2011-03-30 10:47:48 -07:00
Zdenek Behan
7454a5e6f5 build_image: always specify filesystem type for mount
BUG=chromium-os:13221
TEST=Run build_images without ext2 loaded

Specifying a filesystem type explicitly for ext* filesystems will avoid
weird fallbacks like mounting ext2 filesystem as ext3 or even ext4.
Instead it attempts to autoload the given filesystem as a module if
available or fail right away.

Change-Id: I6be7f3f994babd8efc8eda97ea9c802e04d98be6

R=dgarret@chromium.org,sosa@chromium.org

Review URL: http://codereview.chromium.org/6696092
2011-03-25 01:25:41 +01:00
Zdenek Behan
aeb8352706 build_image: silence the "No space left on device" message
BUG=chromium-os:12219
TEST=run it, see the message gone

Change-Id: I54174c50dd38e74989e7d63a798dc7f9ea011933

R=thieule@chromium.org

Review URL: http://codereview.chromium.org/6696095
2011-03-25 01:19:16 +01:00