summaryrefslogtreecommitdiff
path: root/buildconf/export
blob: ec943e65daa3fa39f5feb50fa9f60ec35588d46d (plain)
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
#!/bin/sh
ECHO=$(env which echo)
BUILDDIR="../../build"
FIRST_TIME=0
cd layers/openembedded-core
if [ ! -f ${BUILDDIR}/conf/local.conf ]; then
	FIRST_TIME=1
fi

. ./oe-init-build-env ${BUILDDIR}

echo ""
echo "Toradex targets are:"
echo "    console-tdx-image"
echo "    other (unsupported) targets may be found in"
echo "    meta-toradex-demos/recipes-images/images/"

if [ $FIRST_TIME -eq 1 ]; then
	mkdir -p conf
	cp ../layers/meta-toradex-distro/buildconf/*.conf conf/

	if grep -q "meta-toradex-bsp-common" ../.repo/manifest.xml && \
	   ! grep -q "meta-toradex-bsp-common.git.*upstream" ../.repo/manifest.xml || \
	   grep -qE "(integration.xml|next.xml)" ../.repo/manifest.xml
	then
		{
			echo "# This is needed when building on integration. With use-head-next you"
			echo "# always get the newest kernel. Without use-head-next your build may fail."
			echo "MACHINEOVERRIDES =. \"use-head-next:\""
			echo ""
		} > conf/local.conf.new

		cat conf/local.conf >> conf/local.conf.new
		mv conf/local.conf.new conf/local.conf
	fi

	echo ""
	$ECHO -e "\033[1mA sample conf/local.conf file has been created"
	$ECHO -e "Check and edit the file to adapt to your local needs\033[0m"
	echo "The following likely need your attention:"
	echo "DL_DIR"
fi