== [wiki:STLinuxInstall STLinux °³¹ßȯ°æ ±¸Ãà] == * ÀÛ¼ºÀÚ Á¶ÀçÇõ([mailto:minzkn@minzkn.com]) * °íÄ£°úÁ¤ 2009³â 7¿ù 26ÀÏ : óÀ½¾¸ - STLinux v2.3 ±âÁØÀ¸·Î ÀÛ¼º[[br]] ||[[TableOfContents]] || === ½ÃÀÛÇϱâÀü¿¡ === STLinuxÀÇ °³¹ßȯ°æÀº RPM(RedHat Package Manager)ÆÄÀÏÇüÅ·Π¹èÆ÷µË´Ï´Ù. ¿ì¼± ¿ì¸®´Â ÀÌ°ÍÀ» ¼³Ä¡ÇÒ¼ö ÀÖ´Â ¸®´ª½º(Linux) ¹èÆ÷ÆÇÀÌ ¼³Ä¡µÈ ÀÎÅÍ³Ý ¿¬°áÀÌ °¡´ÉÇÑ Host PC ÇÑ´ë°¡ ÇÊ¿äÇÕ´Ï´Ù. ÀϹÝÀûÀ¸·Î ¾Æ·¡ÀÇ 32bit ¸®´ª½º(Linux) ¹èÆ÷ÆǵéÀº ÀÎÅͳÝÀ¸·ÎºÎÅÍ ½±°Ô ´Ù¿î·Îµå ¹Þ¾Æ¼­ ¼³Ä¡ÇÒ¼ö ÀÖÀ¸¸ç STLinuxÀÇ RPM(RedHat Package Manager)ÆÄÀϵéÀ» ¹«³­ÇÏ°Ô ¼³Ä¡ÇÏ¿© »ç¿ëÇÒ¼ö ÀÖ´Ù°í ÇÒ¼ö ÀÖ½À´Ï´Ù. * RedHat Enterprise Linux version 4 ÀÌ»ó ([^http://www.redhat.com/]) * Fedora Linux 6 ÀÌ»ó ([^http://www.fedoraproject.org/]) ¹èÆ÷ÆÇ ¼³Ä¡½Ã¿¡ ¹æÈ­º®À̳ª SELinux(Security Enhanced Linux) ±â´ÉÀº ºñÈ°¼ºÈ­ Çϰųª À̸¦ Àß ´Ù·ê¼ö ÀÖ¾î¾ß ÇÕ´Ï´Ù. º» ¹®¼­´Â "RedHat Enterprise Linux Server version 5.3"À» Host PC¿¡ ¼³Ä¡ÇÏ°í STLinux v2.3 À» ¼³Ä¡ÇÏ´Â °úÁ¤À» ´Ù·ç´Â °ÍÀ» ±âÁØÀ¸·Î ÇÕ´Ï´Ù. (Âü°í: [wiki:RedHatEnterpriseLinuxInstall RedHat Enterprise Linux ¼³Ä¡]) º¸´Ù ÀÚ¼¼ÇÑ Á¤º¸¸¦ ¿øÇϽŴٸé [^http://www.st.com/ STMicroelectronics]»ç¿¡¼­ ¿î¿µÇÏ´Â [^http://www.stlinux.com/ STLinux ȨÆäÀÌÁö]¸¦ ¹æ¹®Çϼ¼¿ä. === STLinux ¹èÆ÷º»ÀÇ ¼³Ä¡ === ÀÏ´Ü ¸®´ª½º(Linux)°¡ ¼³Ä¡µÈ Host PC ¿¡´Â STLinux ¹èÆ÷º»À» ¼³Ä¡ÇØ¾ß ÇÕ´Ï´Ù. STLinux ¹èÆ÷º»Àº [^ftp://ftp.stlinux.com/pub/stlinux/] ¿¡¼­ ÃÖ±Ù ¹öÀüÀ» ´Ù¿î·Îµå ¹ÞÀ»¼ö ÀÖ½À´Ï´Ù. STLinux ¹èÆ÷º»À» ¸®´ª½º(Linux)°¡ ¼³Ä¡µÈ Host PC ¿¡ ¼³Ä¡ÇÕ´Ï´Ù. ¼³Ä¡°úÁ¤¿¡¼­´Â Host PC ÀÇ root°èÁ¤À¸·Î ·Î±×ÀÎ(Login)ÇÏ¿© ÁøÇàÇØ¾ß ÇÕ´Ï´Ù. ´ÙÀ½°ú °°Àº ¼ø¼­·Î ´Ù¿î·Îµå ¹× ¼³Ä¡¸¦ ÁøÇàÇÕ´Ï´Ù. 1. ¸®´ª½º°¡ ¼³Ä¡µÈ Host PC ÀÇ root °èÁ¤À¸·Î ·Î±×ÀÎ(Login) ÇÕ´Ï´Ù. 1. ¸¸¾à ÀÌÀü¿¡ ¼³Ä¡ÇÑ STLinux ¹èÆ÷º»ÀÌ ÀÖ´Ù¸é À̸¦ UninstallÇÕ´Ï´Ù. (óÀ½ ¼³Ä¡ÇϽô °æ¿ì¶ó¸é ÀÌ °úÁ¤Àº »ý·«Çϼŵµ µË´Ï´Ù.) {{{#!plain [root@STLinux ~]# rpm –e –nodeps `rpm –qa | grep stlinux23` [root@STLinux ~]# rm –rf /opt/STM/STLinux-2.3 }}} 1. ´Ù¿î·Îµå ¹ÞÀº ÆÄÀÏÀ» ÀúÀåÇÒ µð·ºÅ丮 "~/download"¸¦ ¸¸µé°í STLinuxÀÇ iso À̹ÌÁö ÆÄÀÏÀ» ´Ù¿î·Îµå ¹Þ½À´Ï´Ù. {{{#!plain [root@STLinux ~]# mkdir -p ~/download [root@STLinux ~]# wget ftp://ftp.stlinux.com/pub/stlinux/2.3/iso/STLinux-2.3-sh4-03-11-07.iso -P ~/download/ }}} 1. "/mnt/cdrom" µð·ºÅ丮¸¦ ¸¸µé°í ÇØ´ç µð·ºÅ丮¿¡ ´Ù¿î·Îµå ¹ÞÀº STLinuxÀÇ iso À̹ÌÁö ÆÄÀÏÀ» ¸¶¿îÆ®(mount) ÇÏ°í "/mnt/cdrom"À¸·Î À̵¿ÇÏ¿© "./install all-sh4-glibc"¸¦ ½ÇÇàÇÏ¿© ¼³Ä¡ÇÕ´Ï´Ù. (¸¸¾à uclibc¸¦ »ç¿ëÇϽ÷Á°í °èȹÇϼ̴ٸé "./install all-sh4-uclibc"¸¦ ½ÇÇàÇÏ¿© ¼³Ä¡¸¦ ÁøÇàÇÏ½Ã¸é µË´Ï´Ù. {{{#!plain [root@STLinux ~]# mkdir -p /mnt/cdrom [root@STLinux ~]# mount -o loop,ro -t iso9660 -r ~/download/STLinux-2.3-sh4-03-11-07.iso /mnt/cdrom [root@STLinux ~]# cd /mnt/cdrom [root@STLinux cdrom]# ./install all-sh4-glibc }}} 1. STAPI°ü·Ã ÆÐÅ°Áö(Package)µµ ´Ù¿î·Îµå ¹Þ±â À§Çؼ­ stmyum ÀÇ ¼³Á¤ÆÄÀÏ¿¡ ÇØ´ç Á¤º¸¸¦ Ãß°¡ÇÏ¿©¾ßÇÕ´Ï´Ù. ¾Æ·¡ÀÇ ³»¿ëÀ» "/opt/STM/STLinux-2.3/host/etc/yum.conf"ÆÄÀÏ¿¡ Ãß°¡ÇÕ´Ï´Ù. (±× ¹Û¿¡ ÇÊ¿äÇÑ ÆÐÅ°ÁöµéÀ» ÀÌ·¯ÇÑ ½ÄÀ¸·Î Ãß°¡¼³Á¤ÇÒ¼ö ÀÖ½À´Ï´Ù.) {{{#!plain [STLinux_Distribution_STAPI] name=STLinux Distribution 2.3 STAPI baseurl=http://www.stlinux.com/pub/stlinux/2.3/stapi/RPMS gpgkey=http://www.stlinux.com/pub/stlinux/2.3/STLinux/gpg_key gpgcheck=0 }}} 1. STLinux Àüü¸¦ ¾÷µ¥ÀÌÆ®(Update)ÇÕ´Ï´Ù. ´Ü, Host PC´Â ÀÎÅÍ³Ý ¿¬°áÀÌ °¡´ÉÇÑ »óÅ¿¡ ÀÖ¾î¾ß ÇÕ´Ï´Ù. (ÀÌ °úÁ¤Àº ÀÎÅÍ³Ý ¼Óµµ¿¡ µû¶ó¼­ »ó´çÈ÷ ¿À·¡ °É¸±¼öµµ ÀÖ½À´Ï´Ù.) {{{#!plain [root@STLinux cdrom]# /opt/STM/STLinux-2.3/host/bin/stmyum update .... Transaction Summary ============================================================================= Install XXX Package(s) Update XXX Package(s) Remove XXX Package(s) Total download size: XXX M Is this ok [y/N]: y .... }}} "stmyum update"À» Çϸé ÀÌÀü¿¡ ÀÛ¾÷Çß´ø ¼Ò½ºµé°ú ¹öÀüȣȯ¼º ¹®Á¦·Î ºôµå°¡ ¾ÈµÇ°Å³ª ´ë±Ô¸ð ¼öÁ¤ÀÌ ÇÊ¿äÇÑ »óȲÀÌ ÀÖÀ»¼ö ÀÖ½À´Ï´Ù. ÀÌ °æ¿ì ÇØ´ç ¹®Á¦°¡ µÇ´Â ÆÐÅ°Áö¸¦ Migration ÇØ¾ß ÇÒ¼öµµ ÀÖ½À´Ï´Ù. È®ÀÎµÈ ¹®Á¦»çÇ×Àº ´ÙÀ½°ú °°½À´Ï´Ù. * STLinux v2.3 ¿¡¼­ STLinux v2.2ÀÇ u-boot¹öÀüÀÌ ºôµå¿À·ù°¡ ¹ß»ýÇÕ´Ï´Ù. * u-boot °ú Linux kernelÀÌ ½ÃÁ¡ÀûÀ¸·Î ºñ½ÁÇÑ ½Ã±âÀÇ ¹öÀüÀÌ ¾Æ´Ñ °æ¿ì Çì´õȣȯ¹®Á¦°¡ ÀÖ´Â °æ¿ì°¡ ÀÖ½À´Ï´Ù. * gcc 4.2.4-51ÀÌ»óÀÇ ¹öÀü¿¡¼­ u-boot-sh4-1.3.1_stm23_0043 ÀÌ ºôµåµÇÁö ¾Ê½À´Ï´Ù. 1. ¼³Ä¡µÈ STLinuxÀÇ °æ·ÎÀÔ·ÂÀ» °£´ÜÈ÷ Çϱâ À§Çؼ­ PATH ȯ°æº¯¼ö¿¡ °æ·Î¸¦ Ãß°¡ÇÕ´Ï´Ù. {{{#!plain [root@STLinux ~]# echo "export PATH=/opt/STM/STLinux-2.3/devkit/sh4/bin:\${PATH}" >> ~/.bash_profile [root@STLinux ~]# echo "export PATH=/opt/STM/STLinux-2.3/host/bin:\${PATH}" >> ~/.bash_profile [root@STLinux ~]# source ~/.bash_profile }}} ÀÌÁ¦ ±âº»ÀûÀÎ °³¹ßȯ°æÀÇ ¼³Ä¡°¡ ³¡³µ½À´Ï´Ù. Áö±Ý±îÁöÀÇ ¼³Ä¡°úÁ¤¿¡¼­ º¸´Ù½ÃÇÇ STLinux´Â Æí¸®ÇÑ ÆÐÅ°Áö(Package) °ü¸®ÅøÀ» Á¦°øÇÕ´Ï´Ù. Á÷Á¢ [^ftp://ftp.stlinux.com/pub/stlinux/] ¿¡¼­ RPM(RedHat Package Manager)ÆÄÀÏÀ» ´Ù¿î·Îµå ¹Þ¾Æ¼­ ¼³Ä¡ÇÒ¼öµµ ÀÖÀ¸³ª stmyum À̶ó´Â À¯Æ¿¸®Æ¼¸¦ ÅëÇؼ­ º¸´Ù Æí¸®ÇÏ°Ô ¼³Ä¡ ¹× ¾÷µ¥ÀÌÆ®(Update)¸¦ ÇÒ ¼ö°¡ ÀÖ½À´Ï´Ù. * rpm À¯Æ¿¸®Æ¼ÀÇ ±âº» »ç¿ë¹ý * ÆÐÅ°Áö(Package) ¼³Ä¡ {{{#!plain rpm –ivh }}} * ¼³Ä¡µÈ ÆÐÅ°Áö(Package) ¾÷µ¥ÀÌÆ®(Update) {{{#!plain rpm –Uvh }}} * ÆÐÅ°Áö(Package) »èÁ¦Çϱâ {{{#!plain rpm –e }}} * ¼³Ä¡µÈ ÆÐÅ°Áö(Package) ¸ñ·Ï º¸±â {{{#!plain rpm –qa }}} * stmyum À¯Æ¿¸®Æ¼ ±âº» »ç¿ë¹ý * ÆÐÅ°Áö(Package) ¼³Ä¡ {{{#!plain stmyum install }}} * ¼³Ä¡µÈ ÆÐÅ°Áö(Package) ¾÷µ¥ÀÌÆ®(Update) {{{#!plain stmyum update }}} * ÆÐÅ°Áö(Package) »èÁ¦Çϱâ {{{#!plain stmyum remove }}} * ¼³Ä¡µÈ ÆÐÅ°Áö(Package) ¸ñ·Ï º¸±â {{{#!plain stmyum list }}} === U-boot bootloader build === ºÎÆ®·Î´õ(Boot loader)ÀÇ ¼Ò½º´Â "/opt/STM/STLinux-2.3/devkit/sources/u-boot/"µð·ºÅ丮 ¹Ø¿¡ ÀÖ½À´Ï´Ù. ÀÌ°ÍÀ» ±×´ë·Î ÇØ´ç µð·ºÅ丮¿¡¼­ ºôµå ¹× ¼öÁ¤ÀÛ¾÷À» Çϱ⺸´Ù´Â ÀÚ½ÅÀÇ ÀÛ¾÷µð·ºÅ丮·Î º¹»çÇؼ­ ÀÛ¾÷ÇÏ´Â°Ô ÁÁ½À´Ï´Ù. 1. ´ÙÀ½°ú °°ÀÌ u-boot source¸¦ ÀÚ½ÅÀÇ ÀÛ¾÷µð·ºÅ丮·Î º¹»çÇÕ´Ï´Ù. (º» ¹®¼­¿¡¼­´Â ÀÛ¾÷µð·ºÅ丮¸¦ "~/project/stprj"·Î ¼³Á¤ÇÏ¿´°í version 1.3.1_stm23_0044À» ±âÁØÀ¸·Î ¼³¸íÇÕ´Ï´Ù.) {{{#!plain [root@STLinux ~]# mkdir –p ~/project/stprj [root@STLinux ~]# cp –a /opt/STM/STLinux-2.3/devkit/sources/u-boot/u-boot-sh4-1.3.1_stm23_0044 ~/project/stprj/ }}} 1. ÀÚ½ÅÀÇ º¸µå(Board)¿¡ ¸Â´Â ºôµå¼³Á¤À» Çϱâ À§Çؼ­ ±âÁ¸¿¡ ¸¸µé¾îÁ® ÀÖ´Â ÇÁ·ÎÆÄÀÏ(Profile)·ÎºÎÅÍ »õ·Î¿î ÇÁ·ÎÆÄÀÏ(Profile)·Î º¹»çÇÕ´Ï´Ù. (º» ¹®¼­¿¡¼­´Â ÇÁ·ÎÆÄÀÏ "5197cab"À» ±âÁØÀ¸·Î »õ·Î¿î ÇÁ·ÎÆÄÀÏÀÎ "stprj"¸¦ ¸¸µå´Â°ÍÀ¸·Î ¼³¸íÇÕ´Ï´Ù.) {{{#!plain [root@STLinux ~]# cd ~/projtect/stprj/u-boot-sh4-1.3.1_stm23_0044/ [root@STLinux u-boot-sh4-1.3.1_stm23_0044]# ls ./board/ 5197cab a3000 adder . . . mb411 mb442 mb448 mb519 mb618 mb628 mb671 mb680 mb704 [root@STLinux u-boot-sh4-1.3.1_stm23_0044]# cp -a ./board/5197cab ./board/stprj [root@STLinux u-boot-sh4-1.3.1_stm23_0044]# mv ./board/stprj/init-5197cab.S ./board/stprj/init-stprj.S [root@STLinux u-boot-sh4-1.3.1_stm23_0044]# mv ./board/stprj/5197cab.c ./board/stprj/stprj.c [root@STLinux u-boot-sh4-1.3.1_stm23_0044]# cp ./include/configs/5197cab.h ./include/configs/stprj.h }}} 1. Text ÆíÁý±â(¿¹: vim)·Î u-bootÀÇ MakefileÀ» ÆíÁýÇϴµ¥ 5197cab_config ºÎºÐÀ» ã¾Æ¼­ Âü°íÇϸ鼭 ±× ¹Ø¿¡ ¾Æ·¡¿Í °°ÀÌ Ãß°¡ÇÕ´Ï´Ù. {{{#!plain 5197cab_config \ 5197cabse_config : unconfig @ >include/config.h @echo "#define CONFIG_SH_STX5197 1" >>include/config.h @echo "#define CONFIG_SH_5197CAB 1" >>include/config.h $(if $(findstring se,$@), \ @echo "#define CONFIG_SH_SE_MODE 1" >>include/config.h) $(if $(findstring se,$@), \ @echo "TEXT_BASE = 0x83F00000" >$(obj)board/5197cab/config.tmp) @./mkconfig -a 5197cab sh sh 5197cab "" stx5197 ########################################### ### 5197cab_config¸¦ Âü°íÇÏ¿© »õ·Î Ãß°¡ÇÑ ºÎºÐ ########################################### stprj_config \ stprjse_config : unconfig @ >include/config.h @echo "#define CONFIG_SH_STX5197 1" >>include/config.h @echo "#define CONFIG_SH_STPRJ 1" >>include/config.h $(if $(findstring se,$@), \ @echo "#define CONFIG_SH_SE_MODE 1" >>include/config.h) $(if $(findstring se,$@), \ @echo "TEXT_BASE = 0x83F00000" >$(obj)board/stprj/config.tmp) @./mkconfig -a stprj sh sh stprj "" stx5197 }}} 1. "./board/stprj/config.mk"ÀÇ TEXT_BASEÀÇ °ªÀ» ¼öÁ¤ÇØ¾ß Çϴµ¥ ÀÌ°ÍÀº ÀÚ½ÅÀÇ º¸µå (Board)¿¡ µû¶ó¼­ °ªÀÌ ´Þ¶óÁú¼ö ÀÖ½À´Ï´Ù. ÀÌ·¯ÇÑ TEXT_BASEÀÇ °ªÀ» °áÁ¤ÇÏ´Â °ø½ÄÀº ´ÙÀ½°ú °°Àº °è»ê¿¡ ÀÇÇؼ­ °áÁ¤ÇØ¾ß Çϴµ¥ ÀÌ´Â °á±¹ SDRAMÀÇ ¸¶Áö¸· 1Mbytes ¿µ¿ª¿¡ u-bootÀ» ¿Ã·Á¼­ ½ÇÇàÇÏ°Ú´Ù´Â Àǵµ·Î ³ª¿Â °è»êÀ̶ó°í º¸½Ã¸é Ʋ¸®Áö ¾Ê½À´Ï´Ù. {{{#!plain TEXT_BASE = + ( - 1Mbytes) }}} º» ¹®¼­¿¡¼­´Â SDRAMÀÇ baseÁÖ¼Ò´Â 84000000H, SDRAMÀÇ size´Â 64Mbytes¸¦ ±âÁØÀ¸·Î ´ÙÀ½°ú °°ÀÌ "./board/stprj/config.mk"¸¦ ¼öÁ¤ÇÏ¿´½À´Ï´Ù. {{{#!plain # # stprj board # # Installs at SDRAM BASE + 63M in cache region TEXT_BASE = 0x87F00000 PLATFORM_LDFLAGS += }}} 1. ÀÚ½ÅÀÇ Board¿¡¼­ ¸¸¾à Flash chipÀÇ write±â´ÉÀ» »ç¿ëÇϱâ À§ÇÑ Vpp Àü¾ÐÀ» Á¦¾îÇÏ´Â ºÎºÐÀÌ ±¸ÇöµÇ¾î¾ß ÇÏ´Â °æ¿ì¶ó¸é ¼Ò½ºÆÄÀÏÀÎ "./board/stprj/stprj.c"¿¡ flashWriteEnable ¹× flashWriteDisableÇÔ¼ö¿¡ ±¸ÇöÇØ ÇØ´ç VppÁ¦¾îºÎºÐÀ» ÀûÀýÇÏ°Ô ±¸ÇöÇØ ³Ö¾î¾ß ÇÕ´Ï´Ù. 1. ÀÚ½ÅÀǺ¸µå¿¡ ¸Â´Â ¼³Á¤À» Çϱâ À§Çؼ­ Çì´õÆÄÀÏÀÎ "./include/configs/stprj.h"¸¦ ¼öÁ¤ÇÕ´Ï´Ù. 1. "./include/asm-sh/io.h"¿¡ CONFIG_SH_STPRJ¿¡ ´ëÇÑ ºÎºÐÀ» Ãß°¡ÇÕ´Ï´Ù. {{{#!enscript c #if defined(CONFIG_SH_MB411) || \ defined(CONFIG_SH_MB442) || \ defined(CONFIG_SH_MB448) || \ defined(CONFIG_SH_HMS1) || \ defined(CONFIG_SH_MB519) || \ defined(CONFIG_SH_MB618) || \ defined(CONFIG_SH_MB628) || \ defined(CONFIG_SH_MB671) || \ defined(CONFIG_SH_MB680) || \ defined(CONFIG_SH_PDK7105) || \ defined(CONFIG_SH_IPIDTV7105) || \ defined(CONFIG_SH_MB704) || \ defined(CONFIG_SH_5197CAB) || \ defined(CONFIG_SH_CB101) || \ defined(CONFIG_SH_CB102) || \ defined(CONFIG_SH_STPRJ) # include "asm/io_stb1eval.h" #else # error "What system is this?" #endif }}} 1. U-boot ¸¦ ºôµåÇÕ´Ï´Ù. {{{#!plain [root@STLinux [root@STLinux [root@STLinux [root@STLinux ~]# cd ~/project/stprj/u-boot-sh4-1.3.1_stm23_0044/ u-boot-sh4-1.3.1_stm23_0044]# make mrproper u-boot-sh4-1.3.1_stm23_0044]# make stprj_config u-boot-sh4-1.3.1_stm23_0044]# make }}} ºôµå°¡ ¿Ï·áµÇ¸é u-boot, u-boot.bin, u-boot.map, u-boot.srec °¡ »ý¼ºµË´Ï´Ù. ¿©±â¼­ ¿ì¸®°¡ flash¿¡ writeÇÏ°Ô µÉ ÆÄÀÏÀº u-boot.binÀ̸ç GDB·Î loadÇÏ´Â °ÍÀº ELFÆ÷¸ËÀÎ u-bootÆÄÀÏÀÌ »ç¿ëµË´Ï´Ù. 1. U-boot¸¦ stprj board ¿¡ flash·Î write Çϱâ À§Çؼ­ sh4-linux-gdb¸¦ ÅëÇؼ­ u-bootÀ» ½ÇÇàÇÕ´Ï´Ù. stprj board´Â ¡°ST Micro Connect¡±¿¡ ¿¬°áµÇ¾î ÀÖ¾î¾ß ÇÏ°í board³»ÀÇ Serial consoleµµ º¼¼ö ÀÖµµ·Ï ¹Ì¸® ÁغñÇØÁÖ¾î¾ß ÇÕ´Ï´Ù. Board¸¶´Ù Á¢¼ÓÇÏ´Â profileÀ̸§ÀÌ ´Ù¸£¹Ç·Î ÀÌ ºÎºÐÀº °¢ÀÚ ÇØ°áÇÏ¼Å¾ß ÇÒ°Ì´Ï´Ù. (ÀÌ ¹®¼­¿¡¼­´Â ¡°ST Micro Connect¡±ÀÇ IP¸¦ 192.168.33.2·Î ¼³Á¤ÇÏ¿´´Ù°í °¡Á¤ÇÏ°í ÀÛ¼ºµÇ¾ú½À´Ï´Ù.) {{{#!plain [root@STLinux u-boot-sh4-1.3.1_stm23_0044]# sh4-linux-gdb ./u-boot GNU gdb STMicroelectronics/Linux Base 6.8-41 [build Aug 3 2009] Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=i686-pc-linux-gnu --target=sh4-linux"... (gdb) 5197cabbypass 192.168.33.2 The target is assumed to be little endian 0xa0000000 in ?? () (gdb) load Loading section .text, size 0x1195c lma 0x87f00000 Loading section .rodata, size 0x750 lma 0x87f1195c Loading section .rodata.str1.4, size 0x3e74 lma 0x87f120ac Loading section .data, size 0xb50 lma 0x87f15f20 Loading section .u_boot_cmd, size 0x4b4 lma 0x87f16a70 Start address 0x87f00000, load size 93988 Transfer rate: 236 KB/sec, 18797 bytes/write. (gdb) compare-sections Section .text, range 0x87f00000 -- 0x87f1195c: matched. Section .rodata, range 0x87f1195c -- 0x87f120ac: matched. Section .rodata.str1.4, range 0x87f120ac -- 0x87f15f20: matched. Section .data, range 0x87f15f20 -- 0x87f16a70: matched. Section .u_boot_cmd, range 0x87f16a70 -- 0x87f16f24: matched. (gdb) continue Continuing. }}} GDB¸í·É compare-sections¿¡¼­ matched·Î ³ª¿Í¾ß¸¸ Á¤»óÀûÀÎ ½ÇÇàÀÌ µË´Ï´Ù. ¸¶Áö¸·¿¡ "Continuing." ¸Þ½ÃÁö°¡ ³ª¿ÂÈÄ compare-sections°¡ matched°¡ ¾Æ´Ï¸é ´Ù½Ã Ctrl-CÅ°¸¦ ´© ¸¥ÈÄ load¸í·ÉºÎÅÍ ´Ù½Ã ¼öÇàÇغ¸½Ã¸é matched¶ó°í µÉ¶§°¡ ÀÖ½À´Ï´Ù. À̶§ Serial console»óÅ× º¸¸é u-bootÀÇ ºÎÆ®¸Þ¼¼Áö°¡ Á¤»óÀûÀ¸·Î Ãâ·ÂµÇ´Â °ÍÀ» º¸½Ç¼ö ÀÖ½À´Ï´Ù. Serial console·Î ¾Æ¹«Å°³ª Àü¼ÛÇϸé ÇÁ·ÒÇÁÆ®·Î ÁøÀÔÇÏ°Ô µË´Ï´Ù. {{{#!plain U-Boot 1.3.1 (Aug 20 2009 - 18:16:28) - stm23_0044 DRAM: 64 MiB NOR: 8 MiB *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial Hit any key to stop autoboot: 15 stprj> }}} ÀÌÁ¦ ºôµåµÈ u-boot.binÀ» serial·Î Àü¼ÛÇÏ¿© flash¿¡ write ÇÕ´Ï´Ù. (À̶§ Serial consoleÀ» ÅëÇؼ­ YmodemÀ¸·Î ÆÄÀÏÀ» Àü¼ÛÇØ¾ß µÇ¹Ç·Î Serial console terminal ÇÁ·Î±×·¥ÀÌ YmodemÀ» Áö¿øÇØ¾ß ÇÕ´Ï´Ù. ¿¹¸¦ µé¾î¼­ SecureCRT°°Àº Terminal ÇÁ·Î±×·¥ÀÌ YmodemÀ» Áö¿øÇÕ´Ï´Ù.) {{{#!plain stprj> run updateboot Un-Protect Flash Sectors 0-1 in Bank # 1 .. done Erase Flash Sectors 0-1 in Bank # 1 .. done ## Ready for binary (ymodem) download to 0x84000000 at 115200 bps... CCCC Starting ymodem transfer. Press Ctrl+C to cancel. Transferring u-boot.bin... 100% 91 KB 6 KB/s 00:00:15 0 Errors xyzModem - CRC mode, 737(SOH)/0(STX)/0(CAN) packets, 6 retries ## Total Size = 0x00016f24 = 93988 Bytes Copy to Flash ........ done Protect Flash Sectors 0-1 in Bank # 1 .. done stprj> }}} === Âü°íÀÚ·á === * [^http://www.stlinux.com/] ([^http://www.stlinux.com/install])