For generating images for groups other than the one given to build_image
run this script along with the usual image_to_vm.sh commands. To avoid
ambiguity with the 'latest' symlink, this script creates $group-latest
symlinks instead. build_image creates the new symlink too.
The existing version.txt is kinda annoying. The common case of referring
to the current version requires joining three values and the names of
those values only make sense in ChromeOS. Instead just use version as a
string, using VERSION, VERSION_ID, and BUILD_ID just as they appear in
os-release. It is up to the few scripts that need the individual parts
to break the version apart.
The old values remain for the sake of compatibility.
This makes build_image and image_to_vm behave like build_packages, where
if you call the script outside of the SDK's chroot it will automatically
reexecute itself inside of the chroot.
- Remove custom COREOS_* attributes from /etc/lsb-release
- Move dev image logic to dev_image_util
For extra fun fix detection of local host URL for devserver.
- Remove weirdly verbose "DESCRIPTION" format.
- Add COREOS_RELEASE_BOARD back to /usr/share/coreos/release
This is mostly just so update_engine and gmerge report the correct
board name to devserver, informative-only on prod images.
- Remove version info from /etc/gentoo-release
- Switch from 'track' to 'group' terminology.
I would like to phase out parallel_emerge so disable it for all commands
other than build_image which is the only one that shows a noticeable
benefit from it (~2 min with --fast, ~3 min with --nofast).
For multi-file uploads we should explicitly declare what the name of the
.DIGESTS file should be instead of using the first file name. Relying on
the ordering was subtle and easy to break.
Nothing from chromeos-common.sh is needed for image building now. Also
kill off build_common.sh which was just a weird way of sourcing
common.sh. The two piddly functions it provided fit better in
build_image_util.sh
cros_make_image_bootable now only is relevant for prod images, so move
the remaining code to prod_image_util in a similar scheme that base and
dev images use.
The verification flag was being passed through to the bootloader
template script but no longer had any effect.
Force the base image to always remain writable, its only purpose is to
be modified in a later build step anyway.
This isn't a feature we've been using as far as I know and if someone
needs a custom partition layout it's probably better to just add it to
the json file. Removing this avoids some complexity.
This makes it possible to toggle parallel_emerge just as other scripts
do. In other scripts update the help string to be more specific, the
--jobs option can be used to control parallelism.
Remove --verity_*: Unused, we don't support verity
Remove --usb_disk: Unused, we use PARTUUID now.
Remove --enable_serial: Unused, and serial is enabled for syslinux
Trying to include version info by adding the directory name to VM image
names didn't work and a better solution is for build_image to write out
a version.txt file. This should also fix an issue where uploading from
image_to_vm.sh didn't always go to the same location as the images
uploaded from build_image did.
Ever since adding prod it hasn't been possible to build just dev and
prod without explicitly building base. Base is always built but usually
there is no point to keeping it around. Add some logic to make dev not
conflict with prod and make sure base is deleted and not uploaded if it
wasn't explicitly requested.
Add --production_track argument to set_lsb_release and
cros_make_image_bootable to support using the production update service
on developer builds of the 'prod' image. This replaces the previous hack
of setting COREOS_OFFICIAL=1 in the middle of the build.
Since lsb-release doesn't exist prior to the first call to
set_lsb_release switch to sudo_clobber instead of append. That way if it
is called a second time later the contents aren't duplicated.
Write the info to gentoo-release and os-release as well so everything
gets the same information.
A few things here:
- Source manifests/version.txt directly instead of coreos-version.sh
- Remove Chrome branch from target image directory names.
- Use proper version instead of timestap for catalyst builds.
- Move lsb_release script from coreos-overlay to build_library.
As outlined here we need a new partition layout, this patch makes the
necessary changes:
https://groups.google.com/forum/#!topic/coreos-dev/bA7gwGGoTng
The first big change is making all of the scripts obey partition numbers
based on labels in the disk_layout.json. This makes it much easier to
change later on.
The second big change is in the layout itself. The json file was updated
to reflect the document above.
And finally the grub boot configuration needed for pv-grub and pygrub
were added to the create_legacy_bootloader_templates.sh library utlity.
Everything seems to work and boot now.
Enable the serial port from the build_image command line.
Currenly, you have to edit build_kernel_image.sh to enable
the serial port for kernel debugging. Now:
./build_image --board=${BOARD} --enable_serial=ttyS0
Will enable sending printks to the specified serial port.
BUG=chromium-os:38026
TEST=built images with and without serial enabled
Change-Id: I9ef4f2a20f0d451e132371339c4eba1faf4c94de
Reviewed-on: https://gerrit.chromium.org/gerrit/41638
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Paul Taysom <taysom@chromium.org>
Tested-by: Paul Taysom <taysom@chromium.org>
This is to match the refactoring of kernel eclass.
BUG=chrome-os-partner:17368
TEST=Build factory install shim and install.
Change-Id: Ia47f1c9632f82c127a818ca69fbcc91feacbfdcd
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41755
Reviewed-by: Mike Frysinger <vapier@chromium.org>
As USB/SD install shim might be used for ARM devices now, it is
reasonable to move ARM factory install shim to initramfs like on x86.
This converges the code path and build process for ARM and x86.
BUG=chrome-os-partner:15884
TEST=Install with install shim and netboot on Spring.
Change-Id: Ic8d7328502181ca909be3d7542be34f2a904523f
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/40931
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Now that we have an ebuild for factory install shim, let's move to that
instead of base image.
BUG=chrome-os-partner:16712
TEST=Test network boot, install shim, RMA shim on Link.
Test install shim on Snow.
CQ-DEPEND=CL:39952
Change-Id: Ib6a7a598087647b44a4aeca970e293ea72023890
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39955
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
If devs run `./build_image --noenable_rootfs_verification`, they also
have to manually specify --noenable_bootcache otherwise the default
kicks in. We can make the default logic slightly smarter and only
enable bootcache by default if rootfs verification is also enabled.
BUG=chromium-os:25441
TEST=`./build_image --board=parrot --enable_rootfs_verification` -> bootcache enabled
TEST=`./build_image --board=parrot --noenable_rootfs_verification` -> bootcache disabled
TEST=`./build_image --board=parrot` -> bootcache enabled
TEST=`./build_image --board=parrot --noenable_bootcache` -> bootcache disabled
Change-Id: I97f40c70c045bca294a903ff73e5eff7554617d4
Reviewed-on: https://gerrit.chromium.org/gerrit/39043
Reviewed-by: Paul Taysom <taysom@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Changes to build_image to allow enabling of bootcache.
./build_image --board=$BOARD --enable_bootcache
A board can be configured to use the bootcache by
the following lines in private-overlays/overlay-<board>-private/scripts
if [[ ${FLAGS_bootcache_use_board_default} -eq ${FLAGS_TRUE} ]]; then
FLAGS_enable_bootcache=${FLAGS_TRUE}
fi
Setting --noenable_bootcache or --enable_bootcache on the comand
line will override the default.
BUG=chromium-os:25441
TEST=built and installed snow, amd-64(latitude), stumpy
Change-Id: Ie081ef94f4799b0071b53e0587d89f1247b4a11f
Reviewed-on: https://gerrit.chromium.org/gerrit/38414
Tested-by: Paul Taysom <taysom@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Paul Taysom <taysom@chromium.org>
This allows you to build a VM image using the 4gb-rootfs layout
BUG=none
TEST=Build iamge using 4gb-rootfs and build VM image
Change-Id: I1efa45d1448b22a9905dae764f0e4cdc0538be68
Reviewed-on: https://gerrit.chromium.org/gerrit/37489
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Liam McLoughlin <lmcloughlin@chromium.org>
Tested-by: Liam McLoughlin <lmcloughlin@chromium.org>
This CL adjusts all scripts to use cros_list_overlays from chromite
instead of cros_overlay_list.
BUG=chromium-os:35514
TEST=Trybot runs with all callers adjusted to use
cros_list_overlays instead of cros_overlay_list.
CQ-DEPEND=CL:36191
Change-Id: I6b147a64744015f6b199b2a00493e6f1e030376b
Reviewed-on: https://gerrit.chromium.org/gerrit/36167
Tested-by: David James <davidjames@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
The factory test image uses third party kernel modules from /usr/local.
Since it builds with verity enabled, the module restrictions must be
disabled in the command line instead of via run-time sysctl values
(which are not available if verity is enabled).
BUG=chromium-os:34134
TEST=parrot build, manual testing
Change-Id: Ibfc3332eac88e3748f2c81d6dce1a595dd16c055
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/34321
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Liam McLoughlin <lmcloughlin@chromium.org>
Reviewed-by: Joseph Shyh-In Hwang <josephsih@chromium.org>
This reverts commit acff376525
This broke the signing process due to changed kernel params.
Please update ensure_secure_kernelparams.config under the
cros-signing/ tree before relanding this.
Change-Id: I3be62e16299eb69bbfef9f1530d92200a2e309d7
Reviewed-on: https://gerrit.chromium.org/gerrit/34320
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Added a new flag for enabling the boot cache.
BUG=chromium-os:25441
TEST=built and ran amd64 and arm
Change-Id: Ia151d40c4b02f4353981affd321763521d972ee6
Reviewed-on: https://gerrit.chromium.org/gerrit/33617
Tested-by: Paul Taysom <taysom@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Paul Taysom <taysom@chromium.org>
This change adds support for building the disk layout from a
configuration file. It also cleans up much of the image creation
code.
install_gpt no longer exists, and has been replaced by cgpt.py's
write action. This spits out a file that has two functions that can
be called to write a partition layout to a disk/file. This gets rid
of the gigantic nest of calculations that built the layout previously.
All instances of partition/filesystem sizes in build scripts should now
be gone in favour of calls to the cgpt.py tool.
create_boot_desc has moved inside the base image creation, in an effort
to simplify build_image.
load_kernel_test is gone since it's apparently not supposed to be called
here anyway (asked wfrichar/rspangler about this one).
Base image creation now uses files rather than loop devices when
building an image. This means we can simply umount them once we're
done and not worry about cleaning up the loop device, since it's
been done for us.
Hash pad calculation has been removed. This is now set manually inside
the partition config file.
Hybrid MBR creation is gone, since it's now possible to do that in a board
specific hook (see overlay-beaglebone/scripts/board_specific_setup.sh).
OEM partition now has a filesystem, which is mounted at /usr/share/oem
during emerge so that packages can stash files here.
root_fs_dir and friends are still globals, but the long-term idea
is to make this not the case.
BUG=chromium-os:33817
TEST=All types of images and their respective flows
(VM, recovery, test, factory etc)
Change-Id: I8a596728a4d1845c930e837bea627f5b6a11c098
Reviewed-on: https://gerrit.chromium.org/gerrit/29931
Commit-Ready: Liam McLoughlin <lmcloughlin@chromium.org>
Reviewed-by: Liam McLoughlin <lmcloughlin@chromium.org>
Tested-by: Liam McLoughlin <lmcloughlin@chromium.org>
For reasons yet to be determined the factory shim rootfs size spills
over allotted 300 MBytes. The actual culprit will have to be
determined and hopefully eliminated, at the time the lower size could
be restored by reverting this change.
BUG=chromium-os:34167
TEST=manual
./build_image --board=amd64-generic factory_install
was failing before this change and is succeeding now
Change-Id: I01456f8317b0d02968068f609811c36d4816f353
Reviewed-on: https://gerrit.chromium.org/gerrit/32298
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Jon Salz <jsalz@chromium.org>
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Commit-Ready: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Peter Mayo <petermayo@chromium.org>
BUG=none
TEST=Build a beaglebone image then verify that the beaglebone
bootloader was installed into the ESP
Change-Id: I1037ee6a61d409e8fd2d66ec6746048a54ce8f14
Reviewed-on: https://gerrit.chromium.org/gerrit/26738
Tested-by: Liam McLoughlin <lmcloughlin@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Liam McLoughlin <lmcloughlin@chromium.org>
Make the following commands send stats to chromiumos-build-stats.appspot.com:
build_image
run_chroot_version_hooks
make_chroot
setup_board
update_chroot
BUG=chromium-os:33088
TEST=`cbuildbot --remote -p chromiumos/platform/crosutils alex-paladin`
confirm in the log that uploads succeded, and see them show up in queries
at chromiumos-build-stats.appspot.com.
Change-Id: I0280f91a3e7e0a0483c01c87072bc589003dbe95
Reviewed-on: https://gerrit.chromium.org/gerrit/28969
Tested-by: Matt Tennant <mtennant@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Matt Tennant <mtennant@chromium.org>
This allows booting on boards that require their bootloader be on
the first partition of a MBR formatted disk
BUG=chromium-os:32150
TEST=Build an image using the --hybrid_mbr_hack flag, verify that
the ESP is visible on a system with GPT support
Change-Id: I4b137ef672b9ed7327bd42ec0a260d82a8c9d470
Reviewed-on: https://gerrit.chromium.org/gerrit/26071
Tested-by: Liam McLoughlin <lmcloughlin@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Commit-Ready: Liam McLoughlin <lmcloughlin@chromium.org>
Reviewed-by: Liam McLoughlin <lmcloughlin@chromium.org>
This is part of some user's workflow and should be deprecated with
proper advance notice.
- Added a deprecation warning when --to=/dev/sdX is used in
image_to_usb.sh.
- Removed mention of /dev/sdX from the output of build_image. Also
simplified this output a bit (it should be obvious to a user who just
invoked build_image that the other scripts should be invoked
similarly, from inside the chroot's scripts directory).
BUG=chromium-os:32023
TEST=Invoked image_to_usb.sh with different --to values
Change-Id: Ib93d1b55f425b0978c4a9680be7755ae031c46e6
Reviewed-on: https://gerrit.chromium.org/gerrit/25819
Reviewed-by: Olof Johansson <olofj@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
Commit-Ready: Gilad Arnold <garnold@chromium.org>
We are about to separate VFAT support from 'initramfs' flag. Let's add
'vfat' flag first so that when this happens nothing gets broken.
BUG=chrome-os-partner:9805
TEST=Build success. Factory install shim still works.
Change-Id: Ia432e3b1a6186f4f7c817a1283c86066ced5fef1
Reviewed-on: https://gerrit.chromium.org/gerrit/23193
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Vic Yang <victoryang@chromium.org>
Tested-by: Vic Yang <victoryang@chromium.org>
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>
This allows us to specify a boost size where we know we are growing Chrome,
but don't know what the default sizes are, nor whether we are overriding them
elsewise.
BUG=chromium-os:29829
TEST=try(lumpy-chrome-pfq,lumpy-canary)
Change-Id: I3b7c927874fdfedace027e7a2398d9e97a9d3527
Reviewed-on: https://gerrit.chromium.org/gerrit/21519
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Peter Mayo <petermayo@chromium.org>
Tested-by: Peter Mayo <petermayo@chromium.org>
This change adds the ability for a caller to pass a specific version name
to build_image rather than rely on parsing of chromeos_version.sh + attempt
number.
BUG=chromium-os:29077
TEST=Ran build_image w/ w/out option
Change-Id: I69b76ae4bfc148325686902606476a0aae293e56
Reviewed-on: https://gerrit.chromium.org/gerrit/19861
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
Rather than trying to use an old/stale common.sh, use the common.sh
from the invocation point- if invoked via /usr/lib/crosutils, use that
common.sh. If invoked via src/scripts/, use that, etc.
Trying to intermix it just introduces potential for bugs and invalidly
freezes common.sh api, thus the efforts to revert this and ultimately
revert the existing of a crosutils ebuild.
BUG=chromium-os:27201
TEST=cbuildbot x86-generic-full
Change-Id: I4c6c5fbade3d28c71752bd4c44dccad49af52ec0
Reviewed-on: https://gerrit.chromium.org/gerrit/18303
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
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>
1. Remove options that are already deprecated:
--chromefromsource --chromebuild --chromebase
--crosbug12352_arm_kernel_signing
2. Remove the --retries option and associated function eretry.
3. Move seldomly used options out of --help to avoid confusing
developers. Developers who need these options can read the
source.
4. Alphabetize all options.
5. Add description of each script to --help.
BUG=chromium-os:27364
TEST=Run --help with each script. Full canary trybot run.
Change-Id: I95675b069781f7e950d75d32dbad744adce6b830
Reviewed-on: https://gerrit.chromium.org/gerrit/18194
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
BUG=chromium-os:27362
TEST=Built a test image.
Change-Id: I884acd534f06d9070b28d5cd74862e2774822578
Reviewed-on: https://gerrit.chromium.org/gerrit/17759
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
Using these flags directly was deprecated a while back and is causing confusion
which way is the right way. This CL removes all these FLAGS from build_image
(though keeps support of them in mod_image_for_test/image_to_usb invocations
in common.sh). In this change I've also defaulted build_image to build the
developer image (and only the developer image).
BUG=chromium-os:27362
TEST=Been busy testing. Have built the following combinations and verified them:
build_image base
build_image
build_image base dev test
build_image dev
build_image dev factory_test
build_image factory_install
Change-Id: Ie534c276a9ec571926964320ac176daa91b12a81
Reviewed-on: https://gerrit.chromium.org/gerrit/17386
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
On both x86 and x64(amd64) platforms, we should enable initramfs for
factory install shim so that partner can remove shim.
BUG=chrome-os-partner:8376
TEST=./build_image --board lXXk --factory_install # pass, bootable with initramfs
Change-Id: Ibbb3f71fc287d2db2c9245e11ce5a00cbc353c3a
Reviewed-on: https://gerrit.chromium.org/gerrit/17472
Reviewed-by: Rong Chang <rongchang@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@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>
I will attempt to shrink this rootfs size back to the original size.
BUG=chromium-os:22932
TEST=./build_image --board=amd64-corei7 --noenable_rootfs_verification --symlink=factory_shim factory_install
Change-Id: I3bf571c569330480293f35ec3390c9ab6b76f4e2
Reviewed-on: https://gerrit.chromium.org/gerrit/11637
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Tested-by: Anush Elangovan <anush@chromium.org>
Commit-Ready: Anush Elangovan <anush@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>
the factory install shim.
BUG=chrome-os-partner:6535
TEST=Ran factory install shim on Alex and in VM
Change-Id: I32761736d8565d16323c6962058b478511a3ee8c
Reviewed-on: http://gerrit.chromium.org/gerrit/10398
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Jon Salz <jsalz@chromium.org>
Commit-Ready: Jon Salz <jsalz@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
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=chromium-os:19868
TEST=build_image --factory # see output as chromiumos_factory_image.bin
build_image --test # see output as chromiumos_test_image.bin
Change-Id: Ice1aa576cfe297db0900e6c42de8d362aa94729a
Reviewed-on: http://gerrit.chromium.org/gerrit/6993
Tested-by: Hung-Te Lin <hungte@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>
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>
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>
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>
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>
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
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>
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>
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>