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.
This commit is contained in:
Michael Marineau 2014-06-09 17:23:27 -07:00
parent 93b0ec304a
commit 09faef6d02

View File

@ -235,12 +235,33 @@ sudo_multi "${cmds[@]}"
sudo_clobber "${BOARD_SETUP}" <<EOF
# Created by setup_board
# Settings derived from the host environment
CBUILD="$(portageq envvar CHOST)"
HOSTCC="$(portageq envvar CHOST)-gcc"
PORTDIR="$(portageq envvar PORTDIR)"
PORTDIR_OVERLAY="$(portageq envvar PORTDIR_OVERLAY)"
DISTDIR="$(portageq envvar DISTDIR)"
MAKEOPTS="$(portageq envvar MAKEOPTS)"
# Board specific settings
CHOST="${BOARD_CHOST}"
ROOT="${BOARD_ROOT}/"
MAKEOPTS="--jobs=${NUM_JOBS} --load-average=$((NUM_JOBS * 2))"
PKG_CONFIG="pkg-config-${BOARD_VARIANT}"
BOARD_USE="${BOARD_VARIANT}"
PKGDIR="${BOARD_ROOT}/var/lib/portage/pkgs"
PORT_LOGDIR="${BOARD_ROOT}/var/log/portage"
PORTAGE_TMPDIR="${BOARD_ROOT}/var/tmp"
PORTAGE_BINHOST="${BOARD_BINHOST}"
# TODO(marineam): Unsure if we need to specify both the pkg-config
# env variables and a pkg-config wrapper that does the same thing...
PKG_CONFIG="pkg-config-${BOARD_VARIANT}"
PKG_CONFIG_PATH="${BOARD_ROOT}/usr/lib/pkgconfig:${BOARD_ROOT}/usr/share/pkgconfig"
PKG_CONFIG_SYSROOT_DIR="${BOARD_ROOT}"
# Generally there isn't any need to add packages to @world by default.
# You can use --select to override this.
EMERGE_DEFAULT_OPTS="--oneshot"
EOF
generate_all_wrappers