Commit Graph

2152 Commits

Author SHA1 Message Date
Paul Stewart
bd2871a43a Fix duplicate sever-port bug
cros_copy_upgrade_server had a bug where it would always start servers
on port 8081 regrdless of whether that port was free.  This was a bug
in the "get next free port" code.

BUG=chromium-os:4776
TEST=Reran multiple instances at once, run netstat -nlt

Review URL: http://codereview.chromium.org/2975006
2010-07-13 07:59:15 -07:00
Tan Gao
8ae113bb42 remove handling of kernel verification block from recovery image
Change-Id: I749dc652651fdb02b49b290863e2fa9adc6b904e

Review URL: http://codereview.chromium.org/2948005
2010-07-13 07:04:48 -07:00
David James
dc07fb27e4 Teach parallel_emerge to uninstall packages.
Currently, parallel_emerge doesn't know how to handle uninstall actions, so it
actually installs packages when it should be uninstalling them. This patch
fixes that.

TEST=sudo ./parallel_emerge -uDNv hard-host-depends, and make sure it
     uninstalls nih-dbus-tool, which is blocked by hard-host-depends
BUG=none

Review URL: http://codereview.chromium.org/2990001
2010-07-13 00:33:20 -07:00
David James
b9ad46e9f7 Update parallel_emerge to support --workon.
Packages specified as workon packages are always built from source.
Dependencies of workon packages are also built from source.

Dependencies are calculated with --selective=n so that workon packages will be included in the install list. Packages that are not being worked on and are being unnecessarily replaced because of --selective=n are filtered out later.

This patch also fixes a bug with world file updating -- previously the world file was never updated because the packages were getting removed by RemoveInstalledPackages. We now keep the appropriate world file updates, and instead update SanitizeTree to handle world file updates without trouble.

I also optimized the cycle cracking algorithm so that it only visits each node once. This seems to improve run time significantly on graphs that have cycles.

TEST=Ran ./parallel_emerge -uDNvpg --board=x86-generic chromeos --workon=chromeos-chrome &&
         ./parallel_emerge -uDNvpg --board=x86-generic chromeos --workon=libcros &&
         ./parallel_emerge -uDNvpg world --workon=libxml2 &&
         ./parallel_emerge -uDNv -p world hard-host-depends --workon='bcel'
BUG=none

Review URL: http://codereview.chromium.org/2959006
2010-07-12 23:44:10 -07:00
Zelidrag Hornung
42ca818d3b fixed vm scripts
Review URL: http://codereview.chromium.org/2973005
2010-07-12 18:08:44 -07:00
David McMahon
464ae31739 Created branch 0.7.54.B. Update CHROMEOS_VERSION_BRANCH=55
Change-Id: Ib8374af3729a2660e28a78df1ee9b93d0556e7e9
2010-07-12 16:15:05 -07:00
Zdenek Behan
a5959f5c14 cros_workon: allow unmasking packages for the host
modified:   cros_workon

Review URL: http://codereview.chromium.org/2945010
2010-07-12 15:40:49 -07:00
Tan Gao
ffbe06d6d1 remove update_engine flag from start_devserver
Change-Id: Ie54dcad3e12b51272f05dbb5f2de5bfb994c6f90

Review URL: http://codereview.chromium.org/2897011
2010-07-12 15:22:53 -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
Gaurav Shah
561be04e50 Add a script to re-sign Chrome OS images with keys of our choosing.
Currently the output of build_image signs the kernel partition with the recovery keys on the final image. This script allows us to replace the kernel vblock and resign the kernel with the right set of keys (for example, using the normal boot path kernel keys, or the keys for factory install, etc.)

BUG=4623
TEST=Tested by running the script on one of the latest builbot images (801) and resigning with test kernel keys. The resulting image was dd-ed off to an SSD and was succesfully able to boot on one of our dev systems with our custom firmware with both dev mode and recovery mode turned off.

To test (can do outside chroot):

1) Download the latest image from the buildbot (I used build 801)
2) Run script with the following arguments and paths adjusted below

resign_image
 --from /path/to/chromiumos_image.bin \
 --datakey /path/to/vboot_reference/tests/devkeys/kernel_data_key.vbprivk \
 --keyblock /path/to/vboot_reference/tests/devkeys/kernel.keyblock \
 --vsubkey /path/to/vboot_reference/tests/devkeys/kernel_subkey.vbpubk \
 --vbutil_dir /path/to/vbutil/binaries
 --to image.out

This re-signs the image with the normal test keys (instead of recovery as done by build_image)

3) Copy the image to an SSD drive

dd if=image.out of=/dev/ssd [replace with the correct device]

4) Boot with the latest custom firmware in normal mode (recovery and dev mode turned off).
5) Profit!

Review URL: http://codereview.chromium.org/2938004
2010-07-09 18:33:39 -07:00
Zdenek Behan
9a8f3998f0 cros_workon: also create unmask
* This fixes the issue, where cros-workon packages have a package.mask set
to prevent upstream ebuilds from rolling in. In general, it brings out the
cavalry for unmasking the live package in every possible way.

Review URL: http://codereview.chromium.org/2934007
2010-07-09 18:08:46 -07:00
Chris Masone
3adf3f71e9 replace test -n ... && clauses with proper ifs
The version of this using test -n syntax didn't work in my chroot.

Review URL: http://codereview.chromium.org/2951007
2010-07-09 16:44:18 -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
Mandeep Singh Baines
f9acd8e3d3 get_svn_repos.sh: remove repos that are no longer needed
This change removes svn repos which have had their ebuild modified
to use the subversion eclass. This repos have already been removed
from the DEPS file.

Change-Id: I290d0bc6e401511abb7d637d83fe2d6961851aa9

Review URL: http://codereview.chromium.org/2899013
2010-07-09 13:27:14 -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
Ken Mixter
10b62483ec Use hard host depends emerged breakpad binaries
BUG=3437

Review URL: http://codereview.chromium.org/2873037
2010-07-09 12:55:47 -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
Chris Sosa
54d8baacc0 Make generate_test_reports a symlink to the py file so it can be imported.
TEST=Ran archive_build with --official-build and test_mod set.

Review URL: http://codereview.chromium.org/2951003
2010-07-09 10:46:53 -07:00
Olof Johansson
2e1f24ba3e parallel_emerge: print total time and load in status output
TEST=run build_packages/build_image
BUG=none

Review URL: http://codereview.chromium.org/2946003
2010-07-09 12:20:32 -05:00
Rahul Chaturvedi
b5643e8bf6 Final set of VM scripts - integrated with changes from Zelidrag to create a test image if specified.
Integrated comments from http://codereview.chromium.org/2604001/show
[the git repository that commit was on was deleted and replaced, hence this new commit]

Review URL: http://codereview.chromium.org/2803015
2010-07-09 10:46:05 +05:30
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
David James
37f50a00e6 Print status every 30 seconds so that buildbot doesn't kill us.
TEST=Ran CHROME_ORIGIN=SERVER_SOURCE ./parallel_emerge chromeos-chrome
BUG=none

Review URL: http://codereview.chromium.org/2924008
2010-07-08 21:14:03 -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
David James
9b20ce4cb0 Cleanup parallel_emerge a bit.
- Add support for --jobs flag.
- Add support for --depclean with no arguments.
- Cleanup comments.
- Print out error details the first time a package fails.

TEST=Ran full build_packages --fast
BUG=none

Review URL: http://codereview.chromium.org/2853031
2010-07-08 17:51:42 -07:00
Ken Mixter
26b6408e5b Support non-default board use case
Review URL: http://codereview.chromium.org/2955002
2010-07-08 17:28:38 -07:00
Tan Gao
eb6914ed3c TBR: wad@chromium.org
Change-Id: I9521241704d8c41b3a81f921f54bcb284ac581fb
2010-07-08 15:47:45 -07:00
Darin Petkov
16ca07c92e Use PKG_INSTALL_MASK to prevent debug symbols from getting into the binpkg.
The mask is set only if it's not set already. Also, it picks up the default
install mask from common.sh.

BUG=none
TEST=gmerged chromeos-chrome with PKG_INSTALL_MASK set/unset.

Review URL: http://codereview.chromium.org/2907005
2010-07-08 15:17:01 -07:00
Antoine Labour
a166ca1dc0 add cros_deps_diff tool that creates dependency graph diffs
This is useful to understand why packages may be different between say, x86 and arm.
Use cros_extract_deps to extract the dependency graph for each, then:
cros_deps_diff -o path/to/output x86-generic.deps arm-generic.deps

Review URL: http://codereview.chromium.org/2870042
2010-07-08 14:52:37 -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
David McMahon
edf039490e Use --official_build boolean.
Review URL: http://codereview.chromium.org/2843051
2010-07-07 12:48:36 -07:00
Nick Sanders
1e53c94ac9 remove autotests in case they come back
Review URL: http://codereview.chromium.org/2819039
2010-07-07 12:42:17 -07: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
ce2caf47e4 TBR: fix up arm portion of update_bootloaders
Removed two errant locals in the arm section

TEST=manual build_image on tegra1-dev-board
BUG=none
TBR=fes
2010-07-03 19:09:09 -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
d3c938b85d [PATCH 4/5] update_bootloaders.sh, create_esp.sh: add two helpers
Adds two helpers that are not used yet.  They will be
used in the next CL to unify the bootloaders in use
in build_image.

TEST=used in the next CL but otherwise not called.
BUG=chromium-os:327

Review URL: http://codereview.chromium.org/2829039
2010-07-03 13:32:26 -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
Will Drewry
bcbf1c4484 [PATCH 2/5] build_kernel_image: add verified boot support
Adds rootfs image hashing to the build.  If it is hashed
even if the default boot device is not dm-0, the baseline
rootfs integrity information will be included (though
device setup will fail in the logs during boot).

TEST=manually ran without enabling vboot support.
BUG=chromium-os:327

Review URL: http://codereview.chromium.org/2808043
2010-07-03 10:23:30 -05:00
Will Drewry
fb48fa3500 TBR: mount_gpt_image: fix missing guard for esp
Missing check during mkdir causes failure with -e empty.

The tree broke prior to this commit, but this will break the dev
build so bypassing hooks. sorry.

TEST=reran build_image
BUG=none
TBR=adlr
2010-07-02 16:35:27 -05:00
Will Drewry
61f39fb266 [PATCH 1/5] mount_gpt_image: mount the esp image
Adds support for mounting the esp image.
In the future, all legacy boot loaders will live on
the ESP partition (#12) to avoid modifying the rootfs
partition with bootloader changes in the configuration or
preamble.  This is needed.

TEST=manually reran mount_gpt_image.sh users.
BUG=chromium-os:327

Review URL: http://codereview.chromium.org/2811042
2010-07-02 16:15:22 -05:00
Tan Gao
f5a61e900c add boolean flag to start_devserver to support requests from update_engine
Change-Id: Iaea128d9626ff93ec600d3a2b878885a2efefb28

Review URL: http://codereview.chromium.org/2817049
2010-07-02 13:53:17 -07:00
David James
a27ae994b5 Robustify package upgrades and dependency checking.
- Unmerge appropriate packages during upgrades and downgrades.
- Calculate time spent in dependency generation to the tenth of a second.
- Only track dependencies of packages that are actually being installed.
- Ignore PDEPEND, as it has no impact on dependency ordering.
- Only break dependency chains that go against Portage's install order.
- Rename Failed -> Retrying.
- Print emerge command lines as they are run.

TEST=Emerged hard-host-depends and ran build_packages with parallel_emerge
BUG=none

Review URL: http://codereview.chromium.org/2886010
2010-07-01 20:52:59 -07:00