3 # Copyright 2013, Intel Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; version 2 of the License.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU Library General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 #author: Ronan Le Martret ronan@fridu.net
22 GIT_CLONE="${GIT_CMD} clone"
23 GIT_FETCH="${GIT_CMD} fetch --all"
24 GIT_PULL="${GIT_CMD} pull"
25 GIT_RESET="${GIT_CMD} reset --hard"
26 GIT_CO="${GIT_CMD} checkout"
29 #Change TOPDIR to your working directory.
31 YOCTO_DOWNLOAD=${TOPDIR}/download
33 # The base project is pocky from "git://git.yoctoproject.org/poky" but for developpement needs, we fork the project on a private server.
34 POCKY_DIR=${TOPDIR}/yocto-Tizen-Generic
35 YOCTO_OPEN_TIZEN_GIT=git://git.yoctoproject.org/poky
36 YOCTO_OPEN_TIZEN_BRANCH=master
39 #set build name and directory
42 if [ ! -z ${CHECKOUTTIZEN} ]; then
43 BUILDIR=${BUILDIR}_tizen
46 BUILDPATH=${POCKY_DIR}/${BUILDIR}
48 # We also need to include Intel BSP
49 META_INTEL_DIR=${POCKY_DIR}/meta-intel
50 META_INTEL_GIT=git://git.yoctoproject.org/meta-intel
51 META_INTEL_BRANCH=master
54 # We need extra meta from openembedded
55 META_OPENEMBEDDED_DIR=${POCKY_DIR}/meta-openembedded
56 META_OPENEMBEDDED_GIT=git://git.openembedded.org/meta-openembedded
57 META_OPENEMBEDDED_BRANCH=master
58 META_OPENEMBEDDED_SHA=
60 # We need extra meta from meta-pure-wayland
61 META_PURE_WAYLAND_DIR=${POCKY_DIR}/meta-pure-wayland
62 META_PURE_WAYLAND_BRANCH=master
63 META_PURE_WAYLAND_SHA=
65 # For the project Tizen on
66 YOCTOTIZEN_DIR=${TOPDIR}/yoctoTizen
67 YOCTOTIZEN_GIT=git@github.com:eurogiciel-oss/yoctoTizen.git
68 YOCTOTIZEN_BRANCH=devel
71 function checkout_project
73 echo _________________________________________________________________________
80 echo start to update directory : ${INSTALL_DIR}
81 echo from project : ${GIT_SRC}
82 echo branch : ${GIT_BRANCH}
86 if [ -d ${INSTALL_DIR}/.git ]; then
89 ${GIT_CO} ${GIT_BRANCH}
91 echo fetch and checkout OK
93 echo fetch and checkout FAILED
96 if [ -d ${INSTALL_DIR} ] ; then
99 ${GIT_CLONE} ${GIT_SRC} -b ${GIT_BRANCH} ${INSTALL_DIR}
103 echo ${GIT_CLONE} FAILED
107 if [ ! -z ${GIT_SHA} ] ; then
108 ${GIT_RESET} ${GIT_SHA}
112 echo ${GIT_RESET} FAILED
118 function add_meta_to_bblayers
123 echo add \"${META_DIR}\" to file ${BBLAYER_FILE}.
125 if grep -q "${META_DIR} " "${BBLAYER_FILE}"; then
126 echo ${META_DIR} is already present in ${BBLAYER_FILE}.
128 sed -i -e '/meta-yocto-bsp/a \ '${META_DIR}' \\' ${BBLAYER_FILE}
132 function change_conf_default_value
138 echo into file ${CONF_FILE}
139 echo ' change value' \"${DEFAULT_VALUE}\" by \"${OUR_VALUE}\"
141 if grep -q "${OUR_VALUE}" ${CONF_FILE} ;then
142 echo \"${OUR_VALUE}\" is set in ${CONF_FILE}.
144 sed -i -e "s,${DEFAULT_VALUE},${OUR_VALUE},g" ${CONF_FILE}
153 echo add ${OUR_VALUE} to ${CONF_FILE}
154 if grep -q "${OUR_VALUE}" ${CONF_FILE} ; then
155 echo is already add ${OUR_VALUE}
158 echo ${OUR_VALUE} >> ${CONF_FILE}
163 function print_end_update
166 echo _________________________________________________________________________
170 echo '... project Tizen Generic in directory '${BUILDPATH}' is ready for work'
172 echo ' # cd '${POCKY_DIR}
173 echo ' # source ./oe-init-build-env '${BUILDIR}
174 echo ' # bitbake -k '${IMAGE_DST}
176 echo 'After image build:'
177 echo ' # sudo dd if='${BUILDPATH}'/tmp/deploy/images/chiefriver/'${IMAGE_DST}'-chiefriver.hddimg of=/dev/sdX'
178 echo ' ( /dev/sdX is your usb devise \"ls -l /dev/sd*\" ).'
179 echo 'Warning: Before the first use read the file:'
180 echo ' # less '${YOCTOTIZEN_DIR}'/README'
182 echo _________________________________________________________________________