Some mod_for_test images don't have the files necessary to run
emerge. Install them.
BUG=none
TEST=Rerun package install
Review URL: http://codereview.chromium.org/3351016
Change-Id: Ib19986121a8988c6cae23527148a7b5d4a58663e
BUG=chromium-os:6577
TEST=(inside chroot) run 4 test cases from src/scripts/, using Ctrl+C to force abort (hence triggering "delete_prompt")
a.) (stdin tty) "./build_image --board=x86-generic < /dev/null", expected = no prompt and delete output dir; actual == expected
b.) (stdout tty) "./build_image --board=x86-generic > foo.txt", expected = no prompt and delete output dir; actual == expected
c.) (normal user case) "./build_image --board=x86-generic",
expected = prompt to delete output dir, if y, output dir is removed; actual == expected
d.) (normal user case) "./build_image --board=x86-generic", expected = prompt to delete output dir, if N, output dir is NOT removed; actual == expected
Review URL: http://codereview.chromium.org/3373003
Historically, we used --usepkgonly in build_image to ensure that packages
were not accidentally built during this step. Recently, build_image was
updated to use --usepkg. The benefit of using --usepkg was that it would not
install obsolete binary packages to your image. It was counter-intuitive that
--usepkgonly would install packages to your image that are not actually
installed to your board root. The disadvantage, however, of --usepkg, was that
it sometimes tried to build packages afresh using the image as your build root,
and this failed with strange errors because you're not supposed to do that.
This change fixes build_image to give useful errors by switching back to
--usepkgonly. To fix the problem where --usepkgonly installs packages that are
not installed, we first run eclean-<board> to clean all unused packages from
the board root.
This change is a big improvement because a number of people have run into
strange issues with build_image due to this problem and have had trouble
debugging them.
This change was actually written by Sean Paul, and I am shepherding his change
through for him because he doesn't have a Chromium account yet.
BUG=chromium-os:6437
TEST=
1) build_packages && build_image should still work
2) build_packages && ./cros_workon start power_manager && build_image should
fail with an error that all versions of the power manager are masked. This
happens because you started working on the power manager, but did not build
the version of the power manager you were working on before installing it.
3) Assuming you are working on the power manager, build_packages && build_image
should succeed because your cros_workon'd version of the package is built.
4) ( ./cros_workon start power_manager && build_packages &&
./cros_workon stop power_manager && build_image ) should fail with the
same error message as case 2 for similar reasons.
5) ( ./cros_workon start power_manager && build_packages &&
./cros_workon stop power_manager && build_packages && build_image )
should work because you've built your new version of the stable package.
Change-Id: Ia3858c70997bc6f0ec0b6d1bfaede8d3272a0976
Review URL: http://codereview.chromium.org/3305010
USB/SDCard boot devices typicaly don't run software updater,
and won't have success ever set. We never want to try to
fall back to the empty B partition either. The workaround
for this is to set the successful bit regardless of actual
boot success.
bug=6395
Change-Id: I67c625804203b13be9a0c626c404fa38bafb5445
Review URL: http://codereview.chromium.org/3344008
* Add dev-rec key to factory installer
* rename factory_install_shim output to be consistent with dev install shim
Change-Id: Ibf8f027edda67626af5c319b4daa164cb53ccfe7
BUG=4382
TEST=Build factory install, build dev install, build normal
Review URL: http://codereview.chromium.org/3286002
BUG=none
TEST=build_image + cut and paste image_to_vm in the output
Change-Id: I9def13a56d796c1f034c834a8429e909b45afa02
Review URL: http://codereview.chromium.org/3181038
Change-Id: I7722848872b1712b26c38ac8f163d450c5a08f6d
BUG=chromium-os:5183
TEST=manually built a dev install shim and verified it's bootable on agz device
Review URL: http://codereview.chromium.org/3158021
This change enables root filesystem integrity checking for all x86
builds by default. All mod_image_for_* work with this and the
factory_install. In addition, the BVT tests all pass running on
a dm-verity root.
[I will send a mail to the chromium-os-dev once this lands with instructions on how to build with it and how to turn it off (chromeos-setimage) on an installed machine.]
Once this is functioning, I will start migrating the build/install process over to use the UUID-based boot.
TEST=built x86-generic, mod'd for test, installed, ran suite_BuildVerify
BUG=chromium-os:5100
Review URL: http://codereview.chromium.org/3143025
Change-Id: Ib23962b7a5e034ef6aea31b4361944ba894700c6
Verified rootfs-based factory installers fail because the ROOT_SIZE_BYTES is
updated, but the information is not propagated to the boot.desc which
cros_make_image_bootable uses. The result is that mod_image_for_test
incorrectly appends the rootfs hash even though it is correctly computed.
Random note:
build_kernel_image uses dumpe2fs to compute the size, but
cros_make_image_bootable uses the supplied size. These shouldn't
diverge though the partition size should accomodate the addition of the
hashes.
TODO(wad) Add checking of sizes in cros_make_image_bootable
TEST=x86-generic build image with --enable_rootfs_verification and --factory_install; then put in a machine and it no longer spewed dm-verity hash errors and the root hash checked successfully!
BUG=chromium-os:5100
Review URL: http://codereview.chromium.org/3155025
Change-Id: I174e3661b80d83b25f3af95ff1eb77f634a7e797
Change-Id: I14cd9dc365093c0450210d7853ad5f67ffa0ddd0
BUG=chromium-os:5183
TEST=1) manually built a dev install shim and verified it's only bootable when dev switch is ON
Review URL: http://codereview.chromium.org/3153001
Adds arm_extra_bootargs to boot.desc and to cros_make_image_bootable.
TEST=tegra2 dev-board build_packages, build_image --fast worked
BUG=broken tree
Change-Id: Ifdfeda66f1eb5e5b1e618706eeba269f31fa9913
Review URL: http://codereview.chromium.org/3069031
Breaks make_image_bootable out of build_image into a separate
script. In addition, it make a helper .sh in the OUTPUT_DIR
to let make_image_bootable be re-run on an image with the same
arguments that were passed in via build_image.
This change also removes the use of the boot/ directory in
OUTPUT_DIR.
TEST=build_image verified; image_to_usb --test_image; booted l13
build_image; image_to_vm; qemu booted
build_image verified; image_to_usb; booted l13
BUG=chromium-os:5081
Review URL: http://codereview.chromium.org/3066037
Change-Id: I627d678089aa71c353347f387ad5b14063fd4e7b
build_image creates it after a successful build, and get_latest_image
can use it if it exists. Fall back to old behavior for now when there
are directories without a link.
BUG=none
TEST=Try building an image, check link. Rebuild, check new link.
Review URL: http://codereview.chromium.org/3014051
The fast build is stable enough now that we can enable it for everybody.
I ran the build constantly all weekend on two machines and I only ran into
one (rare) error, which I've fixed in a separate patch.
See <http://codereview.chromium.org/2856048/show>
TEST=Ran lots and lots of fast builds
BUG=none
Review URL: http://codereview.chromium.org/3059001
BUG=chromium-os:1888
TEST=Manual. build_image should run fine when oem_customization flag is not specified.
Review URL: http://codereview.chromium.org/3076009
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
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
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
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
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
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
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
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
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
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.
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
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
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
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
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
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
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
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