Commit Graph

103 Commits

Author SHA1 Message Date
Michael Marineau
e19de29cda setup_board: fix fetching binary toolchain packages
Fix 98684560 which in turn tried to fix 0d29e735. This time the option
to download binary packages was lost so building from scratch worked but
not the normal usage of using binary packages. *sigh*
2014-07-22 14:11:18 -07:00
Michael Marineau
986845608a setup_board: fix compiling toolchains from scratch
Commit 0d29e735 broke this by not properly initializing the toolchain
ebuild flags when binary packages were disabled.
2014-07-20 21:32:53 -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
3d8948d91f setup_board: copy portage's repos.conf files from the chroot 2014-07-19 16:10:34 -07:00
Michael Marineau
dea299312e setup_board: remove extra pkg-config wrapper script
crossdev provides cross-pkg-config which respects $SYSROOT so we do not
need to do anything extra ourselves.
2014-07-19 11:37:03 -07:00
Michael Marineau
99ed29d218 fix(board_setup): Remove old make.conf symlinks
Just use the single auto-generated make.conf, it covers everything now.
2014-06-12 16:53:27 -07:00
Michael Marineau
bb3b7d4fcd fix(setup_board): Got lost in my own if statements :( 2014-06-10 16:00:32 -07:00
Michael Marineau
9a973e4113 fix(setup_board): Migrate packages in existing board roots. 2014-06-10 15:38:36 -04: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
09faef6d02 feat(setup_board): Generate a complete make.conf
Add settings that are currently provided by make.conf.common-target in
coreos-overlay. Most of these are better off being derived directly from
the host environment's portage configuration.

The PKGDIR, TMPDIR, and LOGDIR values are changing to be more consistant
with the SDK configuration but these changes won't take effect until the
old make.conf.common-target is removed since its values override these.
2014-06-10 14:45:56 -04:00
Michael Marineau
38fa0f92a8 Merge pull request #252 from marineam/clean
Clean out some old ChromeOS junk
2014-05-15 17:57:53 -07:00
Michael Marineau
2b2576c4ab remove(hooks): Kill off old hook that checked compile flags.
This did things like verify that things were linked with gold (which we
don't do) and other checks. We don't have a need for it kill it.
2014-05-15 15:42:02 -07:00
Michael Marineau
7d6619df8a fix(setup_board): Remove unused option to accept restrictive licenses 2014-05-13 17:42:00 -07:00
Michael Marineau
9482d5cdf4 fix(setup_board): Allow make.conf.user to be per-board
Previously this would symlink to a global make.conf.user making it
impossible to apply changes to a board but not the SDK.
2014-04-09 17:32:28 -07:00
Michael Marineau
e1ee712a16 fix(setup_board): increase load-based threshold to 2xCPUs
My laptop has idle time! This cannot stand...
2014-02-09 21:01:39 -08:00
Michael Marineau
30b72754ff fix(setup_board): Remove note about annoying eselect warning
Silenced in eselect 1.4
2014-02-09 14:48:45 -08: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
6d414d275e fix(*): remove lingering broken support for board overlays.
This is a feature from the chromeos sdk that we haven't used and doesn't
work any more. Clean it up...
2013-12-08 16:02:00 -08:00
Michael Marineau
1e7ce95508 fix(setup_board): Depend on --usepkg and --getbinpkg as a pair.
Instead of gating only on --usepkg depend on both flags as a pair. This
keeps setup_board's behavior a little closer to build_packages. The
buildbot is using --nogetbinpkg to avoid pulling in existing packages
built by the SDK but setup_board is causing some to be pulled in anyway.
2013-12-06 14:41:46 -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
9dfad070c9 fix(setup_board): Hide --getbinpkg, it isn't useful for setup_board.
A new board build root always starts with an empty package cache so if
binary packages are enabled downloading is required. The distinction can
be useful for passing to update_chroot since its cache isn't impacted so
the flag remains, just among the less used hidden ones.
2013-11-29 17:56:58 -08:00
Michael Marineau
500fe74856 fix(setup_board): Move to new toolchain_util.sh and eselect
The new toolchain utils define chost, portage profiles, and portage arch
per board. Replace the tricker logic from the old platform/dev repo and
switch to setting the profile with the standard eselect tool.

A few cleanups here and there, replacing echo with info and renames.
2013-11-07 13:28:13 -08:00
Michael Marineau
456af72625 fix(setup_board): Remove unused support for special amd64-host boards.
This was some scheme for building packages using the SDK profile instead
of the normal target board profiles. We use catalyst instead so remove
this dead code. Ordering cleaned up slightly as well.
2013-10-10 11:46:58 -07:00
Michael Marineau
29ccafbdba fix(sdk): Use coreos-devel/sdk-depends instead of hard-host-depends
coreos-devel/sdk-depends is a super-set of hard-host-depends and has a
somewhat better name.
2013-08-28 15:59:05 -07:00
Michael Marineau
ac931bd088 fix(setup_board): Install baselayout with USE=build
We need to install baselayout with the build use flag as the very first
package in the new board sysroot to ensure the system's directory
structure is created correctly. This should resolve surprise failures
with the bootengine ebuild.
2013-07-22 21:42:57 -04:00
Michael Marineau
be63f41081 fix(make.conf.user): Fix references to old make.conf.user path.
We've moved all of the chroot configs from /etc to /etc/portage but
setup_board was still symlinking to /etc. Fix the path so no one gets
mixed up by the two copies of the same file. Remove unused script that
also used to write to old location.
2013-07-22 21:42:57 -04:00
Michael Marineau
09203453dd fix(scripts): Add --load-average to MAKEOPTS
Already did this for catalyst builds but might as well do it for all.
With this competing builds on the same host should be a little
friendlier to each other.
2013-07-17 18:04:51 -07:00
Michael Marineau
e6b3c60836 cleanup(setup_board): Remove /etc/make.conf.board
This file mostly just defined BINHOSTs but I'd like to move that
completely into coreos-overlay as the SDK BINHOSTs have always been. It
also sourced src/overlays/overlay-amd64-generic/make.conf but I want to
move the few things it defined into coreos-overlay as well.

The one interesting thing this file did was to optionally define
ACCEPT_LICENSE but that can go into /etc/make.conf.board_setup instead.

Overall this takes a chunk out of the make.conf spaghetti. :)
2013-06-22 16:05:33 -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
81e546cb0b fix(setup_board): copy /etc/make.conf.host_setup from /etc/portage
this stuff lives in etc/portage. Cp from there.
2013-03-06 14:02:43 -08:00
Brandon Philips
5bfbf31423 chore(setup_board): chromeos -> coreos
Change-Id: If9bb62dacd603775ff599df28b40d92e9f762cee
2013-02-14 16:18:56 -08:00
Mike Frysinger
cf7a09344b setup_board: make sure /usr/local/bin exists
We currently rely on the fact some package happens to install into
/usr/local/bin and creates the dir for us.  If that doesn't happen,
then we fail when generating local wrappers.  So run mkdir first to
make sure everything is sane.

BUG=chromium-os:31039
TEST=`cbuildbot chromiumos-sdk` works

Change-Id: I42f9122e1a8aa7aa19a7efb17deaa6dd28e58582
Reviewed-on: https://gerrit.chromium.org/gerrit/41929
Reviewed-by: David James <davidjames@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2013-01-24 14:21:20 -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
Ryan Cui
7a40158fd7 setup_board: fix --regen_config bug.
https://gerrit.chromium.org/gerrit/#/c/38156 introduced a bug where
cross_get_version was moved to install_toolchain but was still
used in setup_board.

setup_board now saves whatever toolchain version is currently configured
and appends that information to the newly generated board config.

BUG=chromium-os:36865
TEST=remote trybot. manual - test case of existence/nonexistence of
board config file and existence/nonexistence of previous toolchain info.

Change-Id: I20e1794c12e7e60fdbbcd5a123ddc5c6bdf86b16
Reviewed-on: https://gerrit.chromium.org/gerrit/39132
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Ryan Cui <rcui@chromium.org>
Tested-by: Ryan Cui <rcui@chromium.org>
2012-12-03 17:47:37 -08:00
Mike Frysinger
33776c1cae setup_board: generalize pkg-config paths
The current logic has a few libdirs hardcoded (lib & lib64).  This fails
if the libdir is named something else (like libx32).  Tweak the pkg-config
logic so it returns all pkg-config dirs found in the target.  This won't
work if the target is multilib, but we don't have any plans to do that.

BUG=chromium-os:36866
TEST=`cbuildbot {amd64,arm,x86}-generic-full` worked

Change-Id: I1d856c86d279691e85e5794f429bd3da2eb28675
Reviewed-on: https://gerrit.chromium.org/gerrit/39050
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-12-01 17:02:22 -08:00
Ryan Cui
dbac9554aa Add install_toolchain script.
Move cross toolchain library install code out of setup_board to a
separate script, and have setup_board use it.

The install_toolchain script will be used by the builders to set up
a separate sysroot (distinct from the /build/<board> root), as part of
the Simplified Chrome Workflow (goto/simple-chrome).

BUG=chromium-os:36299
TEST=locally, trybots.

Change-Id: I88c355f1798da71ead9370a82365304dbf311504
Reviewed-on: https://gerrit.chromium.org/gerrit/38156
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Ryan Cui <rcui@chromium.org>
Tested-by: Ryan Cui <rcui@chromium.org>
2012-11-20 11:57:12 -08:00
Mike Frysinger
6c26f2dd91 setup_board: drop binutils version lookup
When we stopped installing binutils into package.provided, we stopped
needing to check its version at all.  While CL:30287 updated the file,
it left the latter in place.  Scrub it now.

BUG=chromium-os:21330
TEST=`./setup_board --board=x86-generic` setup gcc/glibc in package.provided and worked

Change-Id: I5c5d7175f17fd2d4ad5231ed3f9f5ddee592aa63
Reviewed-on: https://gerrit.chromium.org/gerrit/37517
Reviewed-by: asharif <asharif@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-11-07 14:07:13 -08:00
Mike Frysinger
1d107dc1f7 setup_board: load all hooks in one go
No need to setup these hooks in their own set of sudo commands,
so merge with the existing block to avoid another sudo.

Also install all hooks that are available in case we want to add
more in the future (we probably do).

BUG=None
TEST=`./setup_board --board=daisy --skip_chroot_upgrade --regen_configs` created install hooks

Change-Id: Idcd64afc32c81fcc2b4a712992c5ee0edf5ae0d4
Reviewed-on: https://gerrit.chromium.org/gerrit/36474
Reviewed-by: Brian Harring <ferringb@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-10-31 15:54:28 -07:00
David James
18a9c2513a Move board overlay calculation into chromite (part 3 of 5)
This CL adjusts all scripts to use cros_list_overlays from chromite
instead of cros_overlay_list.

BUG=chromium-os:35514
TEST=Trybot runs with all callers adjusted to use
     cros_list_overlays instead of cros_overlay_list.
CQ-DEPEND=CL:36191

Change-Id: I6b147a64744015f6b199b2a00493e6f1e030376b
Reviewed-on: https://gerrit.chromium.org/gerrit/36167
Tested-by: David James <davidjames@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: David James <davidjames@chromium.org>
2012-10-23 08:52:03 -07:00
Ahmad Sharif
e824585f80 setup_board: add ELF qa post_install hooks for all boards.
BUG=chromium-os:24742
TEST=./setup_board --board=$board
  emerge-$board quipper # no warnings.
  sudo binutils-config <non-gold config>
  emerge-$board quipper # gold warning.
  <edit> # Change sysroot wrapper to not pass in -fstack-protector
  emerge-$board quipper # stack warning.
  etc.

Change-Id: I94ccda99e9ac47c25ff23a7fe45774fb62447e4c
Reviewed-on: https://gerrit.chromium.org/gerrit/34151
Tested-by: asharif <asharif@chromium.org>
Reviewed-by: <jimhebert@google.com>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: asharif <asharif@chromium.org>
2012-10-05 15:21:09 -07:00
Mike Frysinger
dda30b4f70 setup_board: merge common wrapper logic
Now that all the wrapper logic is one function, we can merge some of the
sub-pieces (chown/chmod/messages) into single calls.

BUG=chromium-os:34519
TEST=`./setup_board --board=lumpy` output looked ok

Change-Id: If959b48877adfaaca121370495e15cf912deea37
Reviewed-on: https://gerrit.chromium.org/gerrit/33526
Reviewed-by: Brian Harring <ferringb@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-09-20 17:32:22 -07:00
Mike Frysinger
2f9a82df4c setup_board: add new --regen_configs option
This lets people run setup_board w/out re-installing the toolchain,
but otherwise setting up all the config files.  This is useful when
people want to make overlay changes that don't affect the settings
but do affect file layout (like when moving from private to public
overlays).

BUG=chromium-os:34519
TEST=`cbuildbot {x86,amd64,arm}-generic-full chromiumos-sdk` worked

Change-Id: I6202073a74700379fe2b705d1ff3d6148b9723ec
Reviewed-on: https://gerrit.chromium.org/gerrit/33487
Reviewed-by: Brian Harring <ferringb@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-09-20 15:57:31 -07:00
Mike Frysinger
e1d2c1f10c setup_board: use sudo_multi in more places
This gives a side speed up and a slight clean up.

While we're here, merge a few commands (like mkdirs).

BUG=chromium-os:34519
TEST=`./setup_board --board=lumpy` output looked ok
TEST=`cbuildbot {x86,amd64,arm}-generic-full chromiumos-sdk` worked

Change-Id: I8d03448e2df549e76d320cc23ab9d36242c3b118
Reviewed-on: https://gerrit.chromium.org/gerrit/33486
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
2012-09-18 15:05:06 -07:00
Mike Frysinger
70c8db6806 setup_board: move all wrapper gen code into one func
Makes the code flow easier to follow, and makes it easier to skip
wrapper generation if we so desire.

BUG=chromium-os:34519
TEST=`./setup_board --board=lumpy` output looked ok
TEST=`cbuildbot {x86,amd64,arm}-generic-full chromiumos-sdk` worked

Change-Id: Ie7a1d387fb21a495c6a2da2c9147587743240929
Reviewed-on: https://gerrit.chromium.org/gerrit/33485
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-09-18 09:38:58 -07:00
Mike Frysinger
bc09fb8974 setup_board: drop binutils from package.provided
We don't have anything pulling this into the target, so there is no reason
to list it in package.provided.  Further, this messes us up when we we do
want to install it into the target image (for debugging/etc...).

BUG=chromium-os:21330
TEST=`build_packages+build_image` for x86-alex did not install binutils
TEST=`cbuildbot {amd64,arm,x86}-generic-full` did not install binutils
TEST=`emerge-x86-alex binutils` worked

Change-Id: Ie43124a5e763e416508155ab6465a272e639905a
Reviewed-on: https://gerrit.chromium.org/gerrit/30287
Reviewed-by: asharif <asharif@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-08-18 13:57:33 -07:00
Mike Frysinger
c17a493bcc setup DEFAULT_BOARD by default
Rather than forcing all consumers of DEFAULT_BOARD to remember to call
get_default_board, just do it for them automatically.

BUG=None
TEST=`cbuildbot {arm,amd64,x86}-generic-full` works
TEST=`./build_packages --help` shows correct default

Change-Id: I8d6ccb83babb2764a50692318eb9193c45fb3b39
Reviewed-on: https://gerrit.chromium.org/gerrit/17868
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-08-14 10:17:31 -07:00
Matt Tennant
0a9d32d61b Add more commands to build stats prototype.
Make the following commands send stats to chromiumos-build-stats.appspot.com:
build_image
run_chroot_version_hooks
make_chroot
setup_board
update_chroot

BUG=chromium-os:33088
TEST=`cbuildbot --remote -p chromiumos/platform/crosutils alex-paladin`
confirm in the log that uploads succeded, and see them show up in queries
at chromiumos-build-stats.appspot.com.

Change-Id: I0280f91a3e7e0a0483c01c87072bc589003dbe95
Reviewed-on: https://gerrit.chromium.org/gerrit/28969
Tested-by: Matt Tennant <mtennant@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Matt Tennant <mtennant@chromium.org>
2012-08-03 12:22:32 -07:00
Mike Frysinger
f5a383d366 setup_board: look up sdk targets only
We don't care about non-sdk targets when setting up the host boards,
so only load those for processing.

BUG=None
TEST=`cbuildbot chromiumos-sdk` passed

Change-Id: Ifa0f82a8c9704862a714fd9f35cbd11d809e295f
Reviewed-on: https://gerrit.chromium.org/gerrit/25626
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
2012-06-19 17:11:06 -07:00