-
Notifications
You must be signed in to change notification settings - Fork 66
/
init.sh
executable file
·71 lines (64 loc) · 2.02 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
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
BASE_PATH=`pwd`
YOCTOBRANCH="scarthgap"
mkdir -p target
echo "0. Fetching LK2nd fork..."
if [ ! -d "lk2nd" ]
then
echo "--> Fetching forked lk2nd tree..."
git clone -b quectel-eg25-timer https://github.com/Biktorgj/lk2nd.git
else
echo "--> Updating lk2nd..."
cd lk2nd && \
git pull && \
cd $BASE_PATH
fi
echo "1. Fetching Yocto"
if [ ! -d "yocto" ]
then
echo "--> Cloning Yocto repository from the Yocto Project"
git clone -b $YOCTOBRANCH git://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_mdm9607.conf conf/rootfs.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_mdm9607.conf yocto/build/conf/rootfs.conf
echo " Now run 'make help' to see the available options"