Emulating the XO/lang-ko: Difference between revisions

From OLPC
Jump to navigation Jump to search
m (fix extra/server parameter for Latest Releases template)
 
(54 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Translation | lang = ko | source = Emulating the XO | version = 45693}}
{{translations}}
{{Ongoing Translation}}
{{ Latest Releases | livecd = inline | devel = inline | extra }}
{{ Latest Releases | livecd = inline | devel = inline | server = inline}}


[[Image:AP1_39.jpg|thumb|laptop-in-laptop]]
[[Image:AP1_39.jpg|thumb|노트북 안의 노트북]]


==[[LiveCd|라이브시디]]를 통한 빠른 시작==
==[[LiveCd|라이브시디]]를 통한 빠른 시작==


대부분 [[Sugar|슈가]]를 사용해보는 가장 쉬운 방법은 [[LiveCd|라이브시디]]입니다. 이 방법은 쉽지만, 재부팅을 했을 때 하였던 작업들이 모두 사라집니다.
대부분 [[Sugar|슈가]]를 사용해보는 가장 쉬운 방법은 [[LiveCd|라이브시디]]입니다. 이 방법은 쉽지만, 재부팅을 했을 때 작업한 내용들이 모두 사라집니다.


== [[Emulating the XO/Quick Start|에뮬레이팅]]을 통한 빠른 시작==
== [[Emulating the XO/Quick Start|에뮬레이팅]]을 통한 빠른 시작==


'''[[Emulating the XO/Quick Start|에뮬레이팅]]'''도 [[Sugar|슈가]]를 사용해보는 또 다른 방법입니다. 설피하기는 좀 어렵지만, 작업한 내용들은 유지가 됩니다.
'''[[Emulating the XO/Quick Start|에뮬레이팅]]'''도 [[Sugar|슈가]]를 사용해보는 또 다른 방법입니다. 설치하기는 좀 어렵지만, 작업한 내용들은 유지가 됩니다.
:지금 당장은 [[TamTam|탐탐]]의 소리를 사용할 수 없을 수도 있습니다. [[User:MitchellNCharity|MitchellNCharity]] 13:16, 5 June 2007 (EDT)
:참고; 지금 당장은 [[TamTam|탐탐]]의 소리를 사용할 수 없을 수도 있습니다. [[User:MitchellNCharity|MitchellNCharity]] 13:16, 5 June 2007 (EDT)


== 개발자들을 위한 빠른 시작 ==
== 개발자들을 위한 빠른 시작 ==
에뮬레이팅을 이용하여 개발하는 방법은 소프트웨어 개발의 대안방법입니다.
에뮬레이팅을 이용하여 개발하는 방법은 소프트웨어 개발의 대안방법입니다.

Developing on emulation is one alternative for developing software.


[http://olpc.download.redhat.com/olpc/streams/development/LATEST/devel_ext3/olpc-redhat-stream-development-devel_ext3.img.bz2 가장 최근 이미지]를
[http://olpc.download.redhat.com/olpc/streams/development/LATEST/devel_ext3/olpc-redhat-stream-development-devel_ext3.img.bz2 가장 최근 이미지]를
[http://olpc.download.redhat.com/olpc/streams/development/LATEST/devel_ext3/ 여기서] 받으세요. ''(틴더박스에 링크 추가하기)''
[http://olpc.download.redhat.com/olpc/streams/development/LATEST/devel_ext3/ 여기서] 받으세십시오. ''(틴더박스에 링크 추가하기)''
[[Emulating the XO/Quick Start|XO를 에뮬레이팅하기/빠른 시작]]에 설명된대로 QEMU과 커널을 인스톨하시면 됩니다. [[/Help_and_tips]] "개발" 부분을 보세요
[[Emulating the XO/Quick Start|빠른 시작]]에 설명된대로 QEMU와 커널 가속기를 인스톨하시면 됩니다. [[Emulating the XO/Help and tips|도움 및 팁]]에서 "Development" 부분을 참고하십시오


== 개요 ==
'''[[#XO-QEMU boot broken - current workarounds]].'''


OPLC 소프트웨어를 구동하는 한 가지 방법은 PC에서 에뮬레이터를 이용하는 것입니다. [[Getting started programming|프로그래밍 시작하기]]에서 기타 옵션들을 보십시오.
Get [http://olpc.download.redhat.com/olpc/streams/development/LATEST/devel_ext3/olpc-redhat-stream-development-devel_ext3.img.bz2 the latest image]
from [http://olpc.download.redhat.com/olpc/streams/development/LATEST/devel_ext3/ here]. ''(add link to tinderbox)''
Install QEMU and kernel acceleration as described in [[Emulating the XO/Quick Start]]. See the [[/Help_and_tips]] "Development" section.


참고 '''[[:Category:Emulation|카테고리:에뮬레이션]]''' 과 '''[[Emulating the XO/Help and tips|도움 및 팁]]'''.
'''See [[#XO-QEMU boot broken - current workarounds]].'''


단순한 작동을 하려면 [[LiveCd|라이브시디]]나 [[Emulating the XO/Quick Start|에뮬레이팅을 통한 빠른 시작]]을 사용할 수 있습니다.
== Overview ==


개발을 한다면 [[LiveCd|라이브시디]], qemu (빠른 시작과 마찬가지이지만, 다른 이미지를 사용) 사욜할 수 있고, 라이브시디보다는 [[Developer Images|개발자용 이미지]]을 사용할 수도 있습니다. 한 가지 대안이 되는 개발연구법은 [[:Category:Installing_Sugar|슈가 설치]]를 해보는 것입니다. 비교를 하려면 [[Getting started programming|프로그래밍 시작하기]]를 보십시오.
One way to run oplc software is using an emulator on your pc. See [[Getting started programming]] for other options.


일반적인 개발연구법은 [[QEMU]]을 kqemu 가속과 함께 사용하는 것입니다. 기본내용을 확인하려면 [[Emulating the XO/Quick Start|빠른 시작]]을 보십시오
Note '''[[:Category:Emulation]]''' and '''[[Emulating the XO/Help and tips|Help and tips]]'''.


For play, you can use [[LiveCd]] or [[Emulating the XO/Quick Start|Quick Start]].


비록 개발을 위한 것일지라도, 우리는 다른 이미지(.img)들을 사용할 겁니다. 임시의 유틸리티가 있는 것입니다. '''[[OS_images#Latest_Stable_Build |가장 최근의 안정 빌드]]'''를 포함한 [[OS images|OS 이미지]]를 보십시오.
For development, you can use [[LiveCd]], or qemu (as in quick start, but with a different image), or perhaps one of the [[Developer Images]] other than the LiveCd. An alternate approach is to attempt [[:Category:Installing_Sugar|installing sugar]]. See [[Getting started programming]] for a comparison.


qemu 대신에 [[Emulating the XO/UsingVMware|VMware]]를 작동해서 할 수 있습니다. 또한 Mac에 대한 추가적인 옵션들은 [[Emulating the XO/Mac|Mac에서 XO를 에뮬레이팅하기]]에서 볼 수 있습니다.
A common development approach is to use [[QEMU]] with kqemu acceleration. See [[Emulating the XO/Quick Start|Quick Start]] for the basics.
Though for development, we will use a different .img, one with a few extra utility programs. See [[OS images]], including '''[[OS_images#Latest_Stable_Build |latest stable build]]'''.


Instead of qemu, you can run [[Emulating the XO/UsingVMware|VMware]], and there are additional options on a [[Emulating the XO/Mac|Mac]].


Please report your experiences in [[User Feedback on Images]]. There is a [[Virtualization Common Room]].
[[User Feedback on Images|이미지들에 대한 사용자 피드백]] 여러분들의 경험들을 보고해주십시오. [[Virtualization Common Room|가상화 공동 토론방]]이 있습니다.

[[Emulating the XO/Limitations of XO disk images|XO 미스크 이미지의 제한내용]]들이 있습니다.


There are [[Emulating the XO/Limitations of XO disk images|limitations with XO disk images]].


The LATEST-STABLE-BUILD versus LATEST build distinction is mostly of interest to people running on actual XO's. In emulation, developers should usually use LATEST. And when STABLE is old, non-developers probably should too.
The LATEST-STABLE-BUILD versus LATEST build distinction is mostly of interest to people running on actual XO's. In emulation, developers should usually use LATEST. And when STABLE is old, non-developers probably should too.


== 대안방법들의 비교 ==
== Comparison of alternatives ==


OLPC 노트북은 개조된 하드웨어로서, 레드헷 리눅스를 추려내어 [[Sugar|슈가]]를 작동하게 만든 것입니다. 하지만 만약 진짜 OPCL 노트북을 가지고 있지 않다면 어떻게 해야할까요? 여기에 여러가지 방법으로 사용할 수 있는 옵션들이 있습니다
An OLPC laptop is custom hardware, running a stripped-down Red Hat linux, running [[Sugar]]. But what if you don't have a real olpc laptop? There are a several options, which can each be used in a couple of ways.


=== recomendations ===
=== 추천방법들 ===
{| border=1 cellspacing=0
{| border=1 cellspacing=0
|- style="background:lightgray; "
|- style="background:lightgray; "
! platform !! purpose !! recommendation
! 플랫폼 !! 목적 !! 추천방법
|-
|-
| 윈도우즈 || 개발 || 에뮬레이트된 XO 디스크 이미지; 혹은 에뮬레이트된 우분투와 슈가-jh빌드 (혹은 개발자용 CD나 라이브시디)?. (''여러분들의 보고내용이 필요합니다.'')
| Windows || development || emulated xo disk image; or emulated Ubuntu with sugar-jhbuild; (or develoepr CD or LiveCD)?. (''need your reports'')
|-
|-
| 맥 || 개발 || 에뮬레이트된 XO 디스크 이미지; 혹은 에뮬레이트된 우분투와 슈가-jh빌드 (혹은 개발자용 CD나 라이브시디)?. (''여러분들의 보고내용이 필요합니다.'')
| Mac || development || emulated xo disk image; or emulated Ubuntu with sugar-jhbuild; (or developer CD or LiveCD)?. (''need your reports'')
|-
|-
| Mac with Parallels || development || install Ubuntu 32-bit, and [[Sugar on Ubuntu Linux]]. See [[/Mac]].
| 맥과 패래럴즈 || 개발 || 우분투 32비트 버젼을 설치하고, [[Sugar on Ubuntu Linux|우분투에 슈가얹기]]. [[Mac|맥]]부분을 보십시오.
|-
|-
| Ubuntu 32-bit || development || [[Sugar with sugar-jhbuild]] and [[Sugar on Ubuntu Linux]]
| 우분투-32비트 || 개발 || [[Sugar with sugar-jhbuild|슈가와 슈가-jh빌드]] [[Sugar on Ubuntu Linux|우분투 리눅스에 슈가얹기]]
|-
|-
| 32-bit linux || development || [[Sugar with sugar-jhbuild]]
| 32비트 리눅스 || 개발 || [[Sugar with sugar-jhbuild|슈가와 슈가-jh빌드]]
|-
|-
| 64비트 리눅스 || 개발 || qemu 하(下)에서 XO 디스크 이미지나 업데이트된 [[LiveCd|라이브시디]] (현재로서는 4월이 최근)
| 64-bit linux || development || xo disk images under qemu; or [[LiveCd]] once it gets updated (currently it's April)
|}
|}


:I don't really believe the development option of Windows/Mac developer/live CD. I've not yet heard of it actually being used. They are months out of date (April). But [[User:Mcfletch|Mcfletch]] said (in May) it's an option, so I added it. [[User:MitchellNCharity|MitchellNCharity]] 09:19, 23 June 2007 (EDT)
: 윈도우즈/맥 개발자용 라이브시디의 개발 옵션을 믿지 않습니다. 아직까진 실질적으로 쓰였다는 이야기를 들어본 적이 없습니다. 라이브시디의 이미지들은 달간 데이터 업데이트가 없었습니다. (4월이 최근) 하지만 [[User:Mcfletch|Mcfletch]]님이 이건 단지 옵션(5월 달에)이라고 말씀하셔서 부분을 추가했습니다. [[User:MitchellNCharity|사용자:MitchellNCharity]] 09:19, 23 June 2007 (EDT)


=== background ===
=== 사용환경 ===
{| border=1 cellspacing=0
{| border=1 cellspacing=0
|- style="background:lightgray; "
|- style="background:lightgray; "
! option
! 옵션
! updated !! sound? !! camera? !! library? !! etoys? !! R/W? !! development software? !! net? !! comments
! 업데이트가됨 !! 소리? !! 카메라? !! 라이브러리? !! E-토이즈? !! 읽기/쓰기? !! 개발 소프트웨어? !! 인터넷? !! 해설
|-
|-
| [[:Category:Installing Sugar|Installing Sugar]]
| [[:Category:Installing Sugar|Installing Sugar]]
| continuous || yes || yes? || yes? || yes
| 지속적으로 || 가능 || 가능? || 가능? || 가능
| yes || your own || yes
| 가능 || 개인의 || 가능
| 일부 플랫폼에서 시간과 공간이 좀 필요합니다. (몇 시간 그리고 ~3GB의 저장공간). 하지만 "단지 작동하는 것"뿐입니다. 다른 의미로, 이것은 설치하기가 좀 어려울수 있습니다.
| On some platforms, it takes time and space (hours and ~3GB), but "just works". On others, it is quite difficult to install.
|-
|-
| [[:Category:Installing Sugar|Installing Sugar]], on a virtual 32-bit Ubuntu, running in an emulator (qemu, parallels, or vmware)
| [[:Category:Installing Sugar|슈가 설치하기]]-우분투 32비트(qemu, 패래럴즈, vmware에 가상설치)
|-
|-
| [[LiveCd]]
| [[LiveCd|라이브시디]]
| April || yes(boot) yes?(qemu) || yes?(boot) no(qemu) || no || yes
| 4월이 최신 || 가능(부트) 가능?(qemu) || 가능?(부트) 불가능(qemu) || 불가능 || 가능
| no || toolchain, Gnome || yes?
| no || 툴체인(toolchain), 그놈 || yes?
| Alternative Quick Start. Can both be booted from, and used in qemu. Problems: A.
| 대안적인 빠른 시작. Can both be booted from, and used in qemu. Problems: A.


|-
|-
Line 96: Line 93:


|-
|-
| colspan=10 | LATEST-STABLE-BUILD <span style="font-size:80%; "><tt>http://olpc.download.redhat.com/olpc/streams/development/LATEST-STABLE-BUILD/</tt></span>
| colspan=10 | 가장 최근의 안정 빌드 <span style="font-size:80%; "><tt>http://olpc.download.redhat.com/olpc/streams/development/LATEST-STABLE-BUILD/</tt></span>


|-
|-
| ...development-ext3.img
| ...development-ext3.img
| ~monthly || yes/B || no || yes || yes
| ~월간 || 가능/B || 불가능 || 가능 || 가능
| yes || no || after config
| 가능 || 불가능 || 설정
| Quick Start for getting a look at Sugar.
| Quick Start for getting a look at Sugar.


|-
|-
| ...development-devel_ext3.img
| ...development-devel_ext3.img
| ~monthly || yes/B || no || no || yes
| ~월간 || 가능/B || 불가능 || 불가능 || 가능
| yes || a little || after config
| 가능 || a little || 설정


|-
|-
Line 114: Line 111:
|-
|-
| ...development-ext3.img
| ...development-ext3.img
| ~daily || yes/B || no || yes || yes
| ~일일 || 가능/B || 불가능 || 가능 || 가능
| yes || no || after config
| 가능 || 불가능 || 설정


|-
|-
| [http://olpc.download.redhat.com/olpc/streams/development/LATEST/devel_ext3/olpc-redhat-stream-development-devel_ext3.img.bz2 ...development-devel_ext3.img]
| [http://olpc.download.redhat.com/olpc/streams/development/LATEST/devel_ext3/olpc-redhat-stream-development-devel_ext3.img.bz2 ...development-devel_ext3.img]
| ~daily || yes/B || no || no || yes
| ~일일 || 가능/B || 불가능 || 불가능 || 가능
| yes || a little || after config
| 가능 || a little || 설정
| Good for new developers (requires some command-line comfort).
| 새로운 개발자들에게 적합 (약간의 command-line comfort를 필요로 함).


|-
|-
| colspan=10 style="background:lightgray; " | OTHER
| colspan=10 style="background:lightgray; " | 기타


|-
|-
| [[Developer Images#Big Fedora Core 6 Build|FC6+Sugar]]
| [[Developer Images#Big Fedora Core 6 Build|페도라코어6+슈가]]
| April || yes? || ? || ? || no
| 4월 || 가능? || ? || ? || 불가능


| yes || Full Fedora Softare Dev. || yes
| 가능 || Full Fedora Softare Dev. || 가능
| 6GB (April version: no etoys)
| 6GB (4월 버젼 : etoys가 없음)


|}
|}
Line 152: Line 149:
*Add a microphone column? Reconsolidate sound/camera/mic into a H/W column?
*Add a microphone column? Reconsolidate sound/camera/mic into a H/W column?


== Example step-by-step instructions ==
== XO-QEMU boot broken - current workarounds ==

Here, in one place, are assembled all the steps to get you to a working
emulated XO. Assuming you are running on linux, and have already
installed qemu and kqemu.

The following will ''not'' work on your virtual xo: sound, camera. The first because no one has gotten around to figuring out why it isn't working[http://dev.laptop.org/ticket/1978]. The second because qemu doesn't yet support them.

Go to
http://olpc.download.redhat.com/olpc/streams/development/LATEST/devel_ext3/
and obtain the numbered -devel_ext3.img.bz2 and its md5. For this example I used build 485.

md5sum -c olpc-redhat-stream-development-build-485-20070703_0249-devel_ext3.img.bz2.md5
bzcat olpc-redhat-stream-development-build-485-20070703_0249-devel_ext3.img.bz2 > xo-485a.img

The resulting file is 1 GB.

export PORT=2221
qemu-system-x86_64 -soundhw es1370 -serial `tty` -kernel-kqemu -redir tcp:$PORT::22 -hda xo-485a.img
Unless you have a x86_64 cpu, use <tt>qemu</tt> instead of <tt>qemu-system-x86_64</tt>.

The screen will very briefly be black, and then show the blue "GNU
GRUB" screen. If it stays black, that's a qemu bug. Kill qemu and try again.

The boot messages will scroll by, and you should eventually see the normal XO first-time login. We'll save that for later.

In the window where you started qemu, you should now see a login: prompt.

# Enter <tt>root</tt>
# Then:
/etc/rc5.d/S98NetworkManager stop
mv /etc/rc3.d/S98NetworkManager /etc/rc3.d/DISABLED-S98NetworkManager
mv /etc/rc5.d/S98NetworkManager /etc/rc5.d/DISABLED-S98NetworkManager
echo ifup eth0 >> /etc/rc.local
ifup eth0
killall X

Killing X should restart sugar.

If you want to enter a name with diacritics, you need to wait for X to restart, and then do:
su olpc -c"DISPLAY=:0 xmodmap -e 'keycode 77 = Multi_key'"
This sets up Num_lock as Multi_key. Unfortunately, the next time X is
restarted, you will lose it. A better solution is needed.

At this point you could just proceed to use your new XO. However, the screen resolution is wrong (1024x768). So for development, or to get a more accurate feel for how things really look, some extra steps are required.

Once you reach the main sugar screen, you should check the Neighborhood view (F1). If you can't see other people, either the we are having problems with the presence server, you are behind an unusually picky firewall, or networking on qemu is broken again in the build number you are using. (Remember that ping doesn't work inside of qemu).

While this next step is not strictly required, it will enable you to use ssh and scp, which can be handy to move stuff back and forth between your host and xo.

Still as root on the xo,

1. Change the root password.
passwd
Don't worry if it says something like "BAD PASSWORD: ", and complains about the password you picked. It will still work.

2. Change the olpc password.
passwd olpc

Now you can use ssh and scp.


The current released version of QEMU doesn't support 1200x900, so we use a Xephyr remote X server. Each time you boot the xo, if you want 1200x900, you'll need to do these next steps again, except for the ones marked "(First time only)".

1. Still as root on the xo:
init 3
sleep 5
ifup eth0
su olpc
grep export /usr/bin/sugar > ~/env
source ~/env

If the <tt>ifup eth0</tt> fails with an "already running" message, that's ok. Perhaps it is no longer needed.

2. Back on the host, prepare Xephyr (First time only)
mcookie > xephyr-cookie
export COOKIE=`cat xephyr-cookie`
rm -f xephyr-xauth; echo "add :1 . $COOKIE" | xauth -f xephyr-xauth
echo $COOKIE

3. On the xo, still as "su olpc", record the cookie: (First time only)
echo "add 10.0.2.2:1 . " PUT-THE-COOKIE-HERE | xauth

4. Back on the host, start a Xephyr:
Xephyr :1 -auth xephyr-xauth -reset -screen 1200x900x16 -dpi 200
You will probably want to do this in its own window, as it periodically dies and needs to be restarted.

5. On the xo, still as "su olpc", start sugar:
DISPLAY=10.0.2.2:1 sugar

Actually, I usually ssh in from the host, and run sugar that way:

a. On the host,
ssh -o NoHostAuthenticationForLocalhost=yes -p 2222 olpc@localhost
b. in the resulting shell,
source ~/env
export DISPLAY=10.0.2.2:1
sugar
You may also want to run
xmodmap -e 'keycode 77 = Multi_key'
to be able to enter diacritics with the Num_lock key.
But I find doing it first thing tends to kill Xephyr. :(

You should now see the XO first-login screen in correct resolution.
You can use Num_lock to enter diacritics. Congratulations. Sorry it
was so much bother.


To run multiple xo's (to play with collaboration, for instance), you
can repeat the above steps. Create a xo-485b.img, and use a different
PORT number (like 2222). If you are using Xephyr, start a second
Xephyr, which will be 10.0.2.2:'''2''', use that instead of ...:1 in
the instructions. You should now be able to see yourself, and
collaborate in Write.


The following will save you having to periodically type your xo password, but is optional, and can just as easily be done later.
Build 445 was the last version which booted cleanly under qemu ([http://dev.laptop.org/ticket/1809 ticket]).
More recent builds require workarounds.


Back on the host,
*The boot currently hangs in rc netfs. So we disable it. This only needs to be done once.
*#Get a shell. Follow the instructions below, but add a "2" to the end of the kernel line. So it is <tt> root=/dev/hda1 2 </tt>
*#Log in as root, no password.
*#Then:
mv /etc/rc.d/rc3.d/S25netfs /etc/rc.d/rc3.d/DISABLED-S25netfs
mv /etc/rc.d/rc5.d/S25netfs /etc/rc.d/rc5.d/DISABLED-S25netfs
::4. Done. Now restart qemu, following the instructions below.


1. Create an ssh key if you don't already have one. See [[/Help_and_tips#SSH into qemu, using a key]].
:(This workaround avoids the boot hanging after saying "Mounting other filesystems:".)
*When booting on qemu, add root=/dev/hda to the grub kernel line. This needs to be done every time.
*#When you start your xo disk image on qemu, you should see a blue grub screen, doing a "Booting .. in N seconds" countdown. Press space to interrupt it.
*#Press '''e''' (edit). This will show you 3 lines.
*#Move to the second, which begins "kernel". Press '''e'''. This will take you to the end of the kernel line.
*#Add <tt> root=/dev/hda1</tt> Then press enter.
*#Press '''b''' to continue booting.
:(This workaround avoids "WARNING: Cannot find root file system!", and being dropped into an emergency shell.)


2. Copy it to the xo,
Should add instructions to modify the image's grub config, so this doesn't need to be done every time you boot. [[User:MitchellNCharity|MitchellNCharity]] 12:04, 3 July 2007 (EDT)
scp -o NoHostAuthenticationForLocalhost=yes -P $PORT ~/.ssh/id_rsa.pub root@localhost:~/


3. On the xo, as root, spread the key around:
It might be worth gathering the currently scattered notes, into a single list of step by step instructions, for getting from nothing, to a pair of qemu images running with Xephyr's and ssh. [[User:MitchellNCharity|MitchellNCharity]] 12:04, 3 July 2007 (EDT)
mkdir ~root/.ssh
mkdir ~olpc/.ssh
cat ~root/id_rsa.pub >> ~root/.ssh/authorized_keys
cat ~root/id_rsa.pub >> ~olpc/.ssh/authorized_keys


You can now ssh and scp without retyping your password.
=Links=
*[http://www.ibm.com/developerworks/linux/library/l-sugar-olpc/index.html Tutorial] Written by IBM on how to get this working.


[[Category:OS]]
[[Category:OS]]

Latest revision as of 20:22, 9 October 2009

  번역근원 Emulating the XO 원문  
  english | español日本語한국어portuguêsрусский   +/- 차이  
This is an on-going translation


노트북 안의 노트북

라이브시디를 통한 빠른 시작

대부분 슈가를 사용해보는 가장 쉬운 방법은 라이브시디입니다. 이 방법은 쉽지만, 재부팅을 했을 때 작업한 내용들이 모두 사라집니다.

에뮬레이팅을 통한 빠른 시작

에뮬레이팅슈가를 사용해보는 또 다른 방법입니다. 설치하기는 좀 어렵지만, 작업한 내용들은 유지가 됩니다.

참고; 지금 당장은 탐탐의 소리를 사용할 수 없을 수도 있습니다. MitchellNCharity 13:16, 5 June 2007 (EDT)

개발자들을 위한 빠른 시작

에뮬레이팅을 이용하여 개발하는 방법은 소프트웨어 개발의 대안방법입니다.


가장 최근 이미지여기서 받으세십시오. (틴더박스에 링크 추가하기) 빠른 시작에 설명된대로 QEMU와 커널 가속기를 인스톨하시면 됩니다. 도움 및 팁에서 "Development" 부분을 참고하십시오

개요

OPLC 소프트웨어를 구동하는 한 가지 방법은 PC에서 에뮬레이터를 이용하는 것입니다. 프로그래밍 시작하기에서 기타 옵션들을 보십시오.

참고 카테고리:에뮬레이션도움 및 팁.

단순한 작동을 하려면 라이브시디에뮬레이팅을 통한 빠른 시작을 사용할 수 있습니다.

개발을 한다면 라이브시디, qemu (빠른 시작과 마찬가지이지만, 다른 이미지를 사용) 사욜할 수 있고, 라이브시디보다는 개발자용 이미지을 사용할 수도 있습니다. 한 가지 대안이 되는 개발연구법은 슈가 설치를 해보는 것입니다. 비교를 하려면 프로그래밍 시작하기를 보십시오.

일반적인 개발연구법은 QEMU을 kqemu 가속과 함께 사용하는 것입니다. 기본내용을 확인하려면 빠른 시작을 보십시오


비록 개발을 위한 것일지라도, 우리는 다른 이미지(.img)들을 사용할 겁니다. 임시의 유틸리티가 있는 것입니다. 가장 최근의 안정 빌드를 포함한 OS 이미지를 보십시오.

qemu 대신에 VMware를 작동해서 할 수 있습니다. 또한 Mac에 대한 추가적인 옵션들은 Mac에서 XO를 에뮬레이팅하기에서 볼 수 있습니다.


이미지들에 대한 사용자 피드백에 여러분들의 경험들을 보고해주십시오. 가상화 공동 토론방이 있습니다.

XO 미스크 이미지의 제한내용들이 있습니다.


The LATEST-STABLE-BUILD versus LATEST build distinction is mostly of interest to people running on actual XO's. In emulation, developers should usually use LATEST. And when STABLE is old, non-developers probably should too.

대안방법들의 비교

OLPC 노트북은 개조된 하드웨어로서, 레드헷 리눅스를 추려내어 슈가를 작동하게 만든 것입니다. 하지만 만약 진짜 OPCL 노트북을 가지고 있지 않다면 어떻게 해야할까요? 여기에 여러가지 방법으로 사용할 수 있는 옵션들이 있습니다

추천방법들

플랫폼 목적 추천방법
윈도우즈 개발 에뮬레이트된 XO 디스크 이미지; 혹은 에뮬레이트된 우분투와 슈가-jh빌드 (혹은 개발자용 CD나 라이브시디)?. (여러분들의 보고내용이 필요합니다.)
개발 에뮬레이트된 XO 디스크 이미지; 혹은 에뮬레이트된 우분투와 슈가-jh빌드 (혹은 개발자용 CD나 라이브시디)?. (여러분들의 보고내용이 필요합니다.)
맥과 패래럴즈 개발 우분투 32비트 버젼을 설치하고, 우분투에 슈가얹기. 부분을 보십시오.
우분투-32비트 개발 슈가와 슈가-jh빌드우분투 리눅스에 슈가얹기
32비트 리눅스 개발 슈가와 슈가-jh빌드
64비트 리눅스 개발 qemu 하(下)에서 XO 디스크 이미지나 업데이트된 라이브시디 (현재로서는 4월이 최근)
전 윈도우즈/맥 개발자용 라이브시디의 개발 옵션을 믿지 않습니다. 아직까진 실질적으로 쓰였다는 이야기를 들어본 적이 없습니다. 라이브시디의 이미지들은 몇 달간 데이터 업데이트가 없었습니다. (4월이 최근) 하지만 Mcfletch님이 이건 단지 옵션(5월 달에)이라고 말씀하셔서 이 부분을 추가했습니다. 사용자:MitchellNCharity 09:19, 23 June 2007 (EDT)

사용환경

옵션 업데이트가됨 소리? 카메라? 라이브러리? E-토이즈? 읽기/쓰기? 개발 소프트웨어? 인터넷? 해설
Installing Sugar 지속적으로 가능 가능? 가능? 가능 가능 개인의 것 가능 일부 플랫폼에서 시간과 공간이 좀 필요합니다. (몇 시간 그리고 ~3GB의 저장공간). 하지만 "단지 작동하는 것"뿐입니다. 다른 의미로, 이것은 설치하기가 좀 어려울수 있습니다.
슈가 설치하기-우분투 32비트(qemu, 패래럴즈, vmware에 가상설치)
라이브시디 4월이 최신 가능(부트) 가능?(qemu) 가능?(부트) 불가능(qemu) 불가능 가능 no 툴체인(toolchain), 그놈 yes? 대안적인 빠른 시작. Can both be booted from, and used in qemu. Problems: A.
XO disk images:
가장 최근의 안정 빌드 http://olpc.download.redhat.com/olpc/streams/development/LATEST-STABLE-BUILD/
...development-ext3.img ~월간 가능/B 불가능 가능 가능 가능 불가능 설정 후 Quick Start for getting a look at Sugar.
...development-devel_ext3.img ~월간 가능/B 불가능 불가능 가능 가능 a little 설정 후
LATEST http://olpc.download.redhat.com/olpc/streams/development/LATEST/
...development-ext3.img ~일일 가능/B 불가능 가능 가능 가능 불가능 설정 후
...development-devel_ext3.img ~일일 가능/B 불가능 불가능 가능 가능 a little 설정 후 새로운 개발자들에게 적합 (약간의 command-line comfort를 필요로 함).
기타
페도라코어6+슈가 4월 가능? ? ? 불가능 가능 Full Fedora Softare Dev. 가능 6GB (4월 버젼 : etoys가 없음)

Key:

library: A library of sample content is included (english version). Ie, pretty text to web browse without having to get network.
R/W (writable): With an .img, you can save things between sessions. With a .iso, your environment is the same each time you start.
development software: are development tools included?
Net (network): does the network "just work" or "manual" steps are required?

Problems:

A: LiveCd (April) on fc6 x86_64, kernel panics under kqemu. A squashfs problem.
B: Tam Tam is silent (though EToys makes noise). Cause unknown.

Notes:

  • re "does sugar-jhbuild support camera/mic?": "yes, if the camera uses v4l2 and 640x480, I'd suspect so." Can someone confirm this? (#olpc, now) MitchellNCharity 00:16, 2 June 2007 (EDT)

Doables:

  • Remove LiveCd's "?" above.
  • Find out what's going on with Tam Tam sound. It would be nice for the xo disk images to all be sound-yes.
  • Add a microphone column? Reconsolidate sound/camera/mic into a H/W column?

Example step-by-step instructions

Here, in one place, are assembled all the steps to get you to a working emulated XO. Assuming you are running on linux, and have already installed qemu and kqemu.

The following will not work on your virtual xo: sound, camera. The first because no one has gotten around to figuring out why it isn't working[1]. The second because qemu doesn't yet support them.

Go to http://olpc.download.redhat.com/olpc/streams/development/LATEST/devel_ext3/ and obtain the numbered -devel_ext3.img.bz2 and its md5. For this example I used build 485.

md5sum -c olpc-redhat-stream-development-build-485-20070703_0249-devel_ext3.img.bz2.md5

bzcat olpc-redhat-stream-development-build-485-20070703_0249-devel_ext3.img.bz2 > xo-485a.img

The resulting file is 1 GB.

export PORT=2221
qemu-system-x86_64  -soundhw es1370 -serial `tty` -kernel-kqemu -redir tcp:$PORT::22 -hda xo-485a.img

Unless you have a x86_64 cpu, use qemu instead of qemu-system-x86_64.

The screen will very briefly be black, and then show the blue "GNU GRUB" screen. If it stays black, that's a qemu bug. Kill qemu and try again.

The boot messages will scroll by, and you should eventually see the normal XO first-time login. We'll save that for later.

In the window where you started qemu, you should now see a login: prompt.

  1. Enter root
  2. Then:
/etc/rc5.d/S98NetworkManager stop
mv /etc/rc3.d/S98NetworkManager /etc/rc3.d/DISABLED-S98NetworkManager
mv /etc/rc5.d/S98NetworkManager /etc/rc5.d/DISABLED-S98NetworkManager
echo ifup eth0 >> /etc/rc.local

ifup eth0 
killall X

Killing X should restart sugar.

If you want to enter a name with diacritics, you need to wait for X to restart, and then do:

su olpc -c"DISPLAY=:0 xmodmap -e 'keycode  77 = Multi_key'"

This sets up Num_lock as Multi_key. Unfortunately, the next time X is restarted, you will lose it. A better solution is needed.

At this point you could just proceed to use your new XO. However, the screen resolution is wrong (1024x768). So for development, or to get a more accurate feel for how things really look, some extra steps are required.

Once you reach the main sugar screen, you should check the Neighborhood view (F1). If you can't see other people, either the we are having problems with the presence server, you are behind an unusually picky firewall, or networking on qemu is broken again in the build number you are using. (Remember that ping doesn't work inside of qemu).

While this next step is not strictly required, it will enable you to use ssh and scp, which can be handy to move stuff back and forth between your host and xo.

Still as root on the xo,

1. Change the root password.

passwd

Don't worry if it says something like "BAD PASSWORD: ", and complains about the password you picked. It will still work.

2. Change the olpc password.

passwd olpc

Now you can use ssh and scp.


The current released version of QEMU doesn't support 1200x900, so we use a Xephyr remote X server. Each time you boot the xo, if you want 1200x900, you'll need to do these next steps again, except for the ones marked "(First time only)".

1. Still as root on the xo:

init 3
sleep 5
ifup eth0

su olpc
grep export /usr/bin/sugar > ~/env
source ~/env

If the ifup eth0 fails with an "already running" message, that's ok. Perhaps it is no longer needed.

2. Back on the host, prepare Xephyr (First time only)

mcookie > xephyr-cookie
export COOKIE=`cat xephyr-cookie`
rm -f xephyr-xauth; echo "add :1 . $COOKIE" | xauth -f xephyr-xauth
echo $COOKIE

3. On the xo, still as "su olpc", record the cookie: (First time only)

echo "add 10.0.2.2:1 . " PUT-THE-COOKIE-HERE | xauth

4. Back on the host, start a Xephyr:

Xephyr :1 -auth xephyr-xauth -reset -screen 1200x900x16 -dpi 200

You will probably want to do this in its own window, as it periodically dies and needs to be restarted.

5. On the xo, still as "su olpc", start sugar:

DISPLAY=10.0.2.2:1 sugar

Actually, I usually ssh in from the host, and run sugar that way:

a. On the host,

ssh -o NoHostAuthenticationForLocalhost=yes -p 2222 olpc@localhost

b. in the resulting shell,

source ~/env
export DISPLAY=10.0.2.2:1
sugar

You may also want to run

xmodmap -e 'keycode  77 = Multi_key'

to be able to enter diacritics with the Num_lock key. But I find doing it first thing tends to kill Xephyr. :(

You should now see the XO first-login screen in correct resolution. You can use Num_lock to enter diacritics. Congratulations. Sorry it was so much bother.


To run multiple xo's (to play with collaboration, for instance), you can repeat the above steps. Create a xo-485b.img, and use a different PORT number (like 2222). If you are using Xephyr, start a second Xephyr, which will be 10.0.2.2:2, use that instead of ...:1 in the instructions. You should now be able to see yourself, and collaborate in Write.

The following will save you having to periodically type your xo password, but is optional, and can just as easily be done later.

Back on the host,

1. Create an ssh key if you don't already have one. See /Help_and_tips#SSH into qemu, using a key.

2. Copy it to the xo,

scp -o NoHostAuthenticationForLocalhost=yes -P $PORT ~/.ssh/id_rsa.pub root@localhost:~/

3. On the xo, as root, spread the key around:

mkdir ~root/.ssh
mkdir ~olpc/.ssh
cat ~root/id_rsa.pub >> ~root/.ssh/authorized_keys
cat ~root/id_rsa.pub >> ~olpc/.ssh/authorized_keys

You can now ssh and scp without retyping your password.

Links

  • Tutorial Written by IBM on how to get this working.