??????Boot Loader?? - PowerPoint PPT Presentation

1 / 33
About This Presentation
Title:

??????Boot Loader??

Description:

Title: Author: wzchen Last modified by: chenwenzhi Created Date: 3/26/2005 12:18:31 PM Document presentation format: – PowerPoint PPT presentation

Number of Views:173
Avg rating:3.0/5.0
Slides: 34
Provided by: wzc8
Category:
Tags: boot | loader

less

Transcript and Presenter's Notes

Title: ??????Boot Loader??


1
??????Boot Loader??
  • ???
  • ?????????
  • 2009?5?

2
????
  • 1. Boot Loader???????
  • 2. Boot Loader???????
  • 3. Boot Loader??
  • ??? Boot Loader????
  • ??? U-BOOT??????

3
1. Boot Loader???????
  • Boot Loader?????????????????????
  • ??????????????????
  • ??????????????????,?????????????????????
  • ???Boot Loader?????????0x00000000 ?

4
  • Boot Loader????????
  • ?????CPU?????????Boot Loader
  • Boot Loader?????
  • Boot Loader????????
  • ??????????????????
  • Boot Loader?????

5
  • Boot Loader?????
  • ??????
  • ????
  • Boot Loader?????????????

6
2. Boot Loader???????
  • ????????,Boot Loader????????????????
  • ???Boot Loader?????1???2????
  • ??1?????CPU???????
  • ??2?????????

7
2.1 Boot Loader??1??
  • Boot Loader ???1????????
  • 1)????????
  • ???????
  • ??CPU????????
  • RAM???
  • ???LED
  • ??CPU????/??Cache

8
  • 2)?????2??RAM??
  • ????2?????????,?????????????
  • ?????????????????????RAM??

9
  • 3)????2?RAM?
  • 4)??????sp
  • 5)?????2?C???
  • Boot Loader ? ??2 ?????????? RAM ??????????,???

10
(No Transcript)
11
2.2 Boot Loader??2??
  • 1)???????????????
  • ?????????,?????????I/O????
  • ???????

12
  • 2)?????????
  • ???????
  • ????????????RAM???????????????
  • ???????

typedef struct memory_area_struct u32 start / ??????? / u32 size / ??????? / int used memory_area_t
13
  • 3)??????????????
  • ?????????
  • ????????????
  • MEM_START 0X8000
  • ?????????????
  • MEM_START 0X00100000
  • ?Flash???
  • While??

14
  • 4)?????????
  • ????(tagged list)??????????,???????????ATAG_CORE??
    ,???ATAG_NONE??
  • ???Linux???,?????Boot Loader??????????ATAG_CORE?A
    TAG_MEM?ATAG_CMDLINE?ATAG_RAMDISK?ATAG_INITRD

15
  • ???ATAG_CORE?????

params (struct tag )BOOT_PARAMS params-gthdr.tag ATAG_CORE params-gthdr.size tag_size(tag_core) params-gtu.core.flags 0 params-gtu.core.pagesize 0 params-gtu.core.rootdev 0 params tag_next(params)
BOOT_PARAMS ??????????????????,??params???struct
tag???????tag_next()??????????????,???????????????
???
16
  • 5)????
  • CPU??????
  • R00
  • R1????ID???????,????
  • linux/arch/arm/tools/mach-types?
  • R2?????????RAM??????
  • CPU ??
  • ??????(IRQs?FIQs)
  • CPU??SVC??
  • Cache?MMU???
  • MMU????
  • ??Cache?????????
  • ??Cache????

HOW TO CALL ?
17
2.3 ??????
  • ??????????????????????????
  • ??????????????????????,?????
  • Boot Loader ????????????
  • ???host ?????????????????

18
  • Boot Loader ???????????????????
  • ?????????????????????,?????????????
  • Boot Loader ?????????????????????????
  • ???? Boot Loader ?????????????????????????????

19
3. Boot Loader??
  • ??? Boot Loader????
  • ??? U-BOOT??????

20
??? Boot Loader????(1)
  • ??XsBase255?BootLoader
  • ????XsBase255???JTAG?? Jflash-XSBase255
  • ????XSBase?Boot Loader x-boot255
  • ????
  • ??JTAG??BootLoader

root_at_XSBase JTAG ./Jflash-XSBase255 x-boot255
21
??? Boot Loader????(2)
  • ???? Bootloader ??,???????????????
    description????

Usage Help
Description ????????????
Arguments None
Example X-HYPER255gt Help
22
Usage Reload kernel/ramdisk
Description ?Flash????image???SDRAM ???? kernel image? SDRAM, Autoboot?????
Arguments Kernel ?flash? kernel image??? SDRAM 0xa0008000 Ramdisk ?flash? ramdisk??? SDRAM 0xa0800000
Example X-HYPER255gt reload kernel
23
Usage Tftp file loader/kernel/root/ramdisk Tftp file addr
Description ??Ethernet? Host????????SDRAM?
Arguments 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
24
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?0x1c00 00?? Dest-???flash???? Src-????????? Len-?????
Example XSBASE255gt flash kernel XSBASE255gt flash 0xc0000 0xa0000000 0x100000
25
Usage Boot Boot opt1 opt2 Boot addr opt1 opt2
Description ??SDRAM?? kernel ???? arguments ?? ?????????kernel?
Arguments Opt1 kernel option(Only 0) Opt2 machine type( X-Hyer255 200) Addr kernel image address
Example XSBASE255gt boot XSBASE255gt boot 0 200 XSBASE255gt boot 0xa0008000 0 200
26
??? U-BOOT??????(1)
  • U-BOOT???
  • ????Flash?DOC?IDE?IIC?EEROM?RTC
    ??????BOOT-LOADER???IDE?DOC??????
  • ?????kermit?S-record????
  • ??????ELF32?uImage???Image,?Linux????????
  • ?????????

27
  • ??????(??BASH??)
  • ??WatchDog?LCD logo???????
  • ??MTD?????
  • ????
  • ???????

28
??? U-BOOT??????(2)
  • U-BOOT?????
  • /board?????????????
  • /common??????????,???????C??
  • /cpuCPU????
  • /diskdisk?????????
  • /doc??
  • /drivers????????,?????USB?

29
  • /fs?????????
  • /net????????
  • /lib_arm?ARM?????????
  • /tools??S-Record???? ?U-BOOT images???

30
??? U-BOOT??????(3)
  • ?U-BOOT???
  • ???????????????
  • ?include/configs????????xsbase.h
  • ?board/?????xsbase??,??????flash.c?memsetup.S?xsb
    ase.c?Makefile?u-boot.lds
  • ??????????,cs8900?????????cs8900.c ?cs8900.h

31
??? U-BOOT??????(4)
  • ??Makefile
  • ?u-boot-1.1.2/Makefile???
  • xsbase_config unconfig
  • _at_./mkconfig (_at__config) arm pxa xsbase

32
??? U-BOOT??????(5)
  • ??????
  • ???make clean
  • ????make xsbase_config
  • ???make all
  • ??????
  • u-bootELF?????,??????Debug?????
  • u-boot.bin???bin??,??????????????????
  • u-boot.srecMotorola S-Record??,??????????????

33
??? U-BOOT??????(6)
  • ??JTAG??u-boot.bin???Flash????,?????u-boot
  • ??help????????
Write a Comment
User Comments (0)
About PowerShow.com