<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>kyungw00k</title>
	<atom:link href="http://kyungw00k.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://kyungw00k.wordpress.com</link>
	<description>Just another Javascript Lover</description>
	<lastBuildDate>Thu, 16 May 2013 02:35:00 +0000</lastBuildDate>
	<language>ko</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='kyungw00k.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>kyungw00k</title>
		<link>http://kyungw00k.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://kyungw00k.wordpress.com/osd.xml" title="kyungw00k" />
	<atom:link rel='hub' href='http://kyungw00k.wordpress.com/?pushpress=hub'/>
		<item>
		<title>블로그를 Github으로 옮겨봅니다.</title>
		<link>http://kyungw00k.wordpress.com/2012/12/31/%eb%b8%94%eb%a1%9c%ea%b7%b8%eb%a5%bc-github%ec%9c%bc%eb%a1%9c-%ec%98%ae%ea%b2%a8%eb%b4%85%eb%8b%88%eb%8b%a4/</link>
		<comments>http://kyungw00k.wordpress.com/2012/12/31/%eb%b8%94%eb%a1%9c%ea%b7%b8%eb%a5%bc-github%ec%9c%bc%eb%a1%9c-%ec%98%ae%ea%b2%a8%eb%b4%85%eb%8b%88%eb%8b%a4/#comments</comments>
		<pubDate>Mon, 31 Dec 2012 01:31:53 +0000</pubDate>
		<dc:creator>kyungw00k</dc:creator>
				<category><![CDATA[Log]]></category>

		<guid isPermaLink="false">http://kyungw00k.wordpress.com/?p=919</guid>
		<description><![CDATA[http://kyungw00k.github.com Markdown에 적응하고자, 블로그를 github으로 옮겨봅니다. 방문자도 많지 않은 블로그이지만&#8230; 옮겼다고 해서 (예전처럼) 기존 글을 삭제하지는 않습니다. (언제 돌아올지 모르기 때문에? =_=) 일단 최대한 (많이) 포스팅 해보고, 만약 wordpress.com으로 돌아오면&#8230; 그때 다시 경험담을 공유하도록 하겠습니다. Good bye 2012!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kyungw00k.wordpress.com&#038;blog=20232505&#038;post=919&#038;subd=kyungw00k&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://kyungw00k.github.com" rel="nofollow">http://kyungw00k.github.com</a></p>
<p>Markdown에 적응하고자, 블로그를 github으로 옮겨봅니다.</p>
<p>방문자도 많지 않은 블로그이지만&#8230;</p>
<p>옮겼다고 해서 (예전처럼) 기존 글을 삭제하지는 않습니다.</p>
<p>(언제 돌아올지 모르기 때문에? =_=)</p>
<p>일단 최대한 (많이) 포스팅 해보고, 만약 wordpress.com으로 돌아오면&#8230;</p>
<p>그때 다시 경험담을 공유하도록 하겠습니다.</p>
<p>Good bye 2012!</p>
<br />  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kyungw00k.wordpress.com&#038;blog=20232505&#038;post=919&#038;subd=kyungw00k&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kyungw00k.wordpress.com/2012/12/31/%eb%b8%94%eb%a1%9c%ea%b7%b8%eb%a5%bc-github%ec%9c%bc%eb%a1%9c-%ec%98%ae%ea%b2%a8%eb%b4%85%eb%8b%88%eb%8b%a4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/9e3ac0dbb291e11d5fa3b012c56df724?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">parksama</media:title>
		</media:content>
	</item>
		<item>
		<title>(자칭)LibraryPi 프로젝트 Log</title>
		<link>http://kyungw00k.wordpress.com/2012/11/01/%ec%9e%90%ec%b9%adlibrarypi-%ed%94%84%eb%a1%9c%ec%a0%9d%ed%8a%b8-log/</link>
		<comments>http://kyungw00k.wordpress.com/2012/11/01/%ec%9e%90%ec%b9%adlibrarypi-%ed%94%84%eb%a1%9c%ec%a0%9d%ed%8a%b8-log/#comments</comments>
		<pubDate>Thu, 01 Nov 2012 09:57:02 +0000</pubDate>
		<dc:creator>kyungw00k</dc:creator>
				<category><![CDATA[RaspberryPi]]></category>
		<category><![CDATA[raspberry pi]]></category>

		<guid isPermaLink="false">http://kyungw00k.wordpress.com/?p=821</guid>
		<description><![CDATA[사내 제주 도서관에 Raspberry Pi를 입양보냈다. 도서관에 있는 기존 PC는 나무상자 속에 갖혀서 열이 심하면 종종 뻗는 현상이 잦았다고 한다. 이게 골칫거리긴 하나, 나름 잘 돌아가고 있었다. 물론, 라즈베리파이로 교체한다고 해서 달라지는 것은 없다. 단, 기존에 사용한 바코드 리더와 RFID 리더기만 잘 작동하고, 브라우저만 Kiosk 모드로 띄우면 되는 것이다. (다행히도 HID로 인식했다.) 개인적으로는 얼마나 잘 [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kyungw00k.wordpress.com&#038;blog=20232505&#038;post=821&#038;subd=kyungw00k&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>사내 제주 도서관에 Raspberry Pi를 입양보냈다.</p>
<p>도서관에 있는 기존 PC는 나무상자 속에 갖혀서 열이 심하면 종종 뻗는 현상이 잦았다고 한다.</p>
<p>이게 골칫거리긴 하나, 나름 잘 돌아가고 있었다.</p>
<p>물론, 라즈베리파이로 교체한다고 해서 달라지는 것은 없다.</p>
<p>단, 기존에 사용한 바코드 리더와 RFID 리더기만 잘 작동하고, 브라우저만 Kiosk 모드로 띄우면 되는 것이다.</p>
<p>(다행히도 HID로 인식했다.)</p>
<p>개인적으로는 얼마나 잘 버텨줄지 궁금하기도 해서 256M 라즈베리를 입양 보내기로 결심했다.</p>
<p><a href="http://www.linuxsystems.it/2012/06/raspbian-wheezy-armhf-raspberry-pi-minimal-image/">최소한의 패키지로 OS 설치를 진행</a>하고, Locale은 ko_KR.utf8로 맞춘다.</p>
<p>그 다음에 추가로 아래 패키지를 설치한다.</p>
<pre class="brush: plain; title: ; notranslate">
# sudo 설치
$ sudo apt-get install sudo

# X 서버 설치
$ sudo apt-get install xinit

# 한글폰트 설치
$ sudo apt-get install fonts-nanum

# Chronium 설치
$ sudo apt-get install chromium
</pre>
<p>로그인 할 계정(여기서는 편의상 user라고 하자)을 하나 만들고, 자동 로그인 시킨다.</p>
<pre class="brush: plain; title: ; notranslate">
# /etc/inittab: init(8) configuration.
# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $

# The default runlevel.
id:5:initdefault:

...

# /sbin/getty invocations for the runlevels.
#
# The &quot;id&quot; field MUST be the same as the last
# characters of the device (after &quot;tty&quot;).
#
# Format:
#  :::
#
# Note that on most Debian systems tty7 is used by the X Window System,
# so if you want to add more getty's go ahead but skip tty7 if you run X.
#
1:2345:respawn:/bin/login -f user tty1 &lt; /dev/tty1 &gt; dev/tty1 2&gt;&amp;1
#1:2345:respawn:/sbin/getty 38400 tty1
#2:23:respawn:/sbin/getty 38400 tty2
#3:23:respawn:/sbin/getty 38400 tty3
#4:23:respawn:/sbin/getty 38400 tty4
#5:23:respawn:/sbin/getty 38400 tty5
#6:23:respawn:/sbin/getty 38400 tty6
...
</pre>
<p>계정에 sudo 권한을 주는데, reboot은 그냥 할 수 있도록 한다.</p>
<pre class="brush: plain; title: ; notranslate">
# /etc/sudoers
...
user ALL=(ALL:ALL) ALL

# 페스워드 없이 reboot 실행시킬 수 있도록 권한을 준다.
user ALL=NOPASSWD: /sbin/reboot

</pre>
<p>rc.local에서는 user의 권한으로 X를 실행시킨다.</p>
<pre class="brush: plain; title: ; notranslate">
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will &quot;exit 0&quot; on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

su user -c startx
</pre>
<p>라즈베리파이를 키자마자 init 5로 X가 뜨도록 했고,</p>
<pre class="brush: plain; title: ; notranslate">
root@hostname /etc/rc5.d# ln -s ../init.d/x11-common S17x11-common
root@hostname /etc/rc5.d# ln -s ../init.d/rc.local S18rc.local
</pre>
<p>user의 .xinitrc에서는 단순히 chromium 하나만 띄우는걸로 진행했다.</p>
<pre class="brush: plain; title: ; notranslate">
#!/bin.sh

# Run Chrome
/usr/bin/chromium --incognito --disable-ipv6 --disable-translate --kiosk http://주소

# Reboot
sudo reboot
</pre>
<p>헛뜨&#8230; 권한 없다고 X 안뜬다.</p>
<blockquote><p>X: user not authorized to run the X server, aborting.</p></blockquote>
<p>알아보니, X server를 띄울때도 권한이 필요하다.</p>
<p>1. Root Only<br />
2. Console Users Only<br />
3. Anybody</p>
<p>아래 명령을 실행시켜 Anybody로 바꾸자.</p>
<pre class="brush: plain; title: ; notranslate">
$ sudo dpkg-reconfigure x11-common
</pre>
<p>이때, chromium을 띄울 때, kiosk 모드로 띄웠음에도 불구하고 화면이 꽉 차지 않을 수 있다. 이럴 때는 다음의 옵션을 활용한다.</p>
<pre class="brush: plain; title: ; notranslate">
Added two new command line options (should work with or without --app):
--window-size=w,h
--window-position=x,y
</pre>
<p>위 옵션을 적용해 user의 .xinitrc를 다음과 같이 수정한다.</p>
<pre class="brush: plain; title: ; notranslate">
#!/bin.sh

# Run Chrome
/usr/bin/chromium --window-size=1680,1050 --window-position=0,0 --incognito --disable-ipv6 --disable-translate --kiosk http://주소

# Reboot
sudo reboot
</pre>
<p>chromium을 닫을 경우 X는 종료하고, 바로 reboot 된다.</p>
<p>아무런 옵션을 주지 않으면 framebuffer가 16bit 컬러로 동작한다는것을 알고는 32bit로 바꿔봤다.</p>
<p>아래는 최종으로 정리된 /boot/config.txt다.</p>
<pre class="brush: plain; title: ; notranslate">
# /boot/config.txt
# Disable Overscan
disable_overscan=1

# GPU 16M
gpu_mem=16

# DVI MODE
hdmi_drive=1

# DMT
hdmi_group=2

# 1680x1050
hdmi_mode=58

# 32bit Mode
framebuffer_depth=32
framebuffer_ignore_alpha=1
</pre>
<p>그리고&#8230; 기록 상 사진 몇 장 남겨본다.</p>
<div class='embed-vimeo' style='text-align:center;'><iframe src='http://player.vimeo.com/video/52606498' width='590' height='332' frameborder='0'></iframe></div>
<p><img class="alignnone size-full wp-image-822" title="Test! Test! Test!" alt="" src="http://kyungw00k.files.wordpress.com/2012/11/m5.jpeg?w=590&#038;h=786" height="786" width="590" /></p>
<p><img class="alignnone size-full wp-image-823" title="잘가 윈도우 PC" alt="" src="http://kyungw00k.files.wordpress.com/2012/11/m6.jpeg?w=590&#038;h=442" height="442" width="590" /></p>
<p><img class="alignnone size-full wp-image-824" title="제주도서관에 자리 잡은 라즈베리파이" alt="" src="http://kyungw00k.files.wordpress.com/2012/11/m7.jpeg?w=590&#038;h=442" height="442" width="590" /></p>
<p><img class="alignnone size-full wp-image-825" title="깔끔하게 정리?" alt="" src="http://kyungw00k.files.wordpress.com/2012/11/m8.jpeg?w=590&#038;h=442" height="442" width="590" /></p>
<br />  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kyungw00k.wordpress.com&#038;blog=20232505&#038;post=821&#038;subd=kyungw00k&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kyungw00k.wordpress.com/2012/11/01/%ec%9e%90%ec%b9%adlibrarypi-%ed%94%84%eb%a1%9c%ec%a0%9d%ed%8a%b8-log/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/9e3ac0dbb291e11d5fa3b012c56df724?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">parksama</media:title>
		</media:content>

		<media:content url="http://kyungw00k.files.wordpress.com/2012/11/m5.jpeg" medium="image">
			<media:title type="html">Test! Test! Test!</media:title>
		</media:content>

		<media:content url="http://kyungw00k.files.wordpress.com/2012/11/m6.jpeg" medium="image">
			<media:title type="html">잘가 윈도우 PC</media:title>
		</media:content>

		<media:content url="http://kyungw00k.files.wordpress.com/2012/11/m7.jpeg" medium="image">
			<media:title type="html">제주도서관에 자리 잡은 라즈베리파이</media:title>
		</media:content>

		<media:content url="http://kyungw00k.files.wordpress.com/2012/11/m8.jpeg" medium="image">
			<media:title type="html">깔끔하게 정리?</media:title>
		</media:content>
	</item>
		<item>
		<title>Raspberry Pi GPU에 RAM 할당량 변경하기</title>
		<link>http://kyungw00k.wordpress.com/2012/10/19/raspberry-pi-gpu%ec%97%90-ram-%ed%95%a0%eb%8b%b9%eb%9f%89-%eb%b3%80%ea%b2%bd%ed%95%98%ea%b8%b0/</link>
		<comments>http://kyungw00k.wordpress.com/2012/10/19/raspberry-pi-gpu%ec%97%90-ram-%ed%95%a0%eb%8b%b9%eb%9f%89-%eb%b3%80%ea%b2%bd%ed%95%98%ea%b8%b0/#comments</comments>
		<pubDate>Fri, 19 Oct 2012 09:57:28 +0000</pubDate>
		<dc:creator>kyungw00k</dc:creator>
				<category><![CDATA[RaspberryPi]]></category>
		<category><![CDATA[raspberry pi]]></category>

		<guid isPermaLink="false">http://kyungw00k.wordpress.com/2012/10/19/raspberry-pi-gpu%ec%97%90-ram-%ed%95%a0%eb%8b%b9%eb%9f%89-%eb%b3%80%ea%b2%bd%ed%95%98%ea%b8%b0/</guid>
		<description><![CDATA[Updated : 파일 교체가 아니라 /boot/config.txt 에서 설정할 수 있도록 바뀌었습니다. Raspberry Pi용 기본 OS에서는 아무런 변경을 하지 않는 경우에는 GPU에 기본으로 64M을 할당하게 됩니다. 256MB 모델의 경우, 192MB/64MB 형태로 부팅이 된다는 것이죠. 만약 GPU를 3D를 돌리는게 아닌 최소한의 용도로 사용한다고 할 경우에는 불필요하게 GPU에 RAM을 줄 필요가 없는 것이죠. 이를 변경하기 위해서는 이 곳에 방문해서 적절한 [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kyungw00k.wordpress.com&#038;blog=20232505&#038;post=812&#038;subd=kyungw00k&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<h2><strong>Updated : 파일 교체가 아니라 /boot/config.txt 에서 설정할 수 있도록 바뀌었습니다.</strong></h2>
<p>Raspberry Pi용 기본 OS에서는 아무런 변경을 하지 않는 경우에는 GPU에 기본으로 64M을 할당하게 됩니다.</p>
<p>256MB 모델의 경우, 192MB/64MB 형태로 부팅이 된다는 것이죠.</p>
<p>만약 GPU를 3D를 돌리는게 아닌 최소한의 용도로 사용한다고 할 경우에는</p>
<p>불필요하게 GPU에 RAM을 줄 필요가 없는 것이죠.</p>
<p><del datetime="2012-10-30T01:29:03+00:00">이를 변경하기 위해서는 <a href="https://github.com/raspberrypi/firmware/tree/master/boot">이 곳</a>에 방문해서 적절한 elf를 내려받아서 적용하시면 될 것 같습니다.</del></p>
<p><del>예를 들면, 다음과 같습니다.</del></p>
<blockquote><p><del>arm128_start.elf &#8211; 128MB을 제외한 나머지는 GPU에 할당함</del></p></blockquote>
<p><del>256MB 모델의 경우, GPU에 64MB만 할당하고 싶다면 아래 파일을 사용하시면 되겠습니다.</del></p>
<pre><del>$ sudo cp /boot/arm192_start.elf /boot/start.elf</del></pre>
<p>커널 업그레이드 하니 아래와 같은 문구를 발견했습니다.</p>
<blockquote><p>ARM/GPU split is now defined in /boot/config.txt using the gpu_mem option!</p></blockquote>
<p>Github에 가봐도 <a href="https://github.com/raspberrypi/firmware/commit/c57ea9dd367f12bf4fb41b7b86806a2dc6281176">예전처럼 별도의 파일</a>이 따로 있는게 아니더군요.</p>
<p>/boot/config.txt에 gpu_mem option을 설정하는 형태로 바뀌었습니다.</p>
<p>훨신 더 간단해진 것 같네요 <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><a href="http://elinux.org/RPi_config.txt">http://elinux.org/RPi_config.txt</a> 에 보면 아래와 같은 항목을 찾아볼 수 있습니다.</p>
<h1>Memory</h1>
<p><b>disable_l2cache</b> disable ARM access to GPU&#8217;s L2 cache. Needs corresponding L2 disabled kernel. Default 0</p>
<p><strong>gpu_mem </strong>GPU memory in megabyte. Sets the memory split between the ARM and GPU. ARM gets the remaining memory. <strong>Min 16. Default 64</strong></p>
<p><b>gpu_mem_256</b> GPU memory in megabyte for the 256MB Raspberry Pi. Ignored by the 512MB RP. Overrides gpu_mem. Max 192. Default not set</p>
<p><b>gpu_mem_512</b> GPU memory in megabyte for the 512MB Raspberry Pi. Ignored by the 256MB RP. Overrides gpu_mem. Max 448. Default not set</p>
<p>설정하지 않으면 기본은 64M을 잡는 것 같습니다.</p>
<p>실제로 dmesg로 확인해보니 그렇네요</p>
<pre class="brush: plain; title: ; notranslate">

...

[ 0.000000] Memory: 192MB = 192MB total
[ 0.000000] Memory: 188976k/188976k available, 7632k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xcc800000 - 0xe8000000 ( 440 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xcc000000 ( 192 MB)
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[ 0.000000] .text : 0xc0008000 - 0xc04c0e78 (4836 kB)
[ 0.000000] .init : 0xc04c1000 - 0xc04e0b10 ( 127 kB)
[ 0.000000] .data : 0xc04e2000 - 0xc050e1c0 ( 177 kB)
[ 0.000000] .bss : 0xc050e1e4 - 0xc05b5128 ( 668 kB)
[ 0.000000] NR_IRQS:330

...

</pre>
<p>입맛에 맛게 설정하시면 될 것 같습니다.</p>
<p>만약 16M으로 설정하고 싶다면 아래와 같이 /boot/config.txt를 설정하시면 될 것 같습니다.</p>
<pre class="brush: plain; title: ; notranslate">

gpu_mem=16

</pre>
<p><a href="http://raspberrypi.stackexchange.com/questions/673/what-is-the-optimum-split-of-main-versus-gpu-memory">이 글</a>을 보면 이런 이야기도 있네요.</p>
<blockquote><p>240MB RAM and 16 VRAM for almost zero graphical power. There is enough GPU memory to render the screen, but not much else. Use this when you need a further non GUI performance boost.</p></blockquote>
<p>용도가 GUI 환경이 아니라면 GPU에 16MB 정도 주면 된다는 이야기가 있습니다.</p>
<p>실제로 콘솔만 쓴다면 당연하겠죠? <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<br />  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kyungw00k.wordpress.com&#038;blog=20232505&#038;post=812&#038;subd=kyungw00k&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kyungw00k.wordpress.com/2012/10/19/raspberry-pi-gpu%ec%97%90-ram-%ed%95%a0%eb%8b%b9%eb%9f%89-%eb%b3%80%ea%b2%bd%ed%95%98%ea%b8%b0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/9e3ac0dbb291e11d5fa3b012c56df724?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">parksama</media:title>
		</media:content>
	</item>
		<item>
		<title>BeagleBone에 Ubuntu 및 NodeJS 설치 요약</title>
		<link>http://kyungw00k.wordpress.com/2012/10/19/beaglebone%ec%97%90-ubuntu-%eb%b0%8f-nodejs-%ec%84%a4%ec%b9%98-%ec%9a%94%ec%95%bd/</link>
		<comments>http://kyungw00k.wordpress.com/2012/10/19/beaglebone%ec%97%90-ubuntu-%eb%b0%8f-nodejs-%ec%84%a4%ec%b9%98-%ec%9a%94%ec%95%bd/#comments</comments>
		<pubDate>Fri, 19 Oct 2012 06:06:56 +0000</pubDate>
		<dc:creator>kyungw00k</dc:creator>
				<category><![CDATA[Beaglebone]]></category>
		<category><![CDATA[Log]]></category>
		<category><![CDATA[beaglebone]]></category>
		<category><![CDATA[nodejs]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://kyungw00k.wordpress.com/?p=799</guid>
		<description><![CDATA[&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; 생각날때마다 찾기 귀찮아 블로그로 남겨본다. 아래 OS 설치 및 설정이 귀찮으면 Angstrom 배포본을 사용하는게 맘 편할듯 Angstrom 관련 boot-loader 및 소스는 https://github.com/beagleboard 참고 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; I. OS 설치및 설정 1. Ubuntu ARM 설치 시작에 앞서, 비글본은 armhf architecture 를 사용한다. 따라서, 다운 받을때도 armhf 로 되어있는 preinstalled image를 다운받아야 한다. 설치는 Ubuntu에서 진행하는 것으로 한다. Mac에서 작업하려고 했으나 좀 [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kyungw00k.wordpress.com&#038;blog=20232505&#038;post=799&#038;subd=kyungw00k&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>생각날때마다 찾기 귀찮아 블로그로 남겨본다.</p>
<p>아래 OS 설치 및 설정이 귀찮으면 <a title="BeagleBone demo files" href="http://downloads.angstrom-distribution.org/demo/beaglebone/" target="_blank">Angstrom 배포본</a>을 사용하는게 맘 편할듯</p>
<p>Angstrom 관련 boot-loader 및 소스는 <a href="https://github.com/beagleboard">https://github.com/beagleboard</a> 참고</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p><strong>I. OS 설치및 설정</strong></p>
<p><strong>1. Ubuntu ARM 설치</strong></p>
<p>시작에 앞서, 비글본은 <a title="ArmHardFloatPort" href="http://wiki.debian.org/ArmHardFloatPort">armhf</a> architecture 를 사용한다.</p>
<p>따라서, 다운 받을때도 armhf 로 되어있는 preinstalled image를 다운받아야 한다.</p>
<p>설치는 Ubuntu에서 진행하는 것으로 한다.<br />
Mac에서 작업하려고 했으나 좀 불편해서.. Vmware 하나 띄워서 작업했다.</p>
<p>- http://rcn-ee.net/deb/rootfs/ 를 들어가면 Preinstalled Image를 나름 최소 용량으로 받을 수 있다.<br />
(<a href="http://rcn-ee.net/deb/rootfs/precise/ubuntu-12.04-r8-minimal-armhf-2012-10-19.tar.xz" rel="nofollow">http://rcn-ee.net/deb/rootfs/precise/ubuntu-12.04-r8-minimal-armhf-2012-10-19.tar.xz</a>)</p>
<p>- SD 카드를 넣고, 찾아본다.</p>
<p>sudo ./setup_sdcard.sh &#8211;probe-mmc</p>
<p>- 필요한 패키지를 설치한다.</p>
<p>sudo apt-get install wget pv dosfstools parted git-core</p>
<p>- SD 카드에 이미지를 심는다.</p>
<p>sudo ./setup_sdcard.sh &#8211;mmc /dev/sdb &#8211;uboot bone</p>
<p><strong>2. OS 설치 후 터미널 접속해본다.</strong></p>
<p>screen `ls /dev/{tty.usb*B,beaglebone-serial}` 115200</p>
<p><strong>3. Kernel Upgrade</strong><br />
단순 설치만으로는 BeagleBone의 Pin을 사용하기 어려우니, 관련해서 Kernel을 업데이트 해야한다.</p>
<p>URL : <a href="http://rcn-ee.net/deb/precise-armhf/LATEST-omap-psp" rel="nofollow">http://rcn-ee.net/deb/precise-armhf/LATEST-omap-psp</a></p>
<pre>ABI:1 EXPERIMENTAL http://rcn-ee.net/deb/precise-armhf/v3.2.0-rc2-d0/install-me.sh
ABI:1 TESTING http://rcn-ee.net/deb/precise-armhf/v3.6.2-bone0/install-me.sh
ABI:1 STABLE http://rcn-ee.net/deb/precise-armhf/v3.2.32-psp25/install-me.sh</pre>
<p>STABLE 용 URL을 내려받아 root 권한으로 install-me.sh를 실행해 커널을 업데이트 한다.</p>
<p><strong>4. USB Ethernet Gadget로 Internet 잡으려면? <del>udhcpc를 설치한다.</del></strong><br />
(Mac에서는 Internet 공유를 통해 쉽게 설정이 가능하기 떄문에, USB Ethernet Gadget에 공유를 이미 걸어놨다.)</p>
<p>A. g_ether 모듈이 로드 되고 있는지 확인한다.</p>
<pre class="brush: plain; title: ; notranslate">

$ dmesg | grep g_ether

[    2.126892]  gadget: g_ether ready

</pre>
<p>B. 로드되고 있다면 /etc/network/interfaces 를 수정한다.</p>
<pre class="brush: plain; title: ; notranslate">&lt;/pre&gt;
#/etc/network/interfaces 에 아래 내용을 추가한다.

auto usb0
iface usb0 inet dhcp
&lt;pre&gt;</pre>
<p><strong>5. analog input, PWM, I2C, SPI 확인</strong></p>
<p><strong style="color:red;font-size:15pt;">Updated: 12.04 r8 부터는 analog input, PWM, I2C, SPI를 바로 사용할 수 있다.</strong></p>
<pre class="brush: plain; title: ; notranslate">
$  ls /dev/i2c*
 /dev/i2c-1 /dev/i2c-3

$  ls /dev/spi*
 /dev/spidev2.0

$ ls -Fd /sys/devices/platform/omap/e*
 /sys/devices/platform/omap/ecap.0/ /sys/devices/platform/omap/ehrpwm.0/
 /sys/devices/platform/omap/ecap.1/ /sys/devices/platform/omap/ehrpwm.1/
 /sys/devices/platform/omap/ecap.2/ /sys/devices/platform/omap/ehrpwm.2/
 /sys/devices/platform/omap/edma.0/

$ ls /sys/devices/platform/omap/tsc/a*
 /sys/devices/platform/omap/tsc/ain1 /sys/devices/platform/omap/tsc/ain5
 /sys/devices/platform/omap/tsc/ain2 /sys/devices/platform/omap/tsc/ain6
 /sys/devices/platform/omap/tsc/ain3 /sys/devices/platform/omap/tsc/ain7
 /sys/devices/platform/omap/tsc/ain4 /sys/devices/platform/omap/tsc/ain8

</pre>
<p>만약 위와 같이 나오지 않으면 모듈이 로드가 되지 않은 것이니 아래 명령을 실행하고, 다시 한번 확인해보기 바란다.</p>
<pre class="brush: plain; title: ; notranslate">
$ sudo modprobe ti_tscadc
</pre>
<p>부팅시에 항상 모듈을 불러오기 위해 /etc/modules에 ti_tscadc를 추가해두자.</p>
<pre class="brush: plain; title: ; notranslate">
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with &quot;#&quot; are ignored.

ti_tscadc
</pre>
<p><strong>II. NodeJS 0.8.x 설치하기</strong></p>
<p>Updated : v0.8.14 설치</p>
<pre class="brush: plain; title: ; notranslate">
$ ./configure
$ CXXFLAGS=&quot;-fno-rtti -fno-exceptions -march=armv7-a&quot; make -j2
$ CXXFLAGS=&quot;-fno-rtti -fno-exceptions -march=armv7-a&quot; make install
</pre>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>p.s. 막 글을 저장하려는 찰나에 Raspberry Pi 512M 모델이 도착했다. =_=;</p>
<br />  <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kyungw00k.wordpress.com&#038;blog=20232505&#038;post=799&#038;subd=kyungw00k&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kyungw00k.wordpress.com/2012/10/19/beaglebone%ec%97%90-ubuntu-%eb%b0%8f-nodejs-%ec%84%a4%ec%b9%98-%ec%9a%94%ec%95%bd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/9e3ac0dbb291e11d5fa3b012c56df724?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">parksama</media:title>
		</media:content>
	</item>
	</channel>
</rss>
