Commit Graph

62 Commits

Author SHA1 Message Date
Michael Marineau
09e720e821 cleanup: remove a couple references to chrome-bot 2014-09-14 14:54:35 -07:00
Michael Marineau
5bfa0c8d20 build: switch from SYSLINUX to GRUB2
The new grub install script must be called after the image is unmounted
and the old bootloaders script doesn't need to touch grub at all. For
now we will continue to use the existing syslinux configs but
interpreted by grub. Beyond the grub menu flashing by during boot
everything should still be functionally equivalent.
2014-09-07 09:58:51 -07:00
Michael Marineau
9580ea4086 build_image_util: fix generation of packages.txt
The passing ROOT= as an environment variable to board wrapper scripts
doesn't work, the script unconditionally overrides it. This means so far
our packages.txt files have listed the contents of /build/amd64-usr
instead of the image. Fix this by calling equery directly instead.
2014-09-04 15:12:20 -07:00
Michael Marineau
3de1613a99 Merge pull request #324 from marineam/grub
Grub2 preview
2014-09-02 10:22:27 -07:00
Michael Marineau
0cc06c9c5c build_image_util: pass the disk image through to configure_bootloaders
Required so that configure_bootloaders can now handle installing the
bootloaders as well.
2014-08-30 16:39:05 -07:00
Michael Marineau
4228c591a8 disk_layout: mount ESP to /boot instead of /boot/efi
We have long since stopped installing anything to the /boot directory of
the root filesystem. Mount the ESP partition to /boot for consistancy
with the discoverable partition spec.
2014-08-29 13:57:42 -07:00
Michael Marineau
8a3a5e1c51 build_image_util: do not symlink etc/portage/profile
Create profile as a real directory instead of a symlink to the board
root's configuration. Normally the board root does not modify this but
it is useful for build_image to use it to modify package.provided.
2014-08-27 19:55:27 -07:00
Michael Marineau
a28a8966e4 build_image: use dev and prod profile variants
Instead of gluing in a special PROD_INSTALL_MASK for all images use
profiles to configure the differences between the base build root,
production images, and developer images. This offers much more
flexibility and is needed for providing a full dev environment in
developer images.
2014-07-19 17:17:28 -07:00
Michael Marineau
4d3c198161 tools: remove support for parallel_emerge
Using parallel_emerge has been disabled by default for all commands
except build_image for quite a while now, build_image kept it just
because it was still a bit faster than normal emerge. Keeping
parallel_emerge complicates future changes to build_image so it needs to
drop it entirely. Since that means nothing uses it by default we might
as well just rip out support for it entirely.
2014-07-19 16:38:17 -07:00
Michael Marineau
048ee51e6f build_image: when generating update payload don't generate metadata
This feature was removed from delta_generator.
2014-06-25 12:37:36 -07:00
Michael Marineau
51c78a4685 build_image: generate update tools zip by default
Missed this in 7231b95a, the update zip should still be built when the
usr partition is extracted for generating updates but build_image itself
is not generating and signing the update.
2014-06-24 14:01:09 -07:00
Michael Marineau
7231b95af1 updates: extract usr partition when building images
The current generate_update function is now less useful, the important
part that we need is just the partition image now. Also by defaulting to
extracting the partition the old cors_generate_update which is still in
use by devserver can be removed entirely, devserver will just expect the
extracted partition image instead.
2014-06-23 12:26:17 -07:00
Michael Marineau
9d2774af3b fix(build_image): Use developer_data as a system config.
Evaluating this as a user config causes it to block on
coreos-environment-setup.service which will wait on networking. This
makes it hard to add extra tricks for testing/debugging situations where
networking is failing. For example, to trigger dhcpcd if networkd dies:

    #cloud-config

    write_files:
      - path: /etc/systemd/system/systemd-networkd.service.d/dhcpcd.conf
        content: |
          [Unit]
          OnFailure=dhcpcd.service

          [Service]
          Restart=no
2014-06-15 15:41:53 -07:00
Michael Marineau
0d29e73534 fix(*): Use binary package for baselayout
It is no longer necessary to use the build USE flag or avoid binary
packages when installing baselayout for the first time.
2014-06-10 14:45:56 -04:00
Michael Marineau
bb3d751e6f feat(build_image): Generate lists of image contents
Index contents by file and package.
2014-06-08 16:38:54 -04:00
Michael Marineau
0ec871b203 fix(build_image_util): Reorder when set_lsb_release is called
dev_image_util needs to be able to append to update.conf so move
set_lsb_release to start_image instead of finish_image.
2014-05-22 22:41:54 -07:00
Michael Marineau
7372f9f6e6 Merge pull request #254 from marineam/dev-config
Build-time dev cloud configs
2014-05-18 20:46:07 -07:00
Michael Marineau
822644fc54 feat(build_image): Add support for injecting a cloud config
The new --developer_data option can be used to specify a path to a cloud
config to bundle into the image. If none is provided but a shared user
password (for core) is set then generate a config to set that password.
This lets us use the same mechanism for setting the default password for
both disk and PXE images.
2014-05-17 16:23:18 -07:00
Michael Marineau
a93cb921d8 refactor(build_library): Add a function for enabling systemd units. 2014-05-17 16:23:16 -07:00
Michael Marineau
54f774d931 fix(build_library): Skip modifying non-existent partitions.
To make it possible to plop a CoreOS install into a simple
single-filesystem image for use as a container some things like
configuring bootloaders need to be skipped.
2014-05-16 20:52:21 -07:00
Michael Marineau
17bde8aa12 refactor(build_image_util): Move prod specific code to prod_image_util 2014-05-09 11:18:20 -07:00
Michael Marineau
56b550dc21 cleanup(build_image_util): Delete unused code 2014-05-09 11:18:19 -07:00
Michael Marineau
1c5393b78e refactor(build_image_util): Merge with base_image_util
There isn't a base image now, and less file clutter is nice.
2014-05-09 11:16:48 -07:00
Michael Marineau
1836d5998d refactor(base_image_util): Split into two functions.
Use what was the base image build function as setup/finalize steps in
the dev and prod build functions. This eliminates duplicate code
that mounted and unmounted the filesystem images.
2014-05-09 11:13:54 -07:00
Michael Marineau
39086358bf refactor(build_image): Build dev and prod images independently
We need some more control over exactly what lands in dev vs prod images
which will require letting them diverge in what is currently the common
base image step. There isn't any real need for the base image in the
first place other than to speed up building both dev and prod images at
the same time but that isn't common enough to worry about.

As part of this cleanup also remove references to CHROMEOS_* variables
and the recovery image that never actually existed in CoreOS.
2014-05-09 10:55:09 -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
75999b5e2a fix(build_image): Add group prefix to image output directories. 2014-05-01 10:21:51 -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
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
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
d1fee3653e fix(cros_make_image_bootable): Remove dead command line flags.
Lots of things are either unused or meaningless. A particularly creative
one is the fact that there are command line flags for mount point
locations that are then overwritten.
2013-12-30 16:12:43 -08:00
Michael Marineau
52e1dba3ec fix(build_image): Migrate to new disk_util commands 2013-12-30 16:12:43 -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
d3a3a88768 fix(base_image_util.sh): Install glibc and gcc libs via emerge. 2013-12-01 16:04:10 -08:00
Michael Marineau
175d88e6e4 fix(build_image_util.sh): Move image install mask to portage profile.
Reduce the spaghetti config a bit...
2013-11-29 23:38:06 -08:00
Michael Marineau
75972cd991 fix(catalyst): Always use the current SDK tarball as seed.
Right now there is some funky logic to either use a previous build as a
seed or the current SDK tarball if it happens to have been downloaded.
This is a bit confusing and doesn't work reliably since it is reasonable
for there to be neither a previous build or the current SDK available if
the SDK chroot was created some time ago. Fix this by using the new SDK
library and always use the latest SDK, downloading it if needed.
2013-11-23 20:32:55 -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
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
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
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
Paul Taysom
0c2b408347 Fix for factory build of bootcache
BUG=chromium-os:36862
TEST=./build_image factory_install --board=parrot

Change-Id: If1e59d09eec45340e49b2711b4799eb1f83ea007
Reviewed-on: https://gerrit.chromium.org/gerrit/39133
Tested-by: Paul Taysom <taysom@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Paul Taysom <taysom@chromium.org>
2012-12-03 16:13:15 -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
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
0915c1e100 Fix bug where cros_factory_install didn't end up in the kernel cmdline
BUG=none
TEST=./build_image --board=stumpy factory_install, verify kernel cmdline

Change-Id: Icdf3156ea08e46d0ce5154133d62cb8d98d144f5
Reviewed-on: https://gerrit.chromium.org/gerrit/34102
Tested-by: Liam McLoughlin <lmcloughlin@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Ready: Liam McLoughlin <lmcloughlin@chromium.org>
2012-09-26 06:35:49 -07:00