オープンソース・ソフトウェアの開発とダウンロード

Subversion リポジトリの参照

Contents of /tags/htdocs/1.8-old/meego-x86.html.en

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6362 - (show annotations) (download)
Sun Nov 23 14:01:12 2014 UTC (9 years, 5 months ago) by kumaneko
File size: 15716 byte(s)


1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html lang="en-US">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
5 <meta http-equiv="Content-Style-Type" content="text/css">
6 <title>TOMOYO Linux Install manual</title>
7 <link rel="stylesheet" href="http://tomoyo.sourceforge.jp/tomoyo.css" media="all" type="text/css">
8 </head>
9 <body>
10 <p style="text-align:right;"><a href="meego-x86.html.ja">Japanese Page</a></p>
11 <p style="text-align:right;">Last modified: $Date$</p>
12
13 <h1>TOMOYO Linux on MeeGo 1.1</h1>
14
15 <p>This page describes how to run TOMOYO Linux on <a href="http://meego.com/">MeeGo</a>.</p>
16
17 <hr>
18
19 <ul>
20 <li><a href="#step_1">Step 1: Setting up environment for emulator</a></li>
21 <li><a href="#step_2">Step 2: Compiling kernel and tools</a></li>
22 <li><a href="#step_3">Step 3: Initializing TOMOYO Linux</a></li>
23 <li><a href="#step_4">Step 4: Analyzing MeeGo environment</a></li>
24 </ul>
25
26 <h2><a name="step_1">Step 1: Setting up environment for emulator</a></h2>
27
28 <p>Download and extract a MeeGo handset UI image file.</p>
29
30 <pre>
31 $ cd
32 $ wget http://download3.meego.com/sep03/meego-handset-ia32-1.0.80.9.20100706.1-sdk-pre0901.tar.bz2
33 $ tar -jxf meego-handset-ia32-1.0.80.9.20100706.1-sdk-pre0901.tar.bz2 --strip 1
34 </pre>
35
36 <p>"root" user's password for this image file is "meego".</p>
37
38 <p>If you are going to use this image file on QEMU, download and install qemu-gl package as shown in <a href="http://wiki.meego.com/MeeGo_SDK_with_QEMU">http://wiki.meego.com/MeeGo_SDK_with_QEMU</a> .</p>
39
40 <pre>
41 $ wget http://download3.meego.com/qemu-gl_0.12.4-3_i386.deb
42 $ sudo dpkg -i qemu-gl_0.12.4-3_i386.deb
43 $ wget http://download3.meego.com/qemugl_cmd.sh
44 $ chmod 755 qemugl_cmd.sh
45 </pre>
46
47 <p>You can boot QEMU like below.</p>
48
49 <pre>
50 $ ./qemugl_cmd.sh meego-handset-ia32-1.0.80.9.20100706.1-sdk-pre0901.raw
51 </pre>
52
53 <p>If the MeeGo environment shows up correctly, you can proceed to <a href="#step_2">step 2</a>.</p>
54
55 <p>If you are going to use this image file on VMware, you need to modify this image file a bit.</p>
56
57 <p>First, create a VMware virtual machine with 4GB of virtual hard disk.</p>
58
59 <p>Next, boot the virtual machine using LiveCD. For example, you can use <a href="http://releases.ubuntu.com/lucid/ubuntu-10.04.2-desktop-i386.iso">http://releases.ubuntu.com/lucid/ubuntu-10.04.2-desktop-i386.iso</a> (MD5: 477350cbea8936c63d587cf2be69181b). If you booted using this ISO file, start the gnome terminal and become "root".</p>
60
61 <pre>
62 $ sudo bash
63 </pre>
64
65 <p>Check the virtual hard disk's device name. Below case shows that /dev/sda is the virtual hard disk.</p>
66
67 <pre>
68 # fdisk -l
69
70 Disk /dev/sda: 4294 MB, 4294967296 bytes
71 255 heads, 63 sectors/track, 522 cylinders
72 Units = cylinders of 16065 * 512 = 8225280 bytes
73 Sector size (logical/physical): 512 bytes / 512 bytes
74 I/O size (minimum/optimal): 512 bytes / 512 bytes
75 Disk identifier: 0x00000000
76
77 Disk /dev/sda doesn't contain a valid partition table
78 </pre>
79
80 <p>Retrieve this image file using ssh (or curl or wget or whatever) and write to virtual hard disk. Substitute below vmwarehost with VMware host's IP address.</p>
81
82 <pre>
83 # ssh root@vmwarehost 'cat ~/meego-handset-ia32-1.0.80.9.20100706.1-sdk-pre0901.raw' &gt; /dev/sda
84 # fdisk /dev/sda
85
86 WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
87 switch off the mode (command 'c') and change display units to
88 sectors (command 'u').
89
90 Command (m for help): w
91 The partition table has been altered!
92
93 Calling ioctl() to re-read partition table.
94 Syncing disks.
95 </pre>
96
97 <p>Then, mount the first partition of the virtual hard disk on /mnt/ .</p>
98
99 <pre>
100 # fdisk -l
101
102 Disk /dev/sda: 4294 MB, 4294967296 bytes
103 186 heads, 61 sectors/track, 739 cylinders
104 Units = cylinders of 11346 * 512 = 5809152 bytes
105 Sector size (logical/physical): 512 bytes / 512 bytes
106 I/O size (minimum/optimal): 512 bytes / 512 bytes
107 Disk identifier: 0x00097211
108
109 Device Boot Start End Blocks Id System
110 /dev/sda1 * 1 517 2929687+ 83 Linux
111 Partition 1 has different physical/logical endings:
112 phys=(364, 185, 61) logical=(516, 79, 21)
113 # mount /dev/sda1 /mnt/
114 </pre>
115
116 <p>Open /etc/X11/xorg.conf-handset in that partition using a text editor.</p>
117
118 <pre>
119 # gedit /mnt/etc/X11/xorg.conf-handset
120 </pre>
121
122 <p>Comment out Driver and BusID lines in the Device section. A diff output is shown below.</p>
123
124 <pre>
125 --- a/etc/X11/xorg.conf-handset
126 +++ b/etc/X11/xorg.conf-handset
127 @@ -32,10 +32,10 @@
128 #Option "DefaultRefresh" # [&lt;bool&gt;]
129 #Option "ModeSetClearScreen" # [&lt;bool&gt;]
130 Identifier "Card0"
131 - Driver "vesa"
132 + #Driver "vesa"
133 VendorName "Technical Corp."
134 BoardName "Unknown Board"
135 - BusID "PCI:0:2:0"
136 + #BusID "PCI:0:2:0"
137 EndSection
138
139 Section "Screen"
140 </pre>
141
142 <p>Save the file and quit the text editor. Then, unmount the partition.</p>
143
144 <pre>
145 # umount /mnt/
146 </pre>
147
148 <p>Check your IP address. You will need this IP address when logging into MeeGo environment via SSH. Hereafter, I use "meegohost" for referring this IP address.</p>
149
150 <pre>
151 # ifconfig eth0
152 eth0 Link encap:Ethernet HWaddr 00:0c:29:99:19:08
153 inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
154 inet6 addr: 2001:c90:301:ba9:20c:29ff:fe99:1908/64 Scope:Global
155 inet6 addr: fe80::20c:29ff:fe99:1908/64 Scope:Link
156 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
157 RX packets:2210718 errors:39 dropped:40 overruns:0 frame:0
158 TX packets:270495 errors:0 dropped:0 overruns:0 carrier:0
159 collisions:0 txqueuelen:1000
160 RX bytes:3299820248 (3.2 GB) TX bytes:19256240 (19.2 MB)
161 Interrupt:19 Base address:0x2000
162 </pre>
163
164 <p>Reboot the system.</p>
165
166 <pre>
167 # reboot
168 </pre>
169
170 <p>If the MeeGo environment shows up correctly, you can proceed to <a href="#step_2">step 2</a>. If it doesn't, check below things.</p>
171
172 <p>Login to the MeeGo environment via SSH using password "meego".</p>
173
174 <pre>
175 $ ssh root@meegohost
176 </pre>
177
178 <p>Then, check /var/log/Xorg.log.0 for (EE) lines. If you found "ioctl EVIOCGNAME failed: Inappropriate ioctl for device" line like below, you might need to let X ignore that device.</p>
179
180 <pre>
181 [ 35.030] (II) XKB: reuse xkmfile /var/lib/xkb/server-D378AD8F86E560F712A83EE36E4E5E92C595B9BD.xkm
182 [ 35.093] (II) config/udev: Adding input device AT Translated Set 2 keyboard (/dev/input/event1)
183 [ 35.094] (**) AT Translated Set 2 keyboard: Applying InputClass "default"
184 [ 35.094] (**) AT Translated Set 2 keyboard: always reports core events
185 [ 35.094] (**) AT Translated Set 2 keyboard: Device: "/dev/input/event1"
186 [ 35.094] (II) AT Translated Set 2 keyboard: Found keys
187 [ 35.094] (II) AT Translated Set 2 keyboard: Configuring as keyboard
188 [ 35.094] (II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD)
189 [ 35.094] (**) Option "xkb_rules" "evdev"
190 [ 35.094] (**) Option "xkb_model" "evdev"
191 [ 35.094] (**) Option "xkb_layout" "us"
192 [ 35.096] (II) config/udev: Adding input device ImPS/2 Generic Wheel Mouse (/dev/input/event2)
193 [ 35.096] (**) ImPS/2 Generic Wheel Mouse: Applying InputClass "default"
194 [ 35.096] (**) ImPS/2 Generic Wheel Mouse: always reports core events
195 [ 35.096] (**) ImPS/2 Generic Wheel Mouse: Device: "/dev/input/event2"
196 [ 35.096] (II) ImPS/2 Generic Wheel Mouse: Found 3 mouse buttons
197 [ 35.096] (II) ImPS/2 Generic Wheel Mouse: Found scroll wheel(s)
198 [ 35.096] (II) ImPS/2 Generic Wheel Mouse: Found relative axes
199 [ 35.096] (II) ImPS/2 Generic Wheel Mouse: Found x and y relative axes
200 [ 35.096] (II) ImPS/2 Generic Wheel Mouse: Configuring as mouse
201 [ 35.097] (**) ImPS/2 Generic Wheel Mouse: YAxisMapping: buttons 4 and 5
202 [ 35.097] (**) ImPS/2 Generic Wheel Mouse: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
203 [ 35.097] (II) XINPUT: Adding extended input device "ImPS/2 Generic Wheel Mouse" (type: MOUSE)
204 [ 35.098] (**) ImPS/2 Generic Wheel Mouse: (accel) keeping acceleration scheme 1
205 [ 35.098] (**) ImPS/2 Generic Wheel Mouse: (accel) acceleration profile 0
206 [ 35.098] (**) ImPS/2 Generic Wheel Mouse: (accel) acceleration factor: 2.000
207 [ 35.098] (**) ImPS/2 Generic Wheel Mouse: (accel) acceleration threshold: 4
208 [ 35.098] (II) ImPS/2 Generic Wheel Mouse: initialized for relative axes.
209 [ 35.099] (II) config/udev: Adding input device ImPS/2 Generic Wheel Mouse (/dev/input/mouse0)
210 [ 35.100] (**) ImPS/2 Generic Wheel Mouse: Applying InputClass "default"
211 [ 35.100] (**) ImPS/2 Generic Wheel Mouse: always reports core events
212 [ 35.100] (**) ImPS/2 Generic Wheel Mouse: Device: "/dev/input/mouse0"
213 [ 35.100] (EE) ioctl EVIOCGNAME failed: Inappropriate ioctl for device
214 [ 35.100] (II) UnloadModule: "evdev"
215 [ 35.100] (EE) PreInit returned NULL for "ImPS/2 Generic Wheel Mouse"
216 </pre>
217
218 <p>To let X ignore a device ("ImPS/2 Generic Wheel Mouse (/dev/input/mouse0)" in above case), add a section like below and reboot the system.</p>
219
220 <pre>
221 --- a/etc/X11/xorg.conf-handset
222 +++ b/etc/X11/xorg.conf-handset
223 @@ -23,6 +23,13 @@
224 ModelName "Monitor Model"
225 EndSection
226
227 +Section "InputClass"
228 + Identifier "ImPS/2 Generic Wheel Mouse"
229 + MatchProduct "ImPS/2 Generic Wheel Mouse"
230 + MatchDevicePath "/dev/input/mouse0"
231 + Option "Ignore" "on"
232 +EndSection
233 +
234 Section "Device"
235 ### Available Driver options are:-
236 ### Values: &lt;i&gt;: integer, &lt;f&gt;: float, &lt;bool&gt;: "True"/"False",
237 </pre>
238
239 <p>Do troubleshooting now before proceeding to next step.</p>
240
241 <h2><a name="step_2">Step 2: Compiling kernel and tools</a></h2>
242
243 <p>Set up environment for compiling kernel and tools. This section assumes Fedora 13 in order to use "rpmbuild" command.</p>
244
245 <p>First, install packages needed for compiling.</p>
246
247 <pre>
248 $ su -
249 # yum -y install wget gcc rpm-build elfutils-libelf-devel binutils-devel newt-devel ncurses-devel
250 # exit
251 </pre>
252
253 <p>Next, download a kernel source package.</p>
254
255 <pre>
256 $ cd
257 $ wget http://repo.meego.com/MeeGo/builds/1.0.99/1.0.99.2.20101019.1/core/repos/source/kernel-2.6.35.3-10.3.src.rpm
258 </pre>
259
260 <p>Next, install the package and run preparation stage.</p>
261
262 <pre>
263 $ rpm -ivh kernel-2.6.35.3-10.3.src.rpm
264 $ rpmbuild -bp ~/rpmbuild/SPECS/kernel.spec
265 $ cd ~/rpmbuild/BUILD/kernel-2.6.35.3/linux-2.6.35/
266 </pre>
267
268 <p>If you are going to use this kernel on QEMU, download and apply kernel patch. If you are going to use this kernel on VMware, you don't need to do this.</p>
269
270 <pre>
271 $ wget http://meego.gitorious.org/meego-developer-tools/meego-emulator-virtiogl-x86/blobs/raw/master/linux-2.6.35-virtio-for-qemu-gl-acceleration.patch
272 $ patch -p1 &lt; linux-2.6.35-virtio-for-qemu-gl-acceleration.patch
273 </pre>
274
275 <p>Next, create a kernel config file. You can pull it from the MeeGo environment on QEMU by doing</p>
276
277 <pre>
278 $ scp -p -P 6666 root@127.0.0.1:/boot/config-\* .config
279 </pre>
280
281 <p>or from the MeeGo environment on VMware by doing</p>
282
283 <pre>
284 $ scp -p root@meegohost:/boot/config-\* .config
285 </pre>
286
287 <p>Now, update the kernel config file. If you are going to use this kernel on QEMU, be sure to answer "y" or "m" to "Virtio userspace memory transport".</p>
288
289 <pre>
290 $ make -s oldconfig
291 </pre>
292
293 <p>MeeGo kernel is using writeback mode for mounting ext3 filesystem image. But use of writeback mode will corrupt files (e.g. data from deleted files is implicitly imported to previously written files) when QEMU or VMware is suddenly terminated. Change kernel config like below if you want to use ordered mode for mounting ext3 filesystem image.</p>
294
295 <pre>
296 $ sed -i -e 's/# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set/CONFIG_EXT3_DEFAULTS_TO_ORDERED=y/' -- .config
297 </pre>
298
299 <p>If you don't mean to debug kernel, you can save compilation time and disk space. Change kernel config like below if you don't mean to debug kernel.</p>
300
301 <pre>
302 $ sed -i -e 's/CONFIG_DEBUG_INFO=y/# CONFIG_DEBUG_INFO is not set/' -- .config
303 </pre>
304
305 <p>Next, download and apply TOMOYO Linux kernel patch.</p>
306
307 <pre>
308 $ wget -O ccs-patch-1.8.3-20141123.tar.gz 'http://sourceforge.jp/frs/redir.php?m=jaist&amp;f=/tomoyo/49684/ccs-patch-1.8.3-20141123.tar.gz'
309 $ wget -O ccs-patch-1.8.3-20141123.tar.gz.asc 'http://sourceforge.jp/frs/redir.php?m=jaist&amp;f=/tomoyo/49684/ccs-patch-1.8.3-20141123.tar.gz.asc'
310 $ gpg ccs-patch-1.8.3-20141123.tar.gz.asc
311 $ tar -zxf ccs-patch-1.8.3-20141123.tar.gz
312 $ patch -p1 &lt; patches/ccs-patch-2.6.35.diff
313 $ cat config.ccs &gt;&gt; .config
314 </pre>
315
316 <p>Now, build the kernel.</p>
317
318 <pre>
319 $ make -s
320 </pre>
321
322 <p>Download and build the tools.</p>
323
324 <pre>
325 $ cd ~/rpmbuild/BUILD/
326 $ wget -O ccs-tools-1.8.3-20140601.tar.gz 'http://sourceforge.jp/frs/redir.php?m=jaist&amp;f=/tomoyo/49693/ccs-tools-1.8.3-20140601.tar.gz'
327 $ tar -zxf ccs-tools-1.8.3-20140601.tar.gz
328 $ make -sC ccstools/
329 </pre>
330
331 <p>Create a directory for temporarily holding kernel and tools and copy them.</p>
332
333 <pre>
334 $ su
335 # mkdir -p /tmp/meego/boot/extlinux/
336 # make -sC ccstools/ INSTALLDIR=/tmp/meego/ install
337 # cd kernel-2.6.35.3/linux-2.6.35/
338 # make -s INSTALL_MOD_PATH=/tmp/meego/ modules_install vdso_install
339 # make -s INSTALL_PATH=/tmp/meego/boot/extlinux/ install
340 # chmod -R go-w /tmp/meego/
341 # chown -R root:root /tmp/meego/
342 # exit
343 </pre>
344
345 <p>Copy the kernel and tools. You can push them to the MeeGo environment on QEMU by doing</p>
346
347 <pre>
348 $ cd /tmp/meego/
349 $ tar -zcf - | ssh root@127.0.0.1 -p 6666 'cd / &amp;&amp; tar -zxf -'
350 </pre>
351
352 <p>or to the MeeGo environment on VMware by doing</p>
353
354 <pre>
355 $ cd /tmp/meego/
356 $ tar -zcf - | ssh root@meegohost 'cd / &amp;&amp; tar -zxf -'
357 </pre>
358
359 <h2><a name="step_3">Step 3: Initializing TOMOYO Linux</a></h2>
360
361 <p>Log in to the MeeGo environment via SSH.</p>
362
363 <p>Initialize TOMOYO Linux's configuration.</p>
364
365 <pre>
366 # /usr/lib/ccs/init_policy --use_profile=1
367 </pre>
368
369 <p>Change bootloader configuration.</p>
370
371 <pre>
372 # vi /boot/extlinux/extlinux.conf
373 </pre>
374
375 <p>Edit extlinux.conf like below.</p>
376
377 <pre>
378 --- extlinux.conf
379 +++ extlinux.conf
380 @@ -18,7 +18,7 @@
381 menu color timeout 0 #ffffffff #00000000
382 menu color cmdline 0 #ffffffff #00000000
383 label meego0
384 - menu label MeeGo (2.6.35~rc6-134.1-qemu)
385 - kernel vmlinuz-2.6.35~rc6-134.1-qemu
386 - append ro root=/dev/sda1 quiet vga=current quiet
387 + menu label MeeGo (2.6.35.3)
388 + kernel vmlinuz-2.6.35.3
389 + append ro root=/dev/sda1 vga=current
390 menu default
391 </pre>
392
393 <p>Save the file and reboot the MeeGo environment.</p>
394
395 <pre>
396 # reboot
397 </pre>
398
399 <h2><a name="step_4">Step 4: Analyzing MeeGo environment</a></h2>
400
401 <p>You can operate from SSH session. You can switch to console screen by pressing Alt+F1 key and switch back to graphical screen by Alt+F2 key if you removed "quiet" options from /boot/extlinux/extlinux.conf . Also, you may locate xterm window on graphical screen by doing</p>
402
403 <pre>
404 # export DISPLAY=:0
405 # xterm -into `xwininfo -root -tree -int | awk ' { if ( index($2, "duihome") &gt; 0) print $1; } '`
406 </pre>
407
408 <p>Below movie demonstrates how you can use TOMOYO Linux for analyzing the MeeGo environment.</p>
409
410 <object data="http://www.youtube.com/v/H9aZv49d2iw?fs=1&amp;hl=en_US&amp;rel=0" type="application/x-shockwave-flash" width="640" height="385"><param name="movie" value="http://www.youtube.com/v/H9aZv49d2iw?fs=1&amp;hl=en_US&amp;rel=0"><param name="allowFullScreen" value="true"><param name="allowscriptaccess" value="always"></object>
411
412 <ul>
413 <li><a href="http://tomoyo.sourceforge.jp/1.8/tool-editpolicy.html.en">How to use Policy Editor</a>: detailed usage of policy editor</li>
414 </ul>
415
416 <hr>
417
418 <p><a href="index.html.en">Return to index page.</a></p>
419 <p><a href="http://sourceforge.jp/"><img src="http://sourceforge.jp/sflogo.php?group_id=1973" width="96" height="31" alt="sflogo.php" title="SourceForge.jp"></a></p>
420 </body>
421 </html>

Properties

Name Value
svn:keywords Date

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26