mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 14:41:31 +02:00
commit
0b052bc756
@ -12,4 +12,4 @@ BOARD_ROOT="/build/${BOARD}"
|
|||||||
ARCH=$(get_board_arch ${BOARD})
|
ARCH=$(get_board_arch ${BOARD})
|
||||||
|
|
||||||
# What cross-build are we targeting?
|
# What cross-build are we targeting?
|
||||||
. "${BOARD_ROOT}/etc/make.conf.board_setup"
|
. "${BOARD_ROOT}/etc/portage/make.conf"
|
||||||
|
32
setup_board
32
setup_board
@ -187,7 +187,6 @@ esac
|
|||||||
COREOS_CONFIG="/usr/local/portage/coreos/coreos/config"
|
COREOS_CONFIG="/usr/local/portage/coreos/coreos/config"
|
||||||
BOARD_ROOT="/build/${BOARD_VARIANT}"
|
BOARD_ROOT="/build/${BOARD_VARIANT}"
|
||||||
BOARD_ETC="${BOARD_ROOT}/etc"
|
BOARD_ETC="${BOARD_ROOT}/etc"
|
||||||
BOARD_SETUP="${BOARD_ETC}/make.conf.board_setup"
|
|
||||||
BOARD_PROFILE="${BOARD_ETC}/portage/profile"
|
BOARD_PROFILE="${BOARD_ETC}/portage/profile"
|
||||||
BOARD_ARCH=$(get_board_arch "$BOARD")
|
BOARD_ARCH=$(get_board_arch "$BOARD")
|
||||||
BOARD_CHOST=$(get_board_chost ${BOARD})
|
BOARD_CHOST=$(get_board_chost ${BOARD})
|
||||||
@ -232,25 +231,19 @@ if [[ ! -L "${BOARD_ROOT}/packages" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
info "Configuring portage in ${BOARD_ROOT}"
|
info "Configuring portage in ${BOARD_ROOT}"
|
||||||
cmds=(
|
sudo mkdir -p "${BOARD_PROFILE}"
|
||||||
"mkdir -p '${BOARD_ROOT}' '${BOARD_PROFILE}'"
|
sudo ROOT="${BOARD_ROOT}" eselect profile set --force "${PORTAGE_PROFILE}"
|
||||||
"ROOT='${BOARD_ROOT}' eselect profile set --force '${PORTAGE_PROFILE}'"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Setup the make.confs. We use the following:
|
# Cleanup/migrate from older make.conf files
|
||||||
# make.conf <- Overall target make.conf [arm, x86, etc. version]
|
sudo rm -f "${BOARD_ETC}/make.conf" "${BOARD_ETC}/make.conf.common"
|
||||||
# make.conf.board_setup <- Declares CHOST, ROOT, etc.
|
if [[ -f "${BOARD_ETC}/make.conf.user" ]]; then
|
||||||
# make.conf.common <- Common settings across all targets
|
sudo mv "${BOARD_ETC}/make.conf.user" \
|
||||||
cmds+=(
|
"${BOARD_ETC}/portage/make.conf.user"
|
||||||
"ln -sf '${COREOS_CONFIG}/make.conf.${BOARD_ARCH}-target' \
|
else
|
||||||
'${BOARD_ETC}/make.conf'"
|
sudo touch "${BOARD_ETC}/portage/make.conf.user"
|
||||||
"ln -sf '${COREOS_CONFIG}/make.conf.common-target' \
|
fi
|
||||||
'${BOARD_ETC}/make.conf.common'"
|
|
||||||
"touch '${BOARD_ROOT}/etc/make.conf.user'"
|
|
||||||
)
|
|
||||||
sudo_multi "${cmds[@]}"
|
|
||||||
|
|
||||||
sudo_clobber "${BOARD_SETUP}" <<EOF
|
sudo_clobber "${BOARD_ETC}/portage/make.conf" <<EOF
|
||||||
# Created by setup_board
|
# Created by setup_board
|
||||||
|
|
||||||
# Settings derived from the host environment
|
# Settings derived from the host environment
|
||||||
@ -279,6 +272,9 @@ PKG_CONFIG_SYSROOT_DIR="${BOARD_ROOT}"
|
|||||||
# Generally there isn't any need to add packages to @world by default.
|
# Generally there isn't any need to add packages to @world by default.
|
||||||
# You can use --select to override this.
|
# You can use --select to override this.
|
||||||
EMERGE_DEFAULT_OPTS="--oneshot"
|
EMERGE_DEFAULT_OPTS="--oneshot"
|
||||||
|
|
||||||
|
# Allow the user to override or define additional settings.
|
||||||
|
source "${BOARD_ETC}/portage/make.conf.user"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
generate_all_wrappers
|
generate_all_wrappers
|
||||||
|
@ -54,10 +54,10 @@ COREOS_CONFIG="${COREOS_OVERLAY}/coreos/config"
|
|||||||
|
|
||||||
info "Setting up portage..."
|
info "Setting up portage..."
|
||||||
sudo mkdir -p "/etc/portage/repos.conf/"
|
sudo mkdir -p "/etc/portage/repos.conf/"
|
||||||
sudo ln -sf "${COREOS_CONFIG}/make.conf.amd64-host" "/etc/portage/make.conf"
|
sudo rm -f "/etc/portage/make.conf"
|
||||||
sudo touch "/etc/portage/make.conf.user"
|
sudo touch "/etc/portage/make.conf.user"
|
||||||
|
|
||||||
sudo_clobber "/etc/portage/make.conf.host_setup" <<EOF
|
sudo_clobber "/etc/portage/make.conf" <<EOF
|
||||||
# Created by update_chroot
|
# Created by update_chroot
|
||||||
PORTDIR="${PORTAGE_STABLE_OVERLAY}"
|
PORTDIR="${PORTAGE_STABLE_OVERLAY}"
|
||||||
PORTDIR_OVERLAY="${CROSSDEV_OVERLAY} ${COREOS_OVERLAY}"
|
PORTDIR_OVERLAY="${CROSSDEV_OVERLAY} ${COREOS_OVERLAY}"
|
||||||
@ -70,6 +70,9 @@ MAKEOPTS="--jobs=${NUM_JOBS} --load-average=$((NUM_JOBS * 2))"
|
|||||||
# Generally there isn't any need to add packages to @world by default.
|
# Generally there isn't any need to add packages to @world by default.
|
||||||
# You can use --select to override this.
|
# You can use --select to override this.
|
||||||
EMERGE_DEFAULT_OPTS="--oneshot"
|
EMERGE_DEFAULT_OPTS="--oneshot"
|
||||||
|
|
||||||
|
# Allow the user to override or define additional settings.
|
||||||
|
source "/etc/portage/make.conf.user"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
sudo_clobber "/etc/portage/repos.conf/coreos.conf" <<EOF
|
sudo_clobber "/etc/portage/repos.conf/coreos.conf" <<EOF
|
||||||
|
Loading…
x
Reference in New Issue
Block a user