Title: ???? ??? - (10) Bootloader, Kernel download
1???? ???- (10) Bootloader,Kernel download
Konkuk Univ. VLSI Design Lab.
Konkuk Univ. Dept. of Electronics
2What is Bootloader
- ??? ??? ?? ? ?? ?? ???? ??
- ???? ???
- ???? ?? ?? ??
- ??? ???? ??
- ????? ?? ?? 0x0 ? ??
Konkuk Univ. Dept. of Electronics
3Target ??? ??
Host System
Target System
Serial, Ethernet Interface
Linux Kernel Root File System User File System
Download
Fusing
SDRAM
JTAG Interface
Bootloader
Fusing
FLASH MEMORY
Konkuk Univ. Dept. of Electronics
4????? ??
- ??? ???
- ???? ???? ????? ?? ????? ????? ????? ?? ?? ??? ??
?? - ???? ???
- ???? ??? ?? ??? ???? ??
- ?????? ??? ???? ?? ?? ????? ??? ??
- ???? ???
- ???? ???? ???? ?? ????? ???? ??
- ??? ???? ??
- ???? ??? ???????? ?? ???? ?????? ?? ????? ?? ????
???? ? ??? ??.
Konkuk Univ. Dept. of Electronics
5????? ??
- ?? ???? ??
- ???? ????? ????? ?? ???? ????? ?? ???? ?? ???
???? ?? ????. - ??? ?? ?? ??? ???? ?? ?? ?? ???? ?? ??? ??? ????
?? ???? ?? ???? ?? ???? ??? ??? ??. - ??? ????? ?? ???? ???? ?? ??? ????.
- ??? ?????
- ???? ??? ??? ?? ?? ?? ?? ????? ??
- ??????? ???? ?? ??
Konkuk Univ. Dept. of Electronics
6????? ?? (ARM ?)
- ARMBOOT
- ARM? StrongARM? ?? ?? ?? ???
- PPCBOOT(MPC ???? ??? ?? ??
- ARM ?? ?? ??? ?? ? ?? ??? ??? ????.
- ??? ??? ??? ??,
- bootp/dhcp/tftp? ??? ??,
- PCMCIA CF ?? ?? ????
- PPCBOOT? ???? ??? ??? ????.
- ???? ?? ??? ?? ??? ARMBOOT? ???? ???? ?? ??? ??
???? ??.
Konkuk Univ. Dept. of Electronics
7????? ?? ii
- BLOB(Boot Loader OBject)
- SA11x0(StrongARM)? ?? ??? ??
- StrongARM? ??? ???? ???? LARTware ??
- ?? ???? ?? ???? ???? ??????, ??? ??, ??? ?? ?????
?? ?? ??? ?? - ???? ??? ?? ?? ??? ???? ??
- (ARMBOOT??? ??? ????. )
- ??? ???? ??? iPAQ, Jornada? ?? StrongARM, Xscale?
??? ?? PDA? ????.
Konkuk Univ. Dept. of Electronics
8????? ?? iii
- bootldr
- ???? ?? StrongARM? ???? PDA? iPAQ? ????
- handheld.org ???? ??? ?????.
- ???? ???? iPAQ???? ?????, ??? Assabet? Spot???
????. - bootldr? 30??? ?? ??? ??? ????? ?????? ????.
- BLOB? ????? ???? ??? ?? ?? ??? ???? ????
ARMBOOT??? ??? ????.
Konkuk Univ. Dept. of Electronics
9????? ?? iv
- U-boot
- Universal Bootloader ? ??
- PowerPC? ARM? ??? ? ???? ??? ?? ????.
- Ppcboot? ARMboot? ?? ????? ??
- ??? ???? ??? platform? ??(ppc, arm, mips, x86...)
- ??? ???? ??? ??.
- ??? ???? ??? ?? ?? ??
- ?? ??? CPU? ??? ?? evaluation board? ?? ??
sample?? ??(???? ????) -gt exgt S3C2410 evboard
smdk2410 - ?? CPU? ?? ?? ??? ??? ?????, ?? platform? ???
???? ? ??? ?? ?? ????
Konkuk Univ. Dept. of Electronics
10bootloder commands
Help
Usage Help
Description ? ???? ?? ??? ??? ?????.
Arguments None
Example X-HYPER255gt Help
reload
Usage reload kernel/ramdisk
Description Flash ???? ?? image? SDRAM?? ?????. Autoboot? kernel image? SDRAM?? ???? ?? ???? ?????.
Arguments Kernel flash? kernel image? SDRAM 0xa0008000?? ?? ramdisk flash? ramdisk? SDRAM 0xa0800000?? ??
Example X-HYPER255gt reload kernel
Konkuk Univ. Dept. of Electronics
11bootloder commands
bootp
Usage Bootp
Description bootp? ???? bootpd? ??? Host?? ip? tftp packet? ?? Host ?? ???? ?????.
Arguments None
Example X-HYPER255gt bootp
Konkuk Univ. Dept. of Electronics
12 bootloder commands
tftp
Usage tftp file loader/kernel/root/ramdisk tftp file addr
Description Ethernet? ?? Host? ???? SDRAM ???? ???????.
Arguments file Host ?? ?? ?? file ??. loader ???? ??? loader ??? SDRAM 0xa0000000? ?????. kernel ???? ??? kernel ??? SDRAM 0xa0008000? ?????. root ???? ??? 0xa0000000? ?????. Ramdisk ???? ??? 0xA0800000? ?????. Addr ???? ??? ??? SDRAM ?? ??
Example X-HYPER255gt tftp zImage kernel X-HYPER255gt tftp zImage 0xa0000000
Konkuk Univ. Dept. of Electronics
13 bootloder commands
flash
Usage flash loader/kernel/root/ramdisk flash dest src len
Description SDRAM?? ???? flash? ?? ??? ?????..
Arguments loader SDRAM? loader ??? 0xa00000000? flash? 0x0 ??? ?????. Kernel SDRAM? Kernel ??? 0xa00080000? flash? 0xc0000 ??? ?????. root SDRAM? root ??? 0xa0000000? flash? 0x1c0000 ??? ?????. ramdisk - SDRAM? ramdisk ??? 0xA0800000? flash? 0x1c0000 ??? ?????. dest ??? flash ?? ?? src ?? data? ?? ?? len ??? ??
Example X-HYPER255Agt flash kernel X-HYPER255Agt flash 0xc0000 0xa0000000 0x100000
Konkuk Univ. Dept. of Electronics
14 bootloder commands
erase
Usage erase loader/kernel/root/ramdisk erase addr1 erase addr2 len
Description ?? Flash block? ?????.
Arguments loader flash? loader ??? ?????. kernel flash? kernel ??? ?????. root flash? root ??? ?????. ramdisk flash? ramdisk ??? ?????. addr1 flash? ??? block? base address addr2 flash? ??? ??? block? base address len ??? ??
Example X-HYPER255Agt erase kernel X-HYPER255Agt erase 0xc0000 X-HYPER255Agt erase 0xc0000 0x100000
Konkuk Univ. Dept. of Electronics
15 bootloder commands
lock
Usage lock kernel/root/ramdisk lock addr1 lock addr2 len
Description ?? Flash block? lock? ?????.
Arguments kernel flash? kernel ??? lock? ?????. root flash? root ??? lock? ?????. ramdisk flash? ramdisk ??? lock? ?????. Addr1 flash? address? lock? ?????. addr2 flash? address? len?? lock? ?????. len lock? ??? ??
Example X-HYPER255Agt lock kernel X-HYPER255Agt lock 0xc0000 X-HYPER255Agt lock 0xc0000 0x100000
Konkuk Univ. Dept. of Electronics
16 bootloder commands
Usage Unlock
Description Flash? lock? ?????.
Arguments None
Example X-HYPER255Agt unlock
unlock
boot
Usage Boot boot opt1 opt2 boot addr opt1 opt2
Description SDRAM?? ??? kernel? ?????. ?? arguments? ??? ????? ????? ??? ??? ?? ????.
Arguments opt1 kernel option(Only 0) opt2 machine type( X-Hyer255 200) addr kernel image address
Example X-HYPER255Agt boot X-HYPER255Agt boot 0 200 X-HYPER255Agt boot 0xa0008000 0 200
17 bootloder commands
memcpy
Usage Memcpy dest src len
Description SDRAM??? ??? ??? ?????.
Arguments dest ??? ?? src ??? ?? ?? len ??? ??
Example X-HYPER255Agt memcpy 0xa0000000 0xa1000000 0x10000
Konkuk Univ. Dept. of Electronics
18 bootloder commands
Usage memcpy addr len
Description Memory? ??? ?????.
Arguments addr ??? ??? ?? len ??? ??
Example memdump 0xa0000000 0x100
memdump
Usage hexdump addr len
Description Memory? ??? hex ??? ?????.
Arguments addr ??? ??? ?? len ??? ??
Example hexdump 0xa0000000 0x100
hexdump
Konkuk Univ. Dept. of Electronics
19 bootloder commands
Usage memcmp addr1 addr2 len
Description SDRAM? ??? ??? ?? ?????.
Arguments addr1 ??? ?? addr2 ?? ?? len ??
Example X-HYPER255Agt memcmp 0xa0000000 0xa1000000 0x10000
memcmp
Usage memset addr value len
Description SDRAM? ??? ??? ??? ?? ????.
Arguments addr ??? ?? value ?? ? char(8bit)?? hex ? len ??? ??
Example X-HYPER255Agt memset 0xa0000000 0xf 0x10000
memset
Konkuk Univ. Dept. of Electronics
20 bootloder commands
Usage write c/s/l addr value
Description ??? ??? ??? ?? ????.
Arguments c 8bit s 16bit l 32bit addr address value ?? ?
Example X-HYPER255Agt write s 0xa0000000 0x1234 X-HYPER255Agt write l 0xa0000000 0x12345678
write
Konkuk Univ. Dept. of Electronics
21 bootloder commands
read
Usage read c/s/l addr
Description ??? ???? ?? ?????.
Arguments c 8bit s 16bit l 32bit addr address
Example X-HYPER255Agt read s 0xa0000000 X-HYPER255Agt read l 0xa0000000
status
Usage Status
Description Status? ?????.
Arguments None
Example Status
Konkuk Univ. Dept. of Electronics
22 bootloder commands
reboot
Usage Reboot
Description Soft reset
Arguments None
Example Reboot
Konkuk Univ. Dept. of Electronics
23Memory Map
Flash memory
0x01000000
ramdisk.gz
0x001c0000
zImage
0x000c0000
x-boot255
0x00000000
SDRAM
0x02000000
ramdisk.gz
0xa0800000
zImage
0xa0008000
0xa0000000
Konkuk Univ. Dept. of Electronics
24?? ??
Konkuk Univ. Dept. of Electronics
25JTAG Building
- JTAG ??? ?? ??? ????.
- ???? ??? ????.
26JTAG Building
- Vi ??? ???? Compile_switches.h ??? ?? ??.
- ????? XHYPER255A ? ????.
Konkuk Univ. Dept. of Electronics
27JTAG Building
- Vi ??? ???? Jflash.cpp ??? ?? ??.
- Manual ?? ?? ???? ??? ??? ???? ??? ??? ?? ? ??.
?? ?? ???? ??? 149 ??? ?? void main ? int main??
??? ??? ??.
28JTAG Building
- Make ??? ???? JTAG ??? ??? ??.
- ??? ? Jflash-Xhyper255 ? ???? ??? ????? ????.
Konkuk Univ. Dept. of Electronics
29Bootloder Compile
- CD ? ??? Bootloder ??? work ????? ????.
- tar ??? ???? ??? ??? ????.
Konkuk Univ. Dept. of Electronics
30Bootloder Compile
- ??? ??? ? Boot-XHYPER255 ????? ????.
- src/include ????? ??? config.h ??? vi ???? ????
?? ??.
Konkuk Univ. Dept. of Electronics
31Bootloder Compile
- config.h ???? Xhyper255A ??? ????.
- config.h ???? loder , kernel , ram disk ??? ???
? ??.
Konkuk Univ. Dept. of Electronics
32Bootloder Compile
- Make ??? ???? Bootloder ? ??? ??.
- ??? ? x-boot255 ??? ???? ????.
Konkuk Univ. Dept. of Electronics
33Bootloder Download
- JTAG Building ???? ???? Jflash-Xhyper255 ???
- /work/Boot-XHYPER255/src ????? ????.
Konkuk Univ. Dept. of Electronics
34Bootloder Download
- ./Jflash-Xhyper255 x-boot255 ??? ???? ????? ?????
Fusing ??. ( ? 3? ????. )
Konkuk Univ. Dept. of Electronics
35Bootloder Download
Konkuk Univ. Dept. of Electronics
36Bootloder Download
- Minicom ? ???? download ? ????? ??? ??? ????.
- ??? root_at_localhost minicom s
- Minicom ??? ???? ??? root_at_localhost minicom
Konkuk Univ. Dept. of Electronics
37Kernel Download
- Kernel compile ???? ??? zImage ??? ??? /tftpboot
????? ????.
Konkuk Univ. Dept. of Electronics
38Kernel Download
- ??? ?? ???? ?????? ??? bootp , tftp ? ????? ?????
????? ???? ????. - Netstat au ???? ???? ??? ????.
Konkuk Univ. Dept. of Electronics
39Kernel Download
- Target board ?? bootp ??? ???? Host PC ?? Target
board ? - IP ? ??? ? ??? ????.
Konkuk Univ. Dept. of Electronics
40Kernel Download
- ??? ???? Download ? ?? ??? Minicom ??? ????.
- Tftp ? ???? Kernel image ? ???? ??.
- Ex ) XHYPER255Agt tftp zImage kernel
- ?????? Kernel image ? SDRAM ? Kernel ??? download
??.
41Kernel Download
- Target board ? SDRAM ? ???? ??????
- ex ) XHYPER255Agt flash kernel ????
???? ??? ?????? ????. - SDRAM ? ??? ???? ??? ???? ?? ???? ????. ????
SDRAM ? ?? ??? ??? ??? ???? ?? ??? ??? ????
Target board ? ??? ????? ?? ???? ??? ? ?? ??.
Konkuk Univ. Dept. of Electronics