forked from nilan59/wr-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init-intel-apollolake-env
executable file
·193 lines (171 loc) · 6.53 KB
/
init-intel-apollolake-env
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
#!/bin/sh
# Copyright (C) 2006-2011 Linux Foundation
#
# 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 program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
if [ -n "$BASH_SOURCE" ]; then
OEROOT="`dirname $BASH_SOURCE`/layers/oe-core"
elif [ -n "$ZSH_NAME" ]; then
OEROOT="`dirname $0`/layers/oe-core"
else
OEROOT="`pwd`/layers/oe-core"
fi
if [ -n "$BBSERVER" ]; then
unset BBSERVER
fi
if [ -n "$BBSERVER" ]; then
unset BBSERVER
fi
# Figure out the "TOP" relative to TOP/layers/oe-core
THIS_SCRIPT=`dirname $OEROOT`
THIS_SCRIPT=$THIS_SCRIPT/init-intel-apollolake-env
if [ -z "$ZSH_NAME" ] && [ "$0" = "$THIS_SCRIPT" -o "$0" = init-intel-x86-env ]; then
echo "Error: This script needs to be sourced. Please run as '. $THIS_SCRIPT'"
exit 1
fi
OEROOT=`readlink -f "$OEROOT"`
export OEROOT
TEMPLATECONF=$OEROOT/../../.template-conf
export TEMPLATECONF
S_ARGS="$@"
if [ "$S_ARGS" = "" ] ; then
S_ARGS=build-intel-apollolake
fi
unset CONFIG_UPDATED
. $OEROOT/scripts/oe-buildenv-internal "$S_ARGS" $OEROOT/../bitbake && \
$OEROOT/scripts/oe-setup-builddir && \
[ -n "$BUILDDIR" ] && cd $BUILDDIR
if [ $? = 0 ] ; then
if [ ! -e .configured ] ; then
CONFIG_UPDATED=1
CUSTOM_LAYERS=""
# Add custom layers if they exist
if [ -d $OEROOT/../../../custom-layers ] ; then
for e in `ls $OEROOT/../../../custom-layers/*/conf/layer.conf $OEROOT/../../../custom-layers/*/*/conf/layer.conf $OEROOT/../../../custom-layers/*/*/*/conf/layer.conf 2> /dev/null`; do
cust_layer="${e%/conf/layer.conf}"
CUSTOM_LAYERS="$CUSTOM_LAYERS ${cust_layer#$OEROOT/../}"
done
fi
perl -p -i -e 's#BBLAYERS \?=#BBLAYERS =#' conf/bblayers.conf
for e in $CUSTOM_LAYERS wrlabs-integration \
meta-secure-env \
meta-measured \
wr-kernel \
meta-intel \
intel-apollolake \
meta-gateway \
wr-base \
wr-fixes \
wr-tools-debug \
wr-hac-agent \
pulsar \
meta-overc/meta-cube \
meta-cloud-services \
meta-browser \
meta-security \
meta-openembedded/meta-initramfs \
meta-openembedded/meta-filesystems \
meta-openembedded/meta-networking \
meta-openembedded/meta-multimedia \
meta-openembedded/meta-gnome \
meta-openembedded/meta-oe \
meta-openembedded/meta-python \
meta-openembedded/meta-perl \
meta-openembedded/meta-webserver \
meta-openembedded/meta-xfce \
external-binaries \
meta-virtualization \
meta-dpdk \
oe-meta-go ; do
if [ -e $OEROOT/../$e ] ; then
perl -p -i -e "s#^(.*)oe-core/meta(.*)#\$1oe-core/meta\$2\n\$1$e \\\\#" conf/bblayers.conf
fi
done
perl -p -i -e 's#^(.*)oe-core/meta(.*)#$1wrlinux \\\n$1oe-core/meta$2#' conf/bblayers.conf
cat<<EOF>>conf/local.conf
MACHINE = "intel-corei7-64"
# Set wide compatibility with core2 processors
DEFAULTTUNE = "core2-64"
COMPATIBLE_MACHINE_intel-corei7-64 = "${MACHINE}"
# Set default machine to select in the hob interface
HOB_MACHINE = "intel-corei7-64"
DEFAULT_IMAGE = "wrlinux-image-glibc-small"
LINUX_KERNEL_TYPE = "standard"
PREFERRED_PROVIDER_virtual/kernel_intel-corei7-64 = "linux-yocto"
KTYPE_ENABLED = "standard"
PACKAGE_CLASSES = "package_rpm"
# Activate systemd
VIRTUAL-RUNTIME_init_manager = " systemd "
VIRTUAL-RUNTIME_syslog = "sysklogd"
DISTRO_FEATURES_append = " systemd x11 opengl"
DISTRO_FEATURES_BACKFILL_CONSIDERED += " sysvinit "
KERNEL_FEATURES_append = " cfg/systemd.scc"
BSP_SUBTYPE = "apollolake"
USER_CLASSES = "buildstats buildstats-summary"
IMAGE_FSTYPES += "tar.bz2"
NOISO = "1"
IMAGE_FSTYPES += "ext3"
IMAGE_FSTYPES += "live"
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
EXTRA_IMAGEDEPENDS += "\${@base_contains('INCOMPATIBLE_LICENSE', 'GPLv3', '', 'grub-efi', d)}"
SERIAL_CONSOLES_intel-corei7-64 = "\${@bb.utils.contains('BSP_SUBTYPE', 'apollolake', '115200;ttyS2', '115200;ttyS0', d)}"
SERIAL_CONSOLES_CHECK_intel-corei7-64 = "\${@bb.utils.contains('BSP_SUBTYPE', 'apollolake', 'ttyS2', 'ttyS0', d)}"
## Included feature templates
require $OEROOT/../wr-kernel/templates/default/template.conf
require $OEROOT/../wr-base/templates/default/template.conf
require $OEROOT/../meta-secure-env/templates/default/template.conf
require $OEROOT/../meta-secure-env/templates/feature/mok-secure-boot/template.conf
require $OEROOT/../meta-secure-env/templates/feature/tpm2/template.conf
require $OEROOT/../intel-apollolake/templates/default/template.conf
require $OEROOT/../meta-gateway/templates/default/template.conf
require $OEROOT/../wrlabs-integration/templates/default/template.conf
EOF
# Process any custom content overrides
if [ -f $OEROOT/../../../default/template.conf ] ; then
echo "require $OEROOT/../../../default/template.conf" >> conf/local.conf
fi
cat<<EOF>>conf/local.conf
# Kernel overrides
INHERIT += "blacklist"
PNBLACKLIST[linux-windriver] = "Recipe not buildable without local kernel git"
PNBLACKLIST[linux-windriver-dummy] = "Recipe not buildable without local kernel git"
# Unblacklist the YP kernel
PNBLACKLIST[linux-yocto] = ""
PNBLACKLIST[linux-yocto-rt] = ""
PNBLACKLIST[linux-yocto-tiny] = ""
SRC_URI_pn-kern-tools-native = "git://git.yoctoproject.org/yocto-kernel-tools.git"
# EXTRA_BBMASK may be appended in a layer or template
BBMASK = "/(NO_MATCH/\${EXTRA_BBMASK})"
PREFERRED_VERSION_linux-yocto = "4.1%"
PREFERRED_VERSION_linux-yocto-rt = "4.1%"
DL_DIR = "\${TOPDIR}/../downloads"
SSTATE_DIR = "\${TOPDIR}/../sstate-cache"
PULSAR_UNATTENDED_UPGRADE = "true"
PNWHITELIST_LAYERS_forcevariable = ""
PREMIRRORS_append := "\\
http://.*/.* file://${OEROOT}/../../premirrors8/ \n \\
https://.*/.* file://${OEROOT}/../../premirrors8/ \n \\
hg://.*/.* file://${OEROOT}/../../premirrors8/ \n \\
git://.*/.* file://${OEROOT}/../../premirrors8/ \n \\
"
EOF
touch .configured
fi
fi
unset OEROOT
unset BBPATH
unset THIS_SCRIPT
unset S_ARGS
unset TEMPLATECONF