embedded 1

187
Overview of Imbedded System Imbedded system : computer system fixed for only a specific purpose differen t to general PC, but it is operated under simple OS environment such as imbe dded LINUX, or imbedded RTOS. It is small and compact type micro-controller operating with OS since the many functions such as multimedia contents, netw ork, various I/O drivers are needed within one micro-controller. LINUX host PC and target imbedded system (ARM family processor Xscale PXA25 5) ARM chip is very popular in imbedded system because it is RISC type processo r Hyper-terminal function (minicom exec-file on LINUX) to show communication between host and target - thru serial port - initial display by boot-loader of target system Boot-loader : it is similar to Monitor program. - this program code is located at Xscale start address. - initialize all of peripheral chips. - load Kernel from Flash to the RAM. - Provides several commands.

Upload: his2000x

Post on 13-Nov-2014

626 views

Category:

Documents


10 download

TRANSCRIPT

Overview of Imbedded System Imbedded system : computer system fixed for only a specific purpose different to general PC, but it is operated under simple OS environment such as imbedded LINUX, or imbedded RTOS. It is small and compact type micro-controller operating with OS since the many functions such as multimedia contents, network, various I/O drivers are needed within one micro-controller. LINUX host PC and target imbedded system (ARM family processor Xscale PXA255) ARM chip is very popular in imbedded system because it is RISC type processor Hyper-terminal function (minicom exec-file on LINUX) to show communication between host and target - thru serial port - initial display by boot-loader of target system

Boot-loader : it is similar to Monitor program. - this program code is located at Xscale start address. - initialize all of peripheral chips. - load Kernel from Flash to the RAM. - Provides several commands.

Porting Imbedded System (1)Porting the boot-loader of target system (blob) - expand boot-loader compressed file proper to target imbedded system (unique to target H/W) on host PC : tar exec-file is used on LINUX - compile boot-loader source file on host PC : ARM cross c-compiler is used on LINUX ( host PC executes only the executable files compiled by Intel compiler, but target imbedded system operates only the file compiled by ARM compiler.) The compile procedure on LINUX is to configure a make file at first and then use this make file to compile (likely batch file). - Down load the boot loader binary file thru JTAG cable from the parallel port of host PC to JTAG port of the target system. In order to program a device (flash ROM), JTAG exec file is used. - The binary boot-loader is localized into the initial start pointer on Flash memory

Porting the kernel of target system - expand kernel compressed file proper to target imbedded system on host PC. - compile kernel source file on host PC. - Down load kernel binary file (zImage) thru serial cable from the serial port of host PC to serial port of the target system. In order to transfer zImage file to RAM of target system, the blob command download kernel is used on hyper terminal of host PC. On LINUX prompt, the linux command uuencode zImage zImage dev>ttyS0 is used to download zImage file. After finishing download zImage, the zImage must be moved to flash ROM area by using blob command flash kernel, where kernel is predefined location name in bootloader. - Or the blob command tftp zImage kernel is used to transfer zImage file thru ethernet port.

Porting Imbedded System bootloader, kernel, ramdisk, user file system are located in flash ROM When the imbedded system is booted by power-on, boot-loader is accessed at first. Bootloader initializes the all peripheral devices, and transfer kernel, ramdisk, userfile from flash ROM to RAM, and give the control to kernel finally.

Install Linux & Win2000 on Host PC (1) MBR(Master Boot Record), boot manager In order to make a multi-boot system of Win2000 and LINUX, what must be done ? - At booting, MBR is first accessed. As the boot-loaders of OSs are registered in MBR, last installed bootloader will be accessed. - The boot-loader of Win2000 is searched at first. Therefore, Win2000 cannot identify LINUX boot sector. - LILO(Linux Loader), bootsect.lnx must be set on the root directory of Win2000. - In boot.ini file on root directory of Win2000, the boot OSs are described in order to be selected by user.

http://wiki.kldp.org/wiki.php/LinuxdocSgml/LILO for multi-boot http://www.multizine.co.kr/index.php?cat=163 http://hlug.hanyang.ac.kr/~freekgb/html/seminar/lvsp/2-5-_9x_2000__.html http://wowlinux.com/information/freshmanview.html?db=freshman&id=77&view=1

Install Linux & Win2000 on Host PC (2) 13GB primary mater IDE HDD( C: , D:) and 4GB primary slave IDE HDD (E:) 1.3GB HDD consists of 8GB(C: drive) and 4 GB(D: drive) partitions having NTFS and FAT32 file systems, respectively. Partitions of HDD : - capacity = Cylinder > track > sector > bytes : 1024 >255>63>512 - head, cylinder, track, sector, cluster. - primary and extended logic area. - At most, 4 primary areas(C, D, E, F drives) in one physical HDD. - Main boot sector is located in primary drive. - In LINUX, two physical IDE(or SCSI) HDDs are expressed as hda and hdb(or sda and sdb). - hda1 and hda2 are two primary drives in one physical HDD. hda5 and hda6 are logical extended drives.

Install Linux & Win2000 on Host PC (3)Install wowlinux paran v7.1: - Win2000 is installed at C: drive (primary partition 8GB, NTFS), data is at D: drive (extended logic partition 4GB, FAT32). - LINUX is installed at 4GB primary slave HDD, as hdb. - partitioned as hdb1: \ ( primary 2.5GB root directory, ext2 file system) , hdb5 : swap ( extended logic 256MB swap directory), hdb6 : \home (extended logic1.3GB home directory, reiser file system) - At root directory, 554 packages (about 1.3GB) are installed. - LILO is located at boot sector in hdb. bootsect.lnx file must be located in C:\ of Win2000 root directory, and boot.ini file located also in C:\ of Win2000 root directory, must contains the information of LINUX boot sector. - establish root and user login : . /../home/fiberamp - GNOME manager of X-window on LINUX , and LINUX terminal program to use LINUX command.

What is LINUX ? Why is imbedded system ? Ubuntu, CentOS, Debian, Fedora, Sulinux, wow linux , open source X-window, GNOME : navigator, PMP, MP3 player, home automation gateway, XIP(eXecute In Place) . HHD ramdisk . : HP(Host PC) ( ~API, ) TB(Target Board) TB TB .

Getting Fedora 10 Mirror Bit Torrent , Bit Torrent P2P relay . Bit Torrent client . i386 Intel, AMD , x86_64 Intel ATOM 230, Core 2 Duo, Xeon, AMD Athlon 64, Sempron 64, Opteron , ppc Macintosh ppc Live, DVD, CD Live . ISO DVD, CD burning . CD . mirror . arch i386, x86_64, ppc Full distribution on DVD : fedora/linux/releases/10/Fedora/arch/iso/F-10-arch-DVD.iso Live image : fedora/linux/releases/10/Live/arch/iso/F-10-arch-Live.iso, fedora/linux/releases/10/Live/arch/iso/F-10-KDE-arch-Live.iso Minimal CD boot media : fedora/linux/releases/10/Fedora/arch/os/images/boot.iso http://lists.gnupg.org/pipermail/gnupgannounce/2004q4/000184.html. SHA1SUM.EXE CMD ISO Fedora iso CD DVD, USB flash memory roxio easy media creator, nero burning ROM5, Nero express 6, ISO recorder V2 power toy . Fedora http://docs.fedoraproject.org/install-guide/f10/en_US/ www.linux.co.kr , , , . fedoraproject.org, docs.fedoraproject.org, forum.fedoraproject.org

Getting Fedora 10

fedoraproject.org MIRROR http://fedoraproject.org/ko/get-fedora LIVE . http://fedorahosted.org/liveusb-creator liveusb-creator USB live image . USB flash memory FAT VFAT, ext2, ext3 .

Getting Fedora 10 iso sha1sum.exe (hash) sha1sum notepad . MD5 check sum . http://lists.gnupg.org/pipermail/gnupg-announce/2004q4/000184.html sha1sum.exe iso . Sha1sum ftp://ftp.riken.jp/Linux/fedora/releases/10/Fedora/i386/iso/ Fedora-10-i386-DVD.iso (3.4GB ) 4.7GB DVD-R Nero Express 6 burning . burning program ISO9660 ?

Installation multi boot with Linux Druid linux boot, swap, root HDD (OS C:), ( D:, E;) HDD (primary master) win98(C ) (E ) , (primary slave) win95(D ) (F, G ) PC psHDD linux .

(4) win98 fdisk 2 HDD(win 95 D F, G ) . win95 . psHDD linux . (5) PC del( F2) CMOS CD linux CD , , , . (6) psHDD linux . HDD primary HDD IDE1 master, IDE1 slave linux HDD IDE1 slave . . ( Fedora Druid HDD swap PC , boot , root ) http://www.linux.co.kr/ http://www.linux.co.kr/home/lecture/?leccode=10237

Primary master HDD, dev/hda Win98, C: drive, dev/hda1

Primary slave HDD, dev/hdb Win95, D: drive, dev/hdb1 Data, F: drive, dev/hdb2

secondary master CD, dev/hdc data, H: drive, dev/hdc

Data, E: drive, dev/hda2 Data, G: drive, dev/hdb3

secondary slave DVD, dev/hdd data, I: drive, dev/hdd

IDE1 , Primary master HDD, dev/hda Win98, C: drive, dev/hda1 Primary slave HDD, dev/hdb Linux /boot, dev/hdb1 Linux swap, dev/hdb2 Data, E: drive, dev/hda2 Linux /root, dev/hdb3

IDE0

> , secondary master CD, dev/cdrom

secondary slave DVD, dev/?

IDE1

IDE0

Installation multi boot with Linux1) LILO GRUB LILO . LILO installation . . On C: . Create a boot disk . On partition /boot ON C: 1 ( 98 ) (MBR) LILO .( 98 . ) 98 . ( 98 fdisk /mbr ) Create a boot disk . .( 98 ) lilo.conf 98 . 98 1 MBR 98 . 4) 5) 6) Primary ethernet (eth0) IP, subnet mask, gateway , , ( TB LAN ) . root . . LILO linux drive A: floppy disk floppy linux boot loader . X window . root . X window (ctl+alt+F2) linux text command root prompt . shutdown r now .

7)

Installation multi boot with Linux1) 2) BIOS del( F2) CMOS CD C win98 . CMOS C A drive A linux X-window . etc/lilo.conf vi BIOS win98 linux linux win98 linux .etc/lilo.conf

/etc/fstab/dev/hdb1 /dev/hdb2 /dev/hdb3 proc devpts /dev/cdrom /dev/fd0 /dev/hda1 /boot swap / /proc /dev/pts /cdrom /floppy /windows ext2 swap ext2 proc devpts iso9660 auto auto defaults 1 1 defaults 0 1 defaults 1 2 defaults 0 0 defaults 0 0 ro,noauto,user 0 0 noauto,user 0 0 noauto,user 0 0

boot = /dev/hdb1 -> boot = /dev/hda1 vga = normal read-only prompt timeout = 30 image = /boot/vmlinuz label = linux root = /dev/hdb3 image = /boot/vmlinuz.suse label = suse root = /dev/hdb3

other = /dev/hda1 Label = dos Table = /dev/hda

Manual partition by using Druid HDD hda, hdb, hdc sda, sdb . dos EIDE primary master, promary slave, secondary master, secondary slave primary IDE1, secondary IDE0 . EIDE primary, secondary master/slave , primary HDD master, slave jumper secondary CD, DVD drive . HDD OS . primary master hda root, swap, boot hda1, hda2, hda3 . primary slave hdb hdb1, hdb2, hdb3 Druid linux root, swap , . Swap PC HDD HDD HDD ( ) swapping . 1GB swap 2GB 1GB .

www.linux.co.kr http://www.linux.co.kr/home/lecture/index.php?cateNo=1&secNo=27&theNo=&leccode=10915

Manual partition by using Druid(1) / root . ) ext2, ext3, physical volum (LVM), software RAID, swap, vfat MB ) -. -. (MB) -. / ext3 [*]sda 1000MB(1GB) [*]

(MB)

(primery)

root swap

Manual partition by using Druid

(2) swap . (3) root

) ext2, ext3, physical volum (LVM), software RAID, swap, vfat MB ) -. -. (MB) -. swap

[*]sda

(MB)

258MB [*]

(primery)

LVM(Logical Volume Management)

LVM ( , C: D: drive) . . LVM : . LVM RAID . RAID . RAID . LVM RAID . RAID , LVM . GOOGLE lvm http://blog.naver.com/absolaxis/100065099808

http://coffeenix.net/data_repository/htm/01-05-4.htm

LVM(Logical Volume Management)

LVM /dev/sda6, /dev/sda7, /dev/sda8 3 , 60M, 60M, 80M . LV . mkfs t ext3 /dev/sda3 sda3 ext3 mount -t ext3 /dev/sda3 /mnt/backup /mnt/backup sda3 ( ) unmount . fdisk window .

dev/sda6(60MB) dev/sda7(60MB) dev/sda7(80MB) fdisk -t

sda6 sda7 sda8 PV

sda6 PV0 VG0 sda7 PV1 sda8 PV2 VG sda8 PV2 sda8 PV2 LV LV0

1. fdisk /dev/sda6(60MB) /dev/sda7(60MB), /dev/sda8(80MB) LVM .[root@localhost ~]# fdisk /dev/sda Command (m for help): m Command action Command (m for help): p a toggle a bootable flag b edit bsd disklabel Disk /dev/sda: 60.0 GB, 60011642880 bytes c toggle the dos compatibility flag 255 heads, 63 sectors/track, 7296 cylinders d delete a partition Units = cylinders of 16065 * 512 = 8225280 bytes l list known partition types m print this menu Device Boot Start End Blocks Id System n add a new partition /dev/sda1 * 1 2549 20474811 7 HPFS/NTFS o create a new empty DOS/dev/sda2 partition table 2550 5099 20482875 7 HPFS/NTFS p print the partition table /dev/sda3 5100 7139 16386300 83 Linux q quit without saving changes /dev/sda4 7140 7296 1261102+ f W95 Ext'd (LBA) s create a new empty Sun disklabel /dev/sda5 7140 7270 1052226 82 Linux swap / Solaris t change a partition's system id /dev/sda6 7271 7278 64228+ 83 Linux u change display/entry units /dev/sda7 7279 7286 64228+ 83 Linux v verify the partition table /dev/sda8 7287 7296 80293+ 83 Linux w write table to disk and exit Command (m for help): l x extra functionality (experts only) 0 1 2 3 4 5 6 7 8 9 a b Empty 1e Hidden W95 FAT1 80 Old Minix be Solaris boot FAT12 24 NEC DOS 81 Minix / old Lin bf Solaris XENIX root 39 Plan 9 82 Linux swap / So c1 DRDOS/sec (FATXENIX usr 3c PartitionMagic 83 Linux c4 DRDOS/sec (FATFAT16 LV0(17024MB, /, ext3), LV1(1984MB, ,swap) 9, , , 2007

Installation Fedora9 for multi boot with Linux sda2, sda3 /boot 200MB , ext3 sda2 . LVM PV sda3 . LVM sda3 PV VG0 LV0 /(root) 17000MB , ext3 LV0 NA swap LV1(2016MB) . VG0 /root, swap S/W /usr( , 12GB), /home( , 5GB), /var, /tmp LV . VG0>LV0(/root), LV1(swap), LV2(/usr), LV3(/home), LV4(/var), LV5(/tmp) . LVM sda3(/root), sda4(swap), , sda8(/tmp) . /root fdisk mkfs . HDD, primary master, /dev/sda dev/sda1(20GB) Win XP dev/sda3(18800MB) PV0 VG0 dev/sda2(200MB), /boot, ext3 LV0, /root, ext3 LV1, , swap CDROM, primary slave, /dev/cdrom

Installation Fedora9 for multi boot with Linux

/dev/sda ( HDD MBR, master boot record) , first sector of bootpartition /dev/sda2 ?

Fedora Other Fedora /dev/VolGroup00/LogVol00 : root directory Other /dev/sda1 Fedora . GRUB Fedora . MBR DOS dos fdisk MBR .

, , . Fedora Additional Fedora Software repository URL . Fedora repository URL file:// /mnt/source , , . (GNOME, KDE, ), (JAVA, C), (FTP, DNS, , ), ( , , , cdrom xcdroast ), (X , in-choose ), ( )

Installation Fedora9 for multi boot with Linux

4 CD CD1 . 1166 CD1 1~373 , CD2 374~923 , CD3 924~1149

CD4 . GRUB Fedora (2.6.25-14.fc9.i686), Other .

Fedora , ( userid: fiberamp,name: Kim Iksang, PWD), NIS . ). 0.fedora.pool.ntp.org, 1.fedora.pool.ntp.org, 2.fedora.pool.ntp.org

NTP(Network Time Protocol) ( . UUID : 753a0829-4632-4dbf-8762bc844132191d, kernel version : 2.6.25-14.fc9.i686

Understanding the Linux kernel

, , , , , , , , , , , API, , , , , , ,

, , , , , , 2001

Overview of Operating System (1) (tasks) , SERVICE, ( ) hardware .

-

: (load) , I/O , I/O

(tasks) : OS . I/O . . (multiple-program system) .

: (1) , , (2) , OS (paging) .

Overview of Operating System (2)

Scheduling of Processes (1) scheduling of multi-task, job, process interactive processing ( ) / batch processing ( ) scheduling : short term medium term long term

-

(short-term) (queue) . (swap-out condition) , (mid-term scheduler) . (long-term scheduler) (degree of multiprogramming) .

-

New : , . ready . Ready : , . Running : . Waiting : I/O . Halted : , .

Scheduling of Processes (2)

PCB (Process Control Block) :

-

(Identifier) : . (State) : (new, ready ). (Priority) : . (Program Counter) : (Memory Pointer) : , . context data : , IO status information : I/O accounting information :

-

A (I/O ) (service call) . A . A . . , A . A (event) . , (privileged instruction) (time-out) . . A . I/O .

- - PCB

- : round robin, priority algorithm - : I/O I/O , timer I/O I/O .

- PCB -

Scheduling of Processes (3)

I/O , I/O . , ready .

I/O ready I/O .

Memory Management (1) - Partitioning I/O (fragmented) . shift .(compaction)

I/O 2 swap-out process4 swap-in . .

1 I/O swap-out 2 swap-in .

Memory Management (2) PagingJmp offset address Jmp offset address

(compaction) .

shift

shift base (offset) . partition (frame) (page) . page table page frame . page table .

Memory Management (3) Paging

virtual (logical) address space 8K = 213

physical address space (main memory) 4K = 212

page 0 page 1 page 2 page 3 page 4 page 5 page 6 page 7

block 0 or block 1 block 2 block 3

frame 0

Memory Management (4) Demand Paging & Virtual Memory Page demanding : page frame page page (swapping) . . (thrashing) cache line tag replace . . HDD . demand paging . HDD page . HDD . HDD .

Virtual memory (1)paging : . . . frame frame page page table . CPU page .

(demanding page) : frame page . page page . page page . page thrashing HDD . .

: . .

Virtual memory (1)page table pointer in register : page table . page table CPU . page table entry (page frame , page table ) CPU . page table .

demanding page table : page table entry page table . page page table entry . TLB (Translation Lookaside Buffer) : page table CPU ( ) . CPU . page table entry CPU (TLB) page entry frame CPU (TLB ) .

Linux kernel

: 2.6.12 2 , 6 , , 12 .

Linux kernel

: ( ) SWI( ) . user mode kernel mode CPU . User mode instruction . : buddy system slab . : , , . IPC(Interprocess Communication) : signal, message queue, shared memory, semaphore . VFS(Virtual File System) : (EXT2, EXT3, VFAT, JFS ) . IO IO open, read, write, close IO . BSD Socket Interface API : bind, connect, accept, send, recv BSD socket interface . File System : ext2, ext3, vfat, jfs . Network Protocol Stack : ipv4, ipv6, atm, x25 . Device driver : IO

Process

API ,

ps -e (f, j, l) : UID( ID), ID(PID), ID(PPID), ID(SID), (F), (S) . {D : I/O , R : , S : , T : , W : , Z : zombi process wait( ) } . e . pstree : . : fork( ) , user context, kernel context . clone2.c fork( ) [root@localhost /]# cd work/socket_ code clone2 [root@localhost socket_code]# gcc o clone2 clone2.c hello world [root@localhost socket_code]# ls clone2 clone2.c . ps [root@localhost socket_code]# . / clone2 & clone2 [1] 3175 Root . [root@localhost socket_code]# hello, world#include int main(){ fork(); printf("hello, world\n"); sleep(30); return 0; }//clone2.c Hello, world 2GB [root@localhost socket_code]# ps l F S UID PID PPID 0 S 0 S 1 S 4 R 0 0 0 0 2542 2538 3175 2542 3176 3175 3177 2542 C Pri 0 80 0 80 0 80 0 80 SZ TTY pts/0 pts/0 pts/0 pts/0 TIME 00 00 00 00 CMD bash clone2 clone2 ps

Generation of process : fork( )

process2.c main fork( ) . fork( ) PID 0 . process2.c fork( ) ? process2.c main fork( ) process2 .

#include int main(){ int cpid; if((cpid=fork())==-1){ fprintf(stderr, "can't fork); exit(0); } else if(cpid!=0){ //fork( ) 0 PID printf("\n parent process: PID=%d PPID=%d\n", getpid(), getppid()); sleep(20); } else{ //fork( ) 0 printf("\n child process: PID=%d PPID=%d\n", getpid(), getppid()); sleep(20); } exit(0); //kernel exit status word 0 ( ) } //process2.c

process2 child process: PID=%d PPID=%d\n parent process: PID=%d PPID=%d\n 20 . ps . exit( ) .

Exit of process : wait( ), waitpid( ) - . fork( ) PID PID PID . exit status word . wait( ) . ? waitpid( #include PID, exit status word int main(){ , )

int cpid; int zpid;

if((cpid=fork())==-1){ fprintf(stderr, "can't fork"); exit(0); } else if(cpid!=0){ printf("\n parent process: PID=%d PPID=%d\n", getpid(), getppid()); sleep(20); zpid=waitpid(-1, NULL, NULL); printf("zombie process %d removed\n", zpid); sleep(10); exit(0); } else{ printf("\n child process: PID=%d PPID=%d\n", getpid(), getppid()); sleep(10); printf("child process %d terminated\n", getpid());

[root@localhost /]# cd work/socket_ code [root@localhost socket_code]# gcc o zombie1 zombie1.c [root@localhost socket_code]# ls zombie1 zombie1.c [root@localhost socket_code]# . / zombie1 & Root parent process: PID=3371 PPID=3225 [1] 3371 child process: PID=3372 PPID=3371 2GB [root@localhost socket_code]# ps PID TTY TIME CMD 3372 [root@localhost socket_code]# child process 3372 terminated zombie process 3372 removed

exit(0); // } }//zombie1.c

Signal to process

signal signal handler . SWI(software interrupt) . signal event driven . nesC event-driven signal . Signal action signal , , #include .#include #include #include void sig_handler(int sig); int main(){ struct sigaction act; //signal action act.sa_handler=sig_handler; // sigfillset(&act.sa_mask); // act.sa_flags=SA_RESETHAND; // (void) sigaction(SIGINT, &act, NULL); //Ctrl + C action while(1){ sleep(3); printf("waiting for SIGINT...\n"); } } void sig_handler(int sig){ //Ctrl + C printf("I catched a signal (number= %d)\n", sig); } // signal_intr.c

Signal to process [root@localhost /]# cd work/socket_ code [root@localhost socket_code]# gcc o sig_intr signal_intr.c [root@localhost socket_code]# . / sig_intr waiting for SIGINT...\ waiting for SIGINT...\ Root waiting for SIGINT...\ "I catched a signal (number=3) waiting for SIGINT...\ 2GB waiting for SIGINT...\ [root@localhost socket_code]#

Ctrl + C Ctrl + C

Ctrl + C SIGINT sigaction(SIGINT, &act, NULL) act sa_handler sig_handler( ) . main( ) Ctrl + C main( ) . act sa_flags SA_RESETHAND . kill l : . kill SIGQUIT 13092 : 13092 PID SIGQUIT . 13092 signal action .

Kill zombie process by signal

exit( ) SIGCHLD SWI . SIGCHLD waitpid( ) . sleep( ) waitpid( ) .

Kill zombie process by signal

Socket

Socket (IPv4, IPv6, X25), (stream, datagram, raw IP), (TCP, UDP) socket descriptor . bind( ) socket descriptor, , node . IP , . Protocol family Ipv4 Ipv6 TCP UDP datagram TCP UDP ICMP(ping) http client browser Protocol, IP, port internet

PF_INET PF_INET6 Socket type SOCK_STREAM SOCK_DGRAM SOCK_RAW Socket type IPPROTO_TCP IPPROTO_UDP IPPROTO_ICMP

httpd Web server Protocol, IP, port socket( ) socket address struct

bind ( )

Socketstruct sockaddr{ sa_family_t sin_family; 14 Byte struct sockaddr_in{ sa_family_t unsigned short int struct in_addr unsigned char IPv4 IPv6 X25 AF_INET htons(serv_port) htonl(INADDR_AN Y) INADDR_ANY 0 IP ( ) .

sin_family; sin_port; sin_addr; sin_zero[8];

unsigned char sa_data[14]; } (GENERIC) Address family AF_INET AF_INET6 AF_X25sin_family sin_port sin_addr.s_addr

}

stack . bind( ) connect( ) bind connect . bind, connect .

Socket

if(bind(serv_sock, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) : , make clean (label) . => TAB . make . . make TAB .

main.c read.c write.c io.h . test . % gcc -c main.c % gcc -c read.c % gcc -c write.c % gcc -o test main.o read.o write.o make . , 100 ... ... , Makefile . Makefile 1 -------------------------------------------------------------------------------test : main.o read.o write.o gcc -o test main.o read.o write.o main.o : io.h main.c gcc -c main.c read.o : io.h read.c gcc -c read.c write.o: io.h write.c gcc -c write.c --------------------------------------------------------------------------------

www.linux.co.kr makefile make .hwp

main.c main.o , test . io.h , test .

[root@localhost work]# vi tst1-main.c [root@localhost work]# vi tst1-ref1.c [root@localhost work]# vi tst1-ref2.c [root@localhost work]# vi tst1-ref1.h [root@localhost work]# vi tst1-ref2.h [root@localhost work]# gcc c tst1-main.c [root@localhost work]# gcc c tst1-ref1.c [root@localhost work]# gcc c tst1-ref2.c [root@localhost work]# gcc o tst1 tst1-main.o tst1-ref2.o tst1-ref2.o [root@localhost work]# ./tst1 1st operand 1 2nd operand 2 result 5 [root@localhost work]#

make label Makefile label . make clean Makefile clean . make option option Makefile -C . -t option Macro : CC, CFLAG $@ : , $* : , $> :

[root@localhost work]# vi Makefile [root@localhost work]# make gcc -o tst1 tst1-main.o tst1-ref1.o tst-ref2.o [root@localhost work]# ls Makefile tst1 tst1-main.c tst1-main.o tst1-ref1.c tst1-ref1.o tst1ref2.c tst1-ref2.o tst1-ref1.h tst1-ref2.h [root@localhost work]# make clean rm tst1-main.o tst1-ref1.o tst-ref2.o [root@localhost work]# ls Makefile tst1 tst1-main.c tst1-ref1.c tst1-ref2.c tst1-ref1.h tst1-ref2.h [root@localhost work]#

tst1: tst1-main.o tst1-ref1.o tst1-ref2.o gcc -o tst1 tst1-main.o tst1-ref1.o tst-ref2.o tst1-main.o: tst1-main.c tst1-ref1.h # gcc -c tst1-main.c tst1-ref1.o: tst1-ref1.c tst1-ref1.h tst1-ref2.h gcc -c tst1-ref1.c tst1-ref2.o: tst1-ref2.c tst1-ref2.h gcc -c tst1-ref2.c clean: rm tst1-main.o tst1-ref1.o tst-ref2.o

:wq

Bootloader porting to Target Board

/work/ CD source Xwindow . /work/source/kernel/linux2.6.12.tar.gz linux-2.6.12 linux . TB CPU PXA272 chip . /work/source/kernel/patch/diff-linux-2.6.12xm_buverde_p1.gz zcat(gzip cat) patch .

patch readme.txt gedit driver make empos_xm_defconfig XM . Make zImage image zImage . Makefile empos_xm_defconfig, zImage . make clean .

LINUX porting to Target Board[root@localhost work]# cd source/kernel [root@localhost kernel]# tar xvzf linux-2.6.12.tar.gz [root@localhost kernel]# cd linux-2.6.12 [root@localhost linux-2.6.12]# ls Makefile arch drivers include sound net init scripts mm lib kernel usr security fs crypto [root@localhost linux-2.6.12]# cp /work/source/kernel/patch/diff-linux2.6.12-xm_bulverde_p1.gz . [root@localhost linux-2.6.12]# zcat diff-linux-2.6.12xm_bulverde_p1.gz | patch p1 Patching file Makefile Patching file arch/.. Patching file drivers/.. . [root@localhost linux-2.6.12]# cp ../patch/driver_obj/qcif/ driver/i2c/. . [root@localhost linux-2.6.12]# make empos_xm_defconfig [root@localhost linux-2.6.12]# make zImage .. [root@localhost linux-2.6.12]# find name zImage . /arch/arm/boot/zImage [root@localhost linux-2.6.12]# make clean

/work/ CD source Xwindow . /work/source/kernel/linux2.6.12.tar.gz linux-2.6.12 linux . TB CPU PXA272 chip . /work/source/kernel/patch/diff-linux-2.6.12xm_buverde_p1.gz zcat(gzip cat) patch .

patch readme.txt gedit driver make empos_xm_defconfig XM . Make zImage image zImage . Makefile empos_xm_defconfig, zImage . make clean .

Linux source files

arch/ directory : architecture-dependent arch/ ,

(kernel/, lib/, mm/). kernel/ signal handling, clock handling architecture-dependent . lib/ architecture-dependent . mm/ memory handling .

drivers/ directory : drivers/ . 2.4 , . 50 drivers/ . . fs/ drirectory : . IBM JFS Hans Reiser's reiserfs include/ directory : , , , make . , . SMP(Symetric Multiple Processor) , SMP . (sem.c). ipc/ directory ; ipc/ . (Semaphore) C

init/ directory : fork() , cpu_idle() loop Main.c init/ . bogomips . BogoMips reading . noop(no operation) . lib/ directory : lib/ . , inflate.c . . . PKZIP 8-bit kernel/ directory : kernel/ . , fork(), timer.c . printk.c printk() printf() . printf() SMP-capable . mm/ directory : mm/ . . net/ directory : net/ . TCP/IP, Netware, Appletalk

LINUX porting to Target Board

HP linux-2.6.12 PXA XM patch TB SDRAM HP xinetd tftpboot TB tftp . TB boot SDRAM linux . TB SDRAM flash flash ROM fusing . flash ROM kernel SDRAM

CD linux-2.6.12.tar.gz HP /work/source/kernel tar xvfz linux-2.6.12.tar.gz /work/source/kernel/linux-2.6.12 2.6.12 . patch readme.txt gedit driver . make empos_xm_defconfig make zImage zImage . zImage /work/source/kernel/linux-2.6.12/arch/arm/boot/ .

led program

TB r 0x0880500 led l q TB .

: termios init_keyboard( ), kbhit( ) close_keyboard( ) . open( ) /dev/mem mmap 0x0880500 led . led munmap( ) mmap( )

U13 74LCX374

close( ) .

led program using mmap Minicom version . XM Bulverde Linux Kernel [root@localhost /]# cp media/FEDORA/led.c work/. . [root@EMPOS ~]# [root@EMPOS ~]#ls led [root@EMPOS ~]#./led .. Send file S

(1) (1)[root@localhost /]# cd work [root@localhost work]# arm-linux-gcc -o led led.c [root@localhost work]# ls Hello hello.c led led.c

Ctrl+a, z

Root

[root@localhost work]#

(3)

Port setup P . ..

(2)

SZmodem .

2GB

.. [work] led .

usb led.c HP work TB work tftp, nfs, z-modem . TB work led ./led . TB LED .

/*led.c HP TB minicom TB ./led l, r, q , led , . #include #include #include #include #include #include #include #include #include #define ADDRESSOFLED

int kbhit(){ char ch; int nread; if(peek_character != -1) return 1; new_settings.c_cc[VMIN] = 0; tcsetattr(0,TCSANOW,&new_settings); nread = read(0,&ch,1); new_settings.c_cc[VMIN] = 1; tcsetattr(0,TCSANOW,&new_settings); if(nread == 1) { peek_character = ch; return 1; } return 0; } int readch(){ char ch; if(peek_character != -1) { ch = peek_character; peek_character = -1; return ch; } read(0,&ch,1); return ch; }

key board tcgetattr( ), tcsetattr( ), read( ), open( ), close( ), mmap( ), munmap( ), usleep( ) ? ? Arm compiler library /usr/local/arm/3.3.2/include .

0x08805000

static struct termios initial_settings, new_settings; static int peek_character = -1; void init_keyboard(){ tcgetattr(0,&initial_settings); new_settings = initial_settings; new_settings.c_lflag &= ~ICANON; new_settings.c_lflag &= ~ECHO; new_settings.c_lflag &= ~ISIG; new_settings.c_cc[VMIN] = 1; new_settings.c_cc[VTIME] = 0; tcsetattr(0,TCSANOW,&new_settings); } void close_keyboard(){ tcsetattr(0,TCSANOW,&initial_settings); }

int main(void){ int fd; unsigned char *addr_led; unsigned char dir; unsigned char val, val2; unsigned char ch = 'l'; if ((fd=open("/dev/mem",O_RDWR|O_SYNC)) < 0){ perror("mem open fail\n"); exit(1); }addr_led=mmap(NULL,1,PROT_WRITE,MAP_SHARED,fd,ADDRESSOFLED);

while(dir != 'q'){ if(dir == 'l') { val2 = (~(val >> 7)) & 0x1; val = (val 1) | val2; } *addr_led = val;

if(((int)addr_led < 0) ){ addr_led=NULL; close(fd); printf("mmap error\n"); return -1; } init_keyboard(); printf("\n8bit LED IO Interface Procedure\n"); printf("--------------------------------------\n"); printf(" l for left shift\n"); printf(" r for right shift\n"); printf(" q for exit\n"); printf("--------------------------------------\n"); *addr_led = 0; val = 0; val2 = 0; } }

if(kbhit()){ ch = readch(); switch(ch){ case 'r': dir = 'r'; break; case 'l': dir = 'l'; break; case 'q': dir = 'q'; break; } } usleep(100000); *addr_led = 0x00; close_keyboard(); munmap(addr_led, 1); close(fd); return 0;

LED driver

ioremap LED (0x08805000) (1 byte) ledioport_ioremap .

//fimename : ledioport.c main( ) led . int ledioport_open(struct inode *minode, struct file *mfile) { #include #include #include #include #include #include #include #include } if(ledioport_usage != 0) return -EBUSY; ledioport_ioremap= ioremap(LEDIOPORT_ADDRESS,LEDIOPORT_ADDRESS_RANGE); if(!check_region(ledioport_ioremap,LEDIOPORT_ADDRESS_RANGE)) request_region(ledioport_ioremap,LEDIOPORT_ADDRESS_RANGE,LEDIOPORT_NAME); else printk(KERN_WARNING"Can't get IO Region 0x%x\n",ledioport_ioremap); ledioport_usage = 1; return 0; check_region( ) request_region( ) flag ledioport_usage 1 . int ledioport_release(struct inode *minode, struct file *mfile) { iounmap(ledioport_ioremap); release_region(ledioport_ioremap,LEDIOPORT_ADDRESS_RANGE); ledioport_usage = 0; return 0; inode iounmap( ) release_region( ) ledioport_ioremap flag ledioport_usage 0 . static struct file_operations led_fops = { write : ledioport_write_byte, open : ledioport_open, OS release : ledioport_release, open, write, close }; led OS OS .

#define DRIVER_AUTHOR #define DRIVER_DESC #define LEDIOPORT_MAJOR 0 #define LEDIOPORT_NAME

"hanback" "led test program" }

"LED IO PORT"

#define LEDIOPORT_MODULE_VERSION "LED IO PORT V0.1" #define LEDIOPORT_ADDRESS 0x08805000 Ioremap, check_resion, #define LEDIOPORT_ADDRESS_RANGE 1 request_region, printk,iounmap, release_region, get_user, register_chrdev, //Global variable unregister_chrdev ? static int ledioport_usage = 0; ? TB static int ledioport_major = 0; OS static unsigned char *ledioport_ioremap; , /work/linux2.4.12xm_buverde/include .

LED driverssize_t ledioport_write_byte(struct file *inode, const char *gdata, size_t length, loff_t *off_what) { unsigned char *addr; unsigned char c; inode , get_user(c,gdata); led ledioport_ioremap module_init(led_init); module_exit(led_exit); MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_DESC); int led_init(void) { int result; result = register_chrdev(LEDIOPORT_MAJOR,LEDIOPORT_NAME,&led_fops); if(result < 0) { printk(KERN_WARNING"Can't get any major\n"); return result; } ledioport_major = result; printk("init module, ledioport major number : %d\n",result); return 0; } MODULE_LICENSE("Dual BSD/GPL"); insmod, mknod led_init rmnod led_exit .

addr = (unsigned char *)(ledioport_ioremap); *addr = c; return length; }

, , OS &led_fops OS register_chrdev( ) ledioport_major . .

void led_exit(void) { if(unregister_chrdev(ledioport_major,LEDIOPORT_NAME)) printk(KERN_WARNING"%s DRIVER CLEANUP FALLED\n",LEDIOPORT_NAME); else printk("driver: %s DRIVER EXIT\n", LEDIOPORT_NAME); } ledioport_major .

LED driver//test.c TB ./test 0x23 led . #include #include #include #include #include int main(int argc, char **argv) { int dev; char buff; if(argc (1) HP linux-2.6.12 PXA XM patch TB SDRAM HP xinetd tftpboot TB tftp . TB boot SDRAM linux . TB flash SDRAM flash ROM fusing . Led device driver ? (2) asm asm.arm (3) Makefile include include ..

(1) (1)

setip HP TB IP . iptables F, setup Selinux Xwindow Selinux management default setting disable . TB HP . [root@localhost /]# cd work/led_driver[root@localhost led_driver]# ls Makefile, ledioport.c, test.c [root@localhost led_driver]# make [root@localhost led_drivrer]# ls

Minicom version . [XM_bulverde] setip 192.168.123.166 192.168.123.165 XM Bulverde Linux Kernel . [root@EMPOS ~]# cd .. [root@EMPOS /]# tftp r ledioport.ko -g 192.168.123.166 [root@EMPOS /]# tftp r test -g 192.168.123.166 [root@EMPOS /]# insmod ledioport.ko init module, ledioport major number : 252 [root@EMPOS /]# mknod /dev/ledioport c 252 0 /dev/ledioport [root@EMPOS /]# . /test [root@EMPOS /]# rmmod ledioport

Root

Makefile, ledioport.c ledioport.mod.o ledioport.ko ledioport.o test.c test.o [root@localhost led_driver]# cp ledioport.ko test tftpboot/.

2GB

[root@localhost led_driver]# service xinetd restart [root@localhost led_driver]#

Insmod ledioport.ko led_init(void) register_chrdev( ) inode inumber 253 .

mknod inumber /dev/ledioport test .

inode inumber . ID . . ln file1 file2 file1 file2 (cp) . Object link embedded . Symbolic link .

LED driver# led Device Driver Makefile CC = arm-linux-gcc Ioremap, check_resion, request_region, printk,iounmap, release_region, get_user, register_chrdev, unregister_chrdev ? ? TB OS linux-2.6.12-xm_bulverde ledioport.c arm #. led Device Driver Makefile CC = arm-linux-gcc KDIR = /work/linux-2.6.12-xm_bulverde CFLAGS = -D__KERNEL__ -DMODULE -Wall -O2 -I$(KDIR) DRIVER_SRCS = ledioport.c DRIVER_OBJS = ledioport.o TEST_TARGET = test TEST_OBJS = test.o TEST_SRCS = test.c ledioport.o: ledioport.c CC -c CFLAGS ledioport.c test: test.o CC -o test.o test.o: test.c CC -c test.c

obj-m := ledioport.o KDIR := /work/linux-2.6.12-xm_bulverde PWD := $(shell pwd) C compiler optins warning

Optimizatiom level 2

CFLAGS = -D__KERNEL__ -DMODULE -Wall -O2 -I$(KDIR) TEST_TARGET = test TEST_OBJS = test.o TEST_SRCS = test.c TB OS I option include

default:$(TEST_TARGET) $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules $(CC) $(KDIR) -c $(TEST_SRCS) $(CC) $(TEST_OBJS) -o $@ make clean: rm -f *.ko rm -f *.o rm -f *.mod.* rm -f .*.cmd rm -f $(TEST_TARGET) rm -f default

LED driver

CD linux-2.6.12-xm_bulverde.tar.gz HP /work tar xvfz linux2.6.12-xm_bulverde.tar.gz linux-2.6.12-xm_bulverde 2.6.12 . /work/linux-2.6.12-xm_bulverde Makefile make empos_xm_defconfig make zImage zImage . ledioport.c .

(2) asm asm.arm ledioport.c arm .

Web server

HP CD source/webserver webs TB bin , web html . C509 IP 203.250.143.233 NIC IP C302 IP 203.250.122.222 ? IP C gateway . gateway switch ? C509 TB direct UTP cable IP ifconfig eth0 203.250.143.133 up C302 203.250.133.xxx http://203.250.143.133/index.html . ping network . ? TB gateway /etc/sysconfig/ifc-eth0 . C302 203.250.133.xxx IP TB 203.250.133.xxx IP direct LAN port gateway .

Web server - Makefileall: compile CC AR ARCH NAME = = = = arm-linux-gcc arm-linux-ar libwebs.a webs CFLAGS = -DWEBS -DUEMF -DOS="LINUX" -DLINUX $(UMSW) $(DASW) $(SSLSW) $(IFMODSW) OTHERS = -DB_STATS -DB_FILL -DDEBUG DEBUG = -g -Wall IFLAGS = -I.. LDFLAGS = $(SSLLIB) $(IFMODLIB) compile: $(NAME) # # Digest Access switch DASW = -DDIGEST_ACCESS_SUPPORT # # # # # SSL switches (enable all to activate) SSLINC = /RSASSL/library/include SSLLIB = /RSASSL/library/lib/libsslc.a SSLSW = -DWEBS_SSL_SUPPORT -I$(SSLINC) SSLPATCHFILE = ../websSSL.o Build archive of objects

# User Management switch UMSW = -DUSER_MANAGEMENT_SUPPORT

$(ARCH): $(DEPEND_FILES) $(AR) $(ARFLAGS) $(ARCH) $? # Primary link

# If-Modified-Support switches (requires math library, libm.a) # IFMODSW = -DWEBS_IF_MODIFIED_SUPPORT # IFMODLIB = /usr/lib/libm.a # Dependencies DEPEND_FILES = ../asp.o ../balloc.o ../base64.o ../cgi.o ../default.o \ ../ejlex.o ../ejparse.o ../form.o \ ../h.o ../handler.o ../mime.o ../misc.o ../page.o \ ../ringq.o ../rom.o \ ../sock.o ../sockGen.o $(SSLPATCHFILE) \ ../security.o ../sym.o ../uemf.o ../url.o ../value.o \ ../md5c.o ../um.o ../umui.o ../websda.o ../emfdb.o \ ../webrom.o ../webs.o ../websuemf.o main.o

$(NAME): Makefile $(ARCH) $(CC) -o $(NAME) $(DEBUG) (CFLAGS) $(IFLAGS) \ main.o $(ARCH) $(LDFLAGS) clean: rm -f $(NAME) $(ARCH)

Web server - Makefile# Dependencies ../rom.o: ../rom.c ../webs.h ../wsIntrn.h ../ej.h ../ejIntrn.h ../uemf.h ../security.o: ../security.c ../webs.h ../wsIntrn.h ../ej.h ../ejIntrn.h ../uemf.h ../sock.o: ../sock.c ../uemf.h ../sockGen.o: ../sockGen.c ../uemf.h ../sym.o: ../sym.c ../uemf.h ../uemf.o: ../uemf.c ../uemf.h ../um.o: ../webs.h ../wsIntrn.h ../um.h ../uemf.h ../umui.o: ../webs.h ../wsIntrn.h ../um.h ../uemf.h ../url.o: ../url.c ../webs.h ../wsIntrn.h ../ej.h ../ejIntrn.h ../uemf.h ../value.o: ../value.c ../uemf.h ../webrom.o: ../webrom.c ../webs.h ../wsIntrn.h ../uemf.h ../webs.o: ../webs.c ../webs.h ../wsIntrn.h ../ej.h ../ejIntrn.h ../uemf.h ../websda.o: ../webs.h ../wsIntrn.h ../websda.h ../uemf.h ../websuemf.o: ../websuemf.c ../webs.h ../wsIntrn.h ../ej.h ../ejIntrn.h ../uemf.h ../websSSL.o: ../websSSL.c ../websSSL.h ../wsIntrn.h ../ej.h ../ejIntrn.h ../uemf.h main.o: main.c ../wsIntrn.h ../webs.h ../ej.h ../ejIntrn.h ../uemf.h # .c.o: $(CC) -c -o $@ $(DEBUG) $(CFLAGS) $(IFLAGS) $< Transition rules (add -o to put object in right directory) ../asp.o: ../webs.h ../wsIntrn.h ../ej.h ../ejIntrn.h ../uemf.h ../balloc.o: ../balloc.c ../uemf.h ../base64.o: ../base64.c ../webs.h ../wsIntrn.h ../ej.h ../ejIntrn.h ../uemf.h ../cgi.o: ../webs.h ../wsIntrn.h ../uemf.h ../default.o: ../default.c ../webs.h ../wsIntrn.h ../ej.h ../ejIntrn.h ../uemf.h ../ejlex.o: ../ejlex.c ../ej.h ../ejIntrn.h ../uemf.h ../ejparse.o: ../ejparse.c ../ej.h ../ejIntrn.h ../uemf.h ../emfdb.o: ../emfdb.h ../wsIntrn.h ../uemf.h ../form.o: ../form.c ../webs.h ../wsIntrn.h ../ej.h ../ejIntrn.h ../uemf.h ../h.o: ../h.c ../uemf.h ../handler.o: ../handler.c ../webs.h ../wsIntrn.h ../ej.h ../ejIntrn.h ../uemf.h ../md5c.o: ../md5.h ../wsIntrn.h ../uemf.h ../mime.o: ../mime.c ../webs.h ../wsIntrn.h ../ej.h ../ejIntrn.h ../uemf.h ../misc.o: ../misc.c ../uemf.h ../page.o: ../page.c ../webs.h ../wsIntrn.h ../ej.h ../ejIntrn.h ../uemf.h ../ringq.o: ../ringq.c ../uemf.h

Web server server program#include #include #include #include #include #include "../uemf.h" "../wsIntrn.h"

#ifdef WEBS_SSL_SUPPORT #include "../websSSL.h" #endif #ifdef USER_MANAGEMENT_SUPPORT #include "../um.h" void formDefineUserMgmt(void); #endif static char_t static char_t static int static int static int *rootWeb = T("web"); /* Root web directory */ *password = T(""); /* Security password */ port = 80; /* Server port */ retries = 5; /* Server port retries */ finished; /* Finished flag */

static int initWebs(); static int aspTest(int eid, webs_t wp, int argc, char_t **argv); static void formTest(webs_t wp, char_t *path, char_t *query); static int websHomePageHandler(webs_t wp, char_t *urlPrefix, char_t *webDir, int arg, char_t *url, char_t *path, char_t *query); extern void defaultErrorHandler(int etype, char_t *msg); extern void defaultTraceHandler(int level, char_t *buf); #ifdef B_STATS static void printMemStats(int handle, char_t *fmt, ...); static void memLeaks(); #endif

Window XP IIS XP professional IIS(Internet Information Service) , ( SMTP, POP ), FTP . > > window IIS(http, smtp, ftp) XP professional CD . . ( , , ftp) .

: IP (http 80, ftp 21, telnet 23 ),

C:\inetpub\wwwroot, ( , ),

, admin , , frontpage, namoweb editorsheet), CGI, javascript

, dynmic HTML(style

IP IP : class A 10.0.0.0~10.255.255.255, class B 172.16.0.0~172.31.255.255,

class C 192.168.0.0~192.168.255.255 . 127.0.0.1 IP .

.

: VDSL modem, cable modem

IP ISP IP

ISP

POP(point of presence) T1(1.544Mbps) E1(2.048Mbps)

Windows XP , (CSU DSU) router gateway switch

Window XP ICS (Internet Connection Sharing) . XP professional NIC(network interface card) secondary NIC hub client

XP

primary ethernet , secondary ethernet

2 2 . gateway . XP ICS(internet connection shareing) S/W(Sygate, wingate) host computer (wireless router) Gateway server

ISP IP primary ethernet

192.168.0.1 IP secondary ethernet

192.168.0.2 IP

client

client

client 192.168.0.4 IP Windows XP ,

Window XP ICS (Internet Connection Sharing)

2

Window XP shared folders in local network ,.203.250.133.1 gateway 203.250.133. 222 IP

, .

C class ISP .

203.250.133. 220 IP

client

client

client

ISP

Gateway switch(router)LOCAL NETWORK C CLASS 255 COMPUTERS PER LOCAL NET

203.250.143.1 gateway

203.250.143.231 IP

client

client

client203.250.143.233 IP

Windows XP ,

Window XP shared folders in local network

, .

Window XP shared folders in local network

Guest .

Window XP shared folders in local network

.

Administrators

Administrator

User . Guests Guest . XP .

Window XP shared folders in local network >microsoft Windows Network . .

Window XP shared folders in local network . >\\ ( ) .

Window XP shared folders in local network . . Guset .

WINS .

CTL

ISP

. iskim : LOCAL NETWORK

Gateway switch(router)

wins

MSHOME

:

workgroup

Window XP shared folders in local network (1) Guest (2) wins (3)

(4) everyone