Home

Embedded linux Introduction 笔记

image

Contents

1. ms QT C GUI QT3 QT Qt Embedded QTOPIA 1 Linuette 1 1 How to use Virtual FrameBuffer Qt Embedded Linux Qt Embedded x86 X Window qvfb 1 1 1 Executing qvfb cd linuette host Qt X11 2 3 1 8 env sh env sh export QTDIR linuette host Qt X11 2 3 1 export PATH QTDIR bin PATH export MANPATH QTDIR doc man MANPATH export LD LIBRARY PATH QTDIR lib LD LIBRARY PATH 8 cd tools qvfb qvfb
2. F 6UI mizi ar linux
3. include lt stdio h gt include lt unistd h gt include lt sys types h gt unsigned char val vall int mainO f pid t pid vall 0x44 if pid fork 0 while 1 val Ox77 pr sleep 1 val 0x55 pr sleep 1 else intf child val 02x val1 02x n val vall intf child val 02x val1l 02x n val vall sleep 1 vall 0x99 printf father val 02x vall 02x n val vall sleep 1 vall Oxaa printf father val 02x vall 02x n val vall child val 77 vall 44 father val 00 vall 99 child val 55 vall 44 father val 00 vall aa child val 77 vall 44 father val 00 vall 99 2 2 1 include lt signal h gt void signal int signo void func int int SIG ERR signo func typedef typedef v
4. int listen int sockfd int backlog 0 1 accept TCP include lt sys socket h gt TT int accept int sockfd struct sockaddr cliaddr socklen t addrlen 1 cliaddr addrlen addrlen WR accept KI TCP accept listening socket socket bind Listen connected socket
5. ztelnet gt sz filename filename ik RPMS imagewrite flash ztelnet image imagewrite Linux minicom image erminal 1 terminal which location is image directory Terminal 2 terminal which executes minicom console of target board Ll vi I lt EIS shell p root LinuxMc root Waiting for enter to start bin sh pid 100 terminal dd IP Terminal 1 ifconfig eth0 down ifconfig eth0 10 10 10 1 Set up arbitrary IP rminal 2 amp ifconfig eth0 10 10 10 2 Set up IP that can make a pair with that of host PC 3 c inetd inetd
6. cd image minicom Supply power to target board then press space bar quickly vivi gt help 3 1 2 2 Flash Partitioning Kenel panic VFS Unable to mount root fs on 61 02 bootload kernel root filesystem vivi gt bon part 0 192k 1M 0 192K vivi boot load 192K IM zImage kernel 1M End part root cramfs root filesystem 3 1 2 3 vivi image vivi2load flash vivi x Ctrl A S xmodem image vivi xzmodem_initial xmodem initial timeout param show pa
7. void Output Relay485 unsigned char FunNum unsigned char NetID unsigned char Port if FunNum 3 FF 02 03 00 Send00485 00 0 Sendbyte485 Oxff Sendbyte485 0x02 Sendbyte485 0x03 Sendbyte485 0x00 else ID 01 Value Delay 10 Sendbyte485 Net ID Sendbyte485 0x01 Sendbyte485 FunNum Port Port 0x80 FRIAR SRSA AA RIO AIO RE ORI OR TR ROR I OR RI ROR OOK OR ORO OR OOK OR OE OR ORK OR I void Send00485 void 00 Hex kokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokqkokokokok void Send00485 void rULCON1 Ox3b bit 9 is 0 rGPHDAT 0x1 lt lt 7 GPH7 485 receive disable send enable Delay 1 while rUTRSTATI amp 0x6 Wait until THR is empty WrUTXH1
8. TCP TCP SHUT WR SHUT RDWR 1 8 I 0 amp Hi select poll 1 0 4 1 0 select select PAR JJ pol lt include lt sys select h gt E H Jl accept read shutdown
9. TCP cliaddr addrlen getsockname getsockname x include lt sys socket h gt He H option 0 pid t waitpid pid t 1 wait waitpid include lt sys wait h gt pid t wait int statloc ID 1 pid ID 1 include un
10. itimerval inux time h struct itimerval struct struct Ko timeval it interval timer interval timeval it value current value Hm it interval it value timeval struct timeval time t tv sec seconds suseconds t tv usec microseconds 3 int getitimer int which struct itimerval value getitimer value 1 gt which ITIMER_REAL ITIMER_VIRT ITIMER PROF 2 gt value itimerval setitimer int which struct itimerval value struct itimerval ovalue setitimer 0 1 whic
11. UNIX linux LILO etc lilo conf vi 2 Text poweroff shutdown h now reboot shutdown r now Z E IEA logout shutdown now U HUU umount mnt usb 3 mnt usb mount dev sdal mnt usb mnt usb U th 2 etc inittab id 5 initdefault 5 X Window Graphic 3 Text 4 Text F XWindow Graphic XWindow
12. struct sigaction act oact act sa handler func igemptyset amp act sa_mask n act sa flags 0 if signo SIGALRM ifdef SA_INTERRUPT act sa flags SA INTERRUPT SunOS 4 x endi else Hifdef SA RESTART act sa flags SA RESTART SVR4 44BSD endi if sigaction signo kact amp oact lt 0 eturn SIG ERR return oact sa handler end signal Sigfunc Signal int signo Sigfunc func for our signal function Sigfunc sigfunc if sigfunc signal signo func SIG ERR err sys signal error return sigfunc IT SIGCHLD void sig chld int signo pid_t pid int stat while pid waitpid l amp stat WNOHANG gt 0 1 printf child d terminated n pid TE A aA return EB EEF 1 10 ne ne tstat a tstat a grep 9877 Active Internet connections serv
13. IRQ LOCK IRQI is loc felease fork 4 6 gt close release read 4 ZAA close j Io filp f cou SAA D sde E fork T T king the system disabled 16C554 MCR open close Jr SI D E ran EPT close release K T T 4M release Fe MU TRER SSC CL DEG T A open 4 close 4 E
14. AE PAS E tE ee lg SSID QD ny net A FR base K ook xolokolokololololok SRE GO 2 O 00 SERT Mss gt 3808 EAE HG SSID 32 SSID Setup 4 Internet TCP IP Internet IP IP 192 168 0 1 255 255 255 0 Internet TCP IP BWJ IP IP G 192 168 1 F PUES U 255 255 255 M DNS GO G DNS E DNS F DNS QD Setup 5
15. DU d Linux JE Linux MJ FA GNU Linux Linux Linux Red Hat Linux 9 1 GRUB etc grub conf timeout
16. GNU Linux UNIX UNIX WEB CGI S RA PC java boa WiFi windows PAC PD6710 16 WL 110 CC PCMCIA Linux wlan Linux wlan linux wlan ng PC linux wlan linux
17. yaffs yaffs oad mizi yaffs 1 gt BON info MT proc filesystems 4 gt mount t yaffs dev mtdbloc 3 1 vivi vivi gt bon part 0 192k 1M 3M M ik M mtd flag viiv gt bon part show BON info 4 partitions No offset size flags bad k 1 usr 00000001 3 Ix 0 0x00000000 0x00030000 00000000 0 192k 1 0x00030000 0x000d0000 00000000 0 832k 2 0x00100000 0x00200000 00000000 0 2M 3 0x00300000 0x03cfc000 00000001 0 60M 1008k vivi gt load flash vivi x vivi gt load flash kernel x vivi gt load flash root x vivi2boot NAND device Manufacturer ID Oxec Chip ID bon0 00000000 00030000 00030000 00000000 bonl 00030000 00100000 000d0000 00000000 bon2 00100000 00300000 00200000 00000000 bon3 00300000 03ffc000 03cfc000 00000001
18. close 0 Ja nt 0 release fork close IH Fr release EM 4 close Ji release 4 1 1 4 Linux Edition 2 release release close o close r count U BAR hx release close j close W fi close le pen elease K fi close 2
19. c strstr buf VnXn buf n n helloworld c printf Content type text html n n printf Content type E Contenttype text plain n n Web MIME 3k Web ASCII Web 2 WEB 7 TA WEB java java java java java jave CGI
20. 255 HU void Test Send Rec void volatile unsigned char pBaseAddr volatile unsigned char 0x08000080 unsigned char i temp pBaseAddr LCR 0x80 pBaseAddr DLL 0x30 9600 7 3728MHz 16 0x30 pBaseAddr DLM 0x00 pBaseAddr LCR 0x03 no parity stop 1 bit data 8 bit pBaseAddr FCR 0x00 disable FIFO pBaseAddr IER 0x00 disable interrupt pBaseAddr MCR 0x00 for i 1 i 0 i 0xl Oxf 255 while pBaseAddr LSR amp 0x1 lt lt 5 THR empty pBaseAddr THR i while 1 if testval 0 pBaseAddr LSR amp 0xl testval 0 pBaseAddr LSR 0 testval 0 pBaseAddr LSR testval 0 pBaseAddr LSR temp
21. spinlock t define spin lock init lock do while 0 define spin lock lock void lock Not unused variable define spin is locked lock 0 define spin trylock lock 1 define spin unlock wait lock do while 0 define spin unlock lock do while 0 wake_up_interruptible amp rx_queue Enable irq IRQ RXD1 intk lt 1 gt rx queue sleep on n P Interruptible sleep on timeout amp rx queue WAITTIME Printk lt 1 gt rx queue sleep upWM Disable irq IRQ RXD1 IRQ RXDI If index gt Rx counter Printk lt 1 gt index is d Rx counter is d n index Rx_counter Wake_up_interruptible amp rx_queue RS485 test RS485 Init OK rx queue sleep on index is 12 Rx counter is 12 index is 13 Rx counter is 12 index is
22. HE CIS void PrintCIS void int i j int cisEnd 0 static U8 str 16 c Uart _Printf Card Information Structure n r while 1 if Card RdAttrMem cisEnd 2 Oxff break cisEnd cisEnd Card RdAttrMem cisEnd 2 1 Uart Printf cisEnd 0 x n r cisEnd for i 0 i lt 2 cisEnd i 2 c Card RdAttrMem i str i 0x20 2 c Uart Printf 2x cl if G 0x20 gt Oxle Uart_Printf for j 0 j lt 0x10 j if str j gt 0 amp amp str j lt 127 Uart Printf c str j kokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokok SAI SII OI SASK SIO SERS RIO OOK ROO ROR RIOR ROR RR OO ROR ROR OE OR ROR RR CIS Oxff termination tuple CIS else Uart Printf Uart Printf n r Uart Printf n r n r n r FRIAR SORA AAR ARR ASK OR IER AK ROR IER ERO OOK AO ROR OOK AOR ORK ROR OR OK ROR ORK RIK void Test PD6710 void SHAE PCMCIA PD67 10 kokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokok
23. yaffs usr mkyaffsimage fll mkyaffs noecc Mur c Ru PC root localhost cd linuette target box roo dir root localhost root_dir mkyaffsimage root english root english yaffs c root localhost root _dir J ztelnet 192 168 1 7 ztelnet Xf mkyaffs_noecc root_english yaffs tmp root cramfs yaffs yaffs usr ount us F D mkyaffs noecc dev mtd 1 root english yaffs OK foot english mount t yaffs dev mtdblock 1 usr yaffs Attempting MTD mount on 31 1 if 01 ls usr vivi gt param save ivi gt boot lt n5 EWLEM linuette target box root_dir root_english vivi vivi gt param set linux cmd line noinitrd root dev mtdblock 1 init linuxrc console ttyS0 5 SCHEMAS Linux Linux
24. minicom Linux mount o nolock 192 168 0 1 home mnt o nolock mount 192 168 0 1 home mnt portmap server localhost not responding timed out mount t nfs 192 168 0 1 home mnt GNU Linux Linux P25 W hello c define MODULE include lt linux module h gt int init module void printk lt 1 gt Hello world n return 0 void cleanup module void printk lt 1 gt Goodbye cruel world n gcc c hello c amp insmod hello o hello world rmmod hello rmmod hell o Goodbye cruel world insmod hello o hello world hello kernel module version mismatch Es hel
25. boa conf user nobody boa nobody ps boa conf boa root D fy user root 2 4 ERRE user root JETT boa boa c 266 icky Linux kernel bug No such file boa c boa c if setuid 0 1 DIE icky Linux kernel bug 3 submit http 10 10 10 2 var www cgi bin list cgi 400 Bad Request Your client has issued a malfarned or illegal request list html lt form name SystemCont method post action cgi bin list cgi onSubmit return checkforn0 5 form name SystemCont method post action var www cgi bin list cgi onSubmit return checkform 4 var www cgi bin submit
26. 11 Read DEER WA KG ARM U Linux RedHat hat9 0 J63 Nr Par Redhat9 0 Redhat9 0 PC Linux aL IN Roe RF y A eae 3 IRE ATENA PC Linux Redhat9 0 ATJ titionMagic 75 8 46 BAIE ERE HX E44 J H WI RedHat9 0 J Linux Es d nux 1 INE Li
27. define MODULE endif include lt linux config h gt include lt linux module h gt include lt linux kernel h gt include lt linux init h gt include lt linux miscdevice h gt include lt linux sched h gt H HH D MY T H H H H H e Q d dk Q Q d Q Q unsigned char EXT CO unsigned int EXT CO receve interrupt di static const unsigned lude lt linux delay lude lt linux poll lude lt asm hardwar lude lt asm io h gt lude lt asm irg h gt lude lt linux time fine DEVICE_NAM fine uart_MAJOR fine BUFSIZE fine TIMEOUT 0x105d 110 0x0900 200 0x0600 300 0x0300 600 h gt h gt lude lt linux spinlock h gt lude lt linux interrupt h gt e h gt lude lt asm arch cpu_s3c2410 h gt lude lt asm arm mach irg h gt h gt E fine pEXT COMO BASE ADDR T T M iv Fine pEXT_COM_INTS_ADDR fine pEXT_COM_INTCTL_ADDR fine EXT_COM_RS fine EXT_COM_IN fine EXT_COM_NU fine THR ine RBR ine IER ine ISR ine FCR ine LCR ine MCR ine LSR ine MSR ine SR ine DLL ine DL ine BaudRate_d ine EXT COM I TBit PGM EXTCOM 235 128 10 0x08000080 0x080000d8 interrupt source 0x080000e0 0xff enable CLPD uart interrupts out GPIO B6 IRQ EINTI 4 0 Offset to Transmit hld reg write LCR 7 is 0 0 Receiver h
28. LINK ENIRA H iwconfig WAKER root zkccn amp tiwconfig wlan0 WlanO IEEE 802 11b ESSID R DNAN6 Mode Managed Frequency 2 412GHz Access Point 00 15 E9 DE B1 5D Bit Rate 11Mb s Tx Power 20 dBm Sensitivity 0 3 RTS thr 2432 B Fragment thr 2432 B Encryption key B192 27EF 6E Encryption mode restricted Power Management off Link Quality 100 100 Signal level 80 dBm Noise level 256 dBm Rx invalid nwid 0 Rx invalid crypt 0 Rx invalid frag 0 Tx excessive retries 0 Invalid misc 0 Missed beacon 0 WEP key WEP open restricted root zkccn iwconfig wlan0 key open Lroot zkccn amp tiwconfig wlan0 key restricted WEP key WEP root zkccn ifconfig wlan0 mode ad hoc Step 8 IP IP ifconfig root zkccn amp ifconfig wlan0 WlanOLink encap Ethernet HWaddr 00 0A EB
29. MAX485 pind DI CMAX485 pinl RO RI 1 RE_S DE S 0 RO_S C RE S DE S D RO_S RO S 4 38400 1 38400 4 gt 100us 300us 500us C RE 00 2 Linux define IO MAJOR 236 define BUFFSIZE 16 define nREDE GPIO H7 485 define TXD GPIO H4 define RXD GPIO H5 static char rec_buf BUFFSIZE index Rx_counter static void RS485 Init voi
30. i i i i DriverTest c clude lt stdio h gt clude lt sys types h gt clude lt sys stat h gt clude lt fcnt1 h gt a c 254 253 0 int main int argc char argv int testdev int i char buf 10 testdev open dev char dev O RDWR if testdev 1 printf Cann t open file W exit 0 read testdev buf 10 for i 0 i 10 i printf d n buf i close testdev char_dev knod dev char_dev c 254 0 rm f dev char dev I usr src linux 2 4 include c CharDriver c m CAS Bl AZ eh rh dev char_ iri knod fi WA BEEN HAT put user 1 buf put_user 1 buf 1 copy_to_user buf Buffer 1 Buffer copy_to_user buf 1 1
31. linux PAIK Dr P TR fj TP LINK Chttp sourceforge net projects ndiswrapper F usr src 1inux 2 4 20 8 ndiswrapper WHE fA od a od Unresolved symbols in lib dep usr src 1linux 2 4 20 8 make Makefile EXTRAVERSION 8custom make dep Step 3 ndiswrapper ndiswrapper 1 1 tar gz Xf make instal mrproper fil Fy UJ odules 2 4 21 166 default misc ndiswrapper o Z T modeprobe ndiswrapper FE custom make menuconfig Step 4 Windows XP NET8180 I
32. zImage yaffs linuette target box image rwimage vivi gt bon part 0 192k 1M 3M M M MTD M bon yaffs C dev mtd 1 dev mtdblock 1 df dev mtdblock 1 vivi2load flash vivi x vivi gt load flash kernel x ZImage yaffs Vivi gt load flash root x 3X root cramfs ZE rwimage H3 amp FAY root cfanfs root cramfs yaffs vivi2boot us 4f ES kdi SO N ls usr lizzli usr ccn BEA BEA WF mount t yaffs dev mtdblock 1 usr yaffs dev mtdblock 1 usr 2 2 yaffs IER 2 2 1 linuette Htar jxvf root amp fs rwi tar bz2 kcra age root cramfs root cramfs target box r
33. cd usr lib modules 2 4 18 rmk7 pxal ls ds o pemcia_core o 182365 o insmod pcmcia Core o Linux Kernel Card Services 3 1 22 options none cs c 1 279 2001 10 13 00 08 28 David Hinds insmod i82365 o Intel PCIC probe Cirrus PD6710 ISA to PCMCIA at port 0x3e0 ofs 0x00 1 socket host opts 0 ring dyn mode cs register_ss_entry l 0xc4852214 cs pemcia register socket 0xc4852214 insmod ds o ds c 1 112 2001 10 13 00 08 28 David Hinds cs bind device client Oxc03fe660 sock 0 dev Driver Services cs setup socket c3ed4800 applying power cs resetting socket c3ed4800 cs reset done on socket c3ed4800 cs send event sock 0 event 4 pri 0 ZLGMCU cs2 client c03fe660 cs2 client 2next 0 cs register client 0 client Oxc03fe660 sock 0 dev Driver Services ds ds event 0x000004 0 Oxc03fe660 cd wireless ls p80211 o prism2 cs o prism2 usb o insmod p80211 o 1smod Module Size Used by p80211 18320 0 unused ds 8880 0 unused 182365 o 9716 1 pemcia core 42912 0 ds i82365 ol cardmgr cardmgr 38 starting version is 3 1 22 ds_open socket 0 ds open socket 1 ds open socket 1 cardmgr 38 watdhing 1 sockets s ioctl socket 0 0x80146401 Oxbffffbf8 ds poll socket 0 ds read socket 0 cardmgr 38 i S dializing socket 0 s ioctl socket 0 0x8004640b Oxbffff934 cs read_cis cs 0x01 0x03 cs read cis c
34. f 3 amp var www img var www mime types x F 1inux window ip http 10 10 10 2 var www index html 2 gt CGI boa cgi bin boa 0 94 13 examples cgi test cgi fF Pla var www cgi bin H gt lt F3 Hafta LA hello world include lt stdio h gt id main printf printf html gt n printf printf lt body gt Nn printf f printf lt body gt Nn printf it 0 ex lt html gt n Content type text html n n lt hl gt Hello world lt hl gt n 1 2 Boa D boa boa 7 lt head gt lt title gt CGI Output lt title gt lt head gt n 27 Nov 1990 13 22 25 0000 boa c 266 icky Linux kernel bug No such file User 0 User nobody 2 gt
35. ls var www cgi bin list html lt 1 Dir gt lt Files gt fli list c aE list html if stremp buf lt Dir gt 0 sess if stremp buf Files 0 risas 2 4 CGI CGI stdin Web Form CGI POST CGI CGI CGI stdout Web Web HTML CGI include lt stdio h gt include lt stdib h gt
36. Internet TCP IP 192 168 0 1 IP I Windows Internet Internet Internet N EC bau E Sas Internet TAF Internet RE NAT Clees B AXE o Setup 6 IP IP 192 168 0 2 DNS Setup 7 ping IP ping 2 2 Linux Step 1 root zkccn modprobe nidswrapper
37. mount 10 10 10 1 image mnt nfs mnt nfs NFS 2 NFS setp 1 linux NFS make menuconfig File systems gt Network File Systems gt Provide NFSv3 client support Setp 2 linux NFS cd tmp mkdir nfs mount o nolock 10 10 10 1 image nfs s nfs 3 tmount o nolock 10 10 10 1 image nfs setup Firewall config Security W NO Firewall JAfT amp etc init d nfs restart mount o nolock 10 10 10 1 image nfs Linux Linux Linux Linux VxWorks
38. var www images f PU var www img 3 gt cei http 10 10 10 2 cgi bin helloworld cgi I 502 Bad Gateway The CGI was not CGI 1 1 compliant ereere cgi_header u nable to find LFIF boa cgi header c process cgi header buf req header line c strstr buf n r n if c NULL c strstr buf nn if c NULL log_error_time fputs cgi_ header unable to find LFLF n stderr ifdef FASCIST_LOGGING log error time fprintf stderr Vis buf endif send r bad gateway req return 0 FASCIST LOGGING buf SEN cgi_header unable to find LFIF Content type text html lt html gt lt head gt lt title gt CGI Output lt title gt lt head gt lt body gt lt hl gt Hello world lt hl gt lt body gt lt html gt buf helloworld c process_cgi_header text html n
39. PWM static int pwm release struct inode inode struct file filp unsigned long flag MOD DEC USE COUNT usage if usage 0 local irq save flag TCON TCON amp Ox7FFFEO 0x0A Timer0 auto reload Update TCNTBO TCMPBO stop local irq restore flag free irq IRQ TIMERO NULL return 0 4 2 4 pwm_ioctl 3 PWM static int pwm ioctl struct inode inode struct file filp unsigned int cmd unsigned long arg switch cmd case 0 local irq save flag RunTime 0 TCON TCON amp Ox7FFFEO 0x09 Timer0 auto reload Update TCNTBO TCMPBO start local irq restore flag break case 1 local irq save flag TCON TCON amp Ox7FFFEO 0x0A Timer0 auto reload Update TCNTBO TCMPBO stop local irq restore flag break case 2 if put user RunTime u32 arg return EFAULT break case 3 RunTime 0 if put user RunTime u32 arg return EFAULT break default return ENOTTY break return 0 4 2 5 pwm_irq handle PWM static void pwm irq handle int irq void dev id struct pt regs regs RunTime 4 3 PWM
40. T ol m f 1 0 J J gtt LA Yi select BK poll include lt sys time h gt int timeval timeout ti st long tv_sec Ip 0 meout uct timeval seconds 1 long tv usec microseconds timeout 1 Y 0 3 readset writeset exceptset H As p x select int maxfdpl fd set readset fd set writeset fd set exceptset const struct ERMA 2 0 i KR K m 4
41. linux wince FEST AS ABE ccn4220hotmail com D Ff
42. main int i n printf Contenttype text plain n n n 0 if getenv CONTENT LENGTH n atoi getenv CONTENT LENGTH for i 0 i lt n i putchar getchar putchar Uni fflush stdout E NFS ztelnet NFS 1 NFS setp 1 exports Hvi etc exports image 10 10 10 rw sync no root squash IP 10 10 10 image image 10 10 10 rw setp 2 setp 4 setup Firewall configration Security Level No firewall setp 3 NFS etc init d nfs restart setp 4 NFS
43. 152 5 155 T dru DE S 155 E Ee GE 156 OE FS tE EE at a unai at ee D su ah gh t 156 i ne T Sia RR 157 Do DEAE EEN 159 P UH pir Et Cae t IRE pasa shaved a ap at t asa ttt oi av ewes 159 xx OUI c im a yu ua B tawa a saa l k a ua Yaw asp iBsu 159 Z Ee e EE 159 1 gt ay cL CS d N In RAZ Linux JA ZAT GRECI Linux L E E 159 2 OPES oc Qtopia Te pe E 162 3 QTE 2 3 12 Z Qtopia PDA 272505 ege 168 4 linuette root root_english usr 172 a ee ee oe ua E 174 D u HI O PC Windows Linux Cf ARM ARM Linux 1 2 po
44. 2 1 CGIC CGIC http Wwww boutell comy cgic Htar zxvf cgic tar gz 8cd cgic205 Makefile CC gcc HEA CC opt host armv41 bin armv41 unknown linux gcc AR ar AR opt host armv41 bin armnv41 unknown linux ar RANLIB ranlib RANLIB opt host armv4l bin armv4l unknown linux ranlib gt gcc cgictest o o cgictest cgi LIBS CC CFLAGS cgictest o o cgictest cgi LIBS gcc Capture o o capture LIBS make capture cgictest cgi var www cgi bin Tr a Ris H 2 2 CGIC BS RAR Linux EP93XX ARM list html list c 2 3 1 gt submit mkstemp Permission denied boa util c mkstemp O
45. C RE 1 100us 300us C RE 0 FIF0 38400 UBRDIV1 81 UBRDIVI 80 FIFO CUFCON1 0x27 UBRDIV1 81 3 gt 4 gt ER while 1 sleep_on Linux 2 4 x SMP spinlock_t typedef struct
46. PD6710 if ChipInformationl PD6710 Rd CHIP INFO amp 0xc0 OxcO ChipInformation2 PD6710 Rd CHIP INFO amp Oxc0 0x00 Uart Printf PD6710 hardware identification error n Uart Printf PD6710 ChipInformationl is x ChipInformation2 is x n D 1 Chiplnformationl ChipInformation2 return 0 Uart Printf PD6710 ChipInformationl is x ChipInformation2 is x n ChipInformationl ChipInformation2 ntf PD6710 hardware is found Wn PD6710 Wr POWER CTRL 0 lt lt 7 1 lt lt 9 0 lt 4 0 lt 0 W PowerControl Auto Power PD6710 Wr INT GENERAL CTRL 1 lt lt 7 0 59 lt 4 3 0 IRQ3 Enable Manage IRQ Ring Indicate Enable PD6710 Wr MANAGEMENT INT CONFIG 3 lt lt 4 lt lt 3 1 lt lt 0 Battery Dead or Status Change Card Detect Change IRQ3 0 64KB 0 8 He Uart_Pr kg PD6710 Wr SYS MEM MAPO START L 0x0 MEMO 8bit data width PD6710 Wr SYS MEM MAPO START H 0x0 PD6710 Wr SYS MEM MAPO END L Oxf 0x0 Oxffff PD6710 Wr SYS MEM MAPO END H 0x0 1 lt lt 6 X a
47. startx X Window Main Menu CE IER CRTL ALT F1 F6 5 X Window gt Log out 6 passwd d root passwd d root Int X Window 1s S 1s more amp amp Is less mo vi etc shadow passwd New password Retype new password
48. unsigned short glRData 100 1 unsigned short pIRData unsigned char gTimeoutCount unsigned char gState Study unsigned char gPWMEn 38KHz 1 1 0 unsigned short gLen void LearnOK void void _ irq Int IRStudy void void irq Int_Timer0 void void irq Int_Timerl void keeleletolelololotololelotoleloletotolelelelotoleletetolelotetotololetelotoleletetoteloletotolelotetotoleletetolololetotoleloletotoleletetotololetotolelotetotoe void Init IR void Ij 1 0 xolelolelolololetelolololetotoleloletotoleletetoleleletetolelotetotoleletelotololetetoteloetotolelotetotololetetotololetotoleloletotoleletetotoleletetolelotetok void Init IR void GPFCON rGPFCON amp 0x3 lt lt 0 0x2 lt lt 0 EINTO GPFO GPFUP rGPFUP 0x1 lt lt 0 disable GPBCON rGPBCON amp 0x3 lt lt 2 0x2 lt lt 2 TOUTI EXTINTO rEXTINTO amp 0x7 lt lt 0 0x6 lt lt 0 EINTO Both edge triggered pISR EINTO int Int IRStudy ClearPending B
49. API Ff t d rcS H k Ww RTC T hwclock s RRA H RTC de F YA linux 1 busybox E RTC 3 mizi y settimeofday DA 2 gud J Mizi linux RIC dev misc rtc kernel drivers char s3c2410 rtc c RTC RTC
50. IP PC ide iE mb PBI 3BSHEEME ID EHL Hk OD 192 168 1 2 2 MO zs QD TCP IP Winsock EE Linux telnet root Linux 2 4 18 rmk7 pxal none 0 none login root BusyBox v0 60 3 2002 05 13 08 36 0000 Built in shell ash Enter help for a list of built in commands tmp gt A 11 BK Zmodem SME EE hsoft_copy ARM 2410 zImage Xt 1 1 18 ITT 209K TOTK 00 00 03 00 00 05 iret 92874 cps 1s gt A gt mt Zi SB E Bu PUC WAT BBA DOR Diz 55 Da f H Linux 2 4 amp 18 rmk7 pxal none 8 none login root BusyBox v0
51. child p close 1i hb gl HN BEY o LE OCess stening socket PC IP 127 0 0 1 linux PC Linux ARM include lt unistd h gt include lt stdio h gt include lt sys socket h gt include lt netdb h gt include lt errno h gt define MAXLINE 256 define SERV_PORT 9877 define max a b a gt b a b const char gpCommandHead x02 x1b x43 const char gpDelimiter x02 x0d x0a const char gpAckOK x08 xe7 xa8 xb6 xceOK x0d x0a const char gpAckERR x01 x9f void str cli FILE fp int sockfd i Cc i F t maxfdpl stdineof fd_set rset har sendline MAXLINE recvline MAXLINE nt n i stdineof 0 D hile Df ZERO amp rset if stdineof 0 FD SET fileno fp amp rset FD SET sockfd amp rset maxfdpl max fileno fp sockfd 1 select maxfdpl amp rset NULL NULL NULL if FD_ISSET sockfd amp rset if n read sockfd recvline MAXLINE lt 0 return if mememp recvline gpAckOK 1 n 0 write fileno fp
52. define pCPLD IO Addr 0x080000c0 static devfs handle t devfs handle IT static int _ init IO init void int ret ret register _chrdev 10 MAJOR DEVICE NAME amp leds fops if ret lt 0 printk DEVICE NAME can t register major number return ret devfs handle devfs_register NULL DEVICE NAME DEVFS FL DEFAULT IO MAJOR 0 S IFCHR S IRUSR S IWUSR amp leds fops NULL CPLD BaseAddr I0 ioremap pCPLD IO Addr 1 CPLD IO printk DEVICE NAME initialized n return 0 static void _ exit IO exit void iounmap CPLD BaseAddr IO devfs unregister devfs handle unregister chrdev IO MAJOR DEVICE NAME module init IO init module exit IO exit 10 inb O outb O readb O writeb O 2 writel fail bad file descriptor write printk 1 I0 write funce n fd open dev PGM 10 O_RDWR fd
53. select select maxfdpl amp rset NULL NULL NULL fd set LI void FD ZERO fd set fdset void FD SET int fd fd set fdset void FD CLR int fd fd set fdset void FD ISSET int fd fd set fdset maxfdpl 1 maxfdp1 0 1 2 maxfdpl 1 poll select include lt poll h gt int poll struct pollfd fdarray unsigned long nfds int timeout fdarray fd 0 pollfd pollfd Ga struct pollfd int fd descriptor 1 to check short events events of interest on fd short reve ts LIN LRDNORM LRDBAND LPRI LOUT LWRNORM
54. Makefile EXTRAVERSION 8custom custom make menuconfig make dep linux wlan ng make all http www linux wlan com linux wlan linux wlan ng 0 2 0 tar gz oot zkccn wireless_internet tar zxvf linux wlan ng 0 2 0 tar gz oot zkccn wireless internet tcd linux wlan ng 0 2 0 oot zkccn linux wlan ng 0 2 0 fmake clean VE make clean PCMCIA lsmod prism cs p80211 ds root zkccn wireless_internet make config kernel source Linux kernel source directory usr src linux usr src linux 2 4 20 8 root zkccn linux wlan ng 0 2 0 make all root zkccn wireless_internet make install Step 3 etc modules conf root zkccn root vi etc modules conf wlan0 alias wlan0 prism2 cs Step 4
55. etc ndiswrapper tall cardctl pemcia cs 3 2 8 tar http pcmcia cs sourceforge net pcmcia cs 3 2 8 tar oot zkccn src amp tar zxvf pcomcia cs 3 2 8 tar oot zkccn src cd pcmcia cs 3 2 8 oot zkccn pcmcia cs 3 2 8 make config kernel source DK inux kernel source directory usr src linux usr src linux 2 4 20 8 oot zkccn pemcia cs 3 2 8 make all tOzkccn pemcia cs 3 2 8 make t zkccn pemcia cs 3 2 8 etc pemcia 2 amp 3 2 1 Window XP Hu Setup 1 3 EC E install c dinit d pemcia restart tOzkccn pemcia cs 3 2 8 dump_cis Windows
56. lt linux sched h gt int request_irq unsigned int irq void handler int void struct pt regs unsigned long flag const char dev name void dev id void free irq unsigned int irq void dev id 3 1 include lt linux config h gt include lt linux module h gt include lt linux kernel h gt include lt linux init h gt include lt linux miscdevice h gt include lt linux sched h gt include lt linux delay h gt include lt linux poll h gt include lt linux spinlock h gt include lt linux irg h gt include lt linux delay h gt include lt asm hardware h gt define DEVICE NAME custom buttons define BUTTON MAJOR 232 static struct key info int irq no unsigned int gpio port int key no key info tab 4 CPU IRQ EINTI GPIO Fl 1 IRQ EINT2 GPIO F2 2 IRQ EINT3 GPIO F3 3 IRQ EINT7 GPIO F7 4 h static int ready 0 static int key value 0 static DECLARE WAIT QUEUE HEAD buttons wait buttons wait static void buttons irq int irq void dev id struct pt regs reg struct key_info k int i int fo
57. 3 vivi gt bon part 0 192k 1M 3 2 MTD NAND 0x76 Samsung NAND 64MiB 3 3V kernel drivers mntd nand smc_s3c2410 c sme partitions WWF static struct mtd partition smc partitions name bon D partitions 2 gt dev mtd ll dev mtdblock Il LCD 3 gt size 0x04000000 offset 0x0 mask flags MTD WRITEABLE force read only ht name mtd size 0x03cfc000 offset 0x00300000 ys undef CONFIG_MTD_SMC_S3C2410_SMDK_PARTITION define CONFIG MTD SMC S3C2410 SMDK PARTITION Memory Technology Devices MTD gt NAND Flash Device Drivers gt SMC Device Support AND device Manufacture ID Oxec Chip ID 0x76 Samsung K9D1208VOM Creating 2 MTD partitions on Samsung K9D1208V0M 0x00000000 0x04000000 bon 0x00300000 0x03ffc000 mtd bon0 00000000 00030000 00030000 00000000 bonl 00030000 00100000 000d0000 00000000 bon2 00100000 00300000 00200000 00000000 bon3 00300000 03ffc000 03cfc000 00000001 cat proc mtd dev size erasesiz
58. 7 useradd passwd 8 gt gt 5 10 man Manual man man ls 1s help 11 D find C apache 9 Enter a less n q 1s m x apache print grep etc password
59. connect include lt sys socket h gt int connect int sockfd const struct sockaddr servaddr socklen t addrlen 0 1 sockfd socket servaddr IP addrlen servaddr TCP connect TCP connect close socket bind include lt sys socket h gt LI Es int bind int sockfd const struct sockaddr myaddr socklen t addrlen sockfd z H socket myaddr addrlen sin family sin port
60. CS8900A PD6700 ISA ISA 1 0 ARM 1I 0 ADDR24 1 0 nGCS3 CS8900A 0x19000000 ADDR24 1 W 1 0 0x18000000 nGCS2 PD6700 0x11000000 1 0 0x10000000 DU WiFi 1 RedHat9 TL WN210 1 1 nd PH E r gt rt18180 sys J make clean i ndiswrapper Step 1 ndiswrapper iswrapper l 1 tar gz Step 2 ndiswrapper 1ib modules 2 4 20 8 build PC
61. wlanctl wlan ad sbin Step 3 etc pcmcia config cardmgr config Config device prism2 cs module prism2_cs card ASUS WL 110 802 11b WLAN CF Card version ASUS 802 11B CF CARD 25 bind prism2 cs 8 Include configuration files for add on drivers source conf Include local configuration settings Step 4 mkcramfs root cramfs vivi Step 5 insmod pemcia core o 182365 0 ds o p80211 o cardmgr Step 6 CF PCMCIA Step 7 wland_ad bin sh wlanctl wlan0 Inxreq_ifstate ifstate disable E wlanctl wlan0 Inxreq_ifstate ifstate enable wlanctl wlan0 dotllreq start ssid linux wlan bsstype independent beaconperiod 100 dtimperiod 3 cfpollable false cfpollreq
62. if memcmp buf gpDownPort gt sCommandHead pBuffer nbuf 0 continue else if writen sockfd gpDownPort sACkERR pBuffer gpDownPort gt sAckERR Length lt 0 return 1 else goto again W i 2E D E else if nbuf lt gpDownPort gt sCommandHead Length gpDownPort gt sDelimiter Length continue else if memcmp amp buf nbuf gpDownPort sDelimiter Length gpDownPort sDelimiter pBuffer gpDownPort gt sDelimiter Length 0 len nbuf gpDownPort gt sCommandHead Length gpDownPort gt sDelimiter Length pSerial gpDownPort gt psCommand for i 0 i lt gpDownPort gt CommandNum i pSerial if len pSerial gt Length if memcmp amp buf gpDownPort gt sCommandHead Length pSerial gt pBuffer pSerial gt Length 0 Process Command i sockfd goto again printf Bad CommandNn if writen sockfd gpDownPort gt sAckERR pBuffer gpDownPort gt sAckERR Length lt 0 return 1 else goto again int main int argc char argv struct sockaddr_in cliaddr servaddr int lis
63. etc wlan wlan conf ESSID This file maps between wlan devices and network IDs and contains the names of all devices that should be initialized by the hotplug and rc scripts etc wlan wlancfg WE WEP mode These files are per network configurations This makes it easy to switch between different SSIDs and the various settings they may require like WEP keys and whatnot 0 This example assumes your network name SSID is MyHomeNetwork 1 gt cp etc wlan wlancfg DEFAULT etc wlan wlancfg MyHomeNetwork 2 edit etc wlan wlan conf and change the SSID wlanO line to SSID wlan0 MyHomeNetwork 3 edit etc wlan wlancfg MyHomeNetwork and make any necessary changes necessary to support your network such as WEP and whatnot etc pemcia network opts IP Step 5 wlanctl ng Linux wlan ng wireless tools iwconfig wlanct1 ng root zkccn root fwlanctl ng wlan0 Inxreq autojoin ssid my net authtype opensystem Step 6 D etc wlan wlancfg essid WEP MODE wlan conf
64. include lt sys socket h gt E read write ssize t recv int sockfd void buff size t nbytes i ssize t send int sockfd const void buff size t nbytes int t flags flags 1 3 read write 3 flags 0 HER MSG_DONTROUTE send MSG DONTWAIT recv send MSG_OOB recv send MSG PEEK recv SUB DRT D MSG_WAITALL recv 1 2 3 1 7 socket connect bind listen accept
65. yaffs mtdif c 33 variable yaffs oobinfo has initializer but incomplete type yaffs mtdif c 34 unknow field useecc specified in initializer yaffs_mtdif c nand_oobinfo 3 4 5 mount t yaffs dev mtdblock 1 usr yaffs_fs c yaffs internal read su printk nand oobinfo per yaffs mtdif c useecc 3 4 6 mkyaffs e dev mtd 1 usr yaffs argc 4 sh 0 optcnt 2 MEMSETOOBSEL Inappropriate ioctl for device yaffs utils mkyaffs c mkyaffs T H Oobsel usemtdecc yaffs oobinfo yaffs noeccinfo if ioctl fd MEMSETOOBSEL amp oobsel 0 perror MEMSETOOBSEL close fd exit 1 dev mtd 1
66. H A U Uz F He We H lt Linux N GE ta EE WES fa ccn422 hotmail com 211C BBS ARM rk ep gn T J LH u dod UE
67. PWM 1 ifndef _ KERNEL define endif ifndef MODULE define MODULE endif nclude nclude nclude nclude nclude nclude nclude nclude Wo ME k LS AS LS OW NS LS U w PS nclude nclude lt nclude lt nclude lt nclude lt nclude lt nclude lt f Gb S HH H E HE HH H HH HH HH HH E H H TF nclude lt define DEVICE NAME i as as as as as li KERNEL ux config h gt ux module h gt nux kernel h gt nux init h gt ux sched h gt ux delay h gt nux poll h gt nux spinlock h gt linux irq h gt hardware h gt io h gt irq h gt nux time h gt define BUZZ_MAJOR 233 static unsigned int PWM2_Fre 10000 10KHz MODULE_PARM PWM2_Fre i nux interrupt h gt open 1 fork nux miscdevice h gt arch cpu_s3c2410 h gt arm mach irq h gt PGM_BUZZ pf count flush 1 close 1
68. e Space find name grep n password etc Ctrl C 12 ALT FICF6 6 X Window X Window CRTL ALI BackSpace H AA Linux minicom X Window 13 PDF n BAL he H grep n REUK CNTA H X Window star F1 F6
69. close shutdown getsockname getsockname I 0 sock include lt sys socket h gt int socket int family int type int protocol sockfd 1 family family AF_INET IPv4 AF_INET6 IPv6 AF LOCAL Unix AF ROUTE AF KEY type SOCK STREAM SOCK_DGRAM SOCK_SEQPACKET SOCK_RAW Protocol 0 family type IPPROTO_TCP TCP IPPROTO UDP UDP IPPROTO SCTP SCTP
70. make tetris qws 1 2 How to use tmake 1 2 1 Using tmake for x86 Hcd linuette host example tetris 8 env sh env sh export QTDIR opt i386 unknown linux export TMAKEPATH usr lib tmake lib qws linux x86 g export LD LIBRARY PATH lib usr lib QTDIR lib LD LIBRARY PATH Hprogen n tetris o tetris pro pro tmake tetris pro o Makefile Makefile make qvfb H tetris qws 1 2 2 Using tmake for arm cd linuette target example tetris GH a 5 linuette host example tetris env sh env sh 8 env sh env sh export QTDIR opt host armv41 armv41 unknown linux export TMAKEPATH usr lib tmake lib aws linux linuette g export LD LIBRARY PATH lib usr lib QTDIR lib LD LIBRARY PATH Hprogen n tetris o tetris pro tmake tetris pro o Makefile make file tetris tetris ELF 32 bit LSB execut
71. s3c2410a s3c44b0x BCDDAY 44b0x 1 31 2410 1 7 JH BCDDATE mizi linux kernel include asm arm arch s3c2410 S3C2410 h define BCDDATE bRTC Ox7c define BCDDAY bRTC 0x80 define BCDDATE bRTC 0x80 define BCDDAY bRTC 0x7c l main
72. 3 2 2 2 images BA flash imagewrite mtd dev lt file offset gt vivi SAS 0 7192KB X zImage 5A 192KB IMB root cramfs 5 J 1MB End part imagewrite dev mtd 0 vivi 0 imagewrite dev mtd 0 zImage 192K H imagewrite dev mtd 0 root cramfs 1M 3 3 3 3 1 vivi kernel root boot A linux NOW Booting Linux Uncompressing Lime sss cesta da dE E cia aguas esa eae ceed done booting the kernel 3 3 2 telnet sz RedHat 9 telnet ztelnet ztelnet 3 4 windows linux windows SecureCRT Windows gt gt gt gt gt TCP IP winsock
73. v FB tindows W QD E R O Setup 2 Setup 1 QD O tiis ex A O QU Setup 3 Setup 2 SSID my net ping 10
74. BNK Linux HEIN SRL TNUK E EE 1 Bir aaa qut an dd rst bs ada o eT EN TORT ETN otc MR Re era 3 dCpCHL EZ a i nux suse 3 Red Hat Linux 9 0 4 eech HEIN SEENEN 6 EXE E 6 UE EE H Tie EE 7 2 i sU TI 8 Linux 10 MIZI Linux SE for S3C2410 pe 11 1 11 2 Linux image 12 3 RRA Linux hj image FREJ HERIR ee 14 Mil e EE 21 PRA TR Linux SRD EI occ aa a a s A S G S Hu S S 22 z EE 22 2 Waaa EAPC ECE LIE Deca upya a D Y um Ee 23 E C cU od A a ei cules A ASA A aa a uska Q 28 4 PW 33 38 GE HI ica bk aa aah vol aap ecb hu kuki h bhq g 41 Linux 0 42 EC ES Geet a ste et I A aa 42 2 GEIER EE 42 S Yaf S l STE Busana mayuq RO M ARIS oa a DU etr ya ro 44 4 XaffsTE AH N EESS8 812 e e epe e Pul eld 52 5 SEXEBU HRA SELinux SE E 53 Wee EE 53 L BOARS AH a uda aaa tual es Da anasu a ha sa h Pad 53 EE 55 EE s ana aa mag kam A k Aa eyak Am ea k a n A a Ne uk 57 j ASS el ER
75. ret read fd buf 16 ioctl ret ioctl fd 0x100601 buf k ID 06 485 if ret gt 5 amp amp ret lt 16 if buf 0 0x02 amp amp buf 2 0x05 amp amp buf 4 0x00 buf buf 1 2 0 printf find device s n amp buf 5 ioctl fd 0x010600 buf 485 else printf no find device W if pid fork lt 0 printf fork err n else if pid 0 father buf 0 0x06 1D buf 1 0x01 01 buf 2 0x00 while 1 buf 2 0x80 write fd buf 3 sleep 1 1 gt else children while 1 for i 0 i lt 10000 i ret ioctl fd 0x100602 buf ID 00 close fd close fd return 0 read write buf sizeof buf buf 4 4 sizeof buf buf 2 gt 485
76. PWM int main void int fd unsigned int RunTime unsigned char i fd open dev PWM 0 if fd lt 0 perror open device PWM exit 1 while 1 ioctl fd 3 amp RunTime for i 0 i lt 10 i ioctl fd 0 amp RunTime sleep 1 ioctl fd 2 amp RunTimo EX RunTime printf 1s RunTime d n RunTime ioctl fd 1 amp RunTime sleep 1 ioctl fd 2 amp RunTime RunTime printf ls RunTime d n RunTime for G 0 i lt 10 i ioctl fd 0 amp RunTime sleep 2 ioctl fd 2 amp RunTime printf 2s RunTime d n RunTime ioctl fd 1 amp RunTime sleep 2 ioctl fd 2 amp RunTime i HX RunTime f printf 2s RunTime d n RunTime close fd return 0 5 LCD 5 1 s3c2410fb c Linuette mizi linux s3c2410fb c kernel drivers video s3c2410fb c 240 480LCD 640 480 1 gt initdata
77. Send00485 copy from user ioctl buf char arg Len for 12 0 i lt Len D i Sendbyte485 ioctl buf i 0 Sendbyte485 ioctl buf i 1 break default return EINVAL return ret static struct file operations RS485 fops owner THIS MODULE write RS485 write read RS485 read ioctl RS485 ioctl Je static devfs handle t devfs handle static int _ init RS485 init void unsigned long flags devfs handle devfs register NULL DEVICE NAME DEVFS FL DEFAULT IO MAJOR 0 S IFCHR S IRUSR S IWUSR amp RS485_fops NULL RS485 Init O request irq IRQ RXDI rx irq handle 0 DEVICE NAME IRQ UART1 NULL disable irq IRQ RXDD printk DEVICE NAME Init OK n return 0 static void _ exit RS485 exit void devfs unregister devfs handle module init RS485 init module exit RS485 exit 3 include lt stdio h gt include lt stdlib h gt include lt unistd h gt include lt sys ioctl h gt include lt fcntl h gt unsigned char command 6 OxFF 0x02 0x03 0x01 0x06 0x00 find devices int main int argc char argv unsigned char port unsigned int i char buf 16 outbuf 16 char ret int fd pid_t pid pidl fd open dev PGM_RS485 O_RDWR if fd lt 0 perror open device POH RS485 faill exit 1 write fd command 6
78. gLearning Oxff RRS ORAS RAR OO RAE ROO OR RK ROR OOK ROR OOK RK OR OK OR OR OR OK OK IR OR OK OR I ROK void SendIR void kokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokakok k void SendIR void plRData gl kRData gSending 1 gCount 0 gPWMEn 1 rTCNTBO Oxffff pIRData plRData gCount rTCON rTCON amp OxffffffO Ox2 Update TCNTBO TCMPBO rTCON rTCON amp OxffffffO Oxl Start for Timer 0 rTCON rTCON amp OxffffOff Oxa00 Timerl auto reload Update TCNTB1 TCMPB1 Stop rTCON rTCON amp OxffffOff 0x900 Start for Timer 1 rINTMSK amp BIT TIMERO BIT_TIMER1 void LearnIR unsigned char which IR skokokokokokokokokokokokokokokokokokokokokokokokokokoko kokokokokokokokoko
79. jpeg cp arm qtopia jpeg h arm qtopia include HE YE T Es T 4 qte qtopia lib libate so 2 3 12 2 make qpe In file included from videocaptureview cpp 54 usr local arm 2 95 3 lib gcc lib arm linux 2 95 3 arm linux sys include lin ux videodev h 5 linux version h No such file or directory cp linuette target box kernel include linux version h usr local arm 2 95 3 arm linux include linux usr local arm 2 95 3 arm linux include linux videodev h Xx df usr local arm 2 95 3 arm linux sys include linux videodev h X fF include lt linux version h gt 4y Bt Wii 3 Make qpe home nfs qtopia free 2 2 0 qtopia lib libqte so undefined reference to fixsfsi home nfs qtopia free 2 2 0 qtopia lib libqte so undefined reference to subsf3 home nfs qtopia free 2 2 0 qtopia lib libqte so undefined reference to floatsidf jpeg cp arm qtopia jpeg libs libjpeg so arm qtopia lib make clean make 4 gpe qpe qpe error while loading shar
80. sin addr s addr TCP TP IP TCP IP bind IP IP IPv4 INADDR ANY listen TCP socket bind accept socket connect listen CLOSED LISTEN listen include lt sys socket h gt
81. div D I MUXO divider value Timer input clock F SECGPL Freq Timer input clock Frequency div PCLK 50 prescaler value 1 divider value 2 Freq 38KHz init Ouni p PWM freq rate freq requency PCLK prescaler value 1 divider value F TCNTBO TCFGO Prescaler0 TCFG1 div Timer input clock Frequency Freq PCLK prescaler value 1 divider value Freq 50MHz 1 1 2 38KHz 328 947 329 HI TCNTBO div 329 4 rate 50 TCMPB0 329 2 164 CPU FCLK HCLK PCLK kernel arch arm mach s3c2410 cpu c freq s3c2410 get cpu clkQ hclk s3c2410 get bus clk GET HCLK pclk s3c2410 get bus clk GET PCLK CPU clock 200 000 Mhz HCLK 100 000 Mhz PCLK 50 000 Mhz 83c2410 h TCFG0 TCFGO DZONE 0 TCFGO PRE1 15 TCFGO PREO 0 define TCFGO DZONE x FInsrt x fTCFGO DZONE define fTCF
82. GUI F E arch arm def configs smdk2410 ules_install AP F H modules cd tmp lib modules 2 4 18 rmk7 pxal tar zcvf mod tgz kernel pcmcia 5 2 bio Step 1 2 4 18 rmk7 root izi DI linux tmp lib mod modules dep X44 lib mod lib mod lib mod pxal H gt lt ules wire ules wire ules wire ules 2 4 18 modules dep mk7 pxal mod ess p80211 o ess prism2 cs o ess prism2 usb o usr li Xf tgz C pemcia FE pemcia H F root cramfs b modules 2 4 18 rmk7 pxal mod tgz tar zxvf ds o pcmcia core o 1i82365 0 Step 2 usr lib modules wireless linux wlan ng 0 20 p80211 0 prism2_usb o prism2 cs o usr 1ib modules wireless
83. HAY tar cf cd li FS 1 3 gt uette 1 Tool chain rpm Uvh cross ar rpm Uvh cross armv41 rpm Uvh cross armv4l rpm Uvh cross armv4 rpm Uvh cross ar M n cross ar RPMS rpm B YE 1 K cp 1n tar xvf vil binutils 2 10 3mz 1386 rpm vil libfloat 1 0 3mz 1386 rpm rpm Uvh rpm kernel headers 2 4 5 rmk7 np2 lmz 1386 rpm gcc 2 95 2 10mz i386 rpm glibc 2 2 1 2mz 1386 rpm vil gcc c 2 95 2 10mz 1386 rpm pm Uvh cross armv4l zlib 1 1 3 5mz i386 rpm pm Uvh cross armv41 jpeg 6b 2mz 1386 rpm pm Uvh cross armv41 jpeg devel 6b 2mz 1386 rpm pm Uvh tmake 1 7 3mz noarch rpm pm Uvh linuette sdk x86 1 5 3mz noarch rpm
84. NFS NFS Network File System 1 dev t t bps par Bits Serial port setup tyS0 TIT D Hardware Flow Contro fl F Save set HE Exit XBH Serial Device S 2 dev ttyS1 I up as df1 minicom Y Y cr Y or Y c u of on zn on Dan oa th or Y HEP Q BE EH 1 F
85. accept recvfrom getsockname getpeername t F 1 3 host byte order network byte order include lt netinet in h gt uintl6 t htons uintl6 t hostl6bitvalue uintl6 t htonl uint32 t host32bitvalue uintl6 t ntohs uintl6 t netl6bitvalue uintl6 t ntohl uint32 t net32bitvalue l 4 5 byte 4 2B8SD include lt strings h gt void bzero void dest size t nbytes HRE El void bcopy const void src void dest size t nbytes void bemp const void ptrl const void ptr2 size t nbytes Ip
86. kill getpidO SIG SOFTRESET 3 main void sig chld int signo lf pid_t pid int stat while pid waitpid 1 amp stat WNOHANG gt 0 printf child d terminated n pid return Signal SIGCHLD sig_chld main O GUI s3c2410 Windows CE Windows XP Embedded Linux CE VC TOES TUA TUE MCU
87. H L series_buf 0 return len return 0 fail kokokokokokokokokookokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokok void main void 485 kokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokqkokokokok void main void static unsigned int temp static unsigned char i l j char buf FIND DEVICE DATA LENGTH ChangeClockDivider 1 1 1 2 4 ChangeMP11Value 0xal 0x3 Ox1 FCLK 202 8MHz rGPHCON rGPHCON amp 0x3 lt lt 14 0x1 lt 14 setup 485 receive enable pin rGPHCON rGPHCON amp Oxf lt lt 8 Oxa lt lt 8 setup TXD1 RXD1 pin Delay 0 Uartl Init 0 38400 FindDevice NET ID buf Output Relay485 3 NET ID 0 while 1 Delay 50 Send00485 Sendbyte485 NET ID Sendbyte485 00 temp 1 if temp 100 0 Output Relay485 i NET ID j jt if j gt 3 j 0 if temp 400 0 if i gt 0 i 0 else i l 1 2 485
88. static struct s3c2410fb mach info xxx stn info initdata pixclock 174757 bpp 16 ifdef CONFIG FB_S3C2410_EMUL xres 96 else xres 640 endif yres 480 hsync_len 96 vsync_len 2 left_margin 40 upper_margin 24 right margin 32 lower_margin 11 sync 0 cmap static l reg ledconl LCD1 BPP 16T LCD1 PNR TFT LCD1 CLKVAL 1 ledcon2 LCD2 VBPD 32 LCD2 VFPD 9 LCD2 VSPW 1 ledcon3 LCD3 HBPD 47 LCD3 HFPD 15 ledcon4 LCD4 HSPW 95 LCD4 MVAL 13 ledconb LCD5 FRM565 LCD5 INVVLINE LCD5 INVVFRAME LCD5 HWSWP LCD5 PWREN J 2 LCDLPCSEL LCDLPCSEL amp C7 mizilinux L060 rm dev fb 1 amp insmod s3c2410fb o 9 dev fb 1 2 LCD include lt stdio h gt include lt fcntl h gt include lt stdlib h gt include lt errno h gt 5 include lt sys mman h gt include lt linux fb h gt define FBDEV dev fb 1 static char default framebuffer FBDEV struct fb dev int fb void fb mem int fb width fb height fb line len fb size
89. tmp 1 2 PC L 2 2 Hgcc c hello c insmod hello o he llo worlk rmmod hello Goodbye cruel world 3 Makefile CROSS opt host armv41 bin armv41 unknown linux INCPATH linuette target box kernel include al he cl make 1 hello llo CROSS c I INCPATH hello c ean rm rf o make opt hos t armv41 bin armv41 unknown linux gcc I linuette target box kernel include tmp H3 amp F FR See ae AU EIN RG GE EO 3T DAHM BE 1 H insmod hello o He 1lo world rmmod hello Goodbye cruel world proc modules cat proc modules LED 1 LED 2 i 1 1 LED fndef _ KER define _ KER e i define MODULE He i ndif fndef MODUL ndif nclude lt lin EL EL ux module h gt TI L include lt linux kernel h gt include lt linux version h gt include lt linux fs h gt include lt linux init h gt include lt asm arm arch s3c2410 hardware h gt define DEVICE NAME leds define LED MAJ
90. 1 1 sockaddr_xx IPv4 struct in addr sockaddr_in in_addr t s_addr 32 bit IPv4 address network byte ordered struct sockaddr_in bind uint8 t sin_len sa family t sin family AF_INET in port t sin port 16 bit TCP or UDP port number network byte ordered struct in addr t sin addr 32 bit Ipv4 address network byte ordered char sin zero 8 unused struct Sockaddr uint8 t sa_len sa family_t sa family address family AF xxx value char sa data 14 protocol specific address int bind int struct sockaddr socklen_t struct sockaddr in serv IPv4 socket address structure bind sockfd struct sockaddr amp serv sizeof serv unp h defined SA struct sockaddr
91. nand flash ecc mkyaffs dev mtd 1 usr yaffs e yaffs mtdif c yaffs_oobinfo drivers mtd mtdchar c ioct10 mkyaffs mkyaffs gt H tdchar c ioctlO MTD mkyaffs c Hie fis 3 4 7 mkyaffs Makefile MAKETOOLS MAKETOOLS opt host armv41 bin armv41 unknown linux include lt mtd mtd user h ft Xsinclude lt linux mtd mtd h gt nand oobinfo main struct nand oobinfo oobsel 6 MEMSETOOBSEL mkyaffs_noecc mkyaffs _noecc 3 4 8 proc df h Filesystem size U
92. Linux d Linux mizi linux busybox hwcloc SH D I linux toe hl 2 f mktime localtime hwclock 2 etc ini hwcloc FIN Ta H RTC F H k busybox E RING H FETE zii 2 ztelnet telnet F F PC linux hwelock APT dat e i H time stime gettimeofda F
93. ivi gt bon part 0 192k 1M 3M M lt ivi gt load flash vivi x ivi gt load flash kernel x Kr yaffs ivi gt load flash root x lt lt lt ivi gt boot lt He ifconfig eth0 192 168 1 7 inetd ztelnet ount t yaffs dev mtdblock l usr H PC linuette target box root_dir root root english 4 2 mkyaffsimage Yaffs root localhost root tar zcvf root tgz root localhost root ztelnet 192 168 1 7 ztelnet root tgz usr cd usr tar zxvf root tgz rm rf root tgz vivi vivi gt param show Linux command line noinitrd root dev bon 2 init linuxrc console ttyS0 vivi gt param set linux cmd line noinitrd root dev mtdblock 1 init linuxrc console ttyS0 vivi gt param save vivi gt boot yaffs JS root english Yaffs
94. ndiswrapper RedHat 9 linux linux ik Sr W Interval Timer itimer Cinterval interval interval 0 Linux 1 CITIMER_REAL 1 0 SIGALRM 2 ITIMER_VIRT
95. Bind sockfd SA amp serv sizeof serv 1 2 3 struct Sockaddr in serv connect sockfd SA st socklen_t len len sizeof cli getpeername unixfd uct Sockaddr un cli PR bind connect sendto amp serv sizeof serv Unix domain len is a value result CC Fi UR value result BR SA amp cli amp len Gvalue n 4
96. Comment An Hello Progra Exec hello Icon Hello Type Application Name HelloWorld Exec Icon desktop png Hello png pics hello Icon hello Hello Name desktop hello QTE qtopia qtopia 1 gt hello gqtopia src applications 2 gt hello cpp Hinclude lt qapplication h gt include lt qtopia qpeapplication h gt 3 hello pro CONFIG qt warn_on release CONFIG qtopia warn on release DESTDIR QPEDIR bin 4 hello desktop ME h hello 2 2 Target Target Host linux generic gt linux arm g
97. NFS JR ai CH WR UVF A tee CIP 192 168 0 home 192 168 rw syn VE mount F etc exports Xl Yes aS Hill NFS home sbin servic NFS load etc init d nfs reload sbin services nfs start sbin service nfs restart etc exports I4 mount NFS IP A 192 168 0 1 mount 192 168 0 1 home mnt mount mnt home Sat 2 mount NFS IP 192 168 0 1 home CIP 192 168 0 7 mnt A
98. 485 GPIO set gpio ctrl nREDE GPIO PULLUP EN GPIO MODE OUT setup 485 receive enable pin set gpio ctrl TXD GPIO PULLUP EN GPIO MODE UART TXD1 set gpio ctrl RXD GPIO PULLUP DIS GPIO MODE UART RXDI UFCON1 0x27 Rx Trigger 12byte Tx Rx FIFO reset enable UMCON1 0x0 AFC disable ULCON1 0x33 8byte stop 1 parity force 1 UCON1 0x385 rx level tx level enable timeout int disable rx error int normal tx rx interrupt or polling UBRDIV1 80 38400 static void Send00485 void 485 9 0 0x00 ULCON1 0x3b bit 9 is 0 write gpio bit nREDE 1 GPH7 485 receive disable send enable udelay 100 while UTRSTATI amp 0x6 Wait until THR is empty UTXH1 0x00 485 while UTRSTATI amp 0x6 Wait until THR is empty ULCON1 0x33 bit 9 is 1 static void Sendbyte485 unsigned char data unsigned char end 485 while UTRSTATI amp 0x6 Wait until THR is empty UTXH1 data if end laster byte while UTRSTATI amp 0x6 Wait until THR is empty udelay 500 write gpio bit nRED
99. etc passwd nobody ScriptAlias cgi bin usr 1 3 amp F CAPD EBI CGI make boa make opt host armv41 bin armv41 unknown linux strip boa Step 2 Boa Boa etc Group va L usr share doc HT etc linux etc Step 3 1 HTML boa BLA Boa oup 0 boa L xK P var www cgi bin cg etc g Ir Pre User nobody ib cgi bin log boa fl A i oup nog boa conf Boa oup 0 ScriptAlias cgi bin var www cgi bin amp HTML ndex html i 3x ip
100. telnet Terminal 1 ping 10 10 10 2 We can confirm that it s communicating between host PC and target board by ping command of data mm mm om om ztelnet Terminal 1 ztelnet 10 10 10 2 Login by root account Because you don t need to input password press Enter key sec AGE images tmp Terminal 1 cd tmp rz Pushing Ctrl ztelnet gt console appears telnet gt sz vivi zlmage root cramfs imagewrite Ej root LinuxMc image rz rz ready To begin transfer type sz file to your modem program ipped by 1s root_hangul cramfs zImage cramfs flash 3 2 2 imagewrite images flash 3 2 2 1 Flash flash bootload kernel root filesystem imagewrite dev mtd 0 part 0 192K 1M
101. void PD6710 CardInit void JJ fe 5 W kokokokokokokokokokokokokokokokoko kokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokqkokokokok void PD6710 CardInit void if PD6710 Rd MISC CTRLI amp OxD SV 3 3V PD6710 Modify MISC_CTRL1 0x2 0x0 Uart Printf 5 0V card is detected n else PD6710 Modify MISC_CTRL1 0x2 0x2 Uart Printf 3 3V card is detected n Delay 100 PD6710 Modify INT GENERAL CTRL 1 lt lt 6 0 PD6710 Modify POWER CTRL 1 lt lt 7 1 lt 7 PD6710 Modify INT GENERAL CTRL 1 lt lt 6 0 Delay 1 PD6710 Modify POWER CTRL 1 lt lt 4 3 1 4 D PD6710 Modify INT GENERAL CTRL 1 lt lt 6 1 lt 6 5N 3 3V Vpp Vcc 10ms RESET PCMCIA E Reset PCMCIA Reset 10us Reset Delay 200 20ms while PD6710 Rd INTERFACE STATUS amp 0x20 READY define Card RdAttrMem off volatile U8 0x10000000 off define Card WrAttrMem off val volatile U8 0x10000000 off val FRIAR RIK void PrintCIS void
102. 6 8 password etc ep ir password etc tx ALT F7 er CRTL ALT X Window shell xpdf filename pdf mizzo filename html X Window 14 df h printk KERN_DEBUG printk KERN INFO Angus printk Here I am 15 proc proc modules proc ioports proc iomen pro 16 printk s inf Driver Initional M printk lt 6 gt pr
103. CE CE CE Linux Linux GUI IE wince Linux GUI QT QT C Bjarne Stroustrup C C C QT Linux QT C GUI QT3 QT QTE QTOPIA
104. Linux nand flash Yaffs LCD bootloader kernel root filesysytem user filesystem GUI 1 vivi Z 2 vivi z 3 vivi Z GUI 4 vivi Z 5 vivi z 6 vivi z age age age age age age VJ EK A WEB 1 Boa 1 1 Boa root cramfs root cramfs user user yaffs GUI root yaffs root english cramfs BK root china cramfs root_english yaffs root cramfs usr yaffs Step 1 Awww boa org Boa src tar xzf boa 0 94 13 tar gz cd boa 0 94 13 src configure Makefile Makefile TT CC gcc CPP gec E CC opt host armv41 bin armv41 unknown linux gcc CPP opt host armv41 bin armv41 unknown linux gcc E H co boa conf nogroup G
105. Step 1 PC PC CLINKLEDO PC windows 93 JH RES Step 2 WEGA ID ISA kernel drivers net cs8900a c ID ChipID 630e ChipID dc90 1 0 ADS Linux define CS8900 BASE volatile unsigned short 0x19000000 define EthIOAddr volatile unsigned short 0x19000300 define EthPPP volatile unsigned short 0x1900030a define EthPPDO volatile unsigned short 0x1900030c void Test_CS8900 void rBWSCON rBWSCON amp Oxf lt lt 12 Oxd lt lt 12 nGCS3 nUB nLB sSBHE nWAIT 16 bit rBANKCON3 0 lt lt
106. cd tmp lib modules 2 4 18 rmk7 pxal tar zcvf mod tgz kernel pcmcia 2 3 2 3 1 GUI cd linuette target box root_dir tar jxvf root tar bz2 mkcramfs root root cramfs cp root cramfs image 2 3 2 GUI cd linuette target box root dir tar jxvf root english tar bz2 root hangul tar bz2 root china tar bz2 cd root english usr lib modules 2 4 18 rmk7 pxal rm rf kernel pcmcia Htar zxvf tmp lib modules 2 4 18 rmk7 pxal mod tgz C 8 mkcramfs root english root english cramfs Hcp root english cramfs image 3 HAZE Linux image 3 1 image 3 1 1 JTAG vivi JTAG PC JTAG cd linuette target box Jflash cp Jflash s3c2410 image T cd image Jflash s3c2410 help Nand Flash K9S1208 Jflash s3c2410 vivi t 5 Select the function to test 0 Input target block number 0 Select the function to test 2 3 1 2 vivi FR images 3 1 2 1 vivi vivi
107. GNU Li Eh Y RI E PC W Da U gt H 7 K Linux I usr src 1inux 2 4 include 1 PC Linux AZ P nux Linux X Linux i GNU Linux Li BAR n P i nux 8
108. foot_ english cramfs D imagewrite dev mtd 0 root english cramfs 1M VE vivi root cramfs ztelnet FAX root english cramfs imagewrite imagewrite root english cramfs vivi xmodem root english cramfs QT Ctrl C EH QT usr qt bin cal sh start sh QT 2 Yaffs 2 1 VE vivi vivi linux imagewrite 5A mizi yaffs zImage yaffs
109. local_irq_save flags 2410 CINTMSK SUBINTMSK ARM CPSR I F IRQ FIQ Flags CPSR jiffies 8 485 485 RS485 write 0 S Send00485 O gt H nable_irq IRQ_RXD1 intk lt 1 gt rx queue sleep on J E P Interruptible sleep on timeout amp P D isable irq IRQ RXD1 rx queue sleep on rx queue slee rx queue sleep on rx queue slee 3 rx queue WAITTIME p_up p_up Dux
110. make clean make make install cd qtopia free 2 2 0 qtopia image opt Qtopia mkdir demohome ted bin startdemo home qtopia image opt Qtopia demohome sound system Detected Qtopia edition pda in home qtopia free 2 2 0 qtopia Using system sound daemon Starting qvfb QVFB O is already running Starting Qtopia pda Can t open framebuffer device dev fb0 Driver cannot connect Stopping qvfb Chttp trolltech com developer knowledgebase 661 ow do I find out the properties of my Linux Frame Buffer H Entry number 661 How do I find out the properties of my Linux Frame Buffer Answer U se the Linux command fbset often found in usr sbin fbset root localhost bin fbset open dev fb0 No such device 1s dev fb0 root localhost bin 1s dev fb0 1 crw 1 root oot 29 0 Jan 30 2003 dev fb0 framebuffer YE etc grub conf boot grub menu lst X fF kernel vga 791 fb on GRUB windows XP Red Hat Linux 2 4 20 8 linu
111. ARM s3c2410 s3c2410 Linux SEHR 2 E MARA AN WRG 6 MIZI Linux S REF s3c24 DK Software AE 10 DU Ad Linux Development Kit for S3C2410 H AE e pu KE SE Lif E SCH H JUR EG BERE SBC 2410X UM pdf o 1 1 1 binutils gcc gcc c make minicom rpm rpm q binu
112. AckOK n 6 else if mememp recvline gpAckERR 1 n 0 write fileno fp AckERR n 7 if FD ISSET fileno fp amp rset if n read fileno fp sendline MAXLINE 0 stdineof 1 shutdown sockfd SHUT WR FD CLR fileno fp amp rset continue writen sockfd gpCommandHead 1 2 writen sockfd sendline n 1 writen sockfd gpDelimitertl 2 int main int argc char argv int sockfd struct sockaddr_in servaddr sockfd socket AF_INET SOCK_STREAM 0 bzero amp servaddr sizeof servaddr servaddr sin family AF INET servaddr sin port htons SERV PORT inet pton AF INET 192 168 1 1 amp servaddr sin addr connect sockfd struct sockaddr amp servaddr sizeof servaddr str cli stdin sockfd exit 0 4 10 HNZ ERE HEARS SS T0 int SoftwareTPServer int port struct sockaddr in cliaddr
113. Character devices gt S3C2410 LED Driver example Jil 2 3 2 FEAR Makefile vi driver char Makefile CRAMFS Hy then S3C2410 LED Driver example ob j CONFIG S3C2410 LED leds o led c kernel driver char 2 3 3 1 make zlmage this modules ifndef MODULE define MODULE endif CONFIG S3C2410 LED xtA E 2 proc devices dev leds ifndef MODULE define MODULE endif 3 dev leds devfs static devfs handle t devfs handle static int _ init leds init void int ret int i ret register _chrdev LED MAJOR DE
114. it virt value mk 1 0 SIGVTALRM CU Plu A it virt value it_virt_incr 3 gt PROF ITIMER PROF PROF it prof value 1 4908200 HIN SIGPROF it prof value HW AME it_prof_incr 0 Linux include linux time h define IT IMER_REAL 0 define ITIMER VIRTUAL 1 define ITIMER PROF 2 Linux Cinclude
115. 4 T Q PWM lt IE PWM 2 gt 3 gt PWM 4 2 PWM Ba PWM 4 2 1 module init pwm init fll module exit pwm cleanup pwm init PWM EJ AC SCH Hi static devfs handle static int i int result result register chrdev PWM MAJOR t devfs_handle nit pwm_init void if result lt 0 print return result DEVICE_NAME Fo pwm cleanup MAUR Jor amp pwm fops k KERN ERR DEVICE NAME Unable to get major d n PWM MAJOR devfs handle devfs register NULL DEVICE NAME DEVFS FL DEFAULT PWM MAJOR 0 S IFCHR S IRUSR S IWUSR amp pwm fops NULL set gpio ctrl GPIO BO GPIO PULLUP EN GPIO MODE TOUT TOUTO printk KERN INFO DEVICE NAME return 0 static void _ exit pwm cleanup void devfs unregister devfs handle unregister chrdev PWM MAJOR DEVICE NAME module init pwm init module exit pwm cleanup MODULE LICE 4 2 2 pwm open Y d EH PWM H
116. 6 rptr size t len WE TCP read write read write ssize t readn int filedes void buff size t nbytes ssize t written int filedes const void ssize t readline int filedes void buff size t maxien P74 ssize t writen int fd const void vptr size t n size t nleft ssize t nwrit const char ptr pir vptr nleft n while nleft gt 0 ten if written write fd ptr nleft lt 0 if nwritten lt 0 amp amp errno EINTR nwritten 0 and call writeQ again else return l error nleft nwritten ptr nwritten gt INADDR_NONE 32 I 0 return n HH x recv send
117. SSID W SSID_wlan0 R amp DNAN3 SSID R amp DNAN3 wlancfg R amp DNAN3 Lnxreq hostWEPEncrypt true Lnxreq hostWEPDecrypt true DotllPrivacyInvoked true DotlIWEPDefaultKeyID 0 DotllExcludeUnencrypted true Dot 11WEPDefaultKey0 B1 92 27 EF 6E IS ADHOC n AuthType opensyste AP IS_ADHOC y 2 etc pcmcia network opts IP DHCP y HERSH IP IP etc sysconfig network scripts ifcfg wlan0 Get IP setting from DHCP DEVICE wlan0 BOOTPROTO dhcp BOOT yes So Fixed Setting EVICE wlan0 PADDR 192 168 2 98 ETMASK 255 255 255 0 ETWORK 192 168 2 0 ROADCAST 192 168 2 255 BOOT yes GATEWAY 192 168 2 254 e P e Se ti E Step 8 PCMCIA etc init d pemcia restart iwconfig wlan
118. Step 2 root zkccn iwconfig wlan0 mode ad hoc Step 3 root zkccn iwconfig wlan0 essid my net Step 4 root zkccn iwconfig wlan0 key 1234567890 root zkccn amp iwconfig wlan0 Wlan0 IEEE 802 11b ESSID my net Mode Ad hoc Frequency 2 412GHz Access Point 00 11 22 33 53 B8 Bit Rate 11Mb s Tx Power 20 dBm Sensitivity 0 3 RTS thr 2432 B Fragment thr 2432 B Encryption key 1234 5678 90 Encryption mode restricted Power Management off Link Quality 100 100 Signal level 80 dBm Noise level 256 dBm Rx invalid nwid 0 Rx invalid crypt 0 Rx invalid frag 0 Tx excessive retries 0 Invalid misc 0 Missed beacon 0 Step 5 root zkccn ifconfig wlan0 192 168 1 1 root zkccn iwconfig wlan0 WlanOLink encap Ethernet HWaddr 00 0A EB A4 DE A3 inet addr 192 168 1 1 Bcast 192 168 1 255 Mask 255 255 255 0 UP BROADCAST RUNNING MULTICAST MTU 1500 Metric l RX packets 74 errors 0 dropped 0 overruns 0 frame 0 TX packets 28 errors 0 dropped 0 overruns 0 carrier 0 collisions 0 txqueuelen 100 RX bytes 14472 14 1 Kb TX bytes 4140 4 0 Kb Memory 30800000 30800024 windows ping IP Step 6 root zkccn ping 192 168 1 1 PING 192 168 1 1 192 168 1 1 56 84 bytes of data 64 bytes from 192
119. free irq IRQ TIMERO NULL if Learning gt IR NUM MIN for i 0 i lt Learning 1 i if 1 910 printk Xn lt 1 gt printk 04x Study Buf i printk nLearning is d n Learning copy to user buf Study Buf ret Learning 1 2 else ret 0 kfree Study Buf free irq IRQ IRInput Study Buf free irq IRQ TIMERO NULL return ret static ssize t IR Transmit struct file filp const char buf size t count loff t f pos int ret unsigned short Transmit Buf if count lt IR NUM MIN 2 count gt 256 printk 1 buf size invalidation n return EINVAL if Transmit Buf kmalloc count GFP KERNEL printk lt 1 gt kmalloc fail n return EINVAL copy from user Transmit Buf buf count ret request irq IRQ TIMERO timer0 Transmit irq handle SA INTERRUPT DEVICE NAME IRQ TIMERO Transmit Buf if ret 0 printk X15 IR busyW kfree Transmit Buf return EBUSY ret request irq IRQ TIMERI pwm irq handle SA INTERRUPT DEVICE NAME IRQ TIMER1 NULL if ret 0 printk 1 IR busy n kfree Transmit Buf free irq IRQ TIMERO Transmit Buf return EBUSY Transmit flag 1 PWMEn 1 TLen count 2 TCNTBO Oxffff Transmit Buf Transmit Index 1 TCON TCON amp OxffffffO 0x2 Update TCNTBO TCMPBO TCON TCON amp OxffffffO Oxl Start
120. free irq k irq no buttons irq static int matrix4 buttons read struct file file char buffer size t count loff t ppos file operations fy ix FRET ACE static int key int flags int repeat if ready return EAGAIN if count sizeof key value return EINVAL save flags flags if key key value key key value repeat 0 else repeat 1 restore flags flags if repeat return EAGAIN copy to user buffer amp key sizeof key copy to user ready 0 return sizeof key_value static unsigned int matrix4 buttons select struct file file struct poll table struct wait if ready return 1 POLLIN poll wait file amp buttons wait wait return 0 poll select buttons wait static int matrix4 buttons ioctl struct inode inode struct file file unsigned int cmd unsigned long arg switch cmd default return EINVAL static struct file operations matrix4 buttons fops owner THIS MODULE poll poll select poll select RAY ioctl matrix4 buttons ioctl
121. mkdir arm qtopia cd arm qtopia tar zxvf x86 qtopia tmake 1 11 tar gz tar zxvf x86 qtopia qt embedded 2 3 7 tar gz tar jxvf x86 qtopia qtopia free l 7 0 tar bz2 mv tmake 1l 11 tmake mv qt 2 3 7 qt Dm qtopia free 1 7 0 qtopia 2 2 1 qt x11 Host cp x86 qtopia qt bin qt bin 2 2 2 qt embedded export QTDIR PWD qt export QPEDIR PWD qtopia export TMAKEDIR PWD tmake export TMAKEPATH TMAKEDIR lib qws linux arm g export PATH QTDIR bin QPEDIR bin TMAKEDIR bin PATH cd qt make clean vi QPEDIR src qt qconfig qpe h define QT QWS IPAQ define QT QWS IPAQ RAM cp QPEDIR src qt qconfig qpe h src tools echo yes echo yes configure platform linux arm g qconfig qpe no qvfb depths 16 24 make C src 2 2 3 Qt Embedded Hello cd x86 qtopia hello 2 2 2 vi setEnvArm export QTDIR arm qtopia qt export TMAKEDIR arm qtopia tmake export TMAKEPATH TMAKEDIR lib qws linux arm g export LD LIBRARY PATH QT
122. volatile Oxlf 0x02 0x03 0x05 0x10 0x11 0x12 0x13 0x14 0x15 0x06 0x16 Ox1E 0x17 U8 ai CF IO BASE 0x3E0 U8 CF IO BASE 0x3E1 Chip information Power and RESETDRV control Interrupt and general control Card status change interrupt control System Memory Map 0 Start Address Low System Memory Map 0 Start Address High System Memory Map 0 End Address Low System Memory Map 0 End Address High Card Memory Map 0 Offset Address Low Card Memory Map 0 Offset Address High Address window enable Misc control 1 Misc control 2 FIFO control define SETUP_TIMINGO 0x3A Setup Timing 0 define CMD TIMINGO Ox3B Command TimingO0 define RECOVERY TIMINGO 0x3C Recovery Timing0 define INTERFACE STATUS 0x01 Interface status eketekokekeolokolelelololeleleteololelelelololelelololeleletofoleleetofoleleteloleleletotoleleletofoleleletololeletetoleleletofoleletetololeletotoleleletofoleleletofolele void PD6710 Wr U8 index U8 data 73 PD6710 2 xXololelelololelelelololelelelololeletololeleletofoleleetololeletotoleleletololeleletofoleleletoleleletotoleleletofoleletetololeletotoleleletotoleleletofoleleletololeletok void PD6710 Wr U8 index U8 data rPD6710 INDEX index rPD6710 DATA data kKokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokoko
123. 168 1 99 icmp seq 1 ttl 127 time 4 46ms 64 bytes from 192 168 1 99 icmp seq 2 ttl 127 time 1 68ms 64 bytes from 192 168 1 99 icmp seq 3 ttl 127 time 2 01ms 192 168 1 1 ping statistics 1 3 packets transmitted 8 received 0 packet loss time 3047ms Rtt min avg max mdev 1 681 2 150 4 465 0 882 ms 3 RedHat9 WL 110 3 1 Step 1 pemcia cs 4llhttp pemcia cs sourceforge net FZXpcmcia cs 3 2 8 tar gz root zkccn wireless_internet tar zxvf pcmcia cs 3 2 8 tar gz root zkccn wireless_internet cd pcmcia cs 3 2 8 root zkccn pemcia cs 3 2 8 make config kernel source Linux kernel source directory usr src linux usr src linux 2 4 20 8 Lroot zkccn pcmcia cs 3 2 8 make all root zkccn pcmcia cs 3 2 8 make install pcmcia root zkccn pemcia cs 3 2 8 amp etc rc d init d pemcia restart root zkccn pcmcia cs 3 2 8 dump cis Step 2 linux wlan ng linux wlan ng usr src linux 2 4 20 8 make mrproper
124. 4 G lt 2 0 CPLD BaseAddr IO 0x0 Delay 10 CPLD BaseAddr IO Oxa Delay 10 CPLD BaseAddr IO 0x5 Delay 10 CPLD BaseAddr IO Oxf Delay 10 Temp CPLD BaseAddr_I0 1 2 I 0 H Linux 1 2 1 CPLD 7128 nGCS1 define pCSCPLD BASE 0x08000000 define vCSCPLD BASE 0xd0200000 static struct map desc smdk io desc i virtual physical length kernel include asm arm arch s3c2410 smdk h FP kernel arch arm mach s3c2410 smdk c nitdata r w c b vCSCPLD BASE pCSCPLD BASE 0x00000100 DOMAIN IO 0 1 0 0 1 vCS8900 BASE pCS8900 BASE 0x00100000 DOMAIN IO 0 1 0 0 vCF MEM BASE pCF MEM BASE 0x01000000 DOMAIN IO 0 1 0 0 vCF IO BASE pCF IO BASE 0x01000000 DOMAIN IO 0 1 0 0 LAST DESC j CPLD 1 2 2 IO driver c Hifndef _ KERNEL define _ KERNEL Hendif ifndef MODULE define MODULE endif include lt linux config h gt include lt linux module h gt include lt linux kernel h gt include lt linux init h gt include lt linux miscdevice h gt include lt linux sched h gt include lt linux
125. 66 5 46 Tf Lf 1f 5 Linux 5 1 PCMCIA PD6710 28 i82365 i82365 h pemcia core o t d pc etc ini cd li make en i as as TH uconfig PCMCIA BEL P tart MEMI GUI root X4 nuette target box kernel Load an Alternate Configuration File pcmcia make 1s dri V make od e od ules tmp lib tmp lib modules 2 4 18 rmk7 pxal kernel drivers pcmcia THERETO M Fo s pcmcia ds o 182365 0 pcmcia core o D6710 EAS Ha LI 182365 KH Linux i82365 Linuette SMDK2410 kernel drivers pcmcia usr lib modules 2 4 18 rmk7 pxal kernel drivers pcmcia i82365 c GUI ds o i82365 o m H Ts oc fi Fo usr etc rc local
126. 7 tmake 1 11 qt x11 2 3 2 usr 1local arm PATH etc profile pathmunge usr local arm 2 95 3 bin opt host armv41 bin armv41 unknown linux 2 1 Host ftp trolltech com x86 qtopia tar zxvf tmake l 11 tar gz tar zxvf qt embedded 2 3 7 tar gz tar jxvf qtopia free l 7 0 tar bai tar zxvf qt x11 2 3 2 tar gz mv tmake 1 11 tmake Dm qt 2 3 7 qt Dm qtopia free 1 7 0 qtopia mv qt 2 3 2 qt xll 2 1 1 qt xll uic moc designer qvfb 8cd qt xll export QTDIR PWD Hecho yes configure static no xft no opengl no sm make C src moc cp src moc moc bin make C src make C tools designer make C tools qvfb Hcp tools qvfb qvfb bin strip bin uic bin moc bin designer bin qvfb cd cp qt xll bin qt bin rm rf qt xll 2 1 2 qt embedded export QTDIR PWD qt export QPEDIR PWD qtopia export TMAKEDIR PWD tmake export TMAKEPATH TMAKEDIR 1ib qws linux generic gt export PATH QTDIR bin QPEDIR bin TMAKEDIR bin PATH cd qt
127. GPIO PULLUP DIS request irq EXT COM INT uart irq handle SA INTERRUPT DEVICE NAME IRQ EXTCOM NULL writeb Oxff vEXT COM INTCTL ADDR enable COM INT out COM rx buf 0 amp COMO rx buf COM rx buf 1 amp COMI rx buf COM rx buf 2 amp COM2 rx buf COM rx buf 3 amp COM3 rx buf rx queue 0 Ars queue0 rx queue 1 amp rx queuel rx queue 2 amp rx queue2 rx queue 3 amp rx queue3 printk KERN INFO DEVICE NAME init OK n return 0 static void _ exit uart exit void unsigned char i for i 0 i lt EXT COM NUM i iounmap vEXT COM BASE ADDR i iounmap vEXT COM INTS ADDR iounmap vEXT COM INTCTL ADDR free irq EXT COM INT NULL unregister chrdev uart MAJOR DEVICE NAME module init uart init module exit uart exit MODULE LICENSE GPL 2 2 3 include lt stdio h gt include lt stdlib h gt include lt unistd h gt include lt fcntl h gt include lt sys ioctl h gt define CSIZE 0x003 data bit define CS5 0x000 Hdefine CS6 0x001 Hdefine CS7 0x002 Hdefine CS8 0x003 Hdefine CSTOPB 0x004 stop bit Hdefine CSTOP1 0x000 Hdefine CSTOP2 0x001 define CPAR 0x038 parity Hdefine PARNO 0x000 define PARODD 0x008 define PARENB 0x018 define PARMAK 0x028 define PARSPE 0x038 define CFCTL 0x0c0 flow control define CFCTLN 0x000 define CFCTLH 0x040 define CFCTLS 0x080 define CBAUD 0xf00 baudrate define B110 0x000 define B20
128. PWMEn 0 PWMEn 1 TCNTBO Oxffff pIRData Transmit Index TCON TCON amp Oxffffff0 0x2 TCON TCON amp Oxffffff0 Oxl TCON TCON amp OxffffOff 0xa00 TCON TCON amp OxffffOff 0x900 else PWMEn O TCNTBO Oxffff pIRData Transmit Index TCON TCON amp OxffffffO Ox2 TCON TCON amp OxffffffO Oxl Transmit Index static void timer0 Study irq handle int irq void dev id struct pt_regs regs TCON TCON amp Oxlf lt lt 0 stop for timer0 if Learning gt IR_NUM_MIN wake up interruptible amp Wait Study else Learning 0 static void IRInput irq handle int irq void dev id struct pt regs regs unsigned short pIRData dev id set gpio ctrl GPIO FO GPIO PULLUP DIS GPIO MODE IN INPUT if Learning 0 if read gpio bit GPIO FO check Lead code Learning 1 TCON TCON amp Ox1f lt lt 0 0x2 Updata TCNTBO TCON TCON amp Oxlf lt lt 0 Oxl start for timerO IO State 0 else if Learning 1 affirm Lead code pIRData TCNTOO if read gpio bit GPIO FO amp amp IO State 0 amp amp pIRData lt 45535 amp amp pIRData gt 25535 Lead Code 9ms gt 6 4ms lt 12 8ms TCON TCON amp Oxlf lt lt 0 0x2 Updata TCNTBO TCON TCON amp Ox1f lt lt 0 Oxl start for timerO Learning 2 IO State 1 else Lead Co
129. cd arm qtopia qtopia cp ir apps bin etc help il8n lib pics plugins services linuette target box root english usr qtopia qt embedded 2 3 7 linuette 2 3 1 cd linuette target box root dir root english usr qt lib Hrm rf cp arm qtopia qt lib libqte so 2 3 7 8ln s libqte so 2 3 7 libqte so 8ln s libqte so 2 3 7 libqte so 2 8ln s libqte so 2 3 7 libqte so 2 3 Sin s etc fonts fonts vi etc profile QTDIR usr qt QPEDIR usr atopia LD LIBRARY _PATH usr qt lib usr qtopia lib lib usr lib vi etc rc local sounds 2 3 JPEG E KS Host Target Image Viewer jpeg Host Target jpegsrc v6b tar gz libpng l 2 14 tar bz2 tar zxvf jpegsrc v6b tar gz C home tar jxvf libpng 1l 2 14 tar bz2 C home cd home mv jpeg 6b jpeg mv libpng 1 2 14 libpng mkdir lib mkdir include jpeg cd jpeg rt amp configure enable shared make cp
130. ch reg signed char pBaseAddr if Port 0 Uart_P else intf Com interrupt error no interrupt detect Vn for i 0 i lt 8 it if Port gt gt i amp 0x01 f state pBaseAddr volatile unsigned char EXT COM BASE ADDR i Ox8 lsr pBaseAddr LSR let me read it first to clear it s interrupt val pBaseAddr ISR if val amp 0x01 Uart_Printf Com interrupt error no interrupt detect n else if val amp 0x04 Uart Printf Receive interrupt n while pBaseAddr LSR amp 0xl Receive data ready testval i pBaseAddr RBR 160554 while pBaseAddr LSR amp 0x1 lt lt 5 THR empty pBaseAddr THR testval Li else if val amp 0x02 Uart_Printf Sender interrupt W ClearPending BIT EINT1 4 gt FIF0 SerialInitialize pBaseAddr FCR 0 disable FIFO pBaseAddr FCR 0x87 feYF FIFO 8 FIFO TE FIF0 RX FIFO trigger level Receive D
131. int fb bpp h static struct fb dev fbdev static void draw int color int i j unsigned short int p unsigned short int fbdev fb mem for i 0 i fbdev fb height i p fbdev fb line len 2 for j 0 j lt fbdev fb width j pLj color int framebuffer open void int fb struct fb var screeninfo fb vinfo struct fb fix screeninfo fb finfo char fb dev name NULL if fb dev name getenv CFRAMEBUFFER fb dev name default framebuffer fb open fb dev name O RDWR if fb lt 0 printf device s open failed n fb dev name return 1 if ioctl fb FBIOGET VSCREENINFO amp fb_vinfo printf Can t get VSCREENINFO s n strerror errno close fb return 1 if ioctl fb FBIOGET FSCREENINFO amp fb finfo printf Can t get FSCREENINFO s n strerror errno return 1 fbdev fb bpp fb vinfo red length fb _vinfo green length fb vinfo blue length fb_vinfo transp length fbdev fb width fb vinfo xres fbdev fb height fb vinfo yres fbdev fb line len fb finfo line length f bdev fb size fb finfo smem len printf frame buffer 96d 9d x d dbpp Ox xbyte n fbdev fb width fbdev fb line len fbdev fb height fbdev fb bpp fbdev fb size if fbdev fb bpp 16 printf frame buffer must be l6bpp modeW exit 0 fbdev fb_mem mmap NULL fbdev fb_size PROT
132. minor register chrdev MAQEH F LCR ity 3 gt 4 devfs_registe 4 gt Open release ioctl read write inode open fi filp gt private data H 1 node LSR 0xE9 FIFO data err 1 Framing error 1 0x2b force parity 1 SR devfs register r EXTCOM could not append to parent err 17 mknod dev EXT COMO c major minor 4 H MINOR inode gt i_rdev struct file filp filp gt private data p gt private_data inode read H MINOR inode gt i_rdev Ph struct inode inode D
133. pm Uvh qtE custom 1 5 1mz 1386 rpm pm Uvh linuette sdk arm 1 5 lmz noarch rpm V u u ku gas S u u E o o Ca e e pm Uvh cross armv4l qtE custom 1 5 4mz 1386 rpm 1 4 MIZI Linux SDK linuette Documents FPMS SRPMS fhost Qt Xl1 l embedded E example Aarget box Jflash boot root dir zinage zexample 2 kt AA SK Linux image HRA ZK Linux SC ASH bootloader kernel root filesysytem user filesystem bootloader user filesystem vivi 2 1 boot loader cd linuette target box boot tar jxvf vivi tar bz2 gz Star zxvf vivi tar gz cd vivi make menuconfig m root LinuxMc Ainuette Aarget boxboot vivi VIVI v0 1 4 Configuration HIZI Research Inc Arrow keys navigate the menu lt Enter gt selects submenus gt Highlighted letters are hotkeys Pressing lt Y gt includes lt N gt excludes Press lt Esc gt lt Esc gt to exit lt gt for Help Legen
134. poll matrix4 buttons select cH J J JER F read matrix4 buttons read static devfs handle t devfs handle static int init matrix4 buttons init void int ret ready 0 ret register _chrdev BUTTON MAJOR DEVICE NAME amp matrix4 buttons Tops if ret lt 0 printk DEVICE NAME can t register major number n return ret ret request_irqs if ret unregister_chrdev BUTTON MAJOR DEVICE_NAME printk DEVICE NAME can t request irqs n return ret devfs handle devfs register NULL DEVICE NAME DEVFS FL DEFAULT BUTTON MAJOR 0 S_IFCHR S_IRUSR S_IWUSR amp matrix4_buttons_fops NULL devfs return 0 static void exit matrix4 buttons exit void devfs unregister devfs handle free irqsO unregister chrdev BUTTON MAJOR DEVICE NAME module init matrix4 buttons init module exit matrix4 buttons exit MODULE LICENSE GPL 3 2 H H H H TF include lt stdio h
135. psCommand sOldInput sOldHttpInput sCommandHead sDelimiter SAckOK sAckDetect T struct SERIAL DATA sAckERR unsigned char byParity unsigned char bReserved unsigned short wReserved h const char gpCommandHead x02 x1b x43 const char gpSerialCommand Nx08 xcf xad xf0 xe7 xd9 xb6 xe0 xf8 0 update user program Nx08 xfc xad xf0 xe7 xd9 xb6 xe0 x8f 1 update system program x04 INFO 2 look over user information x03 VER 3 look over system version Nx07 Control 4 switch run times show x07 IRLearn 5 IR study x07 GetTime 6 read time x07 SetTime l set time Nx03 Del 8 delete user program x0d GSQRestartGSQ 9 reboot user program NxOf GSQHardResetGSQ 10 systerm hardware reset Nx06 Search 1l find devices for 485NET x01 Nxf0 12 terminal check command test connecting Nx08 xfe xda x67 x85 x2d x7f x9e x88 13 send IR code test NxOc SearchPlugin 14 search plugin devices Nx05 Digit 15 Digit Signal Nx06 Analog 16 Analog Signal Nx06 Serial lT Serial Signal Nx06 IRLong 18 IR study of long NxOb SetBaudrate 19 setup baudrate x0c ReadBaudrate 20 read baudrate h const char gpDelimiter x02 x0d x0a const char gpAckOK x08 xe7 xa8 xb6 xce0K x0d x0a const
136. rx queue sleep on RS485 write Send00485 rx queue sleep up 485 9 gt sleep on 485 Interruptible sleep on timeout amp rx q enable irq IRQ RXD1 jiffiesl jiffies intk lt 1 gt rx queue sleep_up n A printk RS485 write Send00485 4E Rec485 O E FP gt ueue WAITTIME disable irq IRQ RXD1 AX 1 amp include Inc 2410addr h amp include Inc 24101ib h include Inc option h define IR Addr volatile Hdefine IR NUM M
137. width 640 height 480 depth 16 amp mi r ARM 1 1 2 Executing Qt embedded program on qvfb cd linuette host Qt embedded 2 3 1 env sh env sh export QTDIR linuette host Qt embedded 2 3 1 export QTEDIR linuette host Qt embedded 2 3 1 export LD LIBRARY PATH QTDIR lib QTEDIR lib LD LIBRARY PATH cd examples launcher 8 laucher amp 1 1 3 Compiling MIZI Linux example source and Executing it on qvfb 1 qvfb 2 Terminal 1 cd linuette host Qt X11 2 3 1 8 env sh cd tools qvfb qvfb width 640 height 480 depth 16 amp Terminal 2 cd linuette host example helloworld 8 env sh env sh export QTDIR opt host i386 unknown linux export LD LIBRARY PATH QTDIR lib LD LIBRARY PATH make qhello os 1 qvfb 2 qhello cd linuette host example tetris env sh env sh export QTDIR opt i386 unknown linux export LD LIBRARY PATH lib usr lib QTDIR lib LD LIBRARY PATH
138. 13 3 lt 11 lt 8 lt 6 lt 0 G lt 2 0 EthPPP 0 Uart Printf CS8900A ChipID1 is x n EthPPDO ID EthPPP 2 Uart Printf CS8900A ChipID2 is x n EthPPDO EthO cs8900 rev K 3 3 Volts found at 0xd0000300 Cs89x0 media RJ 45 IRQ 37 ifconfig eth0 ping 2 1 PC PC CS8900A 93 RES 2 PC CS8900A ID rBWSCON rBWSCON amp Oxf lt lt 12 0xd lt lt 12 nGCS3 nUB nLB sSBHE nWAIT 16 bit rBANKCON3 0 lt lt 13 G lt 1D 7 lt lt 8 A lt 6 04 3 lt 2 0 74LVCH162245 3 gt CS8900A PCMCIA PD6700 ADDR24
139. 14 Rx counter is 12 rx queue sleep up XL FRAEN A ed EISE EEN ITLL 4 Hy Wake_up_interruptible amp rx_queue 6 local_irq_save flags enable irq IRQ RXD1 local irq save flags interruptible sleep on tiimeout amp rx queue WAITTIME local irq restore flags disable irq IRQ RXD1 interruptible_ sleep on timeout long interruptible sleep on timeout wait queue head t q long timeout SLEEP ON VAR current gt state TASK INTERRUPTIBLE SLEEP ON HEAD timeout schedule timeout timeout SLEEP ON TAIL return timeout define SLEEP ON TAIL N wq write lock irq amp q lock N remove wait queue q amp wait X wq write unlock irqrestore amp q gt lock flags define wq write unlock irqrestore spin unlock irqrestore define spin unlock irqrestore a b restore flags b restore flags jiffies 7 gt ARM
140. 3 4 2 fs Config in YAFFS File system gt Yaffs filesystem on SMC Config in if if CONFIG MTD SMC y then tristate Yaffs filesystem on NAND CONFIG YAFFS FS fi 3 4 3 yaffs yaffs cat proc filesystems nodev rootfs nodev bdev nodev proc nodev sockfs nodev tmpfs nodev shm nodev pipefs cramfs nodev ramfs vfat nodev devfs nodev nfs nodev autofs nodev devpts yaffs fs c init yaffs fsO MAY static int _ init init yaffs fs void 0 yaffsram dev NULL int error yaffs dev printk init yaffs fs printk KERN DEBUG yaffs on DATE TIME ifdef CONFIG YAFFS MTD ENABLED printk register yaffs filesystem error register filesystem amp yaffs fs type if error ifdef CONFIG YAFFS RAM ENABLED unregister filesystem amp yaffs ram fs type amp endif CONFIG YAFFS RAM ENABLED endif CONFIG YAFFS MTD ENABLED return error devfs v1 10 20020120 Richard Gooch rgooch atnf csiro au devfs boot options Oxl i
141. 60 3 2002 05 13 08 36 0000 Built in shell ash Enter help for a list of built in commands 0 05 00 TCP IP SCROLL CAPS NUM 8 ED 4 PAAR hello 4 1 hello hello c hello linux include lt stdio c gt int main void printf hello linux n return 0 4 2 Makefile 4 1 1 Makefile CROSS opt host armv41 bin armv41 unknown linux all hello hello CROSS gcc o hello hello c clean rm rf hello o make hello 3 hello T ztelnet RAR Linux 1 define MODULE include lt linux module h gt int init module void printk lt 1 gt Hello world WM return 0 void cleanup module void printk lt 1 gt Goodbye cruel world Wn
142. A4 DE A3 BROADCAST MULTICAST MTU 1500 Metric 1 RX packets 14 errors 0 dropped 0 overruns 0 frame 0 TX packets 0 errors 0 dropped 0 overruns 0 carrier 0 collisions 0 txqueuelen 100 RX bytes 14472 14 1 Kb TX bytes 4140 4 0 Kb Memory 30800000 30800024 PING root zkccn amp ping 192 168 1 99 Connect Network is unreachable etc sysconfig network scripts ifcfg wlan0 IP BOOTPROTO dhcp MTU REMOTE IPADDR STARTMODE onboot UNIQUE dhclient IP root zkccn dhclient wlan0 ifcfg wlanO root zkccn amp dhclient ethl Internet Systems Consortium DHCP Client V3 0p11 Copyright 1995 2001 Internet Systems Consortium All rights reserved For info please visit http www isc org products DHCP Listening on LPF w1an0 00 0a eb a4 de 3a Sending on LPF w1an0 00 0a eb a4 d3 3a Sending on Socket fallback DHCPDISCOVER on wlanO to 255 255 255 255 port 67 DHCPACK from 192 168 2 1 bound to 192 168 2 163 renewal in 601821 seconds rootOzkccn amp ifconfig wlanO WlanOLink encap Ethernet HWaddr 00 0A EB A4 DE A3 inet addr 192 168 2 163 Bcast 192 168 2 255 Mask 255 255 255 0 UP BROADCAST RUNNING MULTICAS
143. C 0x00 while rUTRSTATI amp 0x6 Wait until THR is empty rGPHDAT amp sl lt lt 7 GPH7 485 receive enable rULCON1 0x33 bit 9 is 1 sckkekeletolelotoleletoleletoteletoteletotoletetoleletoteletoteletotoletotoletetoleetoteletoteletotoletetoletetoteletoteletoteletofoletetoletetotoletoole void Sendbyte485 unsigned char data 485 2 Z data void Sendbyte485 unsigned char data rGPHDAT 0x1 lt 7 GPH7 485 receive disable send enable Delay 1 while rUTRSTATI amp 0x6 Wait until THR is empty WrUTXHI C data while rUTRSTATI amp 0x6 Wait until THR is empty Delay 5 rGPHDAT amp Oxl lt lt 7 GPH7 485 receive enable define FIND DEVICE WAIT TIME Oxffff ID define FIND DEVICE INFO LENGTH 40 define FIND DEVICE DATA LENGTH 16 define SE
144. GRUB Enter miik E 4E c devices proc interrupts proc filesystems Driver Initional 5 2 DEFAULT MESSAGE LOGLEVEL 4E kernel printk c GE L52622 sJ console loglevel klogd syslogd WGI console loglevel vga 791 fb on rpm Uvh tmake 1 7 3mz noarch rpm rpm q tmake rpm e tmake Minicom 1 Minico minicom mi 2 nicom s In ni LI 1 gt TIT HU D E 115200 3 F 3 etc minirc d Windows 3 minico Ctrl A 4 Ctrl A EC Ctrl A Ctrl A NFS
145. LWRBAND LERR LHUP LNVAL T reven PO PO PO PO PO POL PO PO PO PO L ts mr Ki Gi DI AI bi Rn dn Rin HI events that occurred on fd events revents POLLRDNORM POLLRDBAND POLLOUT events L nfds timeout poll INFTIM 0 gt 0 signal software interrupt SIGCHLD Sigfunc signal int signo Sigfunc func
146. OFF timer irq handler s3c2410 _timer_interrupt rHBBr4Ej tur printk lt 1 gt INTMSK x n INTMSK setup arm irq IRQ TIMER4 amp timer irq printk lt 1 gt INTMSK x n INTMSK TCON TCON 4 AUTO COUNT 4 ON setup arm irqO INTMSK fit ffffffff ffffbfff setup arm irqO 0 TIMER4 request O TIMER2 request setup arm irqd O setup arm irq int request_irq unsigned int irq void handler int void struct pt_regs ZHE unsigned long irq flags const char devname void dev_id unsigned long retval struct irgaction action if irq gt NR IRQS irq desc irq valid handler irq flags amp SA SHIRQ amp amp dev
147. SEPSIS ASO ORK AAS OR ORO A ASO OOK ASK ROR OER TAK ORI void Set554Int unsigned char operation unsigned char pU8 pU8 unsigned char 0x80000e0 if operation pU8 Oxff else pU8 0x00 CPU void Reset554 void 16C554 bankl kokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokok void 1 gt ji Reset554 void Set554 Int 0 CPLD rGPBCON rGPBCON amp C 0x3 lt lt 12 0x1 lt lt 12 GPB6 Output rGPBUP amp C 0xl lt lt 6 GPB6 pull up enabled rGPBDAT 0x1 lt lt 6 LCOM_RST GPB6 1 Delay D Min 40ns rGPBDAT amp C 0xl lt 6 rBWSCON rBWSCON amp Oxf lt lt 4 0xO lt lt 4 not nUB nLB sSBHE not nWAIT 8 bit rBANKCONI 0 lt l
148. Seet Transmit_Buf I sleep_on 0 2 request irq IRQ TIMERO timer0 Study irq handle SA INTERRUPT DEVICE NAME IRQ TIMERO Study NULL request irq IRQ TIMERO timer0_ Transmit irq handle SA INTERRUPT DEVICE NAME IRQ TIMERO 3 request_irq void dev id 1 UNIX
149. TIMERO rTCON rTCON amp Oxlf lt lt 0 0x0 stop for timer0 gLearning 0 C earPending BIT TIMERO oktek SRR KK ARK KK AR OK KK OK KK A OK KK I KK IK I KK IK KK KK KK AK KK A EK AK KK IK IK KK IK A KK IK AK KK KK KK KK KK IK KK IK A IK IK void irq Timer1Done void X B 38KHz ZS FR gPWMEn 1 38K 0 void irq Int Timerl void if gPWMEn rTCON rTCON amp OxffffOff stop for Timer 1 ClearPending BIT TIMER1 skokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokoko k void LearnOK void f kokokokokokokokokokokokokokokokokokokokokokokokokokoko okokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokkokokokokok k void LearnOK void rTCON rTCON amp Oxlf lt lt 0 0x2 stop timerO rINTMSK BIT EINTO BIT TIMERO gLen gLearning 1
150. addrptr 1 0 1 255 255 255 255 IPv4 inet_aton in addr t inet addr const char strptr FRJ BE 32 char inet ntoa struct in_addr inaddr include lt arpa inet IPv4 IPv6 h gt int inet pton int family const char strptr void addrptr 1 0 1 H const char inet ntop int family const void addrptr char st NULL len Hi errno ENOSPC netinet in h gt define INET_ADDRSTRLEN 16 define INET6 ADDRSTRLEN 46 1
151. char gpAckERR x01 x9f const char gpAckDetect x01 x0f static struct DOWN LOAD PORT gpDownPort void InitCommand void int i struct SERIAL DATA pSerial gpDownPort struct DOWN LOAD PORT malloc sizeof struct DOWN LOAD PORT gpDownPort gt CommandNum sizeof gpSerialCommand 8 gpDownPort gt byParity 0 pSerial gpDownPort gt psCommand struct SERIAL DATA malloc sizeof struct SERIAL DATA gpDownPort gt CommandNum gpDownPort gt MaxLength 0 for i 0 i lt gpDownPort gt CommandNum 2 pSerial pSerial gt Length unsigned short Gek gpSerialCommand i 4 pSerial gt pBuffer unsigned char gpSerialCommand i44 if gpDownPort MaxLength lt pSerial gt Length gpDownPort gt MaxLength pSerial gt Length gpDownPort gt sCommandHead Length unsigned short gpCommandHead gpDownPort gt sCommandHead pBuffer unsigned char gpCommandHead 1 gpDownPort gt sDelimiter Length unsigned short gpDelimiter gpDownPort gt sDelimiter pBuffer unsigned char gpDelimiter 1 gpDownPort gt sAckOK Length unsigned short gpAckOK gpDownPort gt sAckOK pBuffer unsigned char gpAckOK 1 8 8 8 8 8 pDownPort gt sAckDetect Length unsigned short gpAckDetect pDownPort gt sAckDetect pBuffer unsigned char gpAckDetect 1 pDownPort gt sAckERR Length unsigned s
152. convert produce a big endian image from a little endian machine mkyaffs dev mtd 1 root english yaffs OK mount t yaffs dev mtdblock 1 usr yaffs Attempting MTD mount on 31 1 if 01 mout Mounting dev mtdblock 1 on usr failed Not a directory MTD yaffs mkyaffs dev mtd 1 Erasing block at 0x83cf8000 OK Hmount t yaffs dev mtdblock 1 usr yaffs Attempting MTD mount on 31 1 convert PC root mkyaffs dev mtd 1 root english yaffs OK Hmount t yaffs dev mtdblock 1 usr yaffs Attempting MTD mount on 31 1 3 5 yaffs yaffs proc filesystems Flash if 01 if 01 yaffs convert 3 ocalhost root_dir mkyaffsimage root english root english yaffs c Step 1 yaffs fs c init_yaffs_fs 0 yaffs devfs v1 10 20020120 Richard Gooch rgooch atnf csi devfs boot options Oxl init yaffs fs
153. else PGM_ FCTL FCTL FCTL FCTL printf Ws fd is d n COM DIR i COM fd i i lt lt 4 2 COM PARAM i amp Ox1fff if pid forkQ lt 0 printf fork errxn ioct1 COM fd i EXTCOMI dev PG B115200 INTE B115200 INTE B115200 INTE B115200 INTE H H H EXTCOM2 I else if pid 0 EXT COM test COM fd i t 0 close COM fd il exi else wait NULL return 0 2 2 4 D oops 0x00000001 open open 2 Io LSR 0x6 0x03 no pa
154. else perror IR fd else perror read PGM IR close fd return 0 1 IR fd0 2 gt 4 DEVICE NAME IRQ TIMERO Transmit Buf cat proc interrupts IR test 1 IR fd0 request irq IRQ TIMERO timer0 Transmit irq handle SA INTERRUPT free irq IRQ TIMERO NULL f free_irq dev id request ira free irq IRQ TIMERO Transmit Buf 5 1 gt read write d
155. gt include lt stdlib h gt nclude lt unistd h gt nclude lt sys ioctl h gt nclude lt sys types h gt include lt sys stat h gt include lt fcntl h gt include lt sys select h gt include lt sys time h gt include lt errno h gt int main void int buttons fd int key value buttons fd open dev buttons 0 if buttons fd lt 0 perror open device buttons exit 1 for G fd set rds int ret FD ZERO amp rds FD SET buttons fd amp rds ret select buttons fd 1 amp rds NULL NULL NULL if ret lt 0 perror select exit 1 if ret 0 printf Timeout Vn else if FD ISSET buttons fd amp rds int ret read buttons fd amp key value sizeof key value if ret sizeof key value if errno EAGAIN perror read buttons W continue else printf buttons value d n key value close buttons fd return 0 4 PWM s3c2410 Timer 0 1 2 3 4 5 Timer4 linux Timer3 DMA Timer 0 1 2 3 4 1 1 gt J TOUTO Sri H 38KHz EK 50 PWM N
156. id return EINVAL action struct irqaction kmalloc sizeof struct irqaction GFP KERNEL if laction return ENOMEM action gt handler handler action gt flags irq flags 0 action gt mask action gt name devname NULL action gt next action gt dev_id dev id retval setup arm irq irq action if retval kfree action return retval request O INTMSK TIMER2 0 release 2 cat proc interrupts PGM BUZZ IRQ TIMER2 0 TCON TCON amp Oxf lt lt 12 0x9 lt lt 12 TCON TCON amp C Oxf lt lt 12 Oxb lt lt 12 Timer 2 manual updata 1 Update TCNTB2 amp TCMPB2 ii F T 485 1 1 1 include stdio h gt include lt stdlib h gt amp include Inc 2410addr h amp include Inc 2410lib h include Inc option h void Send00485 void void Sendbyte485 void Uartl Init i unsigned char data t mclk int baud RISA ASK OR ORR ASK OR OO
157. libs libjpeg so lib cp h include libpng cd home libpng cp scripts makefile linux Makefile make cp libpng12 so home lib cp libpngl2 so home lib libpng so cp h home include Qt E cd QTDIR vi TMAKEPATH tmake conf QMAKE LIBS QT QMAKE LIBS QT lqte Ipng ljpeg L lqte echo yes echo yes configure platform linux generic gt qconfig qpe depths 16 24 system jpeg system libpng gif I home include L home lib lpng ljpeg H ake C src qtopia cd QPEDIR src lizzli configure platform linux generic g make cd bin qpe YE qvfb 3 QTE 2 3 12 Qtopia PDA 2 2 0 Qtopia 2 2 0 QTE tmake http www qtopia org cn ftp mirror ftp trolltech com qtopia source qtopia free src 2 2 0 t ar gz 3 1 Qtopia PDA 2 2 0 GPL Host makedir x86 qtopia2 2 0 tar zxvf qtopia free src 2 2 0 tar gz C x86 qtopia2 2 0 cd x86 qtopia2 2 0 qtopia free src 2 2 0 Hexport PATH PWD tmake bin PATH Hecho yes configure qte no keypad qpe pda make Make
158. major char dev gcc 02 DMODULE D KERNEL c CharDriv CharDriver c 18 Tvariable fops has initializer but incomplete type H CharDriver c 19 unknown field read CharDriver c 20 unknown field open CharDriver c 20 unknown field release CharDriver c 53 storage size of fops gcc include XH er c specified in initializer specified in initializer specified in initializer isn t known usr include usr include linux fs h Ph file operations fi F file operations usr src linux 2 4 include linux fs h ifdef KERNEL_ _KERNEL_ gcc 02 DMODULE D KERNEL CharDriver o insmod CharDrive vi proc devices rmmod char dev JO J
159. make clean cp QPEDIR src qt qconfig qpe h src tools echo yes echo yes configure platform linux generic gt qconfig qpe depths 16 24 make C src 2 1 3 Qt Embedded Hello hello mkdir hello cd hello vi hello cpp hello cpp include lt qapplication h gt include lt qpushbutton h gt int main int argc char argv QApplication app argc argv QPushButton hello hello world 0 hello resize 100 30 app setMainWidget hello hello show return app exec host vi SetEnvHost ik TMAKEDIR QTEDIR export TMAKEPATH TMAKEDIR lib qws linux generic g export QTDIR QTEDIR export LD LIBRARY PATH QTDIR lib LD LIBRARY PATH 8 setEnvHost II progen n hello o hello pro tmake o Makefile hello pro make g c pipe DQWS fno exceptions fno rtti Wall x86 qtopia qt include o hello o hello cpp gcc o hello hello o L x86 qtopia qt lib lqte W 02 DNO DEBUG x86 qtopia qt lib libqte so undefined reference to operator new unsigned x86 qtopia qt lib libqte so undefined reference to operator delete void D H x86 qtopia qt lib libqte so undefined reference to cos x86 qtopia q
160. pBaseAddr RBR testval 0 pBaseAddr LSR testval 0 pBaseAddr LSR testval 0 pBaseAddr LSR while pBaseAddr LSR amp 0x1 5 THR empty pBaseAddr THR temp 3 keelekolekeolokolelelololeleletololelelelofoleleletofoleletololeleletololelelelofolelelotolelelelotoleleletofoleleetofoleletloleleletotoleleletofoleleletofoleletotololek void Seriallnitialize unsigned char comn 16C554 ZS BW com void SerialInitialize unsigned char comn unsigned short BaudRate 0x0030 9600 unsigned char COMFormat 0x03 no parity stop 1 bit data 8 bit volatile unsigned char val int i volatile unsigned char pBaseAddr pBaseAddr volatile unsigned char EXT COM BASE ADDR COMIndex 0x8 pBaseAddr LCR 0x80 pBaseAddr DLM unsigned char BaudRate gt gt 8 amp 0x00ff pBaseAddr DLL unsigned cha
161. servaddr int listenfd connfd maxfd nready i clientfd MAX CLIENT maxi msgqlen socklen_t clilen fd_set rset allset msg SoftwareTP pmsg InitCommand maxi 1 for i 0 i lt MAX CLIENT i clientfd i 1 FD ZERO amp allset if listenfd socket AF INET SOCK STREAM IPPROTO TCP lt 0 perror call to socket exit 1 bzero amp servaddr sizeof servaddr servaddr sin family AF INET servaddr sin addr s_addr htonl INADDR ANY servaddr sin port htons port if bind listenfd struct sockaddr amp servaddr sizeof servaddr lt 0 perror call to bind exit 1 if listen listenfd 20 lt 0 perror call to listen exit 1 printf SoftwareTP Accepting connections W FD SET listenfd amp allset FD SET g Variant qid SoftwareTP amp allset if listenfd gt g Variant qid SoftwareTP maxfd listenfd else maxfd g Variant qid SoftwareTP while 1 rset allset nready select maxfd 1 amp rset NULL NULL NULL if FD ISSET listenfd amp rset clilen sizeof cliaddr if connfd accept listenfd struct sockaddr amp cliaddr amp clilen lt 0 if errno EINTR goto drop else perror call to accept exit 1 for i 0 i lt MAX CLIENT amp amp clientfd i gt 0 i if i lt MAX CLIENT clientfd i connfd FD SET connfd amp allse
162. system libpng system zlib gif thread no xft release home arm include L home arm lib lpng lz luuid ljpeg qpe xplatform linux arm g edition pda displaysize 640x480 I home arm include L home arm lib prefix home nfs qtopia 8 setQpeEnv make make install x86 qtopia aqtopia 3 2 2 mkdir image qtopia 2 2 0 TT tar jxvf linuette target box root_dir root_english tar bz2 C image qtopia 2 2 0 cd image qtopia 2 2 0 root_english usr m rf linuette cp ir arm qtopia qtopia cp ir arm q topia qtopia free 2 2 0 qtopia zoneinfo share 8 8 mkdir share 8 8 CLD Chi mp3 image Documents vi etc profile PATH usr qtopia bin LD LIBRARY PATH usr qtopia lib QTDIR QTDIR usr qtopia QPEDIR usr qtopia export QPEDIR Hvi etc rc local pae cp qt etc pointercal etc calibrate qws server ous qpe 3 2 2 1 gt make qte kernel qjpegio cpp 60 jpeglib h No such file or directory jpeg
163. ts open dev touchscreen Oraw 0 RDONLY if ts lt 0 fprintf stderr Can not open touch screen W exit 1 while 1 read ts amp ts event sizeof TS EVENT if ts_event pressure gt 0 printf ts event x Wd ts event y d n ts event x ts event y Linux 1 LCD Linuette root cramfs GUI root_english cramfs vivi 0 192k 1M Fa vivi zlmage root cramfs mizilinux logo ztelnet imagewrite root english cramfs tmp imagewrite
164. 0 0 B E include lt string h gt void memset void dest int c size_t len bzero c void memcpy void dest const void src size t nbytes bcopy memcpy dest src men memory ANSI C ANSI C C int memcmp const void ptrl const void ptr2 size t nbytes 0 gt 0 0 gt 0 lt 0 memXXX 1 5 ASCII inet aton inet addr inet_ntoa IPv4 include lt arpa inet h gt EB ila 202 168 112 96 32 int inet_aton const char strptr struct in_addr
165. 0 IP ifconfig wlan0 192 168 2 1 IP ping ii 3 2 PCMCIA root zkccn root etc rc d init d pemcia restart Shutting down PCMCIA services cardmgr modules Starting PCMCIA services modulesmodprobe Can t locate module pcmcia_core o Modprobe Can t locate module yenta socket o Modprobe Can t locate module ds o root netlab38 root cardctl eject No pemcia driver in proc devices Step 1 pemcia cs 3 2 8 tar gz PCMCIA Linux 3 3 wlanctl ng 3 3 1 1 gt Loading module modprobe prism2 cs 2 reload the firmware wlanctl ng wlan0 Inxreq ifstate ifstate disable wlanctl ng wlan0 Inxreq ifstate ifstate enable 3 Set PortType wlanctl ng wlanO dotllreq mibset mibattribute p2CnfPortType Type Type 0 for IBSS mode Ad hoc 1 for BSS mode Infrastructure Note that the set port type should be done before auto join command 4 gt Auto join command wlanctl ng wlan0 Inxreq a
166. 0 Oxl start for timer0 rINTMSK amp BIT TIMERO gState 0 pIRData gIRData else if gLearning 1 pIRData rTCNTOO if rGPFDAT amp Ox1 amp amp gState 0 amp amp pIRData lt 45535 amp amp pIRData gt 25535 rTCON amp Ox1f rTCON amp Oxlf rTCON rTCON gLearning 2 gState 1 plRData else rINTMSK BIT TIMERO rTCON rTCON amp 0x1f gLearning 0 else Lead Code 9ms gt 6 4ms lt 12 8ms lt lt 0 0x2 Updata TCNTBO lt lt 0 0x1 start for timer0 Lead Code check fail lt lt 0 0x2 stop for timer0 if rGPFDAT amp 0x1 amp amp gState 0 rGPFDAT amp Ox1 amp amp gState 1 pIRData t TTCNT00 1 2 gState gState 0 1 if gLearning gt IR NUM MAX LearnOK else rTCON rTCON amp Ox1lf lt lt 0 0x2 rTCON gLearning t rGPFCON rGPFCON amp 0x3 lt lt 0 ClearPending BIT EINTO rTCON amp Oxlf lt lt 0 Oxl 0x2 lt lt 0 GPFO EINTO RASA IO AKI A ORO OR AK ROR OE ROR OK
167. 0 0x100 define B300 0x200 define B600 0x300 define B1200 0x400 define B2400 0x500 define B4800 0x600 define B9600 0x700 define B14400 0x800 define B19200 0x900 define B38400 0xa00 define B56000 0xb00 define B57600 0xc00 vo efine B115200 0xd00 efine B230400 0xe00 efine B460800 Oxf00 efine BufLen 128 ar SendBuffer BufLen ar RecBuffer BufLen t WriteByte ReadByte id EXT COM test int fd int WriteByte ReadByte char RecBuffer BufLen efine INTEN 0x1000 must be enable WriteByte write fd SendBuffer BufLen printf fd d write d byte n fd WriteByte ReadByte read fd RecBuffer 20 printf fd d read d byte n fd ReadByte WriteByte write fd RecBuffer ReadByte printf fd d write d byte n fd WriteByte close fd int main int argc char argv const char COM DIR dev PGM EXTCOMO dev dev PGM_EXTCOM3 unsigned int COM PARAM 4 CS8 CSTOP1 int COM fd 4 unsigned int i pid t pid CS8 CSTOP1 CS8 CSTOPI CS8 CSTOP1 for i 0 i lt BufLen i SendBuffer i i fd open argv 1 O RDWR for G 0 i lt 4 it COM fd i open COM DIR i O_RDWR if COM fd i lt 0 PARMAK C PARMAK C PARMAK C PARMAK C printf SendBuffer d x n SendBuffer il printf open s fail n COM DIR i
168. 1 r4 c3d49240 r3 00000001 r2 0000000f pe c3d49240 r0 d02000c0 Flags nZCv IRQs on FIQs on Mode SVC 32 Segment user Control C000317F Table 33E38000 DAC 00000015 Process IO test pid 43 stackpage c3d3d000 Stack 0xc3d3df64 to 0xc3d3e000 df60 c00530a4 c488017c 60000013 ffffffff c3d3dfa4 c3d3df84 c00530a4 df80 c4880170 00000648 bffffec4 020003c8 00000036 c00177c4 00000000 c3d3dfa8 dfa0 c0017640 c0052eb8 00000648 c001d918 00000003 00000001 00000001 fbad2a84 dfc0 00000648 bffffec4 020003c8 4001fe94 00000003 0200058c 400dc26c bffffea0 dfe0 400984c0 bffffe7c 020006ac 400984c4 60000010 00000003 00000000 00000000 Backtrace unction entered at lt c4880160 gt from lt c00530a4 gt Ki unction entered at lt c0052ea8 gt from lt c0017640 gt C00177C4 r7 00000036 r6 020003C8 r5 BFFFFEC4 CO I A II 00000648 Code ela0c002 e35c0001 e59f003c e3a0200f e5c02000 Segmentation fault ERY Oops ioremap CPLD
169. 34 ds ioctl socket 0 0xc0206404 Oxbffff934 ds ioctl socket 0 0xc2946406 Oxbffff934 ds ioctl socket ds ioctl socket ds ioctl socket cs read cis mem 1 0x14 42 cs 0x05 0x00 0x41 0x53 ds ioctl socket 0 0xc2946407 Oxbffff934 ds ioctl socket 0 0xc0506403 Oxbffff8d8 cardmgr 38 socket 0 ASUS WL 110 802 11b WLAN CF Card cardmgr 38 module lib modules 2 4 18 rmk7 pxal pcmcia prism2 cs o not available cardmgr 38 executing modprobe prism2 cs init module prism2 cs o 0 2 0 Loaded init module dev info is prism2 cs ds register pccard driver prism2 cs ds ioctl socket 0 0xc050643c 0x20137b8 bind request 0 prism2 cs driver c029c5e0 cs bind device client Oxc03fe860 sock 0 dev prism2 cs driver attach c4891c30 cs register client 0 client Oxc03fe860 sock 0 dev prism2 cs cs read cis mem l Ox7c 7 cs 0x03 0x01 De 0x03 cs read cis mem 1 0x85 16 cs Oxcl 0x01 0x19 0x77 cs write cis mem l Oxlf0 1 prism2 cs index 0x01 Vcc 3 3 irq 36 io 0xd2000000 0x4200003f cs read cis mem l Oxlf0 1 cs 0x41 0x60 Oxe8 Ox3f cs write cis mem l Oxlf0 1 cs write cis mem l Oxlf0 1 cs write cis mem l Oxlf0 1 ds ioctl socket 0 0xc050643d 0x20137b8 DS start get dev info DS end get dev info ds ioctl socket 0 0xc050643e 0x2013810 DS start get dev info ds poll socket 0 lsmod Module Size Used by prism2_cs 68624 0 unuse
170. 3c2410 map_io void iotable init standard io desc Hardware h define VIO BASE 0xe8000000 virtual start of IO space define PIO START 0x48000000 physical start of IO space Linux kernel arch arm mach s3c2410 smdk c kernel include asm arm arch s3c2410 smdk ho smdk c static struct map desc smdk io desc _ initdata virtual physical length domain r w c b vCS8900_BASE pCS8900 BASE 0x00100000 DOMAIN I0 0 1 0 0 vCF_MEM_BASE pCF MEM BASE 0x01000000 DOMAIN I0 0 1 0 0 vCF IO BASE pCF IO BASE 0x01000000 DOMAIN IO 0 1 0 O LAST DESC Ji static void _ init smdk_map_io void s3c2410 map io iotable init smdk io desc s3c2410 register uart 0 0 s3c2410 register uart l 1 set gpio ctrl GPIO IR TXD set gpio ctrl GPIO IR RXD s3c2410 register uart 2 2 ifdef CONFIG PM register wakeup src 0 EXT FALLING EDGE 0 endif smdk h CS8900a nGCS3 define pCS8900_BASE 0x19000000 define vCS8900_BASE 0xd0000000 PCMCIA nGCS2 define pCF_MEM BASE 0x10000000 define vCF_MEM BASE 0xd1000000 define pCF IO BASE 0x11000000 define vCF IO BASE 0xd2000000 CS8900A 1
171. 7 pxal pcmcia pcmcia core o sbin insmod lib modules 2 4 18 rmk7 pxal pcmcia i82365 o sbin insmod lib modules 2 4 18 rmk7 pxal pcmcia ds o sbin insmod lib modules wireless p80211 o sbin cardmgr exec usr etc rc local linuxrc cardmgr 5 4 1 gt ping WEP Key fE wland ad ifconfig eth0 down wlanctl wlan0 dotllreq mibset mibattribute dot11WEPDefaultKeyID 0 wlanctl wlan0 dotllreq mibset mibattribute dotllExcludeUnencrypted true wlanctl wlanO dotllreq mibset mibattribute dotllPrivacyInvoked true wlanctl wlanO dotllreq mibset mibattribute dotllWEPDefaultKey0 12 34 56 78 90 2 linuxrc cardmgr usr etc rc local Ti CPLD 1 I O 1 1 I 0 ADS1 2 define CPLD BaseAddr volatile U8 0x08000000 define CPLD BaseAddr IO volatile U8 0x080000c0 void Test CPLD I0 void U8 Temp rBWSCON rBWSCON amp Oxf lt lt 8 0x0 lt lt 8 nGCS1 not nUB nLB sSBHE not nWAIT 8 bit rBANKCONI 0 lt lt 13 3 lt 11 7K 8 lt 6 lt
172. 8 Jun 18 2007 tmp gt etc tmp drwxr xr x 10 0 512 Mar 28 10 31 usr lrwxrwxrwx 10 0 8 Jun 18 2007 var gt etc var root root english linuette usr linuette lrwxrwxrwx 10 0 13 Jun 18 2007 linuette gt usr linuette bin root englis root irdadump obex test dev devfs TE2R etc linuxrc mount ramfs C lib modules usr 1ib modules etc exec sbin init mnt etc extl1 ext2 ext3 linuxrc mnt etc mount ramfs mnt etc etc etec root_english KR linuette etc init d rcS cat init d rcS bin sh bin mount a exec usr etc rc local J rB re local QPE linuette ls linuette 1 rwxrwxrwx 10 0 17 Dec 4 2030 drwxr xr x 10 0 0 Jan 1 1970 lrwxrwxrwx 10 0 17 Dec 4 2030 lrwxrwx
173. AX 68 gt LAS WE FA NT lt H define IR NUM MIN 30 unsigned char gSending unsigned char gLearning 0 1 unsigned short gCount unsigned char 0x080000c8 1 Ea H 3 H while jiffies jiffieslt timeout amp amp index lt Rx counter 2 L 2 Lead code 32 16bit custom 2 32 16bit data 2 1 end 67 EP RSS C unsigned short gLearnTime ZI unsigned char gState
174. CNTBO Oxffff 21ms TCNTB1 0x52 3 125MHz 38K 82 0x52 TCMPB1 0x29 0x52 2 0x29 TCON amp Oxfff lt lt 0 Timer0 1 Stop Learning 0 Transmit flag 0 PWMEn 0 vIR ADDR ioremap pIR ADDR 1 printk KERN INFO DEVICE NAME init OK n return 0 static void _ exit IR cleanup void iounmap vIR ADDR devfs unregister devfs handle module init IR init module exit IR cleanup MODULE_LICENSE GPL include stdio h gt include lt stdlib h gt include lt unistd h gt include lt sys ioctl h gt include lt fcntl h gt int main int argc char argv int fd IR_fd int ret i unsigned short buf 100 TBuf 100 fd open dev PGM IR O_RDWR 0 if fd lt 0 perror open PGM IR fail exit 1 ioctl fd 3 0 if arge 2 IR fd open tmp IR_fd0 O_RDONLY if IR_fd lt 0 perror open IR fd0 else ret read IR fd TBuf sizeof TBuf if ret gt 0 for i 0 i lt ret 2 i if G 10 printf n printf 04x TBuf lil write fd TBuf ret ret read fd buf sizeof buf 2 if ret gt 0 for i 0 i lt ret i if G 10 printf n printf 04x buf i IR fd creat tmp IR fd0 O_RDWR if IR_fd gt 0 printf creat IR fd sucess n write IR fd buf sizeof short ret
175. DIR lib LD LIBRARY PATH 8 setEnvArm Makefile FHF pro tmake o Makefile hello pro arm qtopia qt lib gt T hello libqte so 2 libqte so 2 3 ztelnet sz libqte so 2 libqte so 2 3 7 libqte so 2 libqte so 2 3 flash 2 2 4 qtopia cd QPEDIR src vi libraries qtopia custom h define QPE NEED CALIBRATION configure platform linux arm g make Makefile make instal1 linuette root_english cd linuette target box root_dir root_english usr qtopia linuette rm rf linuette target box root dir root english usr linuette mkdir linuette target box root dir root english usr qtopia
176. E 0 485 receive enable char Rec485 unsigned char counter char user buf unsigned long timeout 2 counter 30 unsigned int jiffiesl index 0 Rx counter counter enable irq IRQ RXD1 3 Fo pae Bak jiffiesl jiffies while jiffies lt jiffiesl timeout amp amp index lt Rx counter disable irq IRQ RXD1 if index gt 0 if index lt counter copy to user user buf rec buf index return index else copy to user user buf rec buf counter return counter return 0 static void rx irq handle int irq void dev id struct pt regs regs char ch while UFSTATI amp Oxf gt 0 Rx FIFO Count if UERSTATI err ch UR else if index lt BUFFSIZE OOP rec_buf index URXHI if index 2 amp amp rec buf 0 0x02 Rx counter rec buf l 2 static ssize t RS485 read struct file filp char buf size t count loff t f_pos if count gt BUFFSIZE printk 1 buf size invalidation W return EINVAL return Rec485 count buf static ssize t RS485 write struct file filp const char buf size t count loff_t f pos unsigned char WriteBuf BUFFSIZE unsigned ch
177. GO DZONE F1d 8 16 define Fld Size Shft Size lt lt 16 Shft TCFGO_DZONE 7g 8 lt lt 16 16 TCFGO_DZONE x ZJ FInsrt x 8 lt lt 16 16 define FInsrt Value Field UData Value lt lt FShft Field ifndef _ ASSEMBLY define UData Data unsigned long Data pig define UData Data Data define FShft Field Field amp 0x0000FFFF TCFGO_DZONE x unsigned long x lt lt 8 lt lt 16 16 amp 0x0000FFFF TCFGO DZONE x unsigned long x lt 16 TCFGO PREl x A unsigned long x lt lt 8 lt lt 16 8 amp 0x0000FFFF TCFGO PRE1 x TCFGO_PREO x TCFGO_PREO x static int pwm open struct inode inode struct file filp unsigned long x lt 8 unsigned long x lt lt 8 lt lt 16 0 amp 0x0000FFFF unsigned long x lt 0 unsigned long flag if usage 0 equest irq IRQ TIMERO pwm irq handle SA_INTERRUPT my DEVICE NAME NULL ocal irq save flag TCFGO TCFGO amp OxFFFF00 1 prescaler value 1 TCFG1 TCFG1 amp OxFFFFFO 0 divider value 1 2 TCNTBO 329 38KHz TCMPBO 164 50 TCON TCON amp Ox7FFFEO 0x09 Timer0 auto reload Update TCNTBO TCMPBO start RunTime 0 ocal irq restore flag usagett MOD_INC_USE_COUNT return 0 success 4 2 3 pwm release PWM
178. IT EINTO pISR TIMERO int Int_Timer0 TCFGO rTCFGO amp Oxff lt lt 0 0x01 lt lt 0 prescale value 1 TCFG1 rTCFG1 amp Oxf lt lt 0 0x2 lt lt 0 divider value 8 TCNTBO Oxffff TCFG1 rTCFG1 amp Oxf lt lt 4 0x2 lt lt 4 divider value 8 50MHz 1 1 8 3 125MHz TCNTB1 0x52 3 125MHz 38K 82 0x52 TCMPB1 0x29 0x52 2 0x29 TCON rTCON amp Oxf lt lt 8 Oxa lt lt 8 Timerl auto reload Update TCNTB1 TCMPB1 Stop pISR TIMERI int Int_Timer1 INTMSK amp BIT EINTO 0 gState 1 gLearning 0 ieeleleotolelelololololelotoleloletotoleleleloleloletetoleloletotoletelelotololetetoteloletotolelotelotoleletelolololetotoleloletotoletetetotoleletotolelotetotole void irq Eint3Isr void JJ f IR kokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokok k void _ irq Int IRStudy void rGPFCON rGPFCON amp 0x3 lt lt 0 0x0 lt lt 0 if gLea if IGGPFDAT amp Ox1 f gLearning 1 ning 0 GPFO IN YZ rTCON rTCON amp sit lt lt 0 0x2 Updata TCNTBO rTCON rTCON amp Oxlf lt lt
179. K AIK ROR OOK AIK ROR OOK ROR OE OK RIOR OOK RE OR OOK ROK void Ua 1 5 tl Init int pclk int baud ARTI 485 skokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokqkokokokokokokokqkokokokok void Uartl Init int pclk int baud int i if pclk 0 pclk PCLK rUFCON1 0x0 FIFO disable rUMCONI 0x0 AFC disable rULCONI 0x33 8 1 9 1 rUCONI 0x245 rx edge tx level disable timeout int normal interrupt or polling rUBRDIV1 for G 0 i int pclk 16 baud 1 bps 38400 lt 100 i RARER AAO RA RIOR RK OR IO IK OR I OR OE AK ROR IK ROR OK OR OE OR OE OK OR OK ROR OE OK OR OK ROR OE OK ROKR EK void Output Relay485 unsigned char FunNum unsigned char NetID unsigned char Port B FunNum 3 1 0 NetID ID Port
180. NF ndis modprobe rest K o install ndiswrapper I TL W art Step 5 iwconfig POWER root zkccn l Biwconfig Lo eth0 Wlan0 IEEE 802 11b ESSID off any Mode Auto Frequency 2 412GHz Access Point 00 00 00 00 00 00 Bit Rate 11Mb s Tx Power 20 dBm Sensitivity 0 3 RTS thr 2432 B Fragment thr 2432 B no wireless extensions no wireless extensions Encryption key off Power Management off Link Quality 100 100 Signal level 80 dBm Noise level 256 dBm Rx invalid nwid 0 Rx invalid crypt 0 Rx invalid frag 0 Tx excessive retries 0 Invalid misc 0 Missed beacon 0 Step 6 iwlist root zkccn iwlist wlan0 scan TL WN210 210 NET8180 INF Windows NET8180 WRH ndiswrapper 1 wrapper ndiswrapper POWER ndiswrapper MAIME ndiswrapper WR ATA RK etc init d p
181. OM rx buf MINOR inode gt i_rdev printk uart read MINOR is d filp f count is d n MINOR inode gt i_rdev filp f count local irq save flag while rx buf count count if qCOM rx buf emp if qCOM rx buf front gCOM rx buf gt buf qCOM rx buf gt num qCOM rx buf front qCOM rx _buf gt buf if qCOM rx buf front qCOM rx buf gt rear qCOM rx buf emp 1 is empty rx buf rx buf count qCOM rx buf front qCOM_rx_buf gt full 0 else interruptible sleep on rx_queue MINOR inode gt i_rdev J printk 1 gt out sleepW copy to user buf rx buf rx buf count local irq restore flag return rx buf count static ssize t uart write struct file filp const char buf size t count loff_t f pos int i char tx buf BUFSIZE unsigned char lsr size t tx buf count 0 struct inode inode filp gt private data printk 1 uart write minor d filp gt f count is d n MINOR inode gt i_rdev filp f count copy from user tx buf buf count for G 0 i lt count i while Isr readb vEXT COM BASE ADDR MINOR inode i rdev LSR amp 0x1 lt lt 5 wait THR empty writeb tx buf i vEXT COM BASE ADDR MINOR inode i rdev THR return count static int uart ioctl struct inode inode struct file filp unsigned int cmd unsigned long arg printk 1 uart ioctl MINOR is d filp f count is d n MINO
182. OR 232 static unsigned long led table GPIO B7 GPIO B8 GPIO B9 GPIO B10 static int leds ioctl struct inode inode struct file file unsigned int cmd unsigned long arg switch cmd case 0 case l if arg gt 4 return EINVAL write gpio bit led table arg cmd default return EINVAL static struct file operations leds fops owner THIS MODULE ioctl leds ioctl m static int _ init leds init void int ret int i ret register chrdev LED MAJOR DEVICE NAME amp leds fops if ret lt 0 printk DEVICE NAME can t register major number return ret for G 0 id4 i set gpio ctrl led table i GPIO PULLUP EN GPIO MODE OUT ite gpio bit led table i 1 printk DEVICE NAME initialized n return 0 static void _ exit leds exit void unregister_chrdev LED MAJOR DEVICE NAME module init leds init module exit leds exit 2 1 2 Makefile CROSSz opt host armv4l bin armv4l unknown linux INC linuette target box kernel include all leds leds CROSS gcc 02 c I INC leds c clean rm rf leds o 2 1 3 insmod leds o proc devices leds 232 cat proc devices Hmknod dev leds c 243 0 dev leds ls de
183. P key information one can join toan Access Point by the following autojoin command wlanctl ng wlan0 Inxreq autojoin ssid lt SSID gt authtype sharedkey 10 gt Site Survey wlanctl ng wlan0 dotllreq scan bsstype any bssid 00 00 00 00 00 00 scantype both probedelay 0 channellist 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 00 EE minchanneltime 200 maxchanneltime 1000 ssid wlanctl ng wlan0 dotllreq mibget mibattribute p2CommunicationScanresult It includes two commands when doing site survey The first command is issue a scanresult command to the firmware which asks firmware to scan the channel The second one is display the scan result returned by firmware Site survey is very useful when searching the APs One may want to join the AP with the specific SSID or join the AP which has the best signal 11 gt Get Tally information wlanctl ng wlan0 dotllreq mibget mibattribute p2CommunicationTallies 3 3 2 1 modprobe prism2 usb prism2_doreset l wlanctl ng wlan0 Inxreq_ifstate ifstate enable wlanctl ng wlan0 Inxreq_autojoin ssid WLAN authtype opensystem wlanctl ng wlan0 lnxreq hostwep decrypt true encrypt true wlanctl ng wlanO dotllreq mibset mibattribute dot11WEPDefaul tKey ID 0 wlanctl ng wlanO dotllreq mibset mibattribute dotllWEPDefaultKeyO xx xx xx ifconfig wlan0 192 168 42 42 route add default gw 192 168 42 1 ping c 4 192 168 42 1 2 bin bash wlanctl ng wl
184. R inode gt i_rdev filp f count switch cmd amp 0x0Of case 1 read return EXT COM PARAM MINOR inode i rdev case 2 write EXT COM PARAM MINOR inode i rdev arg amp OxIfff disable irq EXT COM INT printk d write param is x n MINOR inode i rdev arg SeriallInit vEXT COM BASE ADDR MINOR inode i rdev EXT COM PARAM MINOR inode gt i_rdev nable irq EXT COM INT break default return EINVAL return 0 static int uart open struct inode inode struct file filp printk 1 uart open MINOR is d n MINOR inode gt i_rdev printk 1 filp is Xx filp count is d n filp filp f count MOD INC USE COUNT Init Queue COM rx buf MINOR inode i rdev EXT COM USE MINOR inode i rdev 1 usr T filp private data inode use read and write function EXT COM PARAM MINOR inode i rdev EXT COM INTBit enable interrupts Seriallnit vEXT COM BASE ADDR MINOR inode gt i_rdev EXT COM PARAM MINOR inode i rdev return 0 static int uart release struct inode inode struct file filp printk 1 uart release MINOR is d file gt f counnt is d n MINOR inode gt i_rdev filp gt f count MOD DEC USE COUNT kfree COM rx buf MINOR inode i rdev buf EXT COM USE MINOR inode i rdev 0 no usr EXT COM PARAM MINOR inode i rdev amp EXT COM INTBit disable interrupts SeriallInit vEXT COM BASE ADDR MINOR
185. RIES CRPWR 4 define NET_ID 0x06 ekke kkk char FindDevice unsigned char id char series buf id ID buf o 3E 0 NULL xolelololeleloleletoleletoleletotoleletoleletoleletoleletoteletotolelotoleletoleletoleletojeletotolelotoleletoleletoleletoleletotolelotoleletoleletoleletok char FindDevice unsigned char id char series buf unsigned int waitdata 0 unsigned char j i 0 len char buf FIND DEVICE DATA LENGTH Send00485 Sendbyte485 0xff FF 02 03 01 ID 00 Sendbyte485 0x02 Sendbyte485 0x03 Sendbyte485 0x01 Sendbyte485 id Sendbyte485 0x00 while waitdata lt FIND DEVICE WAIT TIME if rUTRSTATI amp Ox1 buf i RdURXH1O if i lt FIND_DEVICE_DATA_LENGTH it else break waitdata 0 if G gt 8 for j O j lt i 2894 if buf j 0x02 amp amp buf j 2 0x05 amp amp buf j 3 0x0 amp amp buf j 4 0x0 if len buf j 1 2 sizeof SERIES if strncmp amp buf j 5 SERIES buf j 1 3 Of for i 0 i lt len 1 i series buf buf j 5 i
186. ROR OK ROR OE KOR OK ROR OE AK OR OK ROR OE OK OR OK ROR OE OR RK OR OK AK void _ irq TimerODone voi d B E kokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokok void irq Int TimerO void if gSending 1 if gCount gt gLen Kl NI gSending 0 gPWMEn 0 rTCON rTCON amp Oxffff000 stop for timerO timerl rINTMSK BIT_TIMER1 BIT_TIMERO else if gPWMEn 0 gPWMEn 1 rTCNTBO Oxffff pIRData rTCON rTCON amp OxffffffO 0x2 rTCON rTCON amp OxffffffO Oxl rTCON rTCON amp OxffffOff Oxa00 rTCON rTCON amp OxffffOff 0x900 38K ape oo else gPWMEn 0 rTCNTBO Oxffff pIRData rTCON rTCON amp OxffffffO 0x2 rTCON rTCON amp OxffffffO Oxl plRData gCount else if gLearning gt IR NUM MIN LearnOK else rINTMSK BIT
187. S fork dup file 0 file 1 open static unsigned int RunCount static unsigned int usage static void pwm irq handle int irq void dev id struct pt regs regs if RunCount gt 0 if RunCount lt Oxffffffff RunCount else TCON TCON amp Oxf lt lt 12 xa lt lt 12 Timer2 stop static int buzz open struct inode inode struct file filp int ret unsigned long flag if usage 0 local irq save flag printk 1 TCFGO Xx TCFGI x n TCFGO TCFG1 TCFG1 TCFG1 amp Oxf lt lt 8 0 lt lt 8 Timer2 MUX 1 2 TCNTB2 s3c2410_get_bus_clk GET_PCLK TCFGO gt gt 8 amp 0xff 1 2 PWM2 Fre TCMPB2 TCNTB2 2 50 TCON TCON amp C Oxf lt lt 12 Oxa lt lt 12 Timer2 auto reload Inverter off Update TCNTBO TCMPBO stop printk 1 TCNTB2 x TCMPB2 x TCON x n TCNTB2 TCMPB2 TCON RunCount 0 local irq restore flag usagett MOD INC USE COUNT return 0 success static int buzz release struct inode inode struct file filp unsigned long flag MOD DEC USE COUNT usage return 0 static int buzz ioctl struct inode inode struct file filp uns
188. S SB Er sates s a usa asa a aaa india 57 2c E DURINESOS ig BEE 58 33 WA DER Ub a ib S SA 58 TENE FP PV H Linux anna nnne 58 NEL edu eC C TR 59 E C E T 59 DEN UE c anqana ua qaa qasamanta anak ieee hea u a qa NS 59 EE 60 ul GRADE TQ TEE uyanan sumaq EN 60 NC CUL A MM 61 CSB900A BE PETE V uccisi eati reete reete 62 o Uu LER 62 E EI as ar Ue 63 UE CEET 63 1 RedHat9 TL WN210 aaa 64 E GE Sau uma a sus ak Sy kausay kunasa yah k Oase aa 67 3 RedHat9 E48 FS WL 1 10 aasan 71 4 PD6710 aasan 76 5 Linux 81 CPLD 88 ed Oe 88 DE E E E 94 7 EEN 109 109 2 Ne 112 ER EE 112 e EE 113 1 113 2 EE 118 S kapilla yuta nan u mna aan amas id mna ayaqa ma ua iah 121 4 PE AEE TA pel ENEE 123 Ja A EE 125 E I a P Fiche ov akata aaa a vest eu aver aN 125 Oe ot aaa y ua PRT OD UN 130 EE EE 135 NEU hi Ee EE 137 e GE 137 Ju SEM PE 137 le PER PRE cista o o ee ette do Ua et ham Ei 137 22 JR as oo NO ER heye 146 Ores HE Ee uum an umasa p et bt e oq me 151 4 I0
189. T MTU 1500 Metric l RX packets 74 errors 0 dropped 0 overruns 0 frame 0 TX packets 28 errors 0 dropped 0 overruns 0 carrier 0 collisions 0 txqueuelen 100 RX bytes 14472 14 1 Kb TX bytes 4140 4 0 Kb Memory 30800000 30800024 HR EE RZEKA make unins BJ root zkccn 64 3 packets transmit Rtt min avg max mdev p bytes from 192 ted 8 received X Window Step 9 ndiswrapper 1 2 eject proc driver modprobe ndiswrapper MAHI ndiswrapper POWER pcmcia etc re d init d pemcia restart ES pemcia_core o e pcmcia ng statistics ping BBS ing 192 168 1 99 NG 192 168 1 99 192 168 1 99 56 84 bytes of data 68 1 99 icmp seq 1 ttl 127 time 4 46ms bytes from 192 168 1 99 icmp seq 2 ttl 127 time l 68ms bytes from 192 168 1 99 icmp seq 3 ttl 127 time 2 01ms 192 168 1 99 pi 0 packet loss time 3047ms 1 681 2 150 4 465 0 882 ms modprobe r ndiswrapper ndiswrapper e drivername
190. VICE NAME amp leds fops if ret lt 0 printk DEVICE NAME can t register major number return ret devfs handle devfs_register NULL DEVICE NAME DEVFS FL DEFAULT LED MAJOR 0 S IFCHR S IRUSR S IWUSR amp leds fops NULL for i 0 i lt 4 i et gpio ctrl led table i GPIO PULLUP EN GPIO_MODE_OUT ite gpio bit led table i 1 n printk DEVICE NAME initialized n return 0 static void _ exit leds exit void devfs unregister devfs handle unregister chrdev LED MAJOR DEVICE NAME 2 4 LED 2 4 1 LED 2 LED include lt stdio h gt include lt stdlib h gt include lt unistd h gt include lt sys ioctl h gt int main void unsigned int on int led_no int fd unsigned char i fd open dev leds 0 if fd lt 0 perror open device leds exit 1 on 0 while 1 for G O i lt 4 itt ioctl fd on gt gt i amp 1 i on 1 on amp Oxf sleep 1 close fd return 0 2 4 2 Makefile CROSS opt host armv41 bin armv41 unknown linux all leds leds CROSS gcc o led inc leds c clean
191. _READ PROT_WRITE MAP_SHARED fb 0 if fbdev fb mem NULL int fbdev fb mem 1 fbdev fb mem NULL printf mmap failed n close fb return 1 fbdev fb fb memset fbdev fb mem 0x0 fbdev fb size return 0 void framebuffer_close if fbdev fb mem unmap fbdev fb mem fbdev fb size fbdev fb mem NULL if fbdev fb close fbdev fb fbdev fb 0 int main void int i framebuffer_open for i 0 i lt 16 i printf d color Ox x i 1 lt i draw 1 lt lt i getchar framebuffer close return 0 6 6 1 kernel drivers char s3c2410 ts c s3c2410_ts_init 0 ADCDLY 0xFFFF T 6 2 include lt unistd h gt include lt stdio h gt include lt fcntl h gt typedef struct unsigned short pressure c nsigned short x unsigned short y unsigned short pad TS_EVENT int main void static int ts 1 static int mousex 0 static int mousey 0 static TS EVENT ts event printf touch screen test programW printf please touch the screen n
192. able ARM version 1 ARM for GNU Linux 2 0 0 dynamically linked uses shared libs not stripped J tetris GUI Qt tetris usr etc rc local tetris server 1 1 3 1 usr 1ib tmake 1ib qws 1inux x86 g tmake 1 7 8 mizi tmake 1 7 3mz tmake tmake lib qws linux linuette gt Jil rpm q tmake tmake 1 7 8 rpm e tmake Hcd linuette RPMS rpm Uvh tmake l 7 3mz noarch rpm rpm q tmake tmake 1 7 3mz 2 make INP HEM undefined reference to MzApplication MzApplication int amp char mizi vi TMAKEPATH tmake conf WSJH llinuetteapp lcustomwidget 1mzdateformat 3 TMAKE LIBS TMAKELIBS llinuetteapp lcustomwidget lmzdateformat 2 QTE 2 3 7 Qtopia 1 7 0 S3C2410 qtopia free 1 7 0 QTE qt embedded 2 3
193. an0 Inxreq_ifstate ifstate enable wlanctl ng wlanO dotllreq mibset mibattribute p2CnfRoamingMode 1 wlanctl ng wlanO dotllreq mibset mibattribute dotllWEPDefaultKeyID 0 wlanctl ng wlan0 dotllreq mibset mibattribute dotllExcludeUnencrypted true wlanctl ng wlanO dotllreq mibset mibattribute dotllPrivacyInvoked true wlanctl ng wlan0 dotllreq mibset mibattribute dot11WEPDefaul tKey0 00 00 00 00 00 00 00 00 00 00 00 00 00 wlanctl ng wlan0 Inxreq autojoin ssid somessid authtype sharedkey ifconfig eth0 down ifconfig wlanO 192 168 0 163 up route add default gw 192 168 0 1 3 bin sh Wire Step wlanct Step wlanct Step wlanct wlanct Step wlanct wlanct Step ifconf less USB setup enable wire set SSID fo set WEP attributes wlan0 Inxreq hostwep wlan0 dotll WEP key wlan0 dotll wlan0 dotll set ng ng Dr guration ig wlanO 192 168 1 100 ne set IP confi eq_mibset eq_mibset eq_mibset ess USB for wlan0 your network wlan0 Inxreq ifstate ifstate enable encrypt true decrypt true 4 PD6710 PD6710 CS8900A ISA CS8900A PD6710 H wlan0 Inxreq_autojoin ssid stayoutofmynet authtype opensystem mibattribute dotllPrivacyInvoked true miba
194. ar i if count gt BUFFSIZE printk lt 1 gt buf size invalidation n return EINVAL copy from user WriteBuf buf count Send00485 for i 0 i lt count 1 i Sendbyte485 WriteBuf i 0 Sendbyte485 WriteBuf i 1 return count emd 7 0 cmd 15 8 ID cmd 23 16 arg static int RS485 ioctl struct inode inode struct file filp unsigned int cmd unsigned long arg unsigned char temp unsigned char Len i char ioctl buf BUFFSIZE int ret 0 Len cmd gt gt 16 amp Oxff if Len 0 return EINVAL switch cmd amp Oxff case 0 reset FF 02 03 00 ude lay 700 Send00485 Sendbyte485 Oxff 0 Sendbyte485 0x02 0 Sendbyte485 0x03 0 Sendbyte485 0x00 1 break case 1 find device FF 02 03 01 ID 00 Send00485 Sendbyte485 Oxff 0 Sendbyte485 0x02 0 Sendbyte485 0x03 0 Sendbyte485 0x01 0 Sendbyte485 cmd gt gt 8 amp Oxff 0 Sendbyte485 0x00 1 ret Rec485 Len char arg break case 2 read 485 net command string ID 00 Send00485 Sendbyte485 cmd gt gt 8 amp Oxff 0 ID Sendbyte485 0x00 1 00 ret Rec485 Len char arg break case 3 read string ret Rec485 Len char arg break case 4 write string
195. ata time out ISR 0xcc LSR 0 Recive data ready 1 1 RHR RHR LSRIO A 0 5 SC16C554 datasheet EFR FCR 0xBF 0x02 FCR 0 ISR MCRL1 RTS testval 0 pBaseAddr MCR pBaseAddr MCR testval 0 0x2 RTS 0 testval 0 pBaseAddr MCR pBaseAddr MCR testval 0 amp C0x02 RTS 1 2 2 linux 2 2 1 1 Chun H ioctl 2 16C554 dev 4 2 2 2 ifndef KERNEL Hdefine KERNEL Hendif ifndef MODULE
196. b n config lib locale share start hr bin lib usr linuette bin 1ib 51 51 PIC DSP ee ARM linux GUI VC bin QPE 1ib 2 AV UBI PC zER gt x BB Zomm Teen gt ES A A fo wince wince
197. d p80211 18320 1 prism2 cs ds 8880 1 prism2 cs 182365 o 9776 1 pcmcia core 4912 0 prism2 cs ds i82365 o ifconfig eth0 Link encap Ethernet HWaddr 00 00 C0 FF EE 08 inet addr 192 168 1 2 Bcast 192 168 1 255 Mask 255 255 255 0 UP BROADCAST RUNNING MULTICAST MTU 1500 Metric 1 RX packets 0 errors 0 dropped 0 overruns 0 frame 0 TX packets 0 errors 0 dropped 0 overruns 0 carrier 0 collisions 0 txqueuelen 100 RX bytes 0 0 0 b TX bytes 0 0 0 b Interrupt 37 Base address 0x300 cat wlan_ad bin sh wlanctl wlan0 Inxreq_ifstate ifstate disable wlanctl wlan0 lnxreq ifstate ifstate enable wlanctl wlan0 dotllreq start ssid linux wlan bsstype independent beaconperiod 100 dtimperiod 3 cfpollable false cfpollreq false cfpperiod 3 cfpmaxduration 100 probedelay 100 dschanne1 6 basicratel 2 basicrate2 4 operationalratel 2 operationalrate2 4 operationalrate3 11 operationalrate4 22 wlanctl wlan0 dotllreq mibset mibattribute dotllWEPDefaultKeyID 0 wlanctl wlan0 dotllreq mibset mibattribute dotllExcludeUnencrypted true wlanctl wlanO dotllreq mibset mibattribute dotllPrivacyInvoked true wlanctl wlanO dotllreq mibset mibattribute dot11WEPDefaul tKey0 12 34 56 78 90 ifconfig eth0 down ifconfig wlan0 192 168 0 236 netmask 255 255 0 0 broadcast 192 168 0 255 wlan_ad message lnxreq ifstate ifstate disable resultcode success ident nic h w id 0x800c 1 0 0 ident pri f w id 0x15 1 1 0 ident s
198. d built in excluded eneral setup gt rivate Data gt erial Port gt M mory Technology Devices MTD gt dd Built in Commands gt ystem hacking gt ebugging messages gt oad an Alternate Configuration File ave Configuration to an Alternate File REY lt Exit gt lt Help gt S801 Load an Alternate Configuration File 253 5A arch def configs smdk2410 GE root LinuxMc Ainuettetaryetbox boot vivi VIVI v0 1 4 Configuration HIZI Research Inc Enter the name of the configuration file you wish to load Accept the name shown to restore the configuration you last retrieved Leave blank to abort arch def configs smdk2410 GENE Help OK Yes make linuette target box boot vivi PREM vivi Hmkdir image cp vivi image 2 2 cd linuette target box tar jxvf linux 2 4 18 rmk7 pxal mz4 tar bz2 cd kernel make menuconfig vivi 2 Wl E Load an Alternate Configuration File 3 EG X arch arm def configs smdk2410 ake zImage ake modules ZS d ake modules_install cp ZImage image
199. de check fail TCON TCON amp 0x1f lt lt 0 stop for timer0 Learning 0 else read gpio bit GPIO F0 amp amp if read gpio bit GPIO FO amp amp IO State 0 IO State 1 plIRData Learning 1 TCNTOO IO State IO State 0 1 if Learning gt IR NUM MAX wake up interruptible amp Wait Study else TCON TCON amp Ox1f lt lt 0 0x2 TCON TCON amp Oxlf lt lt 0 Oxl Learning set gpio ctrl GPIO FO GPIO PULLUP DIS GPIO MODE EINT EINTO static ssize t IR Study struct file filp char buf size t count loff t f pos int ret i unsigned short Study Buf if count lt IR NUM MIN 2 count gt 256 printk 1 buf size invalidation W return EINVAL if Study But kmalloc count GFP KERNEL printk lt 1 gt kmalloc fail n return EINVAL ret request_irq IRQ IRInput IRInput_irq handle SA_ INTERRUPT DEVICE NAME IRQ EINTO Study Buf if ret 0 printk X15 IR busyNn kfree Study Buf return EBUSY ret request irq IRQ TIMERO timer0 Study irq handle SA INTERRUPT DEVICE NAME IRQ TIMERO Study NULL if ret 0 printk 1 IR busyW free Study Buf ee irq IRQ IRInput Study Buf in w Learning O0 set gpio ctrl GPIO FO GPIO PULLUP DIS GPIO MODE EINT interruptible sleep on timeout amp Wait Study Wait Time free irq IRQ IRInput Study Buf
200. delay h gt include lt linux poll h gt include lt linux spinlock h gt include lt linux irg h gt include lt asm hardware h gt include lt asm io h gt define DEVICE NAME CPLD IO define IO MAJOR 232 define CPLD BaseAddr IO volatile unsigned char vCSCPLD BASE 0xc0 static ssize t IO read struct file filp char buf size t count loff t f_pos c nsigned char val val inb CPLD BaseAddr IO copy to user buf amp val 1 return 1 static ssize t IO write struct file filp const char buf size t count loff t f pos unsigned char val copy from user amp val buf 1 outb val CPLD BaseAddr IO return 1 static struct file operations leds fops owner THIS_MODULE write O write read O read h static devfs handle t devfs handle static int init IO init void int ret ret register chrdev IO MAJOR DEVICE NAME amp leds fops if ret lt 0 printk DEVICE NAME can t register major number return ret devfs handle devfs register NULL DEVICE NAME DEVFS FL DEFAULT IO MAJOR 0 S IFCHR _IRUSR S IWUSR amp leds Tops NULL printk DEVICE NAME initialized n return 0 static void _ exit IO exit void devfs unregister devfs handle unregister chrdev IO MAJOR DEVICE NAME module init IO init module exit IO exit Makefile CROSS opt host armv41 bin armv41 unknown linux INC linuette targ
201. e name mtd0 04000000 00004000 bon mtdl 03cfc000 00004000 mtd 1s dev mtd 0 Oro 1 lro 1s dev mtdblock 0 1 3 3 yaffs Chttp www aleph1 co uk cgi bin viewcvs cgi yaffs Cyaffs tar gz kernel fs yaffs yaffs fac yaffs guts c yaffs mtdif c yaffs ecc c devextras h yaffs guts h yaffs mtdif h yaffs ecc h yaffsinterface h yportenv h yaffs_config h Hifndef _ YAFFS CONFIG H define YAFFS CONFIG H Hdefine CONFIG YAFFS MTD ENABLED define CONFIG_YAFFS_USE_OLD_MTD endif O TARGET yaffs o obj y obj m 0 TAGRET nclude TOPDIR Rules make fs Makefile yaffs subdir CONFIG YAFFS FS yaffs iv if CONFIG MTD SMC y tristate Yaffs filesystem on NAND fi VE if if Kh File system gt Yaffs filesystem on SMC cat proc filesystems nodev rootfs nodev bdev nodev proc nodev sockfs nodev tmpfs nodev shm nodev pipefs cramfs nodev ramfs vfat nodev devfs nodev nfs jffs2 nodev autofs nodev devpts yaffs mount t yaffs de
202. ed libraries libpngl2 so 0 cannot load shared object file No such file or directory arm qtopia lib arm qtopia dqtopia lib cp arm qtopia lib arm qtopia qtopia lib 5 qpe new conf could not open for writing Settings qpe new conf QCopChannel send Must construct a QApplication before using QCopChannel Settings qpe_new conf yaffs 6 gt dev fb0 qpe Can t open framebuffer device dev fb0 Can t open framebuffer device dev fb0 driver cannot connect dev fb0 dev fb 0 framebuffer dev fb0 dev fb 0 ln s dev fb 0 dev fb0 7 gt qpe Mouse type Auto unsupported ln s dev touchscreen Oraw dev h3600 tsraw Hexport QWS MOUSE PROTO dev h3600 tsraw qpe Mouse type dev h3600 tsraw unsupported qtopia free 2 2 0 qt2 src tools qconfig qpe h define QT QWS IPAQ Hdefine QT QWS IPAQ RAW 8 zoneinfo qpe Madvise of shared memory Function not implemented Madvise
203. em Size dev bon 2 2 8M tmpfs 0 6M dev mtdblock 1 61 OM cen root_english cramfs conso ctrl C Used Available Use 2 8M 0 100 0 30 6M 0 25 3M 35 7M 41 Used Available Use 2 8M 0 100 0 30 6M 0 51 3M 9 7M 84 yaffs usr yaffs ES F tmp aK F J Mounted on dev shm usr Mounted on dev shm usr usr yaffs GUI QT co e fil zx 2635 11 fish nsole ERE Bins QT HR BEI 3 Yaffs Linuette zImage yaffs usr yaffs yaffs LCD 320 480
204. emcia MAC TL WN210 modprobe WIPE Ex iwconfig Wlan0 Scan completed Cell 01 Address 00 15 E9 DE B1 5D ESSID R DNAN6 Unknown Wireless Token Ox8B01 Mode Master Frequency 2 422GHz Quality 0 100 Signal level 80dBm Noise level 256 dBm Encryption key on Bit Rate Bit Rate Bit Rate Bit Rate 1Mb s 2Mb s 5 5Mb s 11Mb s Extra bcn int 100 Extra atim 0 Step 7 CESSIDO iwconfig essid root zkccn iwconfig wlan0 essid R amp DNAN6 KE In WEP key iwconfig wlan0 ESSID off any ESSID R DNAN6 key root zkccn iwconfig wlan0 key B19227EF6E
205. error with marking shared memory pages as not needed Warning Unable to open usr share zoneinfo zone tab Warning Timezone data must be installed at usr share zoneinfo Warning TimeZone data Can t create a valid data object for H qQ zoneinfo mkdir usr share cp ir arm qtopia2 2 0 qtopia free 2 2 0 qtopia etc zoneinfo usr share 4 linuette root root english usr qtopia linuette linuette root root english bin dev etc lib linuette linuxrc mnt proc qt Is bin lib mnt sbin var dev linuette proc tmp etc linuxre qt usr sbin tmp usr var root english Is 1 drwxr xr x 10 0 512 Jun 15 2003 bin drwxr xr x 10 0 0 Jan 1 1970 dev drwxr xr x 10 0 0 Nov 27 1990 etc drwxr xr x 10 0 512 Mar 28 10 31 lib lrwxrwxrwx 10 0 13 Jun 18 2007 linuette etc linuette rwxr xr x 10 0 274 Jan 1 1970 linuxrc drwxr xr x 10 0 512 Mar 28 10 31 mnt dr xr xr x 220 0 0 Nov 27 1990 proc lrwxrwxrwx 10 0 7 Jun 18 2007 qt gt usr qt drwxr xr x 10 0 512 Mar 21 04 51 sbin lrwxrwxrwx 10 0
206. ers and established Proto Recv Q Send Q tcp 0 Local Addres Foreign Address 0 9877 9877 Local Addres 0 IP CINADDR_ANY LISTE TCP Signal SIGCHLD sig chld State LISTE Foreign Addres 0 State T EH ESTABLISHED TIME_WAIT 2 H H Gb T H H Tt nel incl ncl ncl ncl ncl ncl incl defi defin ud ud ud ud ud ud ud ud e SERV_PORT 9877 e MAXLINE 256 e lt stdio h gt e lt sys socket h gt e lt sys wait h gt e lt netinet in h gt e lt arpa inet h gt e lt netdb h gt e lt signal h gt e lt errno h gt struct SERIAL DATA E u un un struct DOWN LOAD PORT signed short Length signed short wReserved signed char pBuffer unsigned short CommandNum unsigned short MaxLength st st st st st st st uct uct uct uct uct uct uct SER SER SER SER SER SER SER AL_DATA AL_DATA AL_DATA AL_DATA AL_DATA AL_DATA AL_DATA
207. et box kernel include all IO I0 CROSS gcc 02 DMODULE D KERNEL c I INC IO driver c clean rm o 1 2 3 IO test c include lt stdio h gt include lt stdlib h gt include lt unistd h gt include lt sys ioctl h gt include lt fcntl h gt int main int argc char argv int on int IO no int fd unsigned char val time 60 fd open dev PGM IO O RDWR if fd lt 0 perror open device PGM 10 exit 1 while time if read fd void amp val 1 lt 0 perror read fail printf read val x n val amp OxOf val val if write fd void amp val 1 lt 0 perror writel fail sleep 1 close fd return 0 Makefile CROSS opt host armv41 bin armv41 unknown linux INC linuette target box kernel include all IO test IO test CROSS gcc IO test c o IO test clean rm IO test 1 2 4 D Oops 10 test unable to handle kernel paging request at virtual address d02000c0 pgd c3e38000 pgd 00000000 pmd 00000000 Internal error Oops ffffffff CPU 0 pc lt c488017c gt lr lt c00530a4 gt Not tainted sp c3d3df74 ip 00000001 fp c3d3df80 rl0 400dc26c r9 c3d3c000 r8 ffffffe7 r7 00000001 r6 00000003 r5 0000000
208. false cfpperiod 3 cfpmaxduration 100 probedelay 100 dschannel 6 basicratel 2 basicrate2 4 operationalratel 2 operationalrate2 4 operationalrate3 11 operationalrate4 22 ifconfig eth0 down ifconfig wlan0 192 168 0 2 netmask 255 255 0 0 broadcast 192 168 0 255 ifconfig PC linux wlan ping ifconfig wlan0 wlan0 Link encap Ethernet HWaddr 00 11 2F 73 B7 FF inet addr 192 168 0 2 Bcast 192 168 0 255 Mask 255 255 0 0 UP BROADCAST RUNNING MULTICAST MTU 1500 Metric 1 RX packets 54 errors 0 dropped 0 overruns 0 frame 0 TX packets 0 errors 0 dropped 0 overruns 0 carrier 0 collisions 0 txqueuelen 100 RX bytes 7448 7 2 kb TX bytes 0 0 0 b Interrupt 36 WEP Key ping ifconfig eth0 down wlanctl wlan0 dotllreq mibset mibattribute dot11WEPDefaultKeyID 0 wlanctl wlan0 dotllred mibset mibattribute dotllExcludeUnencrypted true wlanctl wlan0 dotllred mibset mibattribute dotllPrivacylnvoked true wlanctl wlan0 dotllreq mibset mibattribute dotllWEPDefaultKey0 12 34 56 78 90 PC WEP KEY 1234567890 5 3
209. for Timer 0 TCO TCON amp OxffffOff Oxa00 Timerl auto reload Inverter off Update TCNTB1 TCMPB1 Stop TCON TCON amp OxffffOff 0x900 Start for Timer 1 interruptible sleep on timeout amp Wait Transmit 20 9 4 5 2 243240 56 85 74 TCON amp Oxffff000 free irq IRQ TIMERO Transmit Buf free irq IRQ TIMERI NULL kfree Transmit Buf return count static int IR ioctl struct inode inode struct file filp unsigned int cmd unsigned long arg static unsigned char channel 0 if arg lt 4 switch cmd case 0 channel amp Oxl lt lt arg break case 1 channel 0x1 lt arg break case 2 channel 0 break case 3 channel Oxf break default break writeb channel vIR ADDR static struct file operations IR fops owner THIS MODULE write IR Transmit read IR Study ioctl IR ioctl h static devfs handle t devfs handle static int _ init IR init void devfs handle devfs register NULL DEVICE NAME DEVFS FL DEFAULT BUZZ MAJOR S IFCHR S IRUSR S IWUSR amp IR fops NULL 3 set gpio ctrl GPIO B1 GPIO PULLUP DIS GPIO MODE TOUT TOUTI set external irq IRQ IRInput EXT BOTH EDGES GPIO PULLUP DIS TCFGO TCFGO PREO 1 Timer0 1 prescale value 1 TCFG1 TCFG1 amp C Oxff lt lt 0 0x2 lt lt O 0x2 lt lt 4 TimerO0 1 divider value 8 50MHz 141 8 3 125MHz T
210. h sys_getitimer 2 gt value itimerval 3 gt ovalue itimerval int sigaction int signum const struct sigaction act struct sigaction oldact signum sigaction act oldact signal h gt struct sigaction void sa handler int signum sigset_t sa mask int Sa_flags 4 gt Y void sa_restorer void 4 include stdio h gt include lt signal h gt include lt sys time h gt include lt asm param h gt define HZ struct timeval tpstart tpend float timeuse signal process static timer count 0 void prompt_info in
211. hort gpAckERR pDownPort gt sAckERR pBuffer unsigned char gpAckERR 1 pDownPort gt MaxLength gpDownPort sCommandHead Length gpDownPort gt sDelimiter Length pDownPort gt s01dInput Length 0 pDownPort gt sOldInput pBuffer unsigned char malloc gpDownPort gt MaxLength 4 pDownPort gt sOldHttpInput Length 0 pDownPort gt sOldHttpInput pBuffer unsigned char malloc 256 memset gpDownPort gt sOldHttpInput pBuffer 0 256 return gpDownPort int Process Command int nIDCommand int sockfd struct SERIAL DATA pSerial gpDownPort gt psCommand nIDCommand int k if k writen sockfd gpDownPort gt sAckOK pBuffer gpDownPort gt sAckOK Length lt 0 printf write faill n return 1 printf command d s n nIDCommand pSerial gt pBuffer Hu int Communication int sockfd struct SERIAL DATA pSerial ssize_t nread nbuf len i char buf MAXLINE char ptr again ptr buf nbuf 0 while 1 if nread recv sockfd ptr MAXLINE 0 lt 0 if errno EINTR continue else perror Communication read error return 1 else nbuf nread ptr nread if nbuf lt gpDownPort sCommandHead Length
212. igned int cmd unsigned long arg unsigned long flag switch emd case 0 stop RunCount 0 break case 1 start local irq save flag if arg gt 0 RunCount arg TCON TCON amp C Oxf lt lt 12 0x9 lt lt 12 Timer2 start local irq restore flag break default break return 0 static struct file operations buzz fops owner THIS MODULE ioctl buzz_ioctl open buzz_open release buzz release Js static devfs handle t devfs handle static int _ init pwm init void printk 1 gt INTMSK xWn INTMSK request irq IRQ TIMER2 pwm irq handle SA INTERRUPT DEVICE NAME IRQ TIMER2 NULL printk 1 INTMSK xWn INTMSK devfs handle devfs register NULL DEVICE NAME DEVFS FL DEFAULT BUZZ MAJOR 0 S IFCHR S IRUSR S IWUSR amp buzz fops NULL set gpio ctrl GPIO B2 GPIO PULLUP EN GPIO MODE TOUT TOUT2 printk KERN INFO DEVICE NAME init OK n return 0 static void _ exit pwm cleanup void free irq IRQ TIMER2 NULL devfs unregister devfs handle module init pwm init module exit pwm cleanup MODULE LICENSE GPL 2 include stdio h gt include lt stdlib h gt include lt unistd h gt include lt sys ioctl h gt include lt fcntl h gt int main int argc char argv unsigned int cmd unsigned int PWM Counter int fd int ret
213. inode i rdev EXT COM PARAM MINOR inode i rdev return 0 static int uart flush struct file filp unsigned int i struct inode inode filp gt private data printk 1 uart flush MINOR is d filp f count is d n MINOR inode gt i_rdev filp f count return 0 static struct file operations uart fops owner THIS MODULE open uart open release uart release flush uart flush write uart write read uart read ioctl uart ioctl static devfs handle t devfs uart 4 devfs uart dir static int _ init uart init void int ret unsigned char i ret register chrdev uart MAJOR DEVICE NAME amp uart fops if ret lt 0 printk DEVICE NAME cant t register major num n return ret for i 0 i lt EXT COM NUM i vEXT COM BASE ADDR i ioremap pEXT COM BASE ADDR i 16 printk 1 vEXT COM BASE ADDR d XxW i vEXT COM BASE ADDR i vEXT COM INTS ADDR ioremap pEXT COM INTS ADDR 1 vEXT COM INTCTL ADDR ioremap pEXT COM INTCTL ADDR 1 writeb 0x0 vEXT COM INTCTL ADDR disable COM INT out BWSCON BWSCON amp Oxf lt lt 4 0x0 lt lt 4 nGCS1 not nUB nLB sSBHE not nWAIT 8 bit BANKCONI 0 lt lt 13 lt lt 1D 7 8 a 6 0 lt 4 G lt 2 0 Reset5540 for i 0 i lt EXT COM NUM i Seriallnit vEXT COM BASE ADDR i EXT COM PARAM il EXT COM USE i 0 set external irq EXT COM INT EXT HIGHLEVEL
214. intk lt 1 gt Hello World n JERGA H m TS AW AHR a val log messages H console loglevel DEFAULT_CONSOLE LOGLEVEL proc sys kernel printk echo 8 gt porc sys kernel printk 17 KE ps 18 4 tar xvzf linutte tgz C linuette 19 A etc grub conf 4 m etc grub conf windows XP Red Hat Linux 2 4 20 8 Pj j kernel E i Enter b 20 RPM tmake rpm ivh tmake 1 7 3mz noarch rpm B GRUB HE vga Linux E
215. kokokokokokokokokokokokokokokokokokokokokokokokokokokoakokokokokokokokokokokokokokokokokokokokokokokokokokok U8 PD6710 Rd U8 index Jj iE PD6710 skokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokkokokokokokok U8 PD6710 Rd U8 index rPD6710 INDEX index return rPD6710 DATA kokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokkokokokokokokokokokok int PD6710 Init void PD6710 skokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokqkokokokok int PD6710 Init void static U8 ChipInformationl ChipInformation2 rGPFCON rGPFCON amp 3 lt lt 6 2 lt lt 6 rGPGCON rGPGCON amp 3 lt lt 0 2 lt lt 0 rBWSCON rBWSCON amp 0xf lt lt 8 Oxd lt lt 8 nGCS2 nUB nLB sSBHE nWAIT 16 bit rBANKCON2 0 lt lt 13 G lt 1D 7 lt 8 lt 6 lt 4 G lt 2 0 PD6710 Wr CHIP INFO 0x0 PD6710 CHIP INFO INDEX Ox1P 2 PKS A Ja A 11 00
216. kokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokakok k void LearnIR void unsigned char i 0 IR Addr OxOf TR while 1 Init_IRQ while gLearning Oxff SendIR while gSending Linux define DEVICE NAME PGM IR define BUZZ MAJOR 236 Hdefine IRQ IRInput IRQ EINTO define IR NUM MAX 68 2 Lead code 432 16bit custom 2 32 16bit datax 2 1 end 67 define IR NUM MIN 30 define Wait Time 1800 IR study wait times 18s define pIR ADDR 0x080000c8 void vIR ADDR unsigned char Learning IO State IR study use unsigned char PWMEn Transmit flag TLen Transmit Index IR Transmits static DECLARE WAIT QUEUE HEAD Wait Study static DECLARE WAIT QUEUE HEAD Wait Transmit static void pwm irq handle int irq void dev id struct pt regs regs 38K if PWMEn TCON TCON amp C Oxf lt lt 8 Oxa lt 8 Timerl auto reload Inverter off Update TCNTB1 TCMPB1 stop static void timer0 Transmit irq handle int irq void dev id struct pt regs regs unsigned short pIRData dev id if Transmit flag 1 IR Transmit if Transmit Index gt TLen Transmit flag 0 PWMEn 0 TCON TCON amp Oxffff000 stop for timer0 timerl wake up interruptible amp Wait Transmit else if
217. libpng mkdir lib kdir include e2fs cd e2fs configure host arm linux enable elf shlibs with cc arm linux gcc with linker arm linux ld prefix usr local arm 2 95 3 arm linu x make cp lib libuuid so lib jpeg cd jpeg amp configure enable shared vi Makefile CC arm linux gcc AR arm linux ar rc AR2 arm linux ranlib make cp libs libjpeg so lib cp h include libpng cd libpng Hcp scripts makefile linux Makefile vi Makefile AR RC arm linux ar rc CC arm linux gec RANLIB arm linux ranlib prefix usr local arm 2 95 3 arm linux make cp libpngl2 so lib cp libpngl2 so lib libpng so Hcp h include 3 Qtopia PDA PDA mkdir qtopia cd qtopia free 2 2 0 vi qtopia mkspecs qws linux arm gt qmake conf QMAKE LIBS QT QMAKE LIBS QT lqte Ipng luuid ljpeg ate vi qtopia src qt qconfig qpe h define QT QWS IPAQ define QT QWS IPAQ RAW cp qtopia src qt qconfig qpe h qt2 src tools cd qtopia src libraries qtopia cp custom linux ipaq g cpp custom linux arm gt cpp cp custom linux ipaq g bh custom linux arm gt h Hecho yes configure qte embedded xplatform linux arm g qconfig qpe no qvfb depths 16 24 system jpeg
218. lo o was compiled for kernel version 2 4 20 while this kernel is version 2 4 20 8 1 gt usrVinclude linux version h define 2 4 20 define 2 4 20 8 2 insmod f force insmod f hello o 3 vi usr include linux version h 2 4 20 usr src linux 2 4 include linux version h 2 4 20 8 gcc c I usr src linux 2 4 include hello c OK YE proc modules CharDriver c define NO VERSION include lt linux module h gt include lt linux version h gt char kernel version UTS RELEASE define KERNEL include lt linux types h gt include lt linux fs h gt include lt linux mm h gt include lt linux errno h gt include lt asm segment h gt define SUCCESS 0 static int device read struct file file char buf size t count
219. loff t f pos static int device open struct inode inode struct file file static void device release struct inode inode struct file file struct file operations tdd fops read device read open device open release device release define DEVICE NAME char dev static int Device Open 0 unsigned int test_major 0 static char Messaege 1024 static int device open struct inode inode struct file file ifdef DEBUG printk device open p n file endif if Device Open return EBUSY Device Open MOD INC USE COUNT return SUCCESS static void device release struct inode inode struct file file ifdef DEBUG H printk device release Op p n inode file endif Device Open MOD DEC USE COUNT static int device read struct file file char buf size t count loff t Sr pos int left if verify area VERIFY WRITE buf count EFAULT return EFAULT for left count left gt 0 left put user l buf buf return count int init module void int result result register chrdev 0 char dev amp tdd fops if result lt 0 printk char_dev can t get major number n return result if test_major 0 test_major result printk Hello I m in kenel mode n return 0 void cleanup module void printk Hello I m goint to out W unregister chrdev test
220. mp H Timing Set 0 PD6710 Wr CARD MEM MAPO OFFSET L 0x0 PD6710 Wr CARD MEM MAPO OFFSET H OxO 1 lt lt 6 nREG PD6710 Wr MAPPING ENABLE Dal 1 lt 6 Misc Control PD6710_Wr MISC_CTRLI 0 lt lt 7 0 lt lt 4 3 G lt 2 1 lt 1 3 3V m Um PD6710 Wr MISC CTRL2 Ox1 1 lt 4 Driver LED PD6710 Wr FIFO CTRL 0x80 FIFO 300ns w Timing Set 0 PD6710 Wr SETUP TIMINGO 0x2 80ns PD6710 Wr CMD TIMINGO 0x8 320ns PD6710 Wr RECOVERY_TIMINGO 0x2 80ns eturn 1 skokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokqkokokokqkokokokqkokakokqkokak kkhok void PD6710 Modify U8 index U8 mask U8 data JJ fe 2 stokekelokolelololelotoleletoleletoleletololetotolelotoleletoleletololetololelotoleletoleletoleletolelelotolelotoleletoleletoleletojolelotoleletoleletoleletojoletojololok void PD6710 Modify U8 index U8 mask U8 data rPD6710 INDEX index rPD6710 DATA rPD6710 DATA amp mask data elekeleteteleletoteteletoteteleleteteteletoteteleleteteteleteteteletoteteteletetelelete SRK A AE AK e AE e I I ee RAK kK
221. nit yaffs fs ttyS00 at I O 0x50000000 irq 52 is a S3C2410 ttyS0l at I O 0x50004000 irq 55 is a S3C2410 yaffs H init yaffs fs p defined CONFIG_YAFFS_MTD_ENABLED register yaffs filesystem TInitialisation n oc filesystems yaffs CONFIG_YAFFS_MTD_ENABLED yaffs_config h devfs v1 10 20020120 Richard Gooch rgooch atnf csiro au devfs boot options Oxl init YabPbs EE register filesystelh i Rex ttyS00 at 1 0 0x50000000 irq 52 is a S3C2410 ttyS0l at I O 0x50004000 irq 55 is a S3C2410 cat proc filesystems nodev rootfs nodev bdev nodev proc nodev sockfs nodev tmpfs nodev shm nodev pipefs cramfs nodev ramfs vfat nodev devfs nodev nfs nodev autofs nodev devpts yaffs 3 4 4 CONFIG YAFFS MTD ENABLED
222. oid Sigfunc int signal Sigfunc signal int signo Sigfunc func D 2 2 define SIG HARDRESET 34 typedef void Sigfunc int Sigfunc signal int signo Sigfunc func struct sigaction act oact act sa_handler func gemptyset amp act sa_mask pem S act sa_flags 0 if signo SIGALRM ifdef SA INTERRUPT act sa flags SA INTERRUPT endif else ifdef SA_RESTART act sa flags SA RESTART endif if sigaction signo amp act amp oact lt 0 return SIG_ERR return oact sa handler Sigfunc Signal int signo Sigfunc func Sigfunc sigfunc if sigfunc signal signo func SIG ERR perror signal error return sigfunc void sig softreset int signo static pid t pid UserSystem 0 if signo SIG_SOFTRESET if pid UserSystem kill pid UserSystem SIGKILL pid UserSystem 0 printf kill UserSystem n if pid UserSystem fork 0 kill getppid SIG_SOFTRESET T2 return int main int argc char argv int ret pid t pid InputElement pid TimeTick pid IrQueue pid UserSystem Signal SIG SOFTRESET sig softreset
223. okokokokokokokokokokoqkokkokokokok void Test_PD6710 void Uart_Printf PD6710 test for reading pc card CIS W if IPD6710 InitO return if PD6710 Rd INTERFACE STATUS amp Oxc Oxc CD Uart Printf Card is found n Delay 2000 PD6710 CardInit PrintCISO else Uart Printf Card is not found n PD6710 test for reading pc card CIS PD6710 ChipInformationl is d8 ChipInformation2 is 18 PD6710 hardware is found Card is not found ASUS WL 110 CF PD6710 test for reading pc card CIS PD6710 ChipInformationl is d8 ChipInformation2 is 18 PD6710 hardware is found Card is found 3 3V card is detected Card Information Structure cisEnd 0 95 0 3 0 0 ff 17 4 67 5a 8 ff 1d 5 3 67 5a ftd 8 ff 15 2a 5 0 41 53 55 53 0 38 30 32 5f 31 ASUS802_1 31 42 5f 43 46 5f 43 41 52 44 5f 32 35 0 56 65 1B_CF_CARD_25Ve 72 73 69 6f 6e 20 30 31 2e 30 30 aa 2 2 42 f 0 22 0 21 2 0 22 5 2 80 84 le 5 2 c0 d8 a7 0 22 TE PE fie tt ff rE 22 2 D 0 7 5 7 7 6 0 22 2 1 0 22 2 3 1 la 0 ff 20 4 22 5 2 40 2 60 ec 53 22 8 4 6 3 1 e0 3 rsion 01 00 1 f 3373 re JABE a ios uade 0 0 1 1b 10 cl 1 19 77 bb le 35 b5 3c 36 36 r w 5
224. olding buffer read LCR 7 is O 1 Interrupt enable register 2 Interrupt identification reg 2 FIFO Control register 3 Line control register 4 Modem control register 5 Line status register 6 Modem status register 7 Scrathpad Register 0 LCR 7 is 1 1 LCR 7 is 1 7372800 16 1 lt lt 12 USE 4 0 0 0 0 PARAM 4 0x703 0x703 0x703 0x703 sable 9600 no flow no parity stop lbit 8bit int BaudRateTab 16 0x00 0x0180 1200 0x00c0 2400 0x0060 4800 0x0030 9600 0x0020 14400 0x0018 19200 0x000c 38400 0x0008 56000 0x0008 57600 0x0004 115200 0x0002 230400 0x0001 460800 h static const unsigned int pEXT COM BASE ADDR 0x08000080 0x08000088 0x08000090 0x08000098 void vEXT COM BASE ADDR 0x00000000 0x00000000 0x00000000 0x00000000 void vEXT COM INTS ADDR void vEXT COM INTCTL ADDR static DECLARE WAIT QUEUE HEAD rx queueO static DECLARE WAIT QUEUE HEAD rx queuel static DECLARE WAIT QUEUE HEAD rx queue2 static DECLARE WAIT QUEUE HEAD rx queue3 void rx_queue EXT COM NUM struct Queue char buf char rear char front unsigned int num unsigned char emp l empty 0 no empty unsigned char full l full O no full unsigned char usr l usr 0 no usr usr interrupts COMO rx buf COMI rx buf COM2 rx buf COM3 rx buf struct Queue COM rx buf EXT COM NUM static in
225. oot dir rwimage root tar oot root cramfs 2 2 2 yaffs usr tar jxvf usr tar bz2 kyaffsimage usr usr yaffs c XI un Er B nl g yaffs ZE mkyaffsimage convert mkyaffsimage 2 3 yaffs usr dev ztelnet H umount usr usr yaffs RAY tdblock 1 usr tmp yaffs dev mtdblock 1 usr mkyaffs usr yaffs mkyaffs e dev mtd 1 usr yaffs mkyaffs dev mtd 1 usr yaffs NAND Flash OK mount t yaffs dev mtdblock l usr 1s usr df h Filesystem Size dev bon 2 2 8M tmpfs 0 6M dev mtdblock 1 61 OM cd usr mkdir ccn cp tmp mkyaffs ccn Hcp tmp usr yaffs ccn Is mkyaffs usr yaffs df h Filesyst
226. open dev PGM 10 0 fd 3 gt printk printk IO write funce n printk KERN INFO IO write funce n 2 16C554 2 1 define THR 0 Offset to Transmit hld reg write LCR 7 0 define RBR 0 Receiver holding buffer read LCR 7 0 define IER 1 Interrupt enable register define ISR 2 Interrupt identification reg define FCR 2 FIFO Control registe define LCR 3 Line control registe define CR 4 Modem control register define LSR 5 Line status register define SR 6 Modem status register amp define DLL 0 LCR 7 1 define DL 1 LCR 7 1 define SR 7 Scrathpad Register define EXT COM COUNT 4 define EXT COM BASE ADDR 0x08000080 define rEXTUART INT SOURCE volatile unsigned char 0x080000d8 7 E void Set554Int unsigned char operation CPLD 16C554 CPU 2 operation 1 0 ROKK OK KOK KOK KOK KK KOK KOK eee eee eee eee
227. p h void sig chld int signo pid_t pid int stat while pid waitpid 1 amp stat WNOHANG gt 0 printf child d terminated Wn pid return shutdown close 1 gt close 0 H shutdown BEZEI pid int statloc int options int getpeername int sockfd struct sockaddr peeraddr socklen t addrlen statloc WNOHANG nt getsockname int sockfd struct sockaddr localaddr socklen t addrlen 1 TCP 2 gt close shutdown TCP 0 include lt sys socket h gt int shutdown int sockfd int howto 1 SHUT RD howto
228. r BaudRate amp Ox00ff pBaseAddr LCR COMFormat amp 0x80 T pBaseAddr MCR O for i 0 i lt 8 i val pBaseAddr i pBaseAddr FCR 0 disable FIFO pBaseAddr IER 0 BEATA EBT pBaseAddr IER 0x01 few r BT pBaseAddr MCR 0x08 if rINTMSK amp BIT_EINT1 ClearPending BIT_EINT1 rINTMSK amp BIT_EINT1 Set554Int 1 RARER AS IO A IO A ORI OR OK OR OE ROR EK OR IK ROR OK OR IKK OE OK OR OK ROR OE OK OR OK RR OE OK ROE RR OK void _irq ExtUart_Int void Jj B 160554 Hu H D r EAS Ab kokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokok k void _ irq ExtU unsigned c unsigned c int i volatile u art_Int void har Port rEXTUART INT SOURCE har lsr val 0
229. ram set xmodem initial timeout 5000000 5000000 means 5 second because a unit is Hs param save 3 1 2 4 kernel image vivi kernel image vivi2load flash kernel x zImage 3 1 2 5 F root filesystem image vivi root filesystem root cramfs Vivi gt load flash root x Vivi gt boot pup T E Linux shell 3 2 image image imagewrite SE br xmodem GUI image cd linuette target box image cp imagewrite image 3 2 1 ztelnet ztelnet redhat9 telnet
230. register filesystem Step 2 E Zx NAND device add mtd partitions drivers mtd nand smc_s3c2410 c Xf mtd Ml Hae B anufacture ID Oxec Chip ID 0x76 Sa ro au smc_s3c2410_init O sung K9D1208VOM Creating 2 MTD partitions on Samsung K9D1208VOM 0x00000000 0x04000000 hon 0x00300000 0x03ffc000 mtd Step 3 mount t ya yaffs internal read super O ste mount t yaff yaffs internal yaffs Attempti s dev mtdbloc read_super ng MTD mount o k 1 usr n 31 1 1f 01 Step 4 mtd yaffs AND Flash Y ffs dev mtdblock l usr P T yaffs fs c Xf NAND yaffs fs c F 4 Yaffs 4 1 yaffs root yaffs usr
231. rm rf led inc 0 leds inc ztelnet tmp 4 LED 2 4 3 leds inc root sbin H gt lt root linuxrc leds inc cp leds inc linuette target box root sbin cd linuette target box root vi linuxrc exec bin sh sbin leds inc echo sbin leds inc image cd amp mkcramfs root root cramfs 3 Linux IRQ
232. rwx 10 0 20 Dec 4 2030 bin gt usr linuette bin config lib gt usr linuette lib locale gt usr linuette locale drwxr xr x 10 0 0 Mar 21 04 51 drwxr xr x 10 0 0 Dec 20 12 12 proc qt usr at sbin sbin init bin busybox tmp var etc tmp var usr H3 amp root root_english usr ls usr bin etc lib linuette qt sample sbin HEH bin etc lib qt sbin usr sample share start usr root english ff usr sample f jpe MAAN mpg mp3 usr linuette bi opt root_englis linuette usr linuette etc linuette mnt etc linuette linuette us bi HERES um m wince S En dE n config lib locale share start root english usr linuette H bin li
233. s 0x17 0x04 cs read cis cs Oxld 0x05 cs read cis cs 0x15 0x2a cs read cis cs 0x20 0x04 cs read cis cs Oxaa 0x02 cs read_cis cs 0x21 0x02 cs read_cis cs 0x22 0x02 cs read cis cs 0x22 0x05 cs read cis cs 0x22 0x05 cs read cis cs 0x22 0x05 cs read cis cs 0x22 0x05 cs read cis cs 0x22 0x02 cs read cis cs 0x22 0x08 cs read cis cs 0x22 0x02 cs read cis cs Oxla 0x07 cs read cis cs Oxlb 0x10 cs read_cis cs Oxff Oxff cs read_cis e e e e e e e e e e e e e e Ox3c ls 0x00 1 0x00 0 0x00 0x00 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ls 0x00 0 cs 0x00 0x00 0x00 ds ioctl socket 0 ds_ioctl socket 0 0xc2946406 Oxbffff934 0x0 2 0x07 0x5 2 0x00 Oxb 2 0x00 0x12 2 0x00 Ox3e 2 0x00 0x40 4 0x00 0x44 2 0x00 0x48 2 0x00 Ox4c 2 0x00 0x53 2 0x00 Ox5a 2 0x00 0x61 2 0x00 0x68 2 0x00 Ox6c 2 0x00 0x76 2 0x00 Ox7a 2 0x00 0x83 2 0x00 0x95 2 0x00 0x0 5 0x00 0xc0206404 Oxbffff934 cs read cis mem 1 0x46 2 cs 0x06 0x00 Oxff Oxff ds ioctl socket 0 0xc2946407 Oxbffff934 0xc0206404 Oxbffff934 0xc2946406 Oxbffff934 0xc2946407 Oxbffff9
234. sed Available Use Mounted on df proc mounts No such file or directory ls proc ztelnet root localhost root dir amp ztelnet 192 168 1 7 Trying 192 168 1 7 telnet Unable to connect to remote host Connection refused vivi kernel command line Linuxrc Kernel command line console ttyS0 root dev bon 2 vivi vivi param set linux cmd line noinitrd root dev bon 2 init linuxrc console ttyS0 Kernel command line noinitrd root dev bon 2 init linuxrc console ttyS0 yaffs vivi 3 4 9 yaffs mount t yaffs dev mtdblock 1 usr yaffs Attempting MTD mount on 31 1 if 01 mout Mounting dev mtdblock 1 on usr failed Not a directory mkyaffsimage yaffs convert PC Lroot localhost root _dir mkyaffsimage root english root english yaffs convert
235. sscanf argv 2 x amp PWM Counter 1 cmd gt 1 if arge l 3 sscanf argv 1 x amp cmd l 1 fprintf stderr Usage BUZZ test 1 0 Counter n exit 1 fd open dev PGM_BUZZ 0 if fd lt 0 perror open device DON BUZZ exit 1 if ret ioctl fd cmd PWM Counter lt 0 perror ioctl close fd return 0 3 1 gt Proc interrupts cat proc interrupts PGM_BUZZ IRQ_TIMER2 open release open ioct close cat 1 ZH request O request set_external_irq set external irq iX GPIO TIMERS TCON TCON 4 AUTO TCON 4 UPDATE COUNT 4
236. t if connfd gt maxfd maxfd connfd if i gt maxi maxi i else printf too many clients close connfd drop if nready lt 0 continue if FD ISSET g Variant qid SoftwareTP amp rset if msgqlen msgrcv g Variant qid SoftwareTP amp pmsg 256 type out IPC_NOWAIT gt 0 for i 0 i lt maxi i if clientfd i gt 0 printf msgqlen d SoftwareTP out d n msgqlen type out writen clientfd i pmsg buf pmsg Length if nready lt 0 continue for i 0 i lt maxi i if clientfdli lt 0 continue j if FD ISSET c if Commun ientfd i amp rset ication SoftwareTP clientfd i 10006 0 printf client d had quit out n i close clientfdli FD CLR clientfd i amp allset clientfd i 1 if nready lt 0 break if i maxi for G i gt 0 i if clientfd i gt 0 break maxi i windows PC ping WENS PC 3 li o Linux
237. t 13 3 lt lt 11 7 lt 8 A lt 6 0 lt 4 3 lt 2 0 I skokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokok void Test RW Reg void datasheet default DPI AISI OSI OOO OSI ORS OE AI OR OER OOK ROK ROR I OK OR OK OR I OK OR OR OE OK OR KOR I OK OR OK ROOK OIE volatile unsigned char testval 15 void Test RW Reg void unsigned char i volatile unsigned char pBaseAddr volatile unsigned char 0x08000080 Reset554 for i 0 i lt 8 i Delay 1 testvalli pBaseAddr i pBaseAddr LCR 0x80 testval 3 pBaseAddr LCR testval 8 pBaseAddr DLL pBaseAddr DLM testval 9 pBaseAddr LCR OxBF testval 3 pBaseAddr LCR testval 10 pBaseAddr 2 testval 11 pBaseAddr 4 testval 12 pBaseAddr 5 testval 13 pBaseAddr 6 testval 14 pBaseAddr 7 2 2 I kokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokkokokokokokokokok void Test Send Rec void
238. t Init Queue struct Queue pQueue printk 1 Init Queue x n pQueue pQueue gt emp 1 pQueue gt full 0 BUFSIZE pQueue buf kmalloc sizeof pQueue gt buf pQueue gt num GFP KERNEL if pQueue buf printk lt 1 gt kmalloc faill w return ENOMEM pQueue gt num else pQueue gt front pQueue 2 gt rear pQueue gt buf pQueue gt num 1 point last printk lt 1 gt pQueue gt rear x n pQueue gt rear return 0 void Reset554 void set gpio ctrl EXT COM RST GPIO PULLUP EN GPIO MODE OUT write gpio bit EXT COM RST 1 udelay 10 write gpio bit EXT COM RST 0 void Seriallnit const void vEXT COM BASE ADDR const unsigned int PARAM unsigned short BaudRate BaudRateTab PARAM gt gt 8 amp 0xf 9600 unsigned char COMFormat PARAM amp Ox3f no parity stop 1 bit data 8 bit volatile unsigned char val unsigned char i writeb 0x80 vEXT COM BASE ADDR LCR set baudrate writeb BaudRate gt gt 8 amp Ox00ff vEXT COM BASE ADDR DLM writeb BaudRate amp Ox00ff vEXT COM BASE ADDR DLL writeb COMFormat amp 0x80 vEXT COM BASE ADDR LCR wmb for G O i lt 8 i tt readb vEXT COM BASE ADDR i flash state register flags rmb writeb Oxc7 vEXT COM BASE ADDR FCR enable FIFO RX FIFO trigger level is 14 byte FIFO reset writeb 0x01 vEXT COM BASE ADDR IER only enable rx in
239. t lib libqte so undefined reference to sin x86 qtopia qt lib libqte so undefined reference to cxa pure virtual x86 qtopia qt lib libqte so undefined reference to pow x86 qtopia qt lib libqte so undefined reference to operator delete void x86 qtopia qt lib libqte so undefined reference to operator new unsigned collect2 ld returned 1 exit status make hello Error 1 Makefile LINK gt ge JE o tmake lib qws linux generic gt tmake conf vi TMAKEPATH tmake conf 4 TMAKE LINK gcc TMAKE LINK SHLIB gcc TMAKE LINK g TMAKE LINK SHLIB g tmake o Makefile hello pro Makefile LINK g make hello qws 2 1 4 qtopia qtopia QTE cd QPEDIR src configure platform linux generic g qvfb ay T make cd bin qpe YE qvfb 2 1 5 qtopia hello qtopia bin Hello png qtopia pics H3 amp F qtopia apps Applications hello desktop Desktop Entry
240. t signo if timer_count 100 0 time_t t time NULL printf 9 d prompt info called timer count printf current time s ctime amp t gettimeofday amp tpend NULL timeuse 1000000 tpend tv sec tpstart tv sec tpend tv usec tpstart tv_usec timeuse 1000000 intf Used Time fn timeuse void init _sigaction void struct sigaction act act sa handler prompt info act sa flags 0 sigemptyset amp act sa mask act sa mask sigaction SIGALRM amp act NULL SIGALRM gettimeofday amp tpstart NULL void init time void struct itimerval val val it value tv sec 0 val it value tv usec 10000 val it interval val it value setitimer ITIMER REAL amp val NULL SIGALRM int main void printf clock tick frequency is d n HZ init sigaction init time printf clock tick freq
241. ta f w id Oxlf 1 4 2 MFI SUP role 0x00 id 0x01 var 0x01 b t 1 1 CFI SUP role 0x00 id 0x02 var 0x02 b t 1 1 PRI SUP role 0x00 id 0x03 var 0x01 b t 4 4 STA SUP role 0x00 id 0x04 var 0x01 b t 1 9 PRI CFI ACT role 0x01 id 0x02 var 0x02 b t 1 1 STA CFI ACT role 0x01 id 0x02 var 0x02 b t 1 1 STA MFI ACT role 0x01 id 0x01 var 0x01 b t 1 1 Prism2 card SN 45460871 x00 x00 x00 x00 message lnxreq ifstate ifstate enable resultcode success message dotllreq start ssid linux wlan bsstype independent beaconperiod 100 dtimperiod 3 cfpperiod 3 cfpmaxduration 100 fhdwelltime no value fhhopset no value fhhoppattern no value dschannel 6 ibssatimwindow no value probedelay 100 cfpollable false cfpollreq false basicratel 2 basicrate2 4 basicrate3 no value basicrate4 no value basicrateb no value basicrate6 no value basicrate7 no value basicrate8 no value operationalratel 2 operationalrate2 4 operationalrate3 11 operationalrate4 22 operationalrate5 no_value operationalrate6 no_value operationalrate7 no_value operationalrate8 no_value resultcode success linkstatus CONNECTED cardmgr vi root mnt etc init d rcS bin sh bin mount a sbin insmod lib modules 2 4 18 rmk
242. tenfd connfd socklen_t clilen pid t childpid if listenfd socket AF_INET SOCK STREAM IPPROTO TCP lt 0 perror call to socket exit 1 bzero amp servaddr sizeof servaddr 0 servaddr sin family AF_INET IPv4 servaddr sin_addr s_addr INADDR ANY servaddr sin port htons SERV PORT Fi 28 iin E if bind listenfd struct sockaddr amp servaddr sizeof servaddr lt 0 perror call to bind exit 1 if listen listenfd 20 lt 0 perror call to listen exit 1 printf Accepting connections n Signal SIGCHLD sig chld InitCommand while 1 clilen sizeof cliaddr if connfd accept listenfd struct sockaddr amp cliaddr amp clilen lt 0 if errno EINTR continue writen Heh BOY EM else perror call to accept exit 1 if childpid fork close listenfd Communication connfd exit 0 close connfd 3 0
243. terrupt if PARAM amp EXT_COM_INTBit writeb 0x08 vEXT COM BASE ADDR MCR eable interrupts else writeb 0x0 vEXT COM BASE ADDR MCR disable interrupts wmb static void uart irq handle int irq void dev id struct pt regs regs volatile unsigned char lsr isr unsigned char port readb vEXT COM INTS ADDR unsigned char n struct Queue qCOM rx buf int inc 0 for n 0 n lt EXT COM NUM n if EXT COM USE n continue if port gt gt n amp 0x01 amp amp qCOM rx buf COM_rx_buf n printk lt 1 gt COM rx buf d x n n COM rx buf n isr readb vEXT COM BASE ADDR n ISR if isr amp 0x01 amp amp isr amp 0x04 while qCOM rx buf full amp amp lsr readb vEXT COM BASE ADDR n LSR amp 0x0D recive data ready read later is clear if qCOM rx buf gt rear qCOM rx buf gt buf qCOM rx buf gt num qCOM rx buf rear qCOM rx buf 5buf if qCOM rx buf gt rear qCOM rx buf gt front qCOM rx buf full 1 qCOM_rx_buf gt rear readb vEXT COM BASE ADDR n RBR rmb inc if inc qCOM rx buf emp 0 wake up interruptible rx queue n static ssize t uart read struct file filp char buf size t count loff t f pos unsigned long flag char rx buf BUFSIZE size t rx buf count 0 unsigned int i struct inode inode filp gt private data struct Queue qCOM rx buf C
244. tils RedHat 9 wor glibc kernheaders glibc co mizi ftp SDK Pr SCH MIZI Linux SDK for S3C2410 F LED Ka BO X linux kstation mon glibc glibc devel patch binutils 1 2 MIZI Linux SDK Software Development Kit for S3C2410 ya FEM 1 kdi cd tar cvf linue cd linuette tar xvf linuet Dm rf linuet cp MIZI linuette nt cdrom REH ount dev cdrom mnt cdrom Ler tar Ler tar izi ftp tter linuetter tar linuette
245. ttribute dotllWEPDefaultKeyID 3 mibattribute dot11WEPDefaul tKey3 12 34 56 78 9A tmask 255 255 255 0 broadcast 192 168 1 255 route add default gw 192 168 1 11 32 PRA RSE EVE IS WA HP PD6710 ADSI 2 PD6710 hardware is found H card is de PD6710 PCMCIA EA E Card is found 3 3V tected CIS inclu inclu F def pis def defi defi defin defi defi defi defin defi defi defi defi defi defi defi defin de 2410ADDR h de def h e CF IO BASE e rPD6710 INDEX e rPD6710 DATA e CHIP INFO e POWER CTRL e INT GENERAL CTRL e MANAGEMENT INT CONFIG e SYS MEM MAPO START L e SYS MEM MAPO START H e SYS MEM MAPO END L e SYS MEM MAPO END H e CARD MEM MAPO OFFSET L e CARD MEM MAPO OFFSET H e MAPPING ENABLE e MISC CTRLI e MISC CTRL2 e FIFO CTRL ie 0x11000000 Gk volatile
246. uency is d n HZ while 1 exit 0 ik Tt Linux uClinux uClinux uClinux MMU linux Linux Linux kernel arch arm mach s3c2410 generic c kernel include asm arm arch s3c2410 Hardware ho generic c static struct map desc standard io desc initdata D virtual physical length domain r w c b Oxe8000000 0x48000000 0x17000000 DOMAIN I0 0 1 0 0 LAST_DESC void init s
247. und 0 int up int flags for i 0 i lt sizeof key info tab sizeof key info tab 1 i k key_info_tab i if k gt irq no irq found 1 break if found printk bad irq d in buttonWn irq return save flags flags cli set gpio mode user k 2 gt gpio port GPIO MODE IN up read gpio bit k gpio port set external irq k irq no EXT BOTH EDGES GPIO PULLUP DIS restore flags flags if up key value k gt key_no 0x80 else key value k gt key_no ready 1 wake up interruptible amp buttons wait buttons wait static int request _irqs void struct key info k int i for i 0 i lt sizeof key info tab sizeof key info tab 1 i k key info tab i set external irq k irq no EXT BOTH EDGES GPIO PULLUP DIS if request irq k irq no amp buttons irq SA INTERRUPT DEVICE NAME amp buttons irq 0 return 1 return 0 static void free irqs void struct key_info k int i for i 0 i lt sizeof key info tab sizeof key info tab 1 i k key info tab i
248. utojoin ssid lt SSID gt authtype Type Type opensystem sharedkey 5 gt Set Channel wlanctl ng wlan0 dotllreq mibset mibattribute p2CnfOwnChannel Value The Value should be in the range 1 14 6 gt Set RTSThreshold wlanctl ng wlan0 dotllreq mibset mibattribute dot11RTSThreshold Value The Value should be in the range 072347 7 gt Set FragmentThreshold wlanctl ng wlan0 dotllreq mibset mibattribute dotllFragmentThreshold Value The Value should be in the range 256 2346 8 Set SSID wlanctl ng wlan0 dotllreq mibset mibattribute p2CnfOwnSSID lt your ssid gt 9 Set WEP Key wlanctl ng wlan0 dotllreq mibset mibattribute dotllWEPDefaultKeyID KeyIndex wlanctl ng wlan0 dotllreq mibset mibattribute dotllExcludeUnencrypted true wlanctl ng wlan0 dotllreq mibset mibattribute dotllPrivacyInvoked true wlanctl ng wlan0 dotllreq mibset mibattribute dotllWEPDefaultKeyXKeyIndex xx xx xx KeyIndex should be in the range of 073 XX XX XX is the WEP key xx is in the hexdecimal format If you want to use WEP 64 5 hexdecimal values are expected 13 hexdecimal values are expected when using WEP 128 The four commands listed above are the basic commands you have to issue when enabling WEP and setting WEP key One can set four WEP keys If you want to set four keys at the same time you can repeat the last command with changing the KeyIndex After setting the WE
249. v 2 2 LED 2 2 1 1 LED include lt stdio h gt include lt stdlib h gt include lt unistd h gt Hinclude lt sys ioctl h gt int main int argc char argv int on int led_no int fd if argc 3 sscanf argv 1 d amp led no 1 sscanf argv 2 d Boni 1 on lt 0 on gt 1 led no lt 0 led no gt 3 fprintf stderr Usage leds led no 1 0 n exit 1 fd open dev leds 0 if fd lt 0 perror open device leds exit 1 ioctl fd on led no close fd return 0 2 3 2 2 2 Makefile CROSS opt host armv41 bin armv41 unknown linux all leds leds CROSS gcc o led test leds c clean rm rf led test 0 2 2 3 LED ZS K leds test 8 leds test 8 leds test 8 leds test 8 leds test 8 leds test leds test leds test 0 wn ra O Cc N e 1 1 1 1 0 0 0 0 2 3 1 cd linuette target box kernel vi drivers char Config in if CONFIG ARCH S3C2410 trista Le fi TT make menuconfig
250. v mtdblock l usr yaffs dev is 7937 name is 1f 01 mkdir usr ccn 1s usr ccn lost found df h Filesystem Size dev bon 2 2 7M tmpfs 30 6M fs Config in YAFFS Makefile then CONFIG_YAFFS_FS K gt F yaffs fs o yaffs guts o yaffs mtdif o yaffs ecc o uml EE Used Available UseMounted on 0 100 2 7M 0 30 6M 0 dev shm 3 dev mtdblock 1 61 OM 100 0k 60 9M 0 usr 4 3 4 1 ane partitions MTD NAND device Manufacture ID Oxec Chip ID 0x76 Samsung K9D1208VOM bon0 00000000 00030000 00030000 00000000 bonl 00030000 00100000 00040000 00000000 bon2 00100000 00300000 00200000 00000000 bon3 00300000 03ffc000 03cfc000 00000001 1s dev mtd 0 Oro 1s dev mtdblock 0 Hcat proc mtd dev size erasesize name mtd0 04000000 00004000 Samsung K9D1208V0M sme_partitions E CONFIG MTD SMC S3C2410 SMDK PARTITION HEXA MEZ EAR F undef CONFIG MTD SMC S3C2410 SMDK PARTITION define CONFIG MTD SMC S3C2410 SMDK PARTITION
251. x Enter BE kernel E vga 791 fb on Enter b fb on fb on vga 791 3 2 Target qtopia free src 2 2 0 tar gz h Jj mE e2fsprogs 1 35 tar gz jpegsrc v6b tar gz libpng l 2 14 tar bz2 3 2 1 1 gt Host uic mkdir arm qtopia2 2 0 tar zxvf qtopia free src 2 2 0 tar gz C arm qtopia2 2 0 cd arm qtopia2 2 0 qtopia free 2 2 0 cp x86 qtopia2 2 0 qtopia free 2 2 0 qt2 bin uic qt2 bin 2 cd tar zxvf qt tools e2fsprogs 1 35 tar gz tar zxvf qt tools jpegsrc v6b tar gz tar jxvf qt tools libpng l 2 14 tar bz2 mv e2fsprogs 1 35 e2fs mv jpeg 6b jpeg mv libpng 1 2 14

Download Pdf Manuals

image

Related Search

Related Contents

        intersil HS-3530RH handbook            

Copyright © All rights reserved.
DMCA: DMCA_mwitty#outlook.com.