SAM9407 ¸®´ª½º HOWTO

ÀÛ¼ºÀÚ: Â÷¿µÈ£<ganadist@dacome.co.kr>
 

°³ÀÎÀûÀ¸·Î »ç¿îµå Æ®·¢ 128 DDMA(ÈçÈ÷ »çÆ®·çºñ¶ó°í ºÒ¸®´Â ±âÁ¾)À» ¸®´ª½º¿¡¼­ »ç¿ëÇϸ鼭 ¾òÀº ÆÁÀ» ¸ð¾ÆµÎ¾ú´Ù.

ÇöÀç Áö¿øµÇ´Â »ç¿îµå Ä«µå´Â

ÀÌ´Ù.
 

¼Ò½º¸¦ ¾òÀ»¼ö Àִ°÷

ÄÄÆÄÀÏ ¹æ¹ý


¸ÕÀú ¹ÞÀº ÆÄÀÏÀ» µð·ºÅ丮¿¡ Ǭ´Ù.

[root@ganadist src]# tar xvfz sam9407-0.8.9.tar.gz

±×´ÙÀ½ µð·ºÅ丮¿¡ µé¾î °£´Ù.

[root@ganadist src]# cd sam9407-0.8.9

[root@ganadist sam9407-0.8.9]#

±×´ÙÀ½ ÄÄÆÄÀÏ È¯°æ¼³Á¤À» ÇØÁØ´Ù.

[root@ganadist sam9407-0.8.9]# ./configure
loading cache ./config.cache
checking for gcc... (cached) gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
                    ....
                    ....
                    ....
checking wether module versions is enabled... yes
creating ./config.status
creating Makefile
creating kernel/Makefile
creating init/Makefile
creating x9407/Makefile
[root@ganadist sam9407-0.8.9]#

ÄÄÆÄÀÏÀ» ÇØÁØ´Ù.
[root@ganadist sam9407-0.8.9]# make
make[1]: Entering directory `/usr/local/src/sam9407-0.8.9/kernel'
gcc -O2 -Wall -m486 -fomit-frame-pointer -fno-strength-reduce -I/usr/src/linux/include -D__KERNEL__ -DMODULE -DMODVERSIONS -include /usr/src/linux/include/linux/modversions.h -DSAM_VERSION_MAJOR=0 -DSAM_VERSION_MINOR=8 -DSAM_VERSION_TINY=9 -DSAM_MAJOR=145    -c alloc.c
                    ....
                    ....
                    ....
g++ -o x9407 x9407.o controls.o panes.o device.o utils.o api_none.o api_vanilla.o api_homstdr.o Tab.o Dial.o PeakMeter.o Layout.o laygram.o laylex.o sfDir.o sfDraw.o sfPath.o sfSelFile.o -L/usr/X11R6/lib -lXaw3d -lXmu -lXt -lXpm  -lSM -lICE -lX11
make[1]: Leaving directory `/usr/local/src/sam9407-0.8.9/x9407'
[root@ganadist sam9407-0.8.9]#

´ÙÀ½ ¼³Ä¡¸¦ ÇÑ´Ù.
[root@ganadist sam9407-0.8.9]# make install
rm -f //etc/rc.d/init.d/sam9407
sed -e 's#@''VERSION@#0.8.9#g' -e 's#@''DEV_MAJOR@#145#g' -e 's#@''SBIN_DIR@#//sbin#g' -e 's#@''MACHINE@#i386#g' etc/sam9407-redhat-init.sh.in >//etc/rc.d/init.d/sam9407
                    ....
                    ....
                    ....
sed -e 's#@''VERSION@#0.8.9#g' -e 's#@''DEV_MAJOR@#145#g' -e 's#@''SBIN_DIR@#//sbin#g' -e 's#@''MACHINE@#i386#g' etc/install.sh.in >/tmp/sam9407-install.sh
sh /tmp/sam9407-install.sh
rm -f /tmp/sam9407-install.sh
[root@ganadist sam9407-0.8.9]#

´ÙÀ½ ¸ðµâ ÀÇÁ¸¼ºÀ» ¸¸µç´Ù.
[root@ganadist sam9407-0.8.9]#depmod -a

¸ðµâÀ» ¿Ã·Áº»´Ù.
[root@ganadist sam9407-0.8.9]# modprobe sam9407
[root@ganadist sam9407-0.8.9]# lsmod
Module                  Size  Used by
sam9407                80916   0  (autoclean)
autofs                  9188   1  (autoclean)
ne                      6256   1  (autoclean)
8390                    6052   0  (autoclean) [ne]
vfat                    9084   4  (autoclean)
fat                    30272   4  (autoclean) [vfat]
[root@ganadist sam9407-0.8.9]#dmesg
                    ....
                    ....
                    ....
sam9407: found st128pci port=0xe000, irq=0
[root@ganadist sam9407-0.8.9]#
 

»ç¿îµå Ä«µå »ç¿ëÇϱâ


ÀÌÁ¦ Æß¿þ¾î¿Í »ç¿îµå ÆùÆ®¸¦ ·ÎµùÇÑ´Ù.
·ÎµùÇÏ´Â ¹æ½ÄÀº ¸í·ÉÇà¿¡¼­ ¸í·ÉÁÖ´Â ¹æ¹ý°ú ¾È¿¡ Æ÷ÇÔµÈ ¹Í¼­(x9407)¿¡¼­ ·ÎµùÇÏ´Â ¹æ¹ýÀÌ ÀÖ´Ù.
¿©±â¼­´Â ¸í·ÉÇàÀ¸·Î ·ÎµùÇÏ´Â ¹æ¹ýÀÌ´Ù.
[root@ganadist sam9407-0.8.9]# sam9407 -f /etc/sound/hoon4d.bin -b 0:/etc/sound/gssbk32l.94b

ÀÌÁ¦ È®ÀÎ ÇÑ´Ù.
[root@ganadist sam9407-0.8.9]# cat /dev/sam0_sndstat
driver:         sam9407-0.8.9
soundcard:      st128pci
firmware:       hoon4d
have-audio:     yes
have-midi:      yes
memory-total:   10240k
memory-free:    271k
memory-sbank:   3691k
memory-audio:   0k
channels-play:  0/8
channels-rec:   0/1
[root@ganadist sam9407-0.8.9]#
 
 

/etc/sam9407.conf ÀÌ¿ëÇϱâ ÀÌ ÆÄÀÏÀº sam9407À» ½ÇÇà½Ãų¶§ ±âº»À¸·Î ÀоîµéÀÌ´Â ¼³Á¤ ÆÄÀÏÀÌ´Ù.

ÀÌ ÆÄÀϾȿ¡´Â »ç¿îµåÄ«µåÀÇ ÆùÆ®·¥ Å©±â, irq¼³Á¤, Æß¿þ¾î À§Ä¡, »ç¿îµå ¹ðÅ© À§Ä¡ µîµîÀ» ¼³Á¤ ÇØÁØ´Ù.
Àú°°Àº °æ¿ì¿¡´Â ÆÄÀÏÀÌ ÀÌ·¸°Ô ±¸¼ºµÇ¾î ÀÖ´Ù.

[root@ganadist src]# cat /etc/sam9407.conf
mem 4M
irq 5
firmware /etc/sound/hoon4d.bin
soundbank0 /etc/sound/gssbk32l.94b

ÀÌ·±½ÄÀ¸·Î ÆÄÀÏÀº ¸¸µçÈÄ¿¡´Â sam9407¿¡ ¾î¶°ÇÑ ¿É¼Çµµ ºÙÀÏ ÇÊ¿ä°¡ ¾ø´Ù.

´ÜÁö sam9407¸¸ ½ÇÇà ½ÃÄÑÁÖ¸é µÈ´Ù.
[root@ganadist src]# /sbin/sam9407
 

/etc/rc.d/init.d/sam9407 ÀÌ¿ëÇϱâ

»ç¿ëÇÏ´Ù º¸¸é °è¼Ó ½Ã½ºÅÛÀ» ½ÃÀÛÇÒ¶§ ¸¶´Ù °è¼Ó sam9407·Î Æß¿þ¾î¿Í »ç¿îµå¹ðÅ©¸¦ ·Îµù ½ÃÄÑÁà¾ß ÇÑ´Ù.

ÀÌ°ÍÀ» ½Ã½ºÅÛ½ÃÀÛÇÒ¶§ ÀÚµ¿À¸·Î ·ÎµùÇÏ°Ô ÇÒ¼ö ÀÖ´Â ¹æ¹ýÀÌ ¾øÀ»±î?

¸ðµâÀ» ¼³Ä¡ÇÏ°í ³ª¸é ½Ã½ºÅÛ µ¥¸ó ¼­ºñ½º ½ºÅ©¸³Æ®°¡ ¸ð¿©ÀÖ´Â

/etc/rc.d/init.d/ µð·ºÅ丮¿¡ ´ÙÀ½°ú °°Àº ½ºÅ©¸³Æ®°¡ ¼³Ä¡µÇ¾î ÀÖ´Â °ÍÀ» º¼¼ö ÀÖ´Ù.

[root@ganadist /root]# ll /etc/rc.d/init.d/sam9407
-rwxr-xr-x   1 root     root          404 Oct 28 12:02 /etc/rc.d/init.d/sam9407*

¿ì¸®´Â ´ÜÁö ÀÌ°ÍÀ» °¢°¢ÀÇ ·±·¹º§¿¡ ¸Â°Ô ½É¹ú¸¯ ¸µÅ©¸¸ ÇØÁÖ¸é µÈ´Ù.

[root@ganadist /root]# cd /etc/rc.d/rc3.d
[root@ganadist rc3.d]# ln -s ../init.d/sam9407 S85sam9407
[root@ganadist rc3.d]# cd ../rc5.d
[root@ganadist rc5.d]# ln -s ../init.d/sam9407 S85sam9407

ÀÌÁ¦ ´ÙÀ½ºÎÅÍ´Â ½Ã½ºÅÛÀÌ ½ÃÀÛÇÒ¶§ ´ÙÀ½°ú °°Àº ¸Þ¼¼Áö¸¦ º¼¼ö ÀÖÀ» °ÍÀÌ´Ù.

Initializing SAM9407                       [OK]
 
 

esd¸¦  »ç¿ëÇÏ·Á¸é..

ºñÆ®¿Í »ùÇøµ ·¹ÀÌÆ®¸¦ ¾ÆÁÖ ³·Ãç¾ß ÇÑ´Ù..
/etc/esd.conf¿¡ ´ÙÀ½°ú °°ÀÌ ¼öÁ¤ÇÏ¸é µÈ´Ù.

spawn_options=-b -r 11025 -terminate -nobeeps -as 2

-b´Â 8ºñÆ®·Î ¼³Á¤ -r ¼ýÀÚ´Â »ùÇøµ·¹ÀÌÆ® ¼³Á¤ÀÌ´Ù.
±×³ð°ú enl¿¡¼­ ¼Ò¸®¸¦ µéÀ»¼ö ÀÖ´Ù´Â ÀåÁ¡ ÀÌ¿Ü¿¡´Â ¾øÁö¸¸
µ¿½Ã 8Ãâ·ÂÀÌ µÇ´Â »ç¿îµåÄ«µå¿¡¼­ 1°³Âë ½áµµ »ó°üÀº ¾øÀ»µí ÇÏ´Ù :)