-
Notifications
You must be signed in to change notification settings - Fork 4
/
configure
executable file
·107 lines (82 loc) · 2.58 KB
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#! /usr/bin/env bash
#
# This file is part of Xvisor Build Environment.
# Copyright (C) 2015 Institut de Recherche Technologique SystemX
# Copyright (C) 2015 OpenWide
# All rights reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this Xvisor Build Environment. If not, see
# <http://www.gnu.org/licenses/>.
#
# @file configure
#
# The called program name, i.e. configure with its path
PROGNAME="$0"
# Directory where the configure script is
which realpath &>/dev/null
if [ $? -ne 0 ]; then
CURDIR="$(dirname "${PROGNAME}")"
else
CURDIR="$(realpath "$(dirname "${PROGNAME}")")"
fi
# Script directory
SCRIPTDIR=${CURDIR}/scripts
# Make file directory
MAKEDIR="${CURDIR}"/make
# Test directory
TESTDIR="${CURDIR}"/test
# Configuration file directory
CONFDIR="${CURDIR}"/conf
# Patch file directory
PATCHDIR="${CURDIR}"/patches
# Build directory, used by this script to write the resulting configuration
# (the next variable)
BUILDDIR="${CURDIR}"/build
# Temporary file directory
TMPDIR=/tmp/xvisor_env-"$(date "+%Y%m%d-%H%M%S")"
# Downloaded archive directory
ARCDIR="${BUILDDIR}"/archives
# Build stamp directory
STAMPDIR="${BUILDDIR}"/stamps
# The target built rootfs
TARGETDIR="${BUILDDIR}"/target
# The host build directory
HOSTDIR="${BUILDDIR}"/host
# The host build directory
TFTPDIR=/srv/tftp
# The resulting configuration
CONF=${BUILDDIR}/.env_config
# Does the board require busybox, enabled by default
BOARD_BUSYBOX=1
# Does the board will run under Qemu, disabled by default
BOARD_QEMU=0
# Verbosity option, that can be modify through the program arguments
VERBOSE=0
# What git should use in its remote (fallback)
GIT_BASE_REMOTE="https://github.com/JimmyDurandWesolowski"
# Option functions used in this script
source "${SCRIPTDIR}"/options.sh
source "${SCRIPTDIR}"/package.sh
source "${SCRIPTDIR}"/config.sh
pre_option_check
option_parse "$@"
config_check_git
option_board_validate
option_board
packages_check
if [ -e "local.conf" ]; then
printf "You have a local.conf file so we source it, but use it at your own risk!!\n"
source local.conf
fi
config_write