안양대학교 전기전자공학과 서 삼 준 Kernel Fusing (Boot Loader & tftp 활용 )
Contents JTAG Interface Flash ROM memory block Boot Loader Commands Image Fusing – Boot Loader : empos_boot – Kernel : zImage – RAM disk : ramdisk16.gz – Qtopia : qtopia.jffs (jffs image)
JTAG Write Direct write: JTAG interface (download and erase + write) Indirect write: tftp protocol + boot loader command –tftp empos_boot booter, flash booter Ethernet JTAG I/F Target BoardLink PC 1st port Tftp: /tftpboot/dlfile NFS: /nfs_resources Jflash-Xcale dlfile command Boot loader (0x0c000) 0x – 0xa3d kernel (0x ) 0x000c xa00c 0000 RAMdisk (0x ) 0x – 0xa /usr (0x ) 0x – 0xa Working space Parallel portJTAG port DRAM area (128Mbytes) command Flash ROM: 32Mbutes
Memory Map Flash ROM area + SDRAM area Boot loader Environment values Kernel Image ramdisk /usr (user space) null Flash ROM Area (32Mbyes) 0x x xc x x1c x x x SDRAM Area (128Mbyes) 0xa00c xa Kernel Image ramdisk Boot loader (temporary)
Jflash-Xscale command
Download using Boot Loader
Boot Loader Boot Loader 수행 화면
Status Commands Memory Map, Network Status, Register Value
Experiment: Kernel fusing Interface 설정 : serial port, Ethernet, JTAG interface Target board 의 상태 확인 : status (boot loader) Set environment: IP address(setip), MAC address(macwrite) tftp 를 이용하여 데이터 전송 – tftp empos_boot booter – tftp zImage kernel – tftp ramdisk16,gz ramdisk Flash ROM 에 저장 : flash command – flash booter, flash kernel, flash ramdisk, flash usr 필요한 경우 삭제 : erase command – erase kernel – erase 0x0 0xc0000
Example of Kernel Fusing
Fusing Files 경로 및 파일명설 명 /Image/bootloader/empos_boot 부트로더 /Image/kernel/zImage 커널 /Image/filesystem/ramdisk/ramdisk16.gz 램디스크 /Image/filesystem/qtopia/qtopia.jffs user 영역 (qtopia 용 jffs 이미지 ) /Image/filesystem/tinyx/tinyx.jffs user 영역 (tinyx 용 jffs 이미지 )
Experiment 개발환경에 맞도록 kernel 과 RAM disk 를 fusing –IP address, bootp, tftp 등 –Hosts –Herald message Jflash-Xscale 소스 분석과 memory map 이해 –Flash ROM 구조 (block mode) 에 따른 Jflash-Xscale 소스를 분석 Report –Jffs, ext2 파일 구조 조사