forked from the-modem-distro/pinephone_modem_sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.sh
executable file
·59 lines (53 loc) · 1.72 KB
/
init.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
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
BASE_PATH=`pwd`
YOCTOBRANCH="kirkstone"
mkdir -p target
echo "1. Fetching Yocto"
if [ ! -d "yocto" ]
then
echo "--> Cloning Yocto repository from the Yocto Project"
git clone -b $YOCTOBRANCH git:https://git.yoctoproject.org/poky yocto
else
echo "--> Updating yocto..."
cd yocto && \
git pull && \
cd $BASE_PATH
fi
echo "2. Get meta-qcom layer"
if [ ! -d "yocto/meta-qcom" ]
then
echo "--> Cloning meta-qcom repository"
git clone -b $YOCTOBRANCH https://github.com/Biktorgj/meta-qcom.git yocto/meta-qcom
else
echo "--> Updating meta-qcom layer..."
cd yocto/meta-qcom && \
git pull && \
cd $BASE_PATH
fi
echo "3. Get meta-openembedded layer"
if [ ! -d "yocto/meta-openembedded" ]
then
echo "--> Cloning meta-openembedded repository"
git clone -b $YOCTOBRANCH https://github.com/openembedded/meta-openembedded.git yocto/meta-openembedded
else
echo "--> Updating meta-openembedded layer..."
cd yocto/meta-openembedded && \
git pull && \
cd $BASE_PATH
fi
echo "4. Setting up yocto initial configuration. Build path will be "$BASE_PATH/yocto/build
cd $BASE_PATH/yocto
if [ ! -d "build" ]
then
echo "Initializing poky and copying the configuration file"
source $BASE_PATH/yocto/oe-init-build-env $BASE_PATH/yocto/build && \
cp ../../tools/config/poky/rootfs.conf conf/ && \
bitbake-layers add-layer ../meta-qcom && \
bitbake-layers add-layer ../meta-openembedded/meta-oe && \
bitbake-layers add-layer ../meta-openembedded/meta-python && \
bitbake-layers add-layer ../meta-openembedded/meta-networking
fi
cd $BASE_PATH
mkdir -p yocto/build/conf
cp tools/config/poky/rootfs.conf yocto/build/conf/
echo " Now run 'make help' to see the available options"