Commit Graph

329 Commits

Author SHA1 Message Date
Michael Marineau
9dd0a9d87f Merge pull request #245 from marineam/set-group
add(image_set_group): New script to set the update group in prod images.
2014-05-07 16:58:24 -07:00
Michael Marineau
a7e1e5a177 add(image_set_group): New script to set the update group in prod images.
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.
2014-05-07 15:07:14 -07:00
Michael Marineau
b4d6fb9597 fix(set_lsb_release): Set default GROUP= from arg again.
This makes sure developer builds stick to the developer group. After
commit c3d07e94 developer PXE/ISO images would report as 'alpha'.
2014-05-07 12:52:05 -07:00
Michael Marineau
4815c38194 fix(tag_release): Fix compatibility with portage's config parser
Another fix for 10d98e7. Empty values must be quoted, otherwise the
tokenizer gets confused and everything falls apart. :(
2014-05-04 22:52:53 -07:00
Michael Marineau
fccefb278e Merge pull request #236 from marineam/vagrant
Vagrant related script updates
2014-05-03 14:18:39 -07:00
Michael Marineau
4e85b172df feat(build_image): Optionally generate update payload with prod images. 2014-05-01 09:59:58 -07:00
Michael Marineau
7a7494e999 fix(prod_image_util): Do not install update test key anymore.
Leave this to the ebuild, no reason for it to be done here.
2014-04-30 17:12:59 -07:00
Michael Marineau
10d98e7b32 fix(common): Switch to os-release style names in version.txt
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.
2014-04-29 01:44:47 -04:00
Michael Marineau
7f5b5baf22 maint(build_library): Remove special case code for -usr disk layouts
More cleanup now that amd64-generic is gone.
2014-04-26 14:45:28 -07:00
Michael Marineau
2f8f0159f8 maint(*): Delete special case code for amd64-generic 2014-04-23 16:14:50 -07:00
Michael Marineau
add4519021 fix(build_image): Only use 'alpha' group in official builds. 2014-04-09 18:46:07 -07:00
Michael Marineau
934675d19b fix(build_image): Add auto-enter-chroot call
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.
2014-03-23 20:17:05 -04:00
Michael Marineau
8244c7a260 cleanup(set_lsb_release): Rework release config setup
- 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.
2014-03-19 15:56:21 -07:00
Michael Marineau
10025571d9 fix(common): Disable parallel_emerge by default for most commands.
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).
2014-02-17 12:42:22 -08:00
Michael Marineau
feb59db9f5 fix(release_util): Add argument to specify the name to use for .DIGESTS
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.
2014-01-29 16:30:03 -08:00
Michael Marineau
bfe47817e4 fix(build_image): Add support for COREOS_DISK_LAYOUT_SUFFIX
Append COREOS_DISK_LAYOUT_SUFFIX from the portage profile to disk layout
names. Allows switching from "base" to "base-usr" and similar.
2014-01-05 18:39:47 -08:00
Michael Marineau
e84f922ba5 fix(build_library): remove references to chromeos-common.sh
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
2014-01-05 18:39:47 -08:00
Michael Marineau
15eead682b cleanup(build_library): Remove old disk_layout_util.sh
All of this code can go away now.
2014-01-04 21:17:06 -08:00
Michael Marineau
213472652c add(prod_image_util): Rename what remains of cros_make_image_bootable
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.
2013-12-30 16:12:44 -08:00
Michael Marineau
306a2f6cbc fix(cros_make_image_bootable): Switch to disk_util mount/umount 2013-12-30 16:12:44 -08:00
Michael Marineau
52e1dba3ec fix(build_image): Migrate to new disk_util commands 2013-12-30 16:12:43 -08:00
Michael Marineau
9bc36ee344 fix(base_image_util): Remove dead code, leave rootfs writable.
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.
2013-12-30 16:12:41 -08:00
Michael Marineau
576c8996f4 fix(disk_util): Remove support for --adjust_part
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.
2013-12-30 16:12:02 -08:00
Michael Marineau
6d414d275e fix(*): remove lingering broken support for board overlays.
This is a feature from the chromeos sdk that we haven't used and doesn't
work any more. Clean it up...
2013-12-08 16:02:00 -08:00
Michael Marineau
6452857e82 fix(*): Change default for --jobs to $NUM_JOBS
This makes parallelism behavior between parallel_emerge and emerge
consistent. NUM_JOBS is defined as the number of CPUs by common.sh
2013-12-01 16:04:10 -08:00
Michael Marineau
c9c1efd276 fix(build_image): Add --fast to control use of parallel_emerge
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.
2013-12-01 16:04:10 -08:00
Michael Marineau
241d135126 fix(test_build_root): Switch to using test_image_content
Start using the more complete test_image_content test for the build root
and add the test to the end of build_packages.
2013-11-26 17:14:50 -08:00
Michael Marineau
41099eef6f fix(board_options.sh): Move CHOST->ARCH mapping code.
Use the complete chost to portage arch mapping list from crossdev and
move the logic to toolchain_util.sh where it can be used by other
scripts.
2013-11-07 13:28:13 -08:00
Michael Marineau
207cc2f6a3 cleanup(*): Remove unused/broken test and factory images 2013-09-19 19:04:54 -04:00
Michael Marineau
c86eb16098 fix(build_image): Remove defunct bootcache option.
From ChromeOS, not applicable to our systems.
2013-09-19 18:21:32 -04:00
Michael Marineau
325755e923 cleanup(build_image): Remove some unused flags.
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
2013-08-19 18:09:11 -04:00
Michael Marineau
2edd22024e fix(build_image): Remove noinitrd from default boot_args 2013-08-14 13:15:20 -04:00
Michael Marineau
7c48115da6 fix(image_to_vm): Use saved version info instead of parsing directory.
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.
2013-07-31 21:22:52 -04:00
Michael Marineau
f46ee8c332 fix(build_image): Fix building dev and prod without base
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.
2013-07-26 22:56:27 -04:00
Michael Marineau
cc0873bbd8 fix(set_lsb_release): Add option for production updates, misc updates.
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.
2013-07-25 18:14:51 -04:00
Brandon Philips
95b2a4b8cd chore(*): use coreos_ everywhere 2013-07-21 23:20:50 -07:00
Brandon Philips
4c637bbe8c feat(build_image): official lsb-release on prod images
The /etc/lsb-release should have official values on the prod image. That
way someone can ping the official api.core-os.net with this image.
2013-07-21 22:10:02 -07:00
Brandon Philips
f73cbac8db feat(build_image): install the au-key
Install the developer au key on production images. This will need to
change when we have the production key.
2013-07-20 16:24:13 -07:00
Brandon Philips
fce31ab6fe fix(build_image): print out image_to_vm for dev image
this broke accidently in a previous commit. Fix it by printing the
instructions to build a vm again.
2013-07-07 21:41:28 -07:00
Michael Marineau
b4252985f2 feat(build_image): Add upload support for official builds 2013-07-05 23:55:50 -04:00
Brandon Philips
a45c529549 feat(build*): add CoreOS production image building
This will create a CoreOS production image and support it with the tools
like image_to_vm.sh and build_image.
2013-07-05 12:06:40 -07:00
Brandon Philips
195d052495 fix(*): drop FACTORY images
we don't need factory image functionality. Drop it to simplify our
scripts and prepare for our "production" feature and flags.
2013-07-05 09:37:38 -07:00
Michael Marineau
2482291e7d fix(scripts): Cleanup build version handling.
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.
2013-07-02 16:12:02 -04:00
Brandon Philips
4057d5590d feat(disk_layout): follow new CoreOS partition layout
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.
2013-05-12 12:31:03 -07:00
Brandon Philips
6789da97fc chore(build_image): chromeos -> coreos
Change-Id: I8023c038d7019b55115aaa45487ebb7b9927c239
2013-02-14 16:18:56 -08:00
Paul Taysom
5e39bb6cd1 Configure the serial port for debugging
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>
2013-01-23 17:44:43 -08:00
Vic Yang
3239b1aacd Add TPM and I2C device USE flags when building initramfs kernel
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>
2013-01-22 18:57:41 -08:00
Vic Yang
90e3b25914 Move ARM factory install shim to initramfs
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>
2013-01-09 10:32:24 -08:00
Vic Yang
8e0cd07e03 Build factory install shim by ebuild
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>
2012-12-21 18:54:08 -08:00
Mike Frysinger
454c526fda build_image: auto-disable bootcache when --noenable_rootfs_verification is used
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>
2012-12-03 10:05:44 -08:00
Paul Taysom
00df6f6e5b Build script changes needed to enable bootcache
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>
2012-11-28 16:19:40 -08:00
Liam McLoughlin
b78a7c3569 Add disk_layout flag to image_to_vm
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>
2012-11-07 10:21:46 -08:00
Liam McLoughlin
12a9a84de9 Add adjust_part flag
BUG=chromium-os:35003
TEST=Build an image specifying above flag, verify image is correct size

Change-Id: I36df212bf1dac41717044da011552d459645d523
Reviewed-on: https://gerrit.chromium.org/gerrit/35105
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Liam McLoughlin <lmcloughlin@chromium.org>
Tested-by: Liam McLoughlin <lmcloughlin@chromium.org>
2012-10-30 04:44:53 -07:00
David James
18a9c2513a Move board overlay calculation into chromite (part 3 of 5)
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>
2012-10-23 08:52:03 -07:00
Kees Cook
8df86b24fa build_image: disable module restrictions in factory image
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>
2012-10-02 01:52:21 -07:00
Mike Frysinger
8b82f358ed Revert "Added enable_bootcache option to scripts"
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>
2012-09-28 19:16:40 -07:00
Paul Taysom
acff376525 Added enable_bootcache option to scripts
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>
2012-09-28 11:31:13 -07:00
Liam McLoughlin
5b37c5443a Simplify and add flexibility to image creation process
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>
2012-09-23 10:05:12 -07:00
Vadim Bendebury
0887dc2f7a Allow more room for factory shim rootfs
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>
2012-09-05 16:38:01 -07:00
Liam McLoughlin
d606ee21b4 Adding board specific image creation stage
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>
2012-08-07 19:06:42 -07:00
Matt Tennant
0a9d32d61b Add more commands to build stats prototype.
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>
2012-08-03 12:22:32 -07:00
Liam McLoughlin
8afcdcd1a6 Add a flag to build_image that provisions both root partitions
BUG=none
TEST=Run build_image with --full, verify two roots are provisioned

Change-Id: I3a90cd18a7546519733bbf6ba51c9ad03e19e2ca
Reviewed-on: https://gerrit.chromium.org/gerrit/27432
Reviewed-by: Liam McLoughlin <lmcloughlin@chromium.org>
Tested-by: Liam McLoughlin <lmcloughlin@chromium.org>
Commit-Ready: Liam McLoughlin <lmcloughlin@chromium.org>
2012-07-16 20:52:01 -07:00
Liam McLoughlin
07279034a9 Add option to create a hybrid MBR
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>
2012-06-26 13:58:51 -07:00
Gilad Arnold
a7536efa24 Temporarily reinstate support for --to=/dev/sdX
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>
2012-06-25 07:15:45 -07:00
Vic Yang
4051405da9 Add 'vfat' flag when building kernel with initramfs
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>
2012-05-23 17:49:46 -07:00
Brian Harring
7f175a59e1 common.sh: output a backtrace and debug information on failure.
Currently, if set -e spots a nonzero exit we basically have
no real debug information- it just stops immediately without stating
where or why.  This forces our scripts to be stupidly verbose so
we can track roughly where they were, thus when they fail we can
use that information to localize the rough exit point.

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

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

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

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

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

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

Change-Id: I517ffde4d1bb7e2310a74f5a6455b53ba2dea86c
Reviewed-on: https://gerrit.chromium.org/gerrit/17225
Reviewed-by: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
Commit-Ready: Brian Harring <ferringb@chromium.org>
2012-05-07 17:19:41 -07:00
Peter Mayo
82975f96c5 Add root growth option.
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>
2012-05-07 12:16:13 -07:00
Chris Sosa
dbc853b2bf Add an advanced option to build_image so that a caller can specify the version.
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>
2012-04-10 13:06:46 -07:00
Brian Harring
aa13ea4658 Shift crosutils scripts to use the common.sh they were written against.
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>
2012-03-15 23:35:06 -07:00
David James
dee866c121 Remove --build_root from all scripts except mod_image_for_pyauto.sh.
For all scripts, --build_root defaults to /build and is never used. To
remove option clutter, I've deleted this option.

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

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

Change-Id: I502f7df0123a598fc62a4ef4ed847ceb182f65b8
Reviewed-on: https://gerrit.chromium.org/gerrit/18283
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: David James <davidjames@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
2012-03-15 18:55:26 -07:00
David James
855afb7561 Clean up options to build scripts.
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>
2012-03-15 15:54:43 -07:00
Chris Sosa
e9e2d66366 Remove --nofast --nostatefuldev from build_image as they are never used.
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>
2012-03-12 10:55:51 -07:00
Chris Sosa
c9422fa467 Deprecate --test, --withdev, --factory, --factory_install from build_image.
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>
2012-03-09 12:41:50 -08:00
Hung-Te Lin
7119cb1499 build_image: Enable initramfs for factory install shims on amd64.
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>
2012-03-07 08:02:29 -08:00
Hung-Te Lin
d32c59fe47 crosutils: build factory test image by emerge commands
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>
2012-01-20 17:54:11 -08:00
Chris Sosa
93e7b78eea Fix bug with building on the base image with build_image base.
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>
2012-01-05 11:55:43 -08:00
Anush Elangovan
d39f1de7e5 Increase factory shim rootfs to 320MB to accomodate larger 64bit binaries
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>
2011-11-14 15:02:53 -08:00
Chris Sosa
4299eb9d52 Fix bug where we may modify FLAGS_factory_install after we source base_image_util.sh
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>
2011-11-02 13:45:50 -07:00
Chris Sosa
ef4a6452d4 Add Shflags usage for build_image.
BUG=chromium-os:22048
TEST=Ran build_image -h

Change-Id: If495d1784b9ba4491ca55537bf0b81395e88ee3c
Reviewed-on: https://gerrit.chromium.org/gerrit/10822
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
2011-10-28 11:39:47 -07:00
Chris Sosa
131eaf5667 Fix message funcs to use $@ and fix callers to use it correctly.
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>
2011-10-28 11:08:58 -07:00
Chris Sosa
b0f5732449 Add ability to pass in specific images you want built rather than use flags.
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>
2011-10-27 16:33:07 -07:00
Jon Salz
67145df2a4 Add cros_factory_install kernel command-line argument when running
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>
2011-10-25 08:12:32 -07:00
Elly Jones
9ca3e4c0fe mod_image_for_recovery: reuse salt.
This will prevent the recovery kernel from having a different salt from the
rootfs it corresponds to.

BUG=chromium-os:20766
TESTED_ON=kaen
TEST=Adhoc
Build a recovery image and do recovery from it.

Change-Id: I96f735e527d807247e09e17aac1ed5b51367f0ef
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/8288
2011-09-28 10:50:10 -07:00
J. Richard Barnette
8e48095cb3 Delete some unused options from build_image and mod_image_for_recovery.sh
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>
2011-09-01 09:18:26 -07:00
Hung-Te Lin
f7f8cd871f build_image: fix --factory output file name
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>
2011-08-31 08:53:44 -07:00
J. Richard Barnette
a308b39eae Share commonality between build_image and mod_image_for_test.sh
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>
2011-08-30 15:40:51 -07:00
J. Richard Barnette
5f9dbe46a6 Create a function library for mounting/unmounting images.
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>
2011-08-23 13:39:03 -07:00
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