With Aura, we won't have a need for the WM any more.
TEST=built an image without chromeos-wm, verified that the build system didn't complain.
Change-Id: Id6e5006770f72ea45f440dbe56ff7f53262864c1
Reviewed-on: https://gerrit.chromium.org/gerrit/15212
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Daniel Erat <derat@chromium.org>
Commit-Ready: Stéphane Marchesin <marcheu@chromium.org>
We have helper funcs already for displaying messages, so convert
some raw `echo` calls to them.
BUG=None
TEST=build_image still works and boots
Change-Id: Ie66cc59d0362ef6aa19011fa6cb0bc64a6a4fce8
Reviewed-on: https://gerrit.chromium.org/gerrit/14478
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
We have updated the toolchain in the chroot to use a newer version of
libstdc++ than what is installed on our workstations. This means
this additional library is required to generate deltas outside of the
chroot.
BUG=chromium-os:25277
TEST=Generated zip file, and ran contents outside of chroot on my workstation.
Change-Id: I5a90ee355aabd4849a9186a9a66e3dc9b1c51d52
Reviewed-on: https://gerrit.chromium.org/gerrit/14597
Reviewed-by: Eric M. Blake <eblake@google.com>
Reviewed-by: Eric Blake <eblake@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
Commit-Ready: Don Garrett <dgarrett@chromium.org>
The factory test image was created by using rsync from build artifacts
in chroot, which has some concerns:
- Runtime dependencies of autotest-factory won't be picked into image.
- If a developer skips build_package and builds image by using only pre-built
binary packages, he will get nothing in factory test image.
- It's hard for developers to figure out how and when his changes will be
merged to next build_image (cros_workon does not really work).
- Output image will be definitely different for every developers, also the
official build bots.
- If developers never wipes his chroot (setup_board), the factory test image
will grow until out of space. (For example, my environment outputs a 825M
image while the official buildbot generates only 563M for same ToT source).
This CL changes image build command to using portage emerge, so that output
image can be prepared faster and smaller, and easier for maintenance.
BUG=chromium-os:3335
TEST=./build_packages; ./build_image --factory # Image starts factory UI successfully
# Also tried tests in test_list.all, seems fine.
time ./mod_image_for_test.sh --factory --force_copy --no_inplace
# time: 3m2s => 1m55s, factory test image data: 825/563M => 378M
./build_image --factory_install # factory install shim is also fine
Change-Id: I82b4505c74cd31e718aaff4a319d50b69b2c852c
Reviewed-on: https://gerrit.chromium.org/gerrit/14473
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
This comes from not correctly negating all FLAGS and also the weird
way we set PRISTINE_IMAGE_NAME. Addressed in both cases and
simplified FLAGS_* logic in build_image_util.sh
BUG=chromium-os:24627
TEST=build_image base so far.
Change-Id: I92e8550db3ea713cda1f997b702777035145d8d5
Reviewed-on: https://gerrit.chromium.org/gerrit/13636
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
This is final step in ext4 conversion. We have been running with
the ext4 file system but ext3 format for several weeks. This changes
uses the ext4 format for the stateful partition.
Removed make_developer_script_runner.sh as per review.
BUG=chromium-os:20012
TEST=Ran ext4 on all platforms
Change-Id: I8e1564bfa576e9a0ad810879c18223a6c68b18e1
Reviewed-on: https://gerrit.chromium.org/gerrit/11220
Commit-Ready: Paul Taysom <taysom@google.com>
Reviewed-by: Paul Taysom <taysom@google.com>
Tested-by: Paul Taysom <taysom@google.com>
BUG=chromium-os:21244
TEST=./build_image works with both old and new grub
Change-Id: Idca80f777b7da72da1690bc374a156f910d487b0
Reviewed-on: https://gerrit.chromium.org/gerrit/11876
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Anush Elangovan <anush@chromium.org>
Commit-Ready: Anush Elangovan <anush@chromium.org>
There appear to be race conditions in some environments around mounting
and unmounting a file system quickly failing due to a device in use error.
This change removes the extra umount/mount/rm/umount sequence around
rootfs/filler which was done to ensure the file was being synced to disk.
Instead the dd command has added conv=fdatasync which causes it to sync
the file to disk on completion.
This also fixes a possible loopback device leak where the unmount would fail
and then build output directory deletion would fail because the rootfs was
still mounted, leaking both disk space and loopback devices.
BUG=chromium-os:22308
TEST=Ran filefrag on filler, validated that rootfs.image has blocks of 0 bytes
in each position
Compressed chromiumos_base_image.bin, compared size to previous build_image
Booted image on tegra2 device, confirmed it still boots
Change-Id: I097440b7abefd4a0d25f743e968f33a1531a7a21
Reviewed-on: https://gerrit.chromium.org/gerrit/11487
Reviewed-by: Thieu Le <thieule@chromium.org>
Tested-by: Jon Kliegman <kliegs@chromium.org>
Reviewed-by: Paul Taysom <taysom@google.com>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Jon Kliegman <kliegs@chromium.org>
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
This also simplifies the factory_install logic to all be in the same place :).
BUG=chromium-os:22371
TEST=Ran trybot with this CL + tegra2 build that used make_netboot.sh that uses
the factory install which failed on the buildbot previously.
Change-Id: Id0847b85c061cf230d0e6cc5bb40de2eba0992b9
Reviewed-on: https://gerrit.chromium.org/gerrit/10986
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
Fixed all callers in my big CL to no longer have to wrap poorly using
\ and start from the beginning of the next line but rather pass in
an array of args i.e.
info "tacos" " are" " delicious".
BUG=None
TEST=Ran to see the errors in parse_build_image and manual eyeing.
Change-Id: I5eac8a5ae7a8d314dbc4e821ee33cf88213711d0
Reviewed-on: https://gerrit.chromium.org/gerrit/10823
Commit-Ready: Chris Sosa <sosa@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
This CL does two things.
First it introduces an argument interface that works with all the following
combinations:
factory_install | [base|dev[test|factory_test]] rather than use --test etc.
This does not build extra images. If you just want a test image you can
run build_image --board=<board> test and all that's in your latest_dir is
chromiumos_test_image.bin.
Second, we only build what we ask and only finalize what we ask so on
an invocation of build_image test we only actually run cros_make_image_bootable
once saving 2 minutes on my machine (from 6:50->4:50 on multiple iterations).
BUG=chromium-os:22048
TEST=build_image test, all possible combinations of args through to start of
build. Built factory_install using new and old methods and dev test with both
methods. Also verified mod_image_for_test still works as advertises stand-alone.
Change-Id: I9fe2feb50a941c007214decd9ba1627012c050af
Reviewed-on: https://gerrit.chromium.org/gerrit/10621
Commit-Ready: Chris Sosa <sosa@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
Verified boot is not supported yet for USB+EFI boot, which is the case
of factory install shim. We need to select normal boot in legacy boot
loaders when building factory install shim.
BUG=chrome-os-partner:6358
TEST=build_image --factory_install
# boots successfully under ZGB H2O firmware
Change-Id: Ic4645a1766514bf7e0c31f8a4df21452bf195705
Reviewed-on: http://gerrit.chromium.org/gerrit/10013
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
This causes the script to treat amd64 the same as x86.
BUG=chromium-os:21284
TEST=./build_image for amd64-generic shouldn't generate an invalid
architecture error
Change-Id: I37284def3cb2f0b16ece20a74d65bdb8e0116cff
Reviewed-on: http://gerrit.chromium.org/gerrit/9962
Reviewed-by: Vince Laviano <vlaviano@chromium.org>
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
This change causes build_gpt to treat x86 and amd64 as the same.
BUG=chromium-os:21284
TEST=./build_image for amd64-generic shouldn't generate an invalid
architecture error
Change-Id: I60424515e162a257b9c8d99885cac18f6bb013cd
Reviewed-on: http://gerrit.chromium.org/gerrit/9705
Reviewed-by: Vince Laviano <vlaviano@chromium.org>
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
Rather than hardcoding every possible multilib path that we might come
across, look up the native multilib path that the target system is using
by finding the native ELF interpreter. We use /bin/sh as a known good
file since you can't really have a system without this.
BUG=chromium-os:20636
TEST=`./check_deps /build/amd64-generic /bin/bash` now finds libs without explicit ld.so.conf
TEST=`./build_image --board=x86-alex` still works
Change-Id: Ib80824312a5e5a0f9e17e8ae18a2d42248771eb7
Reviewed-on: http://gerrit.chromium.org/gerrit/8564
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
The ld.so.conf file supports an "include" directive where it'll include
all the files matched by the following glob. Since Gentoo has started
using this, we need to support parsing of it too. So move the parsing
code into a dedicated function and recursively call ourselves when we
hit an include directive.
BUG=chromium-os:20636
TEST=`./check_deps /build/amd64-generic /bin/bash` now finds libs
TEST=`./build_image --board=x86-alex` still works
Change-Id: I8894ca42358d91d8f2ee6e95b47faf9334ccdd26
Reviewed-on: http://gerrit.chromium.org/gerrit/8494
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
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
To always have HWID bundles in build output, this CL copies the HWID bundle
files from board temporary space into build output folder.
The HWID folder in make_netboot is also removed.
BUG=chrome-os-partner:5796
TEST=./build_image --factory
# see "hwid" folder in build output
Change-Id: I8c2cd32c257b117261fba3654b52929c71310c82
Reviewed-on: http://gerrit.chromium.org/gerrit/7331
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
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>
BUG=None
TEST=run both scripts, boot the images
Change-Id: I7209421d3b438d6daf37f210d5e73c0b9f91eb1d
Reviewed-on: http://gerrit.chromium.org/gerrit/6941
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
BUG=None
TEST=run the commands in various combinations.
Change-Id: I94fb167d8312a90818910085adebfb1d0396cdbe
Reviewed-on: http://gerrit.chromium.org/gerrit/6866
Reviewed-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Vince Laviano <vlaviano@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
The functions are shared between build_image and mod_image_for_test.sh.
BUG=None
TEST=build_image
Change-Id: Ib6d860a6818abee380dde97460f57943cc0a070c
Reviewed-on: http://gerrit.chromium.org/gerrit/6444
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
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>
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>
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>
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>
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>
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>
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>