update readme, add tmp workaround.
[scm/bb/meta-tizen.git] / README.md
1 Create a Tizen Common x86_64 image with Yocto
2 =============================================
3
4 Target: Haswell CPU
5
6 # Create your working directory
7
8 Create a working directory (for example "~/yocto"):
9
10         mkdir ~/yocto
11         cd ~/yocto
12
13 Create a download directory (optional). It will act as a common download
14 directory amongst projects:
15
16         mkdir ~/downloads
17
18 # Download sources
19
20 Downlaod Poky:
21
22         git clone git://git.yoctoproject.org/poky
23
24 Download Intel layers:
25
26         git clone git://git.yoctoproject.org/meta-intel
27
28 Download openembedded layers:
29
30         git clone git://git.openembedded.org/meta-openembedded
31
32 Download tizen layer:
33
34         git@github.com:eurogiciel-oss/meta-tizen.git
35
36 # Configuration
37
38 Configure the environment:
39
40         cd poky
41         . ./oe-init-build-env
42
43 # Configuration files
44
45 ## conf/bblayer.conf
46
47 This file contains the list of the layers in which poky has to search
48 for the recipes.
49
50         # LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
51         # changes incompatibly
52         LCONF_VERSION = "6"
53
54         BBPATH = "${TOPDIR}"
55         BBFILES ?= ""
56
57         BBLAYERS ?= " \
58           /home/user/yocto/poky/meta \
59           /home/user/yocto/poky/meta-yocto \
60           /home/user/yocto/poky/meta-yocto-bsp \
61           /home/user/yocto/meta-intel \
62           /home/user/yocto/meta-intel/meta-isg/meta-haswell-wc \
63           /home/user/yocto/meta-openembedded/meta-efl \
64           /home/user/yocto/meta-openembedded/meta-oe \
65           /home/user/yocto/meta-openembedded/meta-multimedia \
66           /home/user/yocto/meta-openembedded/meta-ruby \
67           /home/user/yocto/meta-openembedded/meta-systemd \
68           /home/user/yocto/meta-tizen \
69           "
70
71 ## conf/local.conf
72
73 Most of default values can be kept. The one that needs to be changed is:
74
75         MACHINE ?= "qemux86-64:wq
76         :wq"
77
78 Other useful option to set:
79
80 Download directory:
81
82         DL_DIR ?= "${HOME}/yocto/downloads"
83
84 Setting the download directory DL_DIR to a directory shared amongst
85 projects prevents common data from being downloaded for each project.
86
87 Terminal emulator:
88
89         OE_TERMINAL = "screen"
90
91 The terminal emulator you want to use.
92
93 Example of a complete configuration file (without comments):
94
95         BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
96         PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}"
97         MACHINE ?= "genericx86-64"
98         DL_DIR ?= "${HOME}/yocto/downloads"
99         BB_GENERATE_MIRROR_TARBALLS = "1"
100         DISTRO ?= "poky"
101         PACKAGE_CLASSES ?= "package_rpm"
102         EXTRA_IMAGE_FEATURES = "debug-tweaks"
103         USER_CLASSES ?= "buildstats image-mklibs image-prelink"
104         OE_TERMINAL = "screen"
105         PATCHRESOLVE = "noop"
106         BB_DISKMON_DIRS = "\
107                 STOPTASKS,${TMPDIR},1G,100K \
108                 STOPTASKS,${DL_DIR},1G,100K \
109                 STOPTASKS,${SSTATE_DIR},1G,100K \
110                 ABORT,${TMPDIR},100M,1K \
111                 ABORT,${DL_DIR},100M,1K \
112                 ABORT,${SSTATE_DIR},100M,1K"
113                 PACKAGECONFIG_pn-qemu-native = "sdl"
114                 ASSUME_PROVIDED += "libsdl-native"
115         CONF_VERSION = "1"
116
117 1) Unfortunately we have to copy some files to the meta directory
118 #ls -1 classes/
119     image.bbclass
120     rootfs_rpm.bbclass
121 #ls -1 lib/oe/
122 package_manager.py
123 smack.py
124
125 This should be temporary and will be removed as soon as possible.
126
127 # cp classes/* ${POCKY_PATH}/meta/classes/
128 # cp lib/oe/* ${POCKY_PATH}/lib/oe/
129
130 # Build the Tizen Common image
131
132         bitbake tizen-common-core-image-minimal
133
134 Two useful options are:
135
136 'k' "Continue as much as possible after an error. While the target that
137     failed and anything depending on it cannot be built, as much as
138     possible will be built before stopping."
139
140 'v' "Output more log message data to the terminal."
141
142 Which gives:
143         1) bitbake -kv tizen-common-core-image-minimal
144         2) runqemu qemux86-64 tizen-common-core-image-minimal bootparams="S"
145         3) /etc/smack/init_attr
146 The generate image can be found in tmp/deploy/images/qemux86-64/