ubuntu@ubuntu-armhf:~$ cd linux-dev
root@ubuntu-armhf:~/linux-dev# git checkout origin/am33x-v3.8 -b tmp
Branch tmp set up to track remote branch am33x-v3.8 from origin.
Switched to a new branch 'tmp'
¿Ï·áµÇ¸é Ä¿³Î ºôµå ¸í·É¾î¸¦ ½ÇÇàÇÕ´Ï´Ù.
root@ubuntu-armhf:~/linux-dev# ./build_kernel.sh
+ Detected build host [Ubuntu 12.04.2 LTS]
+ host: [armv7l]
+ git HEAD commit: [008c78651f7b25da854f579cdb84e8fee075fcf5]
Debian/Ubuntu/Mint: missing dependencies, please install:
-----------------------------
sudo apt-get update
sudo apt-get install bc device-tree-compiler lzma lzop man-db u-boot-tools
-----------------------------
* Failed dependency check
ÀÌ ´Ü°è¿¡¼ À§¿Í °°ÀÌ µðÆÒ´ø½Ã üũ ¸Þ½ÃÁö°¡ ³ªÅ¸³¯ ¼öµµ ÀÖ½À´Ï´Ù.
ȸ鿡¼ Áö½ÃÇϴµ¥·Î apt-getÀ» updateÇϽðí, °ü·Ã ÆÐÅ°Áö¸¦ ¸ÕÀú ¼³Ä¡ÇϽʽÿÀ.
°æ¿ì¿¡ µû¶ó ´õ ¸¹°Å³ª ´õ ÀûÀº ÆÐÅ°Áö°¡ Ç¥½ÃµÉ ¼ö ÀÖ½À´Ï´Ù.
¸ðµÎ ¼³Ä¡ÇØÁØ ÈÄ ´Ù½Ã ºôµå Ä¿³Î ½ºÅ©¸³Æ®¸¦ ½ÇÇàÇØÁÝ´Ï´Ù.
root@ubuntu-armhf:~/linux-dev# ./build_kernel.sh
+ Detected build host [Ubuntu 12.04.2 LTS]
+ host: [armv7l]
+ git HEAD commit: [008c78651f7b25da854f579cdb84e8fee075fcf5]
-----------------------------
scripts/gcc: Using: gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------------------------
debug: CC=
-----------------------------
Error: git user.name/user.email not set:
For help please read:
https://help.github.com/articles/setting-your-username-in-git
https://help.github.com/articles/setting-your-email-in-git
For example, if your real name and email was: Billy Everteen & me@here.com
you would type the following into the terminal window to set it up:
-----------------------------
git config --global user.name "Billy Everyteen"
git config --global user.email "me@here.com"
-----------------------------
ȸé°ú °°ÀÌ ¶Ç ¿¡·¯°¡ ³³´Ï´Ù. git À¯Àú³×ÀÓ°ú À̸ÞÀÏÀÌ ¼¼ÆõÇÁö ¾Ê¾Ò±â ¶§¹®ÀÔ´Ï´Ù.
¿¹½Ã¿Í °°ÀÌ À̸§°ú À̸ÞÀÏÀ» ¼ÂÆÃÇÕ´Ï´Ù.
root@ubuntu-armhf:~/linux-dev# git config --global user.name "Billy Everyteen"
root@ubuntu-armhf:~/linux-dev# git config --global user.email "me@here.com"
¼¼Æà ÈÄ ´Ù½Ã ½ºÅ©¸³Æ®¸¦ ½ÇÇàÇØÁÖ¸é ÄÄÆÄÀÏÀÌ ½ÃÀ۵˴ϴÙ.
root@ubuntu-armhf:~/linux-dev# ./build_kernel.sh
+ Detected build host [Ubuntu 12.04.3 LTS]
+ host: [armv7l]
+ git HEAD commit: [008c78651f7b25da854f579cdb84e8fee075fcf5]
-----------------------------
scripts/gcc: Using: gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------------------------
debug: CC=
-----------------------------
scripts/git: LINUX_GIT not defined in system.sh
using default location: /root/linux-dev/ignore/linux-src/
-----------------------------
scripts/git: Debug: LINUX_GIT is setup as...
/root/linux-dev/ignore/linux-src
-----------------------------
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[branch "master"]
remote = origin
merge = refs/heads/master
-----------------------------
scripts/git: Updating LINUX_GIT tree via: git fetch
/root/linux-dev
Resolve operation not in progress, we are not resuming.
git tree is clean...
[v3.8.13-bone28 520ded2] empty cleanup commit
HEAD is now at 520ded2 empty cleanup commit
Checking out files: 100% (22794/22794), done.
Switched to branch 'master'
Your branch is ahead of 'origin/master' by 1 commit.
Already up-to-date.
Deleted branch v3.8.13-bone28 (was 520ded2).
Checking out files: 100% (22704/22704), done.
Switched to a new branch 'v3.8.13-bone28'
v3.8.13
Starting patch.sh
dir: dma
Applying: Without MACH_ option Early printk (DEBUG_LL)
Applying: ARM: OMAP: Hack AM33xx clock data to allow JTAG use
..... (ÀÌÇÏ »ý·«)
ÇÑÂü °É¸³´Ï´Ù. configuration âÀÌ ¶ã ¶§±îÁö ¹«ÇÑ ±â´Ù¸²ÀÌ ½ÃÀ۵˴ϴÙ.
¹º°¡ ¸¶±¸ ȸ鿡 »Ñ·ÁÁöÁö¸¸ Àü ¹«½¼ ¸»ÀÎÁö ¸ð¸¨´Ï´Ù...
Kernel Configuration âÀÌ ¶¹½À´Ï´Ù.
¿©±â¼ Ä¿³Î°ú ÇÔ²² ÄÄÆÄÀÏ ÇÒ ¸ðµâ µå¶óÀ̹ö¸¦ ¼±ÅÃÇØÁÝ´Ï´Ù.
ȸ鿡¼ 'Device Drivers --->' Ç׸ñÀ» ¼±ÅÃÇÕ´Ï´Ù.
Á¦°¡ »ç¿ëÇÒ ¿Â½Àµµ ¼¾¼´Â 'Hardware Monitoring Support --->' Ç׸ñ¿¡ ÀÖ½À´Ï´Ù.
¼±ÅÃÇؼ µé¾î°©´Ï´Ù.
¸®½ºÆ®¸¦ Âß ³»·Á¿À´Ù º¸¸é 'Sensiron humidity and temperature sensors. SHT15 and compat.'¶ó´Â Ç׸ñÀÌ ÀÖ½À´Ï´Ù. Á¦°¡ ĸÃçÇÑ È¸é¿¡´Â ÀÌ Ç׸ñ ¾Õ¿¡ <M>ÀÌ Ç¥½ÃµÇ¾î Àִµ¥, Ãʱ⠻óÅ¿¡´Â ÀÌ ºÎºÐÀÌ ¼±ÅõǾî ÀÖÁö ¾Ê½À´Ï´Ù. SHT21 Ç׸ñ¸¸ ¼±ÅÃÀÌ µÇ¾î ÀÖ½À´Ï´Ù.
SHT15 Ç׸ñÀ» ¼±ÅÃÇÏ°í configurationÀ» ºüÁ®³ª¿À¸é ÄÄÆÄÀÏ °úÁ¤ÀÌ ÁøÇàµË´Ï´Ù.
½Ã°£ÀÌ ´Ù¼Ò ¼Ò¿äµË´Ï´Ù.
-----------------------------
script Complete
eewiki.net: [user@localhost:~$ export kernel_version=3.8.13-bone28]
-----------------------------
ȸé°ú °°ÀÌ ½ºÅ©¸³Æ®°¡ ¿Ï·áµÇ¾ú´Ù´Â ¸Þ¼¼Áö°¡ ¶ß¸é ÄÄÆÄÀÏÀÌ ¿Ï·áµÈ °ÍÀÔ´Ï´Ù.
ÀåÀå ¹Ý³ªÀýÀÌ ³Ñ°Ô °É¸®³×¿ä...
3.8.13-bone28 ¹öÀüÀ¸·Î ¾÷µ¥ÀÌÆ® µÇ¾ú½À´Ï´Ù.
ÀÚ.. ±×·³ ÄÄÆÄÀÏµÈ Ä¿³Î À̹ÌÁö·Î ºÎÆÃÇϱâ À§ÇØ ¾à°£ÀÇ Ãß°¡ÀÛ¾÷À» ÇØ Áà¾ß ÇÕ´Ï´Ù.
deploy µð·ºÅ丮¿¡ »ý¼ºµÈ Ä¿³Î À̹ÌÁö¸¦ ºÎÆ®ÆÄƼ¼ÇÀ¸·Î Ä«ÇÇÇÕ´Ï´Ù.
root@ubuntu-armhf:~/linux-dev# export kernel_version=3.8.13-bone28
À§ÀÇ ½ºÅ©¸³Æ® ¿Ï·á ¸Þ¼¼Áö¿¡ Ç¥½ÃµÈ Ä¿³Î ¹öÀüÀ» ÀÔ·ÂÇØÁÝ´Ï´Ù.
ÇØ´ç ÆÄƼ¼ÇÀ» ¸¶¿îÆ®ÇÕ´Ï´Ù.
root@ubuntu-armhf:~/linux-dev# DISK=/dev/mmcblk0
root@ubuntu-armhf:~/linux-dev# mkdir /media/boot
root@ubuntu-armhf:~/linux-dev# mount ${DISK}p1 /media/boot/
root@ubuntu-armhf:~/linux-dev# mkdir /media/rootfs
root@ubuntu-armhf:~/linux-dev# mount ${DISK}p2 /media/rootfs/
Ä¿³Î À̹ÌÁö¸¦ Ä«ÇÇÇÕ´Ï´Ù.
root@ubuntu-armhf:~# cp -v ./linux-dev/deploy/${kernel_version}.zImage /media/boot/zImage
`./linux-dev/deploy/3.8.13-bone28.zImage' -> `/media/boot/zImage'
cp: writing `/media/boot/zImage': No space left on device
ºÎÆ® ÆÄƼ¼Ç ¸¶¿îÆ® ÈÄ Ä¿³Î À̹ÌÁö Ä«ÇÇ ½ÃµµÇßÀ¸³ª ¿ë·® ºÎÁ·À¸·Î ½ÇÆÐÇÏ¿´½À´Ï´Ù.
¿ë·®À» È®ÀÎÇغýÀ´Ï´Ù.
root@ubuntu-armhf:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mmcblk0p2 29G 3.1G 25G 12% /
devtmpfs 248M 4.0K 248M 1% /dev
none 50M 224K 50M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 248M 0 248M 0% /run/shm
/dev/mmcblk0p1 1004K 1004K 0 100% /boot/uboot
/dev/mmcblk0p1 1004K 1004K 0 100% /media/boot
/dev/mmcblk0p2 29G 3.1G 25G 12% /media/rootfs
boot ÆÄƼ¼Ç »ç¿ë·®ÀÌ 100%³×¿ä..
ÇØ´ç µð·ºÅ丮¿¡¼ ¾î¶² ÆÄÀÏÀÌ ¿ë·®À» ¸¹ÀÌ ¸Ô´Â°ÇÁö ºÃ½À´Ï´Ù.
root@ubuntu-armhf:~# cd boot
root@ubuntu-armhf:/boot# ls -al
total 5556
drwxr-xr-x 4 root root 4096 Jun 9 01:50 .
drwxr-xr-x 22 root root 4096 Oct 23 12:23 ..
-rw-r--r-- 1 root root 2328220 May 29 10:56 System.map-3.8.13-bone20
-rw-r--r-- 1 root root 107778 May 29 10:56 config-3.8.13-bone20
drwxr-xr-x 2 root root 4096 Jun 9 01:50 dtbs
drwxr-xr-x 2 root root 16384 Jan 1 1970 uboot
-rwxr-xr-x 1 root root 3218440 May 29 10:56 vmlinuz-3.8.13-bone20
lrwxrwxrwx 1 root root 21 Jun 9 01:50 zImage -> vmlinuz-3.8.13-bone20
ÀÌÀü Ä¿³ÎÀ̹ÌÁö¿Í ½Ã½ºÅÛ ¸ÊÀÌ Á¦ÀÏ Å« ¿ë·®À» Â÷ÁöÇÏ°í ÀÖ¾ú½À´Ï´Ù.
ÀϺθ¸ »èÁ¦ÇÏ·Á°í ÇßÀ¸³ª µÎ ÆÄÀÏÀÌ ¿ö³« Å« ¿ë·®À» Â÷ÁöÇÏ°í ÀÖ¾î¼,
ºÎÆÃÀÌ µÇÁö ¾ÊÀ» À§ÇèÀ» °¨¼öÇÏ°í ÇØ´ç µð·ºÅ丮ÀÇ ¸ðµç ÆÄÀÏÀ» »èÁ¦ÇÏ¿´½À´Ï´Ù
uboot µð·ºÅ丮´Â Àý´ë »èÁ¦ÇÏ¸é ¾ÈµË´Ï´Ù.
root@ubuntu-armhf:/boot# rm -rf System.map-3.8.13-bone20 config-3.8.13-bone20 dtbs/ vmlinuz-3.8.13-bone20 zImage
root@ubuntu-armhf:/boot# ls
uboot
ºÎÆ® °ü·Ã ÆÄÀÏÀ» boot µð·ºÅ丮·Î Ä«ÇÇÇÕ´Ï´Ù.
root@ubuntu-armhf:/boot# cd ~/linux-dev/deploy/
root@ubuntu-armhf:~/linux-dev/deploy# cp -v 3.8.13-bone28.zImage /boot/zImage
`3.8.13-bone28.zImage' -> `/boot/zImage'
root@ubuntu-armhf:~/linux-dev/deploy# ls /boot
uboot zImage
ȯ°æ¼³Á¤ ÆÄÀϵµ ÇÔ²² Ä«ÇÇÇÕ´Ï´Ù.
root@ubuntu-armhf:~/linux-dev/deploy# cp 3.8.13-bone28.config /boot/
root@ubuntu-armhf:~/linux-dev/deploy# ls /boot
3.8.13-bone28.config uboot zImage
dtbs ÆÄÀϵµ boot µð·ºÅ丮¿¡ Ç®¾îÁÝ´Ï´Ù.
root@ubuntu-armhf:~/linux-dev/deploy# mkdir -p /boot/dtbs/
root@ubuntu-armhf:~/linux-dev/deploy# tar xofv 3.8.13-bone28-dtbs.tar.gz -C /boot/dtbs/
root@ubuntu-armhf:~/linux-dev/deploy# ls /boot
3.8.13-bone28.config dtbs uboot zImage
¸®ºÎÆÃÇÕ´Ï´Ù.
root@ubuntu-armhf:~/linux-dev/deploy# reboot
Á¤»óÀûÀ¸·Î ºÎÅÁÀÌ µÈ´Ù¸é ¿Ï·áµÈ °ÍÀÔ´Ï´Ù.
ÀÌÁ¦ µå¶óÀ̹ö ÆÄÀÏÀ» Ç®¾î ÁÙ Â÷·ÊÀÔ´Ï´Ù.
root@ubuntu-armhf:~# cd linux-dev/deploy/
root@ubuntu-armhf:~/linux-dev/deploy# ls
3.8.13-bone28-dtbs.tar.gz 3.8.13-bone28-modules.tar.gz 3.8.13-bone28.zImage
3.8.13-bone28-firmware.tar.gz 3.8.13-bone28.config tmp
deploy µð·ºÅ丮¿¡ ÀÖ´Â ¶óÀ̺귯¸® ÆÄÀÏÀ» ·çÆ®¿¡ ÇØÁ¦ÇÕ´Ï´Ù.
root@ubuntu-armhf:~/linux-dev/deploy# tar xovf 3.8.13-bone28-modules.tar.gz -C /
ÇØÁ¦ ÈÄ ÇØ´ç ¶óÀ̺귯¸® µð·ºÅ丮¸¦ »ìÆ캸¸é sht15.ko ÆÄÀÏÀÌ Á¸ÀçÇÏ´Â °ÍÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.
root@ubuntu-armhf:~/linux-dev/deploy# ls /lib/modules/3.8.13-bone28/kernel/drivers/hwmon/
gpio-fan.ko hih6130.ko max197.ko sht15.ko sht21.ko tmp102.ko
¸ðµâÀ» ·Îµå ÇÕ´Ï´Ù.
·çÆ®±ÇÇÑÀ» ¾òÀº »óÅ¿¡¼ ¾Æ·¡ÀÇ ¸í·É¾î¸¦ ½ÇÇàÇÕ´Ï´Ù.
root@ubuntu-armhf:~# modprobe sht15
·ÎµåµÈ ¸ðµâÀÇ Á¤º¸¸¦ È®ÀÎÇÕ´Ï´Ù.
root@ubuntu-armhf:~# modinfo sht15
filename: /lib/modules/3.8.13-bone28/kernel/drivers/hwmon/sht15.ko
description: Sensirion SHT15 temperature and humidity sensor driver
license: GPL
srcversion: 8F60F17748F23187A4CE01F
alias: platform:sht75
alias: platform:sht71
alias: platform:sht15
alias: platform:sht11
alias: platform:sht10
depends:
intree: Y
vermagic: 3.8.13-bone28 SMP mod_unload modversions ARMv7 p2v8
i2c_tools ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÕ´Ï´Ù.
root@ubuntu-armhf:/# apt-get install i2c-tools
i2c ¸ðµâÀ» ã±â À§ÇØ ¾Æ·¡ ¸í·É¾î¸¦ ÀÔ·ÂÇÕ´Ï´Ù.
root@ubuntu-armhf:/# i2cdetect -r -y 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- UU -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- UU -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: UU -- -- -- -- -- -- --
root@ubuntu-armhf:/# i2cdetect -r -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
±×·±µ¥ °Ë»öÀÌ µÇÁö ¾Ê½À´Ï´Ù.
17,18¹ø Æ÷Æ®¸¦ ÀÌ¿ëÇصµ, 19, 20¹ø Æ÷Æ®¸¦ ÀÌ¿ëÇصµ ¸¶Âù°¡Áö ÀÔ´Ï´Ù.
root@ubuntu-armhf:~# echo sht15 0x40 > /sys/class/i2c-adapter/i2c-0/new_device
root@ubuntu-armhf:~# echo sht15 0x40 > /sys/class/i2c-adapter/i2c-1/new_device
¾Æ¹«·± ¹ÝÀÀÀÌ ¾ø½À´Ï´Ù ¤Ð.¤Ð
Ȥ½Ã ¼¾¼°¡ ºÒ·®Àΰ¡ ½Í¾î ¼¾¼¸¦ ¾ÆµÎÀ̳뿡 ºÙ¿©¼ ¶óÀ̺귯¸® ·ÎµåÇؼ Å×½ºÆ® ÇØ º¸¾Ò½À´Ï´Ù.
°ªÀÌ Á¤»óÀûÀ¸·Î ³ª¿À´Â °ÍÀ» È®ÀÎÇÏ¿´½À´Ï´Ù.
¼¾¼¿¡´Â ¹®Á¦°¡ ¾øÀ¸³ª ¸®´ª½º¿¡¼ ÀνÄÀ» ¸øÇϹǷÎ, ´Ù¸¥ ¹æ¹ýµéÀ» ã¾ÆºÁ¾ß ÇÒ °Í °°½À´Ï´Ù.
Ä¿³Î µå¶óÀ̹ö¸¦ »ç¿ëÇÏ´Â ¹æ¹ý¿¡ ´ëÇؼµµ ´õ ¾Ë¾ÆºÁ¾ß ÇÒ °Í °°½À´Ï´Ù.
¿©±âÀú±â ã¾Æº¸´Ï ÇØ´ç ¼¾¼°¡ I2C Ç¥ÁØ ÇÁ·ÎÅäÄÝÀ» »ç¿ëÇÏ´Â °ÍÀÌ ¾Æ´Ï¶ó I2C¿¡¼ º¯ÇüµÈ µ¶ÀÚÀûÀÎ ÇÁ·ÎÅäÄÝÀ» »ç¿ëÇÑ´Ù´Â ±Ûµµ º¸ÀÌ°í ¿©·¯°¡Áö ¹®Á¦Á¡ÀÌ ³²¾Æ ÀÖ´Â °Í °°½À´Ï´Ù.
¸®´ª½º Ãʺ¸, Çϵå¿þ¾î Ãʺ¸°¡ ÇÁ·ÎÁ§Æ®¸¦ ÁøÇàÇÏ·Á´Ï ¾î·Á¿î ºÎºÐµéÀÌ ¸¹³×¿ä..
±â°£³»¿¡ ÇÁ·ÎÁ§Æ®¸¦ ¿Ï¼öÇÏÁö ¸øÇÒÁöµµ ¸ð¸£Áö¸¸, ±×·¡µµ °è¼Ó ¹æ¹ýÀ» ã¾Æº¸°í ÁøÇà ÇØ º¸°Ú½À´Ï´Ù.
º» Á¦Ç°Àº ICbanQ¿¡¼ ÈÄ¿øÇÏ°í ICbanQ ¹«»ó üÇè´Ü 10±â È°µ¿ÀÇ ÀÏȯÀ¸·Î üÇè Á¦Ç°À» Á¦°ø ¹Þ¾Æ ÀÛ¼ºµÇ¾ú½À´Ï´Ù.