summaryrefslogtreecommitdiff
path: root/init_yocto_env
blob: fef79d3952257492e01e52d90dee55d5d9d86957 (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
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
#!/bin/bash

# this script can be used as a base to init the whole Yocto environment for Tizen
# instructions:
# - create a yocto base dir 
# - copy this script in the yocto dir
# - uncomment the exit below
# - execute this script

echo "Edit the script and remove this line"; exit 0

cd $(dirname $0)

TOPDIR=$(pwd -P)

mkdir -p $TOPDIR/downloads
mkdir -p $TOPDIR/sstate-cache

sudo zypper ar http://download.opensuse.org/repositories/Archiving/openSUSE_12.2/Archiving.repo
sudo zypper in git make gcc gcc-c++ patch diffstat makeinfo chrpath python-curses unp

if ! grep "Host review.tizen.org" ~/.ssh/config; then
    cat <<EOF >>~/.ssh/config

# added automatically by $0
Host review.tizen.org
    Hostname review.tizen.org
    IdentityFile ~/.ssh/id_rsa
    User $USER
    Port 29418
EOF
    echo "Please adjust parameters in ~/.ssh/config"
    xdg-open ~/.ssh/config
fi

if [ ! -d tizen ]; then
    git clone yocto:/home/yoctotizen/yocto/yoctoTizen tizen
fi

if [ ! -d oe-core ]; then
    git clone git://git.openembedded.org/openembedded-core oe-core
fi

cd oe-core

if [ ! -d bitbake ]; then
    git clone git://git.openembedded.org/bitbake
fi

ln -s ../tizen/meta-tizen-ivi .

. ../tizen/yoctorc

yinit

cp -v ../meta-tizen-ivi/conf/bblayers.conf.sample conf/bblayers.conf
cp -v ../meta-tizen-ivi/conf/local.conf.sample conf/local.conf

echo "Yocto init Done"

echo "Now you can run bitbake. For example, bitbake -p"