forked from ubinux/yocto-ubinux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_ubinux.sh
executable file
·46 lines (39 loc) · 998 Bytes
/
setup_ubinux.sh
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
#!/bin/sh
if [ "x$0" = "x./setup_ubinux.sh" ] ; then
echo "Error: This script needs to be sourced. "
echo "Please run as '. ./setup_ubinux.sh <machine> <build>'"
exit 1
fi
if [ $# -ne 2 ] ; then
echo "usage: $0 <machine> <build>"
exit 1
fi
MACHINE=$1
BUILD=$2
export TEMPLATECONF="meta-ubinux/conf"
#. trunk/poky-ubinux/oe-init-build-env ${BUILD}
. ./oe-init-build-env ${BUILD}
DOWNLOADS=$(readlink -f $2)/downloads/downloads-ubinux202007
add_conf_append ()
{
cat << EOF >> conf/local.conf
MACHINE = "${MACHINE}"
#BB_NUMBER_THREADS = "4"
#PARALLEL_MAKE = "-j 8"
SOURCE_MIRROR_URL ?= "file://${DOWNLOADS}"
INHERIT += "own-mirrors"
BB_GENERATE_MIRROR_TARBALLS = "1"
DL_DIR ?= "${DOWNLOADS}"
EOF
}
if [ -f $BUILDDIR/conf/local.conf ]; then
have_set=`grep '^MACHINE =' ${BUILDDIR}/conf/local.conf |tail -n 1 |awk '{print $3}'`
if [ "x$have_set" != "x\"$MACHINE\"" ]; then
add_conf_append
fi
else
add_conf_append
fi
#bitbake ubinux-all
#bitbake meta-toolchain
#bitbake package-index