< > Target cross compiler Target code Target Software Development Kit (SDK) T-Appl T-Appl T-VM Cross downloader Cross debugger Case 1) Serial line Case 2) LAN line LAN line T-OS Target debugger Host System Target monitor Target system Serial line
Cross Compiler : C Gnu source ( Binutils, Gcc, Glibc src ) Montavista Hardhat CDK1.2 2.0 SDK : Target Builder
GDB ESTO ICE (In-circuit Emulator)
Embedded Linux Standard kernel Qplus Rt-linux Packages Redhat HardHat Other RTOS VxWorks Vrtx psos
JTAG TFTP NFS S/W
# mount /mnt/cdrom # cd /mnt/cdrom/install/cllf # rpm ihv --nodeps *noarch.rpm *i386.rpm # umount /mnt/cdrom ; eject # cd /opt/hardhat/devkit/ppc/8xx/ ; ls path # vi /etc/bashrc PATH=$PATH:/opt/hardhat/devkit/ppc/8xx/bin:/opt/hardhat/host/bin # source /etc/bashrc
:, JTAG JTAG boundry cell
.. 5 (TDI, TMS, Ntrst, TDO) JTAG CELL Test Digital Chip Test Registers TAP Flash Memory Fusing
PI(Parallel Input) PO(Parallel Output) SI(Scan Input) SO(Scan Output)
PI PO PI PO (bypass) SI SO
JTAG JTAG jflash JTAG
# minicom s 1) Serial port setup -> () 2) - : [COM1 ] /dev/ttys0 [COM2 ] /dev/ttys1 - : 9600bps - : 8 data, 1 stop, no parity -H/W& S/W 3) Save setup as dfl -> () 4) Exit () -> minicom
tftp #vi /etc/xinetd.d/tftp # service xinetd restart
1. exports # vi /etc/exports 2. export #exportfs -ra 3. nfs #service nfs stop #service nfs start
Boot loader Linux Kernel Ramdisk & busybox Application Makefile Document Misc
?,,,,
LinuxBIOS(http://www.acl.lanl.gov/linuxbios/) Red Hat Inc. RedBoot Blob(http://www.lart.tudelft.nl)
Blob start.s c_main() serial init timer init kernel, ramdisk image ram wait for 10 seconds Key pressed within 10 seconds run command command mode GetCommand() jump to kernel image address BootKernel() BootKernel() SetClock() Download() Flash()... Auto Boot Manual Boot
start.s : disable CPU Stack Point c_main main.c : c
CPU,,, IPC,,.
IPC,, IPC /, proc.
TCP/IP,.,,,
1) Doc (Document) * Linux kernel-2.4.4 * 2) Include 3) Init 4) Kernel
5) Mm,. 6) Ipc IPC 7) Fs 8) Net
9) Drivers, / 10) Lib C, 11) Arch cpu
#make menuconfig (make xconfig, make config )
#make zimage Vmlinux, vmlinux.gz Kernle.boot Elf Mkimage
: http://www.linux.org/dist/kernel.html : X.Y.ZZ X : Y :, ->, -> ZZ :,
1. 2. Busybox multi-call binary,. 3. NFS
2~3 EXT2 :, Journaling File Systems : EXT3, ReiserFS XIP(Execute-in-Place) cramfs(compressed ROM File System) JFFS/JFFS2 NFS : : 10 ( ELF(Executable and Linking Format)
.
TFTP/initrd(Ramdisk)
initrd
TFTP MTD
Initrd MTD
MTD
/* 0,, (KB) ramdisk.fs */ dd if=/dev/zero of=./ramdisk.fs bs=1k count= $1 /* ext2 */ mke2fs -F -m0 ramdisk.fs /* */ mount -o loop=/dev/loop0 -t ext2 ramdisk.fs $Mount_dir /* ( ) */ cd $RAMDISK/image/ find. -print cpio -vpdum $Mount_dir
enable,
NFS disable
1. # make dep # make zimage # cd arch/arm/boot ; tftp # cp zimage /tftpboot 2. [ Target ] dn_k zimage [ Target ] dn_r ramdisk.sample
1. Busybox-0.60.1.tar.gz, # tar xvfz Busybox-0.60.1.tar.gz # cd busybox-0.60.1 2. Config.h #define BB_CP_MV //#define BB_CUT //#define BB_DATE #define BB_DD #define BB_DF
3. Makefile CROSS=ppc_8xx-gcc PREFIX=[Target]/Target/busybox/busybox_img 4. #make ; #make install 5. Busybox
Network File system NFS NFS.
NFS NFS
( busybox ) NFS. 1.. 2.. 1.. 2.. NFS.
TFTP NFS
1. Target system 2. NFS
#make menuconfig
Bootp rarp
NFS
1. # make dep # make kernel.boot tftp # cp kernel.boot /tftpboot/kernel.nfs 2. Target [Target] tftp 300000 kernel.nfs 3. NFS [Target] boot 300000