




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Home Automation, Networking, and Entertainment LabDept. of Computer Science and Information Engineering National Cheng Kung University, TAIWANLINUX BOOT PROCEDURE AND BOOTLOADERLAB 6Department of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN 2HANELOUTLINE Introdu
2、ction Boot loader U-Boot Kernel INIT LabDepartment of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN 3HANELIntroductionqAn embedded linux system is typically consist of some software below :Boot loaderKernelInit programYour applicationDepartment of Computer Scienc
3、e and Information EngineeringNational Cheng Kung University, TAIWAN 4HANELBOOT LOADERqBoot loader is a program that :Execute when board power onDetect hareware (if necessary)Initialize hardwareCopy first program, might be : A simple program Bootloader stage N OS kernelTransfer control to it and goqB
4、oot loader is varied from different CPU, different board.Department of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN 5HANELBOOT LOADER Execute when board power onqAny CPU will execute a program at specified address when power onqBoot loader always be placed there
5、Department of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN 6HANELBOOT LOADER Detect HardwareqSearch for attached device on storageMouse on USBetcqUse detected device if needRead configure Department of Computer Science and Information EngineeringNational Cheng K
6、ung University, TAIWAN 7HANELBOOT LOADER Initialize HardwareqSome hardware require default valueStop interruptSet CPU clockConfigure RAM or MMUReset other processor such as DSPDepartment of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN 8HANELBOOT LOADER Copy Firs
7、t ProgramqA simple programNon-OS programqBootloader stage NBoot loader might have multiple stages, multiple modesqOS kernelLinuxWinCEetcDepartment of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN 9HANELBOOT LOADER Copy First ProgramStage NqTypical 2 stages in emb
8、edded systemqStage 1Write in assembly language to speed upInitialize hardwareCopy Stage 2 to RAMPrepare stack for Stage 2Jump to Stage 2qStage 2Write in C for more featureInitialize hardwareLoad kernelSend parameter to kernelStart kernelDepartment of Computer Science and Information EngineeringNatio
9、nal Cheng Kung University, TAIWAN 10HANELBOOT LOADER Copy First ProgramMultiple modesqIn order to provide more feature, boot loader might have multiple modesqMode 1: Boot program or kernelCopy program onlyqMode 2: Update utilityRead or kernel via : RS232 : xmodem protocol (Very Slow) Network : Earse
10、 flash and overwrite it with new dataDepartment of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN 11HANELBOOT LOADER ExampleDepartment of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN 12HANELBOOT LOADER Transfer Control to It a
11、nd GoqCopy next program to RAMSometimes might execute on ROMqSetup stack for itqSet PC (or jump) to its start addressDepartment of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN 13HANELU-BootqU-Boot : Universal BootloaderqPortable and easy to port and to debugqSup
12、port many architectures: PPC, ARMs, MIPS, x86, m68k, NIOS, MicroblazeDepartment of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN 14HANELU-BootSupport listDepartment of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN 15HANELU-Boo
13、t Instructionsqhelp: print online helpqhelp : show usageqflinfo: print FLASH memory informationqprotect: enable or disable FLASH write protectionqerase: erase FLASH memoryqloadb: loadb binary serial line (kermit mode)qmd: memory displayqcp: memory copyDepartment of Computer Science and Information E
14、ngineeringNational Cheng Kung University, TAIWAN 16HANELKERNELqAfter kernel is loaded and started, kernel will detect and initialize hardwareqAfter everything is done, find root for VFS (Virtual )qThen, search for init, which is the first program in OSInit will be the parent of all other processDepa
15、rtment of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN 17HANELINITqThe first process in OSqPID = 1Enter ps aux to show all processqTypical operation :Fork shell and execute a scriptMount all Start all deamonWait for user loginqIn embedded system, there are few t
16、ask to do.Department of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN 18HANELLABDepartment of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN 19HANELLABqLAB 1: Boot loaderqLAB 2: Boot procedureDepartment of Computer Science and
17、Information EngineeringNational Cheng Kung University, TAIWAN 20HANELLAB 1Boot loaderqInstall boardqInstall arm tool-trainqCompile U-BootqInstall JTAG driverqInstall U-BootDepartment of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN 21HANELLAB 1Install board qInst
18、all J-TAG and COM11 PinDepartment of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN 22HANELLAB 1 Install arm tool-train Compile U-BootqIn LinuxqDownload cross-3.2.tar.bz2 and u-boot-1.1.4.zipqInstall cross-3.2 to /usr/local/armqExtract U-Boot and compile itqAfter
19、completed, copy u-boot.bin to Windowsmake innokom_configmake CROSS_COMPILE=/usr/local/arm/bin/arm-linux-Department of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN 23HANELLAB 1 Install JTAG driverqIn WindowsqCopy GIVEIO.SYS under CgiveIO folder to C:WINDOWSsystem
20、32driversqClick 新增硬體 in 控制台qSelect 是,我已連接硬體qSelect 新增硬體裝置qSelect 進階選項qSelect (COM / LPT)qClick 從磁片安裝, select giveio.infDepartment of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN 24HANELLAB 1 Install U-BootqPlace u-boot.bin in the folder where Jen255.exe existedq
21、Execute Jen255.exe and enter u-boot.binqOpen 超級終端機 with baud rate 19200 bps, no flow controlqReset board and see if successDepartment of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN 25HANELLAB 2qRe-install origin I-BootqModify boot procedureqInstall kernel and D
22、epartment of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN 26HANELLAB 2 Re-install origin I-BootqIn WindowsqExecute Jen255.exe again, but enter bootldr insteadedDepartment of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN 27HANELLAB 2 Modify boot procedureqSetup kernel and qUse compiled kernelqModify existed Department of Computer Science and Information EngineeringNational Cheng Kung University, TAIWAN 28HANELLAB 2 Modify boot procedure(cont)qIn Linux, modify boot proceduregzip -d ramdisk.gz# mount sudo mount -o l
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 安保人力防范培训课件
- 商业场所租赁使用协议细节
- 养殖业务合作与产品质量责任协议
- 形容词与副词的区别及用法:小学中年级英语语法课
- 叉车知识点总结课件
- 2025店面转让协议合同转让协议合同写
- 乡村家庭农场运营模式协议
- 令我着迷的晨景800字11篇
- 化工厂安全培训图课件
- 2025铝合金制作安装合同文件模板
- (全国通用)三甲人民医院诊断证明书请假条模板(广东佛山)
- 部编版一年级上册语文研课标说教材课件
- 2022年廊坊市投资控股集团有限公司招聘笔试题库及答案解析
- 《灭火器维修》GA95-2015(全文)
- 最新VTE指南解读(静脉血栓栓塞症的临床护理指南解读)
- 旅行社计调实务课件完整版电子教案
- 乌有先生传(原文+注释+译文)精编版
- DB53∕T 1022-2021 三七栽培技术规程
- 直接还原铁生产工艺
- 《幂的运算》习题精选及答案
- 《春》默写练习
评论
0/150
提交评论