Commit Graph

90 Commits

Author SHA1 Message Date
Will Drewry
efce66880f image_to_vm: convert to calling setimage directly
The last changes to the installer broke image_to_vm.  Since image_to_vm
doesn't need to run postinst, but just change the active image, it
now just calls chromeos-setimage and passes in its needed flags (already
supported by the last installer change).  It will also detect whether
the image was built with verification of the rootfs enabled or not
by looking at the default.cfg file.

Also updates the location of where you should run the command in
build_image.

TEST=built a new image with --enable_rootfs_verification and started with qemu -curses -hda [output]; did the same without verification
BUG=chromium-os:2963

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

Change-Id: I265d6ad8971f9427b78cc07d784fced9cceb5974
2010-07-23 19:43:27 -05:00
Will Drewry
9926ee2879 build_image: avoid losetup -c because older kernels seem to balk
Instead of resizing the loop device after adding padding for the
hash tree data.  Just ensure that the mkfs.ext3 call doesn't exceed
the rootfs size.

TEST=reran build_image on my lucid machine and checked the rootfs size; asked someone with hardy machine to test.
BUG=none

Change-Id: I59f95e1d17e35aca265bd44bb863da6069c05bd2

Review URL: http://codereview.chromium.org/3048009
2010-07-21 15:11:10 -05:00
Will Drewry
78992a33f4 build_image, build_kernel_image, update_bootloaders: fix up rootfs_verification
This change adds
- --rootfs_hash_pad to specify the MBs reserved for the pad
- the implementation of the above flag
- check if total fs size + pad size exceeds the partition size
- hash appending in make_image_bootable()

Fixes:
- a style for ROOT_FS_HASH usage
- bad mount|grep
- bad bash subst for root devices in all boot paths
- fixed a typo in the update_bootloaders table creation
- disables verified usb for now

Adding the padding argument ensures that the generated hash tree for the root filesystem is appended to the image.  Assuming the rootfs is _never_ mounted read-write
again, that hash tree will be valid and vboot will be able to proceed.

BUG=chromium-os:2693
TEST=manual build_image

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

Change-Id: I67d9b0f91cacdefa309c0cc2dd7fed1d2eddd7a7
2010-07-21 14:02:20 -05:00
Will Drewry
721d94f429 build_image,update_bootloaders: directly update the built image
Instead of playing mount and loop device games, this change adds support for
update_bootloaders.sh to directly update the EFI system partition living in the
image if a file, offset, and size is supplied.

TEST=build_image for x86-generic; booted resulting image
BUG=broken build

Change-Id: I3d891fd965df6fb4abfc63d660e314c497a4184d

Review URL: http://codereview.chromium.org/3006006
2010-07-16 14:39:45 -05:00
Andrew de los Reyes
3172b7e296 build_image: add temporary hack to fix syslinux building.
Will Drewry is working on the proper fix, but this unblocks people who
build images that boot w/ syslinux.

Review URL: http://codereview.chromium.org/3009003
2010-07-15 22:10:47 -07:00
Zelidrag Hornung
478a0d44a4 Renamed VM image to match naming convention of other images.
Review URL: http://codereview.chromium.org/2955014
2010-07-14 11:47:39 -07:00
Denis Romanov
95bdf47a1a Added command line parameter to specify OEM content location.
Added populating OEM partner partition with content.
Added creating flag file .consider_oobe for OEM partition to get mounted on OOBE.

BUG=http://crosbug.com/3828
TEST=Install Chrome OS on the device from USB stick. /mnt/partner_partition contains etc/... directory with customization manifests on first boot.

Review URL: http://codereview.chromium.org/2938003
2010-07-12 22:44:42 +04:00
Mandeep Singh Baines
87b169428f build_image: modify to not get devkeys from vboot_reference checkout
An earlier CL modifies the vboot_reference ebuild to install the
keys into /usr/share/vboot.

TEST=verified that build_image fails without this change and no
vboot_reference checkout but succeeds with this change and no
vboot_reference checkout

Change-Id: Ie2bc1091b52c36fd56cd5f763ee275afc91765c3

Review URL: http://codereview.chromium.org/2896008
2010-07-09 20:52:41 -07:00
Will Drewry
07e350578b build_image: enable syslinux installation for x86
Adds the --install_syslinux to the update_bootloaders call for x86.

BUG=chromium-os:2693
TEST=build_image with both tegra2 and x86-generic in progress. Doesn't affect actual booting until we change the active gpt boot partition.

Review URL: http://codereview.chromium.org/2911003
2010-07-09 14:50:42 -07:00
Will Drewry
1670d481a1 build_image, build_kernel_image, legacy_bootloaders: Rename vboot flags
The use_vboot and vboot_ flags were confusing from a functionality perspective
since verified boot as a feature encompasses firmware and kernel functionality.
The firmware bits are always enabled, but use_vboot enabled the image-integrity
portion of vboot.  It is not called
  --enable_rootfs_verification
and all options for the kernel functionality is under --verity_* given that
verity/dm-verity is the current working name for the module and userspace tool.

TEST=ran x86-generic build_image & tegra2-dev-board build_image and checked the resulting boot.config files (with and without --enable_rootfs_verification).
BUG=chromium-os:2693

Review URL: http://codereview.chromium.org/2917008
2010-07-09 13:08:38 -07:00
David James
fd7403ab89 Revert "Use --fast by default in build_image when --jobs is enabled."
See if this fixes the symlink problems we've been running into.

This reverts commit 8edffbaec5.
2010-07-09 12:00:17 -07:00
David James
8edffbaec5 Revert "Revert "Use --fast by default in build_image when --jobs is enabled.""
parallel_emerge prints a message every 30 seconds now so that buildbot doesn't
kill us early. Per discussion with cmasone, reverting the revert.

This reverts commit debaa3d8cf.
2010-07-08 21:21:41 -07:00
Chris Masone
debaa3d8cf Revert "Use --fast by default in build_image when --jobs is enabled."
This reverts commit f0fb864e8d.

This change needs to be reverted because it suppresses logging output
from the build process.  Thus, when something goes wrong...the
sherriff is left completely helpless in terms of debugging the issue.

TBR: davidjames@chromium.org
2010-07-08 21:10:23 -07:00
David James
f0fb864e8d Use --fast by default in build_image when --jobs is enabled.
Also update eretry to not pass in $EMERGE_JOBS anymore, in coordination with my previous change, which passed it in directly instead of depending on eretry to do so: http://codereview.chromium.org/2944004/show

TEST=Ran build_image --jobs 2 and build_packages --jobs 2
BUG=none

Review URL: http://codereview.chromium.org/2914004
2010-07-08 20:17:45 -07:00
Tien-Ren Chen
71ff3fc632 fix disappearing vmlinuz_hd.vblock problem
Review URL: http://codereview.chromium.org/2905001
2010-07-08 15:27:59 +08:00
Tammo Spalink
cfc0c64823 Allow python to find gtk module. (originally nsanders CL)
BUG=4464
TEST=manually edit file so far

Review URL: http://codereview.chromium.org/2850045
2010-07-07 10:51:21 +08:00
Louis Yung-Chieh Lo
85d49fc1d9 Copy vmlinuz_hd.vblock only in x86 platform.
Review URL: http://codereview.chromium.org/2842044
2010-07-05 22:55:31 +08:00
Louis Yung-Chieh Lo
ca1c2b0430 Change code of copy vmlinuz_hd.vblock to make_image_bootable().
Review URL: http://codereview.chromium.org/2857037
2010-07-05 17:37:05 +08:00
Louis Yung-Chieh Lo
3602040b74 Use the new developer keys to sign things. (submit for Bill)
The original CL is http://codereview.chromium.org/2868044/show

Review URL: http://codereview.chromium.org/2818045
2010-07-05 13:23:34 +08:00
Will Drewry
25861ee160 TBR: use the correct output directory
Pushed with the rootfs instead of output dir.

TBR=fes
BUG=none
TEST=manual
2010-07-04 05:09:41 -07:00
Will Drewry
c985ae271f TBR: build_image chmods the /boot copy
TBR=fes
BUG=none
TEST=manual (no local archive_build)
2010-07-04 05:06:50 -07:00
Will Drewry
82780e5c37 TBR: clean up arm
Right now, the created arm.mbr is the size of the ESP
partition. It should be truncated though to just the mbr size.

In addition, dm= doesnt do anything on arm yet so replacing use with a todo and adding a check if it isn't there.

TEST=manually ran
BUG=none
TBR=fes
2010-07-03 18:27:10 -07:00
Will Drewry
821d07cb42 build_image: fix hash perms & arm image path
This should fix the bad parsing and the failed archiving.
EMphasis on should. I'll keep monitoring.

TEST=in progress
BUG=none

Review URL: http://codereview.chromium.org/2812044
2010-07-03 17:14:58 -07:00
Will Drewry
4a675e18a0 [PATCH 5/5] build_image: refactor bootloaders and enable vboot config paths
This change adds make_image_bootable which combines the
prior changes to make ARM, x86-legacy, x86-efi, and x86-fw
share kernel commandlines (where possible) and not rely on
keeping data stored on the rootfs to do so.

It does not enable a cut over to syslinux yet, though.

TEST=manually built image and tested boot and install (in progress)
BUG=chromium-os:327

Review URL: http://codereview.chromium.org/2834038
2010-07-03 13:35:02 -05:00
Will Drewry
1ee156fd00 [PATCH 3/5] Unify efi and legacy bootloader configuration generation
This change unifies the creation of extlinux.conf,
syslinux cfgs, and grub efi files.  It shouldn't change the
existing behavior but does add support for further arguments
and future use of syslinux (once it is properly rewritten by
an installer or other script).

TEST=in progress; manual run
BUG=chromium-os:327

Review URL: http://codereview.chromium.org/2829038
2010-07-03 13:27:19 -05:00
Bill Richardson
2ace49e0a4 Generate and use .vbprivk files for signing now.
Review URL: http://codereview.chromium.org/2817047
2010-07-01 10:23:27 -07:00
Nick Sanders
f2dee6c5df Add --fast to build_image
Include checked in parallel emerge,
with an optional (default false) argument
in build_image to turn it on.

Review URL: http://codereview.chromium.org/2827037
2010-07-01 00:21:32 -07:00
Denis Romanov
110615446e Added empty ext3 filesystem initialization for OEM partner partition.
BUG=http://crosbug.com/3828
TEST=When mounted, /dev/sd8 (OEM partition) has a valid empty filesystem on it.

Review URL: http://codereview.chromium.org/2867030
2010-06-29 04:23:53 +04:00
Eric Li
5cf288fb1c Increase stateful test partition size to 1G, to accommodate autotest package pre-installation under /usr/local.
Review URL: http://codereview.chromium.org/2865018
2010-06-28 12:46:26 -07:00
David James
868d7bb6b9 Added --preserve option and logic.
Other changes:
- Added update_base_packages() method.
- Fix a get_latest_image.sh problem when the image does not already exist.
- Cleanup method invocations, and remove OUTPUT_IMG global variable.
- Add kernel testing logic back (it was accidentally deleted in an earlier patch.)

TEST=Built regular image. Updated old image to contain new packages.
BUG=none

Patch by: Don Garrett <dgarrett@chromium.org>
(Tweaked by me to address review feedback.)

Review URL: http://codereview.chromium.org/2857020
2010-06-24 21:48:14 -07:00
Tan Gao
40551cd9ca recovery installer: fix build_gpt and build_image
Change-Id: I3cbb62827a33894f47d26dd047134b6c39c6667b

Review URL: http://codereview.chromium.org/2813029
2010-06-24 16:33:32 -07:00
Mandeep Singh Baines
3dfa852743 build_image: use --usepkg instead of --usepkgonly
We want build_image to honour the configuration in PORTDIR and only use
the latest stable version as known by portage and the overlays.

We get these semantics with --usepkg. We do not get them with --usepkgonly.
The one downside is that instead of failing when you forget to run
build_packages before build_image, build_image will try to build
packages from source.

From "man emerge":

       --usepkg[=n] (-k)
              Tells emerge to use binary packages (from $PKGDIR) if they
              are available, thus possibly avoiding some  time-consuming
              compiles.   This option is useful for CD installs; you can
              export PKGDIR=/mnt/cdrom/packages and then use this option
              to have emerge "pull" binary packages from the CD in order
              to satisfy dependencies.

       --usepkgonly[=n] (-K)
              Tells emerge to only use binary packages  (from  $PKGDIR).
              All  the  binary packages must be available at the time of
              dependency  calculation  or  emerge  will  simply   abort.
              Portage  does not use $PORTDIR when calculating dependency
              information so all masking information is ignored.

Change-Id: I267dad8992ac683d0ff4db0d0c72baba61ecbccf

Review URL: http://codereview.chromium.org/2874013
2010-06-24 15:00:49 -07:00
Will Drewry
69563b7349 build_image: pull out kernel partition creation
Makes kernel partition creation standalone.  This is motivated
both by the ability to build test kernel partitions easily as well
the need to create all kernel command line configuration after the
rootfs has been completely created.

Instead of a massive overhaul, I'll do this refactor in pieces.

TEST=manually rebuilt the image
BUG=chromium-os:327

Review URL: http://codereview.chromium.org/2825021
2010-06-24 16:12:58 -05:00
Bill Richardson
8f23ff3dfe Add "gpt" to kernel parameters to ignore missing PMBR
Review URL: http://codereview.chromium.org/2799030
2010-06-23 21:41:59 -07:00
Chris Sosa
6c587b0a5b TBR: Fix build_image without reverting don's change. 2010-06-21 17:36:18 -07:00
Don Garrett
3f41e152bd Created wrapper methods for create_base_image and image updates.
update_dev_packages, and update_recovery_packages created.

Moved assorted global variables up to the top section, since they are global.

TEST=Ran build_image.
BUG=none

Review URL: http://codereview.chromium.org/2823010
2010-06-21 14:54:34 -07:00
Don Garrett
e0020b19b0 Fixed formatting in build_image $VAR -> ${VAR}.
Also remove trailing spaces, and add punctuation to comments.
TEST=Ran build_image
BUG=None

Review URL: http://codereview.chromium.org/2804012
2010-06-17 15:55:35 -07:00
Bill Richardson
25e4c18e96 Add distinct strings to kernel config files to indicate BIOS type.
This does nothing, except provide a way to determine which of the three
possible boot methods was used to boot the running image. Handy for
debugging BIOS issues on experimental and dogfood machines.

Review URL: http://codereview.chromium.org/2868010
2010-06-17 12:50:49 -07:00
Bill Richardson
6ed135883c Use new kernel-signing tools.
Review URL: http://codereview.chromium.org/2820012
2010-06-16 21:38:15 -07:00
Nick Sanders
d250927093 Add Build Timer
Review URL: http://codereview.chromium.org/2859005
2010-06-16 03:50:04 -07:00
Nick Sanders
8ab729ab98 Prototype faster build (kind of ugly)
Review URL: http://codereview.chromium.org/2724014
2010-06-16 03:15:17 -07:00
Nick Sanders
9e305dbae0 Add alternate grub setting for some systems
Review URL: http://codereview.chromium.org/2735017
2010-06-11 15:18:35 -07:00
rginda
e58b86fdcf remove dev-mode aterm related changes
aterm will be going back into every build for now, so we can revert these dev-mode only changes

BUG=chromium-os:3884
TEST=none yet

Review URL: http://codereview.chromium.org/2669004
2010-06-07 17:50:54 -07:00
Bill Richardson
3fefd2ad79 Only sign kernel for x86 for now. Leave ARM unsigned.
The signing work is being tested and developed on x86, and ARM isn't ready
to use it. Signing the ARM kernel is disruptive. We'll enable it for ARM
later.

Review URL: http://codereview.chromium.org/2599001
2010-06-03 11:03:27 -07:00
Tan Gao
a40ed448fc fix for issue 2610:
- add recovery installer config file (which invokes chromeos-install with
   --recovery flag)
 - update build_image to install recovery_installer pkg and changed base image
   name to recovery_image.bin

Review URL: http://codereview.chromium.org/2081018
2010-06-02 15:45:19 -07:00
Zelidrag Hornung
1d12c1a01d RootFS size customization params added
Review URL: http://codereview.chromium.org/2440005
2010-06-02 10:20:29 -07:00
Bill Richardson
6795622ce9 Make build_image create a bootable kernel partition.
Modify build_image to use the kernel_utility and the inline bootloader
to generate a bootable kernel partition.

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

Review URL: http://codereview.chromium.org/2377003
2010-05-28 15:38:56 -07:00
Bill Richardson
2517edabb7 TBR: davidjames 2010-05-27 22:59:41 -07:00
Bill Richardson
c86f88fc44 Start generating a bootable kernel partition as part of build_image
Modify build_image to use the create_blob utility and the inline bootloader
to generate a bootable (but still unsigned) kernel partition.

Review URL: http://codereview.chromium.org/2112013
2010-05-27 21:44:17 -07:00
Anush Elangovan
bb85f8f023 Revert "Teach build_image to pull from buildbot as necessary..."
This reverts commit 6e65e658ff51dc6f3444e8fddb17b3e2b0590661.

Review URL: http://codereview.chromium.org/2315001
2010-05-27 11:00:57 -07:00