Commit Graph

72 Commits

Author SHA1 Message Date
David Michael
f91198ca0e build_packages: also build all torcx images by default
The idea is that once the installed board packages have changed,
the sysroot that was used to build any existing torcx packages may
no longer be compatible.  It will therefore run build_torcx_store,
passing relevant options to it, to build a new torcx store of
images with the current sysroot.

This adds --skip_torcx_store to use the previous behavior.
2017-06-02 14:22:53 -07:00
Michael Marineau
aed5e0d526 build_packages: fix @preserved-rebuild
When the --usepkgonly flag was added in d327840ce this step got wrapped
in an inverted test. It should normally be enabled.
2016-07-13 22:55:19 -07:00
Michael Marineau
9ab853a668 build_image: remove eclean, run in build_packages instead
Allows the binary package cache to be preserved when using build_image
without a fully populated board root.
2016-02-20 14:11:41 -08:00
Michael Marineau
9b00ea5495 *: disable reinstalling rebuilt binaries with --usepkgonly
When --usepkgonly is mixed with the right update flags it will
re-install any binary packages that have a newer build. Since the full
set of SDK and board packages are rebuilt quite often this leads to
excessive reinstalling.
2016-02-04 11:50:36 -08:00
Michael Marineau
d327840ce8 *: add --usepkgonly flag to avoid building from source 2016-02-03 18:29:16 -08:00
Michael Marineau
81ee5389c0 build_packages: accept package names as an argument 2016-02-03 18:29:16 -08:00
Michael Marineau
a42ffcddbb build_packages: include all flags in usage message 2016-02-03 17:37:38 -08:00
Michael Marineau
bf104d415e build_packages: remove old --reuse_pkgs_from_local_boards flag
Removed from setup_board in ancient times e6b3c608.
2016-02-03 17:30:10 -08:00
Michael Marineau
10a7864ff0 build_packages: flip weird inverted boolean flag
Use `--workon` and `--noworkon` instead of `--nonoworkon` and `--noworkon`
2016-02-03 17:26:24 -08:00
Michael Marineau
602412fd2a build_packages: remove unused --accept_licenses
This flag was dropped from setup_board way back in commit 7d6619df8.
2016-02-03 17:23:20 -08:00
Geoff Levand
57c129acfd setup_board: Call setup_qemu_static
setup_qemu_static only needs to be called once, and can
be done early so that it is available.  Move the call
of setup_qemu_static from build_packages to setup_board.

Signed-off-by: Geoff Levand <geoff@infradead.org>
2015-11-19 15:08:00 -08:00
Andrej Rosano
acea447ccd build_packages: Fix ramdisk creation for non-native arches
Chrooting in the target non-native arch rootfs is required
for update-bootengine to be run correctly.

Signed-off-by: Andrej Rosano <andrej@inversepath.com>
2015-09-16 12:41:23 +02:00
Michael Marineau
f5970d877c build_packages: reduce the noise that --depclean generates 2015-08-04 14:46:09 -07:00
Michael Marineau
e881b270db update_chroot/build_packages: remove obsolete packages
Before attempting to do @preserved-rebuild to fix linked against old
libraries remove any packages that no longer have corresponding ebuilds,
making them impossible to rebuild. This uses `--depclean`'s secondary
meaning: `--unmerge` but only remove packages without dependencies.
2015-07-24 14:38:09 -07:00
Michael Marineau
9d4d888429 update_chroot/build_packages: trigger @preserved-rebuild
Rebuilds packages that are linked against old libraries that have been
upgraded or removed from the system. Skipping this can lead to shared
library checks looking ok in the build root but then built images have
broken library dependencies.
2015-07-12 15:48:21 -07:00
Michael Marineau
28c3c3def3 build_packages: be less aggressive about rebuilding packages
The --rebuild-if-unbuilt emerge option will recompile packages if any
build-time dependencies changed. This can be a useful safety to make
sure applications get re-linked and so forth. However recent versions of
portage have grown better defaults for choosing when to rebuild so lets
turn the build_packages flag around and leave emerge to do its default
behavior and see if that is sufficiently safe.
2015-07-08 13:45:18 -07:00
Michael Marineau
9db6ac5ef7 build_image: make building selinux policy optional 2015-07-01 23:11:09 -07:00
Michael Marineau
22e3c116cc build_packages: always rebuild when breaking dependency cycles
Previously we attempted to speed up the first build of a board by
pulling in binary packages regardless of their use flags, assuming that
if the package was already built the loop would not be an issue. Usually
this was true but not always. Now things like util-linux will always get
compiled when setting up a board for the first time but at least it
won't be as likely to fail.
2015-06-25 14:15:35 -07:00
Geoff Levand
dcc9a2b97d build_packages: Update help for CoreOS
Signed-off-by: Geoff Levand <geoff@infradead.org>
2015-04-09 09:42:26 -07:00
Michael Marineau
03411ad4d8 build_packages: add support breaking loops with multiple use flags
Sorry, this is just getting bad. We need to switch to initializing the
board root stage3 style, similar to how the SDK or most any
semi-complicated Gentoo install starts. Breaking loops while merging
into a clean root is just too complicated.

On what this does: util-linux now has a udev *and* a systemd use flag.
Since we use systemd they both are effectively the same and pull in the
systemd package. This adds support for disabling both flags during the
loop breaking procedure.
2015-03-18 11:59:25 -07:00
Michael Marineau
a518dc8df1 build_package: fix loop between two loop breaking steps
If util-linux has a binary package it will be used, but if that binary
package has +udev it will pull in systemd. systemd has a loop that needs
to be broken too so if the util-linux loop breaker doesn't also handle
the systemd one it all falls apart.

In short the comment above the loop breaker code noting that we can try
this until it gets wonky. Well, it is wonky and we need to re-do how
build_packages works as a result. This is just a temporary workaround
until we figure out a larger restructuring.
2014-07-22 14:49:52 -07:00
Michael Marineau
07cb281d6a build_image: install the complete system package set in dev images
dev images, now with fancy tools like `make`!
2014-07-19 17:29:05 -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
097196a6af build_packages: break dependency loop between util-linux and systemd.
This is required to enable the udev use flag.
2014-07-19 15:07:00 -07:00
Michael Marineau
55896af9c1 build_packages: break dependency loop when cryptsetup is enabled 2014-07-01 16:59:54 -07:00
Michael Marineau
691c588c75 fix(build_packages): Simplify emerge command, use board-packages ebuild.
The extra "dependency check" doesn't appear to be all that useful, so
don't waste time on it. Remove some unused command line options for
selecting which packages to build. Use new board-packages ebuild which
currently just includes 'coreos' and 'coreos-dev' but later can include
extra things like 'python-oem' which doesn't land in the base image.
2014-03-27 22:37:28 -07:00
Michael Marineau
7a43a07fef feat(setup_board): Configure binary package sources on the fly.
Generate list of board binhosts based on the new $COREOS_DOWNLOAD_ROOT
variable and optionally use packages only from a specific version
2014-02-09 14:24:01 -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
37267cfce4 fix(setup_board): Install board build root toolchains via emerge! 2013-11-29 18:19:15 -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
078ec6cf0d fix(build_packages): Don't redirect emerge output.
The stats upload has been removed so there is no longer a need to
capture the emerge output to parse the logged output. Remove a bit of
dead chromeos logic too.
2013-11-07 13:28:13 -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
8ee5f00137 fix(common.sh): Stop collecting stats and uploading them to Google.
Just... no.. in so many ways. Kinda dumb it took me this long to delete
this little chunk of rather annoying code.
2013-10-23 11:39:08 -07:00
Michael Marineau
207cc2f6a3 cleanup(*): Remove unused/broken test and factory images 2013-09-19 19:04:54 -04:00
Michael Marineau
34bbdc1996 fix(build_packages): Move gsutil code from build_packages to a library.
To avoid making the same gsutil changes in more scripts move the code to
a library file where some of the basic parts can be shared.
2013-07-05 23:54:23 -04:00
Michael Marineau
4bcee421ad fix(build_packages): Fix check for .boto, argument name was wrong. 2013-07-05 17:49:38 -04:00
Michael Marineau
6aaaf3b846 feat(build_packages): Add --upload option to build_packages
Defaults to upload for official builds and not otherwise.
2013-07-03 20:10:16 -04:00
Michael Marineau
be2bdaaecf fix(build_packages): Remove unnecessary version info export.
Nothing in build_packages references the variables from
coreos_version.sh and nothing in our ebuilds depends on it being in the
environments so just remove it.
2013-07-02 15:39:31 -04:00
Michael Marineau
19a993be96 fix(scripts): Add --nogetbinpkg command line option
As-is all of the various emerge wrapping scripts default to using
--getbinpkg whenever --usepkg is enabled. This means every single emerge
command made makes multiple synchronous HTTP requests to the upstream
binary package repository to get the latest package list. This gets
really frustrating when working remotely with limited network
connectivity. Using --usepkg with --nogetbinpkg will use locally cached
packages without making remote requests.
2013-06-18 14:49:59 -04:00
Brandon Philips
4fa2b2b365 fix(build_packages): Fully comment out the packages
Change-Id: I8f9466b3a90374fe72181996803401e01d501ed5
2013-02-15 07:03:58 -08:00
Brandon Philips
12302b05e2 fix(build_packages): renames of chromeos->coreos
Change-Id: I0187f90aae97ba1060639aeee60c32288e7c47ad
2013-02-14 16:18:57 -08:00
Brandon Philips
56fd29c640 chore(build_packages): use coreos not chromiumos
Change-Id: I2efe4b0c93ca9044aaa284c5c81d62db3e9f1b46
2013-02-14 16:18:56 -08:00
Anush Elangovan
87933c73cf Remove chromeos-[dev|test]-init deps
Now that chromeos-dev-init and chromeos-test-init are explicitly
specified in chromeos-dev and chromeos-test remove the hardcoding
in build_packages

BUG=None
TEST=build and run on daisy and trybots on a variety of x86/arm
paladin/full builders
CQ-DEPEND=CL:Iaceab4dbc2c215ba899d17e78c6c22e60c0802c8

Change-Id: I3064117ecf5bbafbc0f340f46cc07d4f6c959559
Reviewed-on: https://gerrit.chromium.org/gerrit/41943
Reviewed-by: David James <davidjames@chromium.org>
Commit-Queue: Anush Elangovan <anush@chromium.org>
Tested-by: Anush Elangovan <anush@chromium.org>
2013-01-24 13:58:22 -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
Ryan Cui
eb4595f1e8 setup_board: add --accept_license flag.
Setting the flag will cause make.conf to set the ACCEPT_LICENSE
environment variable.

BUG=chromium-os:37312
TEST=remote trybots

Change-Id: Id478b7cfb8c37d363da46b1d74f33143e8ea159f
Reviewed-on: https://gerrit.chromium.org/gerrit/39801
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-12-19 12:15:59 -08:00
Brian Harring
3d01db2603 Fix minor style issue.
This was identified in CL:39304, but not corrected before landing.

BUG=None
TEST=bash -n build_packages

Change-Id: I17cefc883e191d33a3569d7f53ab2e0a85417da9
Reviewed-on: https://gerrit.chromium.org/gerrit/39753
Commit-Ready: Brian Harring <ferringb@chromium.org>
Reviewed-by: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
2012-12-15 21:33:02 -08:00
Brian Harring
17c1fe8073 build_packages: Add --fetch-only pass through to parallel-emerge.
BUG=None
TEST=./build_packages --fetch-only, verify it just fetches.

Change-Id: I290ef23f13446c912724aa37b8c79269a9db6cc0
Reviewed-on: https://gerrit.chromium.org/gerrit/39304
Commit-Ready: Brian Harring <ferringb@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
2012-12-05 21:56:24 -08:00
David James
ab9ca21ba0 build_packages should update all packages for dependency checks.
Currently, build_packages has a typo that causes it to only include "chromeos"
in dependency checks. This means that if a package outside of chromeos needs
to be updated in order to fix a conflict, build_packages will refuse to do that
and break. This caused a build break on keybuk's machine.

BUG=none
TEST=Try it on keybuk's machine and verify build_packages works again.
TEST=Remote trybot run.

Change-Id: I1acca0be47152ba93c30ba07c0bf643650906199
Reviewed-on: https://gerrit.chromium.org/gerrit/37452
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
Tested-by: David James <davidjames@chromium.org>
2012-11-06 12:40:37 -08:00
Chris Sosa
0538571ce1 Deprecate for_test upstart jobs by building and installing test/dev init pkgs.
We also remove some dead mod_for_test scripts.

BUG=chromium-os:9729, chromium-os:14091
TEST=build_packages, build_image dev test
CQ-DEPEND=If58678ab4fe7abd9142a619850be07249d159781

Change-Id: Iff6a143dbf8ce58878dc1b07629c52bbb7f02ded
Reviewed-on: https://gerrit.chromium.org/gerrit/32998
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
Commit-Ready: Chris Sosa <sosa@chromium.org>
2012-09-18 11:10:29 -07:00