CNU Android Mobicon
Contents
2.2. Âü°í »çÀÌÆ® ¶
2.3.1. Ubuntu Linux (32-bit x86) ¶To set up your Linux development environment, make sure you have the following:
2.3.2. Installing Repo ¶Repo is a tool that makes it easier to work with Git in the context of Android. For more information about Repo, see Using Repo and Git.
To install, initialize, and configure Repo, follow these steps:
2.3.3. Initializing a Repo client ¶
repo initialized in /mydroidYour client directory should now contain a .repo directory where files such as the manifest will be kept. What will my name and email be used for?
To use the Gerrit code-review tool, you will need an email address that is connected with a registered Google account (which does not have to be a Gmail address). Make sure this is a live address at which you can receive messages. The real name that you provide here will show up in attributions for your code submissions.
What is a manifest file?
The Android source files are divided among a number of different repositories. A manifest file contains a mapping of where the files from these repositories will be placed within your working directory when you synchronize your files.
2.3.4. Getting the files ¶To pull down files to your working directory from the repositories as specified in the default manifest, run
$ repo syncFor more about repo sync and other Repo commands, see Using Repo and Git. The Android source files will be located in your working directory under their project names.
2.4.2. ¼³Ä¡ ¶´Ù¿î·Îµå ¹ÞÀº .binÆÄÀÏÀº ½ÇÇà ¼Ó¼ºÀÌ ¾øÀ½À¸·Î ½ÇÇà¼Ó¼ºÀ» ÁØ´Ù. ±×¸®°í ½ÇÇàÀ» ½ÃŲ´Ù.
$chmod +x arm-2008q3-66-arm-none-eabi.bin $./arm-2008q3-66-arm-none-eabi.bin "The installer has detected that your system uses the dash shell
as /bin/sh. This shell is not supported by the installer.
You can work around this problem by changing /bin/sh to be a
symbolic link to a supported shell such as bash. Please refer
to the Getting Started guide, or contact CodeSourcery Support
for assistance."¶ó°í ³ª¿Â´Ù¸é ¾Æ·¡ ¼öÇà
$mv /bin/sh /bin/sh.dash $mv /bin/sh.distrib /bin/sh 2.4.3. ºôµåÇÏ°íÀÚÇÏ´Â ¼Ò½ºÀÇ MakefileÀÇ ¼öÁ¤ ¶$vi Makefile ±×¸®°í ARCHÀÇ ³»¿ëÀ» ´ÙÀ½°ú °°ÀÌ ¼öÁ¤ÇÏ¿© Å©·Î½º ÄÄÆÄÀÏ·¯ÀÇ À§Ä¡¸¦ ¼³Á¤ÇÏ¿© ÁØ´Ù.
ARCH := arm CROSS_COMPILE := /home/zeka/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi- 2.5. Android Æ÷ÇÔ ARM EABI ÅøüÀÎÀ¸·Î ºôµå ¶
2.6.1. zImage ¶¾ÐÃàµÈ KernelÀÇ imageÀÌ´Ù. 1M°¡ ³Ñ¾î°¡¸é Big zImage¶ó´Â ¶æÀ¸·Î bzImage ¶ó´Â ÆÄÀÏÀ̸§À¸·Î ¸í¸íÇÑ´Ù. zImage ¾ÕºÎºÐ¿¡´Â zImageÀÇ ¾ÐÃàÀ» Ǫ´Â ÄÚµåµéÀÌ µé¾îÀÖ´Ù. ÀÌ ÄÚµåµéÀÇ Ä¿³Î ¼Ò½º³» À§Ä¡´Â arch/arm/boot/compressed/ ÀÌ°í ÀÌ µð·ºÅ丮 ¾È¿¡¼ ÁÖ·Î head.S, head-xscale.S ÆÄÀÏÀ» º¸¸é µÈ´Ù.
2.6.2. uImage ¶uImageÀ̶õ u-boot¿¡¼ »ç¿ëÇÏ´Â ¾ÐÃàµÈ Ä¿³Î À̹ÌÁöÀÌ´Ù. ´Ü¼øÈ÷ u-boot ÀÇ tools/mkimage(u-boot source¸¦ ÄÄÆÄÀÏÀ» ÇØ¾ß »ý¼ºµÈ´Ù)¶ó´Â ÅøÀ» ÀÌ¿ëÇØ zImage¿¡ 64byte Çì´õ¸¦ Ãß°¡½ÃŲ À̹ÌÁöÀÌ´Ù. ÀÌ 64byte Çì´õ¿¡´Â target architecture, operating system, image type, compression method, entry points, time stamp, CRC32 checksums µî°ú °°Àº Á¤º¸µéÀÌ µé¾î°£´Ù.
2.7. LDS2000º¸µå Specific ¸Þ¸ð¸® ¸ÊÇÎ ¼³Á¤ ¶
2.8. CS8900AÀÇ µå¶óÀ̹ö Æ÷Æà cs89x0.c ¼öÁ¤ ¶
2.9. Root FS À̹ÌÁö ¸¸µé±â ¶ÆÄÀÏ ½Ã½ºÅÛÀ» ¿øÇÏ´Â Æú´õ·Î º¹»ç
2.10. BusyBox ¶The toolbox that is provided on the Android environment is pretty limited. I wanted something more useful and familiar. Busybox to the rescue!
I have a busybox binary available for those who are interested.
To use it simply do # mkdir /data/busybox, on your emulated console. Then copy the busybox binary across: $ adb push busybox /data/busybox/busybox. Once you do this you can install the necessary hardlinks by doing: # cd /data/busybox; ./busybox --install. Once doing this you should have links to all the applets in the /data/busybox directory. To make this useful you probably want to put this into your PATH: # export PATH=/data/busybox:$PATH.
You should now be able to get access to all the useful busybox applets.
binary available¸¦ Ŭ¸¯Çϸé busybox binaryÆÄÀÏ ¹Ù·Î ´Ù¿î Ŭ¸¯
2.11. ¿¡¹Ä·¹ÀÌÅÍ¿¡¼ rootfs ÃßÃâÇϱ⠶
2.13. Linux 2.6 GPIO °ü·Ã Æò¼Ç ¶Ä¿³Î 2.6 ÀÇ gpio ÀÎÅÍÆäÀ̽ºµéÀÌ Ç¥ÁØÈ µÇ¾ú½À´Ï´Ù.
ÇÊ¿äÇÑ Çì´õÆÄÀÏ #include
2.14. ³×Æ®¿öÅ© µå¶óÀ̹ö.. ¶ÇöÀç 2.4¿¡¼´Â eth0ÀÇ irq°¡ 1ÀÎ´ë ¹ÝÇØ 2.6¿¡¼´Â 5·Î ÀâÈ÷°í ÀÖ´Ù. 1·Î ¾î¶»°Ô ¹Ù²Ü´Â°¡..
2.15. kernel 2.4 Á¤º¸µé.. ¶bash-2.05b# cat proc/interrupts 1: 2499 eth0 3: 165 GPIO 2-80 4: 0 PXA USB core 7: 43 AC97 15: 89 serial 18: 0 DMA 19: 3978 timer 28: 0 ads7843 35: 180 SL811 Err: 0 bash-2.05b# bash-2.05b# cat proc/iomem a0000000-a3ffffff : System RAM a0065000-a01ea1ef : Kernel code a01ea1f0-a0237ab3 : Kernel data f4000000-f4002000 : SA1111 f4001600-f40017ff : irqs bash-2.05b# cat proc/ioports 00000000-0000000f : eth0 f1800000-f1800000 : SL811 f1810000-f1810000 : SL811 bash-2.05b# cat proc/kmsg <4>Linux version 2.4.19-rmk7-pxa2 (root@zeka-ubuntu) (gcc version 3.2.1) #280 20 09. 05. 18. (¢Æ) 01:53:45 KST <4>CPU: XScale-PXA255 revision 6 <4>Machine: LDS2000 <6>Memory clock: 99.53MHz (*27) <6>Run Mode clock: 199.07MHz (*2) <6>Turbo Mode clock: 199.07MHz (*1.0, inactive) <4>Security risk: creating user accessible mapping for 0x14400000 at 0xf1800000 <6>=> MCS0 = 0x7ff87ff0 <6>=> MCS1 = 0x5aa85aa0 <6>=> MCS2 = 0x7ffc7ff0 <4>On node 0 totalpages: 16384 <4>zone(0): 16384 pages. <4>zone(1): 0 pages. <4>zone(2): 0 pages. <4>Kernel command line: root=/dev/nfs rw nfsroot=192.168.1.2:/home/LDS/LDS2000/N FS nfsaddrs=192.168.1.3:192.168.1.2 <7>Relocating machine vectors to 0xffff0000 <4>Console: colour dummy device 80x30 <4>Calibrating delay loop... 198.65 BogoMIPS <6>Memory: 64MB = 64MB total <5>Memory: 62532KB available (1556K code, 310K data, 372K init) <6>Dentry cache hash table entries: 8192 (order: 4, 65536 bytes) <6>Inode cache hash table entries: 4096 (order: 3, 32768 bytes) <4>Mount-cache hash table entries: 1024 (order: 1, 8192 bytes) <4>Buffer-cache hash table entries: 4096 (order: 2, 16384 bytes) <4>Page-cache hash table entries: 16384 (order: 4, 65536 bytes) <4>POSIX conformance testing by UNIFIX <6>Linux NET4.0 for Linux 2.4 <6>Based upon Swansea University Computer Society NET3.039 <4>Initializing RT netlink socket <6>SA1111 Microprocessor Companion Chip: silicon revision 1, metal revision 1 <3>SA1111: unable to claim IRQ25: -22 <4>PXA USB Controller Core Initialized <5>get_random_bytes called before random driver initialization <6>USB Function Ethernet Driver Interface <4>Starting kswapd <4>Console: switching to colour frame buffer device 80x30 <4>pty: 256 Unix98 ptys configured <6>Serial driver version 5.05c (2001-07-08) with no serial options enabled <6>ttyS00 at 0x0000 (irq = 15) is a PXA UART <6>ttyS01 at 0x0000 (irq = 14) is a PXA UART <6>ttyS02 at 0x0000 (irq = 13) is a PXA UART <4> ADS7843 Touch Screen driver initialized <6>loop: loaded (max 8 devices) <6>eth0: CS8900A rev E at 0xf0000300 irq=1, no eeprom , addr: 00: A:D4: 0:30: 0 <6>Linux video capture interface: v1.00 <6>SCSI subsystem driver Revision: 1.00 <3>kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2 <3>kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2 <3>kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2 <3>kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2 <6>ac97_codec: AC97 Audio codec, id: 0x4352:0x5913 (Cirrus Logic CS4297A rev A) <6>Linux Kernel Card Services 3.1.22 <6> options: none <6>Intel PXA250/210 PCMCIA (CS release 3.1.22) <3>This hardware is not supported by the PXA250/210 Card Service driver <6>usb.c: registered new driver hub <6>host/sl811.c: v0.30 : Sl811 USB Host Controller Alternate Driver <6>usb.c: new USB bus registered, assigned bus number 1 <6>host/sl811.c: USB SL811 at f1800000,f1810000, IRQ 35 <6>host/sl811.c: [sl811_hc_reset:2517] Full speed Device attached <6>hub.c: USB hub found <6>hub.c: 1 port detected <6>usb.c: registered new driver ov511 <6>ov511.c: v1.63 for Linux 2.4 : ov511 USB Camera Driver <6>Initializing USB Mass Storage driver... <6>usb.c: registered new driver usb-storage <6>USB Mass Storage support registered. <6>NET4: Linux TCP/IP 1.0 for NET4.0 <6>IP Protocols: ICMP, UDP, TCP <6>IP: routing cache hash table of 512 buckets, 4Kbytes <6>TCP: Hash tables configured (established 4096 bind 8192) <4>IP-Config: Guessing netmask 255.255.255.0 <4>IP-Config: Complete: <4> device=eth0, addr=192.168.1.3, mask=255.255.255.0, gw=255.255.255.255, <4> host=192.168.1.3, domain=, nis-domain=(none), <4> bootserver=192.168.1.2, rootserver=192.168.1.2, rootpath= <6>NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. <6>NET4: Ethernet Bridge 008 for NET4.0 <4>NetWinder Floating Point Emulator V0.95 (c) 1998-1999 Rebel.com <5>ds: no socket drivers loaded! <5>Looking up port of RPC 100003/2 on 192.168.1.2 <5>Looking up port of RPC 100005/1 on 192.168.1.2 <4>VFS: Mounted root (nfs filesystem). <6>Freeing init memory: 372K <6>hub.c: USB new device connect on bus1/1, assigned device number 2 <6>scsi0 : SCSI emulation for USB Mass Storage devices <4> Vendor: Apple Model: iPod Rev: 2.70 <4> Type: Direct-Access ANSI SCSI revision: 02 <4>Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0 <4>SCSI device sda: 1010432 512-byte hdwr sectors (517 MB) <4>sda: Write Protect is off <6>Partition check: <6> sda: sda1 <7>WARNING: USB Mass Storage data integrity not assured <7>USB Mass Storage device found at 2 3.1. ¾Èµå·ÎÀÌµå °³¹ß ȯ°æ ¼³Á¤ ¶
3.2. µ¿ÀÛ ÇÃ·Î¿ì ¼³¸í ¶¾Èµå·ÎÀÌµå ½º¸¶Æ®Æù°ú Á¦¾îÇÏ°íÀÚÇÏ´Â PC´Â ÀÎÅͳÝÀ» »ç¿ëÇÒ ¼ö ÀÖ´Â »óÅÂÀÌ´Ù. µÎ ±â±â¿¡´Â MobiconÇÁ·Î±×·¥ÀÌ ¼³Ä¡°¡ µÇ¾îÀÖ´Ù. ½º¸¶Æ®Æù¿¡¼´Â Á¦¾îÇÏ°íÀÚÇÏ´Â PCÀÇ IPÁÖ¼Ò¸¦ ¼³Á¤ÇÑ´Ù. ±×·¯¸é ½º¸¶Æ®Æù¿¡¼´Â ÇØ´ç IP·Î UDP¸¦ »ç¿ëÇÏ¿© Hello Msg¸¦ 1ÃÊ´ç Çѹø¾¿ Àü¼ÛÀ» ÇÏ°Ô µÈ´Ù. Hello Msg¸¦ ¹ÞÀº PC´Â ¸ñ·Ï¿¡ Hello Msg¸¦ ÅëÇÏ¿© ¾òÀº Á¤º¸¸¦ Ç¥½ÃÇÏ¿© ÁØ´Ù. ¸ñ·Ï¿¡¼ Á¦¾î¸¦ Çϵµ·Ï Çã¶ôÇÏ´Â ½º¸¶Æ®ÆùÀ» ¼±ÅÃÇϸé ÇØ´ç ½º¸¶Æ®ÆùÀÇ Key Msg¸¦ »ç¿ëÇÏ¿© PC¿¡ Å° À̺¥Æ®¸¦ ¹ß»ý½ÃŲ´Ù. Çã¶ô µÇÁö ¾ÊÀº ½º¸¶Æ®ÆùÀÇ Key Msg´Â ¹«½ÃµÈ´Ù. (¼öÁ¤ Áß)
3.3. Protocol ¶
|
Far duller than a serpent's tooth it is to spend a quiet youth. |