2023-02-19 01:02:03 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# project_config
|
|
|
|
# -
|
|
|
|
# This file sets some globals for the make project as well as for the
|
|
|
|
# rest of the build process components. It is assumed to be in the root
|
|
|
|
# of the project directory.
|
|
|
|
|
|
|
|
# set all vars to export automatically
|
|
|
|
set -a
|
|
|
|
|
2023-02-19 07:39:41 +00:00
|
|
|
echo "Loading project_config.sh...."
|
|
|
|
|
2023-02-19 01:02:03 +00:00
|
|
|
#
|
|
|
|
## Shared Variables
|
|
|
|
#
|
|
|
|
|
|
|
|
# this is where the directory for foster is located. serves as the
|
|
|
|
# parent directory for most other directories
|
|
|
|
project_root="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))"
|
2023-02-25 20:50:02 +00:00
|
|
|
|
2023-02-19 01:02:03 +00:00
|
|
|
# the project files for the make system that is used to orchestrate the
|
|
|
|
# build steps
|
|
|
|
dir_make=${project_root}/make.project
|
|
|
|
|
|
|
|
# the stage directory. this contains the mutable directory where
|
|
|
|
# artifacts are created, as well as the directories which store
|
|
|
|
# configuration for cacheable items (like source code packages, patches,
|
|
|
|
# et al.)
|
|
|
|
dir_stage=${project_root}/stage
|
|
|
|
|
|
|
|
# local tools (rex is installed here)
|
|
|
|
dir_localtools=${dir_stage}/local
|
|
|
|
|
|
|
|
# the mutable directory. Anything created by the build process should
|
|
|
|
# go here to prevent a myriad of issues.
|
|
|
|
dir_artifacts=${dir_stage}/artifacts
|
|
|
|
|
|
|
|
# path for the logs
|
2023-02-19 01:55:42 +00:00
|
|
|
dir_logs=${project_root}/logs
|
2023-05-28 09:05:28 +00:00
|
|
|
LOGS_ROOT="$dir_logs"
|
2023-02-19 01:02:03 +00:00
|
|
|
# config directory - general path for configuration files on the target
|
|
|
|
# system before they're placed, as well as various values for configure
|
|
|
|
# of the build
|
2023-02-21 05:02:49 +00:00
|
|
|
dir_configs=${project_root}/configs
|
2023-02-19 01:02:03 +00:00
|
|
|
|
|
|
|
# the patches directory. this contains all the patches we use during
|
|
|
|
# the foster build
|
|
|
|
dir_patches=${dir_stage}/patches
|
|
|
|
|
|
|
|
# sources dir. this path is the directory for where the sources go that
|
|
|
|
# get compiled for the initial chroot/sysroot
|
|
|
|
dir_sources=${dir_stage}/sources
|
|
|
|
|
|
|
|
# the rex project directory contains all the componennts used by the rex
|
|
|
|
# utility when it takes over compilation
|
|
|
|
dir_rex=${project_root}/rex.project
|
|
|
|
|
|
|
|
# the sysroot being created
|
|
|
|
dir_sysroot=${dir_artifacts}/T_SYSROOT
|
|
|
|
|
2024-02-07 07:00:50 +00:00
|
|
|
# set this manually because rex runs as root for its setgid/setuid
|
|
|
|
build_user="bagira"
|
|
|
|
build_group="bagira"
|
2023-02-19 01:02:03 +00:00
|
|
|
|
|
|
|
# if we're being supplied parameters we assume it's being called by make
|
|
|
|
# and need to recall make with all appropriate vars set
|
|
|
|
if [ -n "$1" ]; then
|
|
|
|
# The first argument is set, call back into make.
|
|
|
|
$1 $2
|
|
|
|
fi
|
|
|
|
|
|
|
|
# EOF
|
2023-05-26 16:34:19 +00:00
|
|
|
COLORTERM="truecolor"
|