mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-29 22:42:10 +01:00
Remove --build_root from all scripts except mod_image_for_pyauto.sh.
For all scripts, --build_root defaults to /build and is never used. To remove option clutter, I've deleted this option. The only script which still references build_root in src/scripts is mod_image_for_pyauto.sh, which seems to support it for grabbing pyauto dependencies from a location other than /build/*. This might conceivably be useful, so I haven't touched that script. BUG=chromium-os:27364 TEST=Remote trybot run. git grep for references to build_root. Change-Id: I502f7df0123a598fc62a4ef4ed847ceb182f65b8 Reviewed-on: https://gerrit.chromium.org/gerrit/18283 Reviewed-by: Mike Frysinger <vapier@chromium.org> Tested-by: David James <davidjames@chromium.org> Commit-Ready: David James <davidjames@chromium.org>
This commit is contained in:
parent
855afb7561
commit
dee866c121
@ -37,8 +37,6 @@ DEFINE_boolean verbose ${FLAGS_FALSE} \
|
|||||||
DEFINE_boolean build ${FLAGS_FALSE} "Build package before installing"
|
DEFINE_boolean build ${FLAGS_FALSE} "Build package before installing"
|
||||||
DEFINE_string board "$DEFAULT_BOARD" \
|
DEFINE_string board "$DEFAULT_BOARD" \
|
||||||
"Board for which the package should be built/found"
|
"Board for which the package should be built/found"
|
||||||
DEFINE_string build_root "/build" \
|
|
||||||
"The root location for board sysroots."
|
|
||||||
|
|
||||||
FLAGS "$@" || exit 1
|
FLAGS "$@" || exit 1
|
||||||
|
|
||||||
@ -79,7 +77,7 @@ if [ ${FLAGS_build} -eq ${FLAGS_TRUE} ]; then
|
|||||||
emerge-${FLAGS_board} $@
|
emerge-${FLAGS_board} $@
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PKGROOT="${FLAGS_build_root}/${FLAGS_board}/packages"
|
PKGROOT="/build/${FLAGS_board}/packages"
|
||||||
|
|
||||||
# Temporarily clear read-only flag on / if it is set
|
# Temporarily clear read-only flag on / if it is set
|
||||||
remote_sh "grep '\S* / ' /proc/mounts | tail -1 | awk '{ print \$4 }' |
|
remote_sh "grep '\S* / ' /proc/mounts | tail -1 | awk '{ print \$4 }' |
|
||||||
|
|||||||
@ -60,8 +60,6 @@ show_help_if_requested "$@"
|
|||||||
# The following options are advanced options, only available to those willing
|
# The following options are advanced options, only available to those willing
|
||||||
# to read the source code. They are not shown in help output, since they are
|
# to read the source code. They are not shown in help output, since they are
|
||||||
# not needed for the typical developer workflow.
|
# not needed for the typical developer workflow.
|
||||||
DEFINE_string build_root "/build" \
|
|
||||||
"The root location for board sysroots."
|
|
||||||
DEFINE_integer build_attempt 1 \
|
DEFINE_integer build_attempt 1 \
|
||||||
"The build attempt for this image build."
|
"The build attempt for this image build."
|
||||||
DEFINE_integer jobs -1 \
|
DEFINE_integer jobs -1 \
|
||||||
|
|||||||
@ -8,7 +8,7 @@ if [ -z "${FLAGS_board}" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
BOARD="${FLAGS_board}"
|
BOARD="${FLAGS_board}"
|
||||||
BOARD_ROOT="${FLAGS_build_root}/${BOARD}"
|
BOARD_ROOT="/build/${BOARD}"
|
||||||
|
|
||||||
# What cross-build are we targeting?
|
# What cross-build are we targeting?
|
||||||
. "${BOARD_ROOT}/etc/make.conf.board_setup"
|
. "${BOARD_ROOT}/etc/make.conf.board_setup"
|
||||||
|
|||||||
@ -720,7 +720,7 @@ function reinterpret_path_for_chroot() {
|
|||||||
|
|
||||||
function emerge_custom_kernel() {
|
function emerge_custom_kernel() {
|
||||||
local install_root="$1"
|
local install_root="$1"
|
||||||
local root=${FLAGS_build_root}/${FLAGS_board}
|
local root=/build/${FLAGS_board}
|
||||||
local tmp_pkgdir=${root}/custom-packages
|
local tmp_pkgdir=${root}/custom-packages
|
||||||
|
|
||||||
# Clean up any leftover state in custom directories.
|
# Clean up any leftover state in custom directories.
|
||||||
|
|||||||
@ -67,8 +67,6 @@ DEFINE_boolean test_image "${FLAGS_FALSE}" \
|
|||||||
DEFINE_string image_name "" \
|
DEFINE_string image_name "" \
|
||||||
"image base name (auto-select if empty)" \
|
"image base name (auto-select if empty)" \
|
||||||
i
|
i
|
||||||
DEFINE_string build_root "/build" \
|
|
||||||
"root location for board sysroots"
|
|
||||||
DEFINE_boolean install ${FLAGS_FALSE} \
|
DEFINE_boolean install ${FLAGS_FALSE} \
|
||||||
"install to the USB/MMC device"
|
"install to the USB/MMC device"
|
||||||
DEFINE_string arch "" \
|
DEFINE_string arch "" \
|
||||||
@ -367,7 +365,7 @@ if [ -b "${FLAGS_to}" ]; then
|
|||||||
die "Installation must be done from inside the chroot"
|
die "Installation must be done from inside the chroot"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"${FLAGS_build_root}/${FLAGS_board}/usr/sbin/chromeos-install" \
|
"/build/${FLAGS_board}/usr/sbin/chromeos-install" \
|
||||||
--yes \
|
--yes \
|
||||||
--skip_src_removable \
|
--skip_src_removable \
|
||||||
--skip_dst_removable \
|
--skip_dst_removable \
|
||||||
|
|||||||
@ -26,8 +26,6 @@ DEFINE_string image "" "Location of the rootfs raw image file" i
|
|||||||
DEFINE_integer jobs -1 \
|
DEFINE_integer jobs -1 \
|
||||||
"How many packages to build in parallel at maximum." j
|
"How many packages to build in parallel at maximum." j
|
||||||
DEFINE_boolean yes $FLAGS_FALSE "Answer yes to all prompts" y
|
DEFINE_boolean yes $FLAGS_FALSE "Answer yes to all prompts" y
|
||||||
DEFINE_string build_root "/build" \
|
|
||||||
"The root location for board sysroots."
|
|
||||||
DEFINE_boolean fast $DEFAULT_FAST "Call many emerges in parallel"
|
DEFINE_boolean fast $DEFAULT_FAST "Call many emerges in parallel"
|
||||||
DEFINE_boolean inplace $FLAGS_TRUE \
|
DEFINE_boolean inplace $FLAGS_TRUE \
|
||||||
"Modify/overwrite the image $CHROMEOS_IMAGE_NAME in place. \
|
"Modify/overwrite the image $CHROMEOS_IMAGE_NAME in place. \
|
||||||
|
|||||||
@ -33,8 +33,6 @@ show_help_if_requested "$@"
|
|||||||
# The following options are advanced options, only available to those willing
|
# The following options are advanced options, only available to those willing
|
||||||
# to read the source code. They are not shown in help output, since they are
|
# to read the source code. They are not shown in help output, since they are
|
||||||
# not needed for the typical developer workflow.
|
# not needed for the typical developer workflow.
|
||||||
DEFINE_string build_root "/build" \
|
|
||||||
"The root location for board sysroots."
|
|
||||||
DEFINE_string board_overlay "" \
|
DEFINE_string board_overlay "" \
|
||||||
"Location of the board overlay."
|
"Location of the board overlay."
|
||||||
DEFINE_string binutils_version "2.21-r4" \
|
DEFINE_string binutils_version "2.21-r4" \
|
||||||
@ -525,7 +523,7 @@ case "$BOARD" in
|
|||||||
HOST_BOARD=false
|
HOST_BOARD=false
|
||||||
esac
|
esac
|
||||||
# Locations we will need
|
# Locations we will need
|
||||||
BOARD_ROOT="${FLAGS_build_root}/${BOARD_VARIANT}"
|
BOARD_ROOT="/build/${BOARD_VARIANT}"
|
||||||
CROSSDEV_OVERLAY="/usr/local/portage/crossdev"
|
CROSSDEV_OVERLAY="/usr/local/portage/crossdev"
|
||||||
CHROMIUMOS_OVERLAY="/usr/local/portage/chromiumos"
|
CHROMIUMOS_OVERLAY="/usr/local/portage/chromiumos"
|
||||||
CHROMIUMOS_CONFIG="${CHROMIUMOS_OVERLAY}/chromeos/config"
|
CHROMIUMOS_CONFIG="${CHROMIUMOS_OVERLAY}/chromeos/config"
|
||||||
@ -661,7 +659,6 @@ sudo ln -sf /etc/make.conf.user "${BOARD_ROOT}/etc/make.conf.user"
|
|||||||
# cros_choose_profile manually.
|
# cros_choose_profile manually.
|
||||||
if ! cros_choose_profile \
|
if ! cros_choose_profile \
|
||||||
--board "${FLAGS_board}" \
|
--board "${FLAGS_board}" \
|
||||||
--build_root "${FLAGS_build_root}" \
|
|
||||||
--board_overlay "${FLAGS_board_overlay}" \
|
--board_overlay "${FLAGS_board_overlay}" \
|
||||||
--variant "${FLAGS_variant}" \
|
--variant "${FLAGS_variant}" \
|
||||||
--profile "${FLAGS_profile}"; then
|
--profile "${FLAGS_profile}"; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user