bootloader

Linux启动过程

爷,独闯天下 提交于 2019-12-02 20:12:08
Linux启动过程 前言:   Linux 是一种自由和开放源代码的类UNIX操作系统。该操作系统的内核由林纳斯·托瓦兹在1991年10月5日首次发布。在加上用户空间的应用程序之后,成为Linux操作系统。Linux是自由软件和开放源代码软件发展中最著名的例子。   接触Linux的时间也不算短了,一直都是直接使用Linux操作系统进行一些工作,很少去了解系统从开机到能使用的整个过程,感觉有需要好好理解下整个系统的启动过程,故写这篇博客加深一下理解。 先通过一张图来简单了解下整个系统启动的流程,整个过程基本可以分为POST-->BIOS-->MBR(GRUB)-->Kernel-->Init-->Runlevel。下面会详细说明每个过程的作用。 图1-1:系统启动流程 BIOS   BIOS(Basic Input/Output System),基本输入输出系统,该系统存储于主板的ROM芯片上,计算机在开机时,会最先读取该系统,然后会有一个加电自检过程,这个过程其实就是检查CPU和内存,计算机最基本的组成单元(控制器、运算器和存储器),还会检查其他硬件,若没有异常就开始加载BIOS程序到内存当中。详细的BIOS功能,这边就不说了,BIOS主要的一个功能就是存储了磁盘的启动顺序,BIOS会按照启动顺序去查找第一个磁盘头的MBR信息,并加载和执行MBR中的Bootloader程序

Arduino Bootloader

☆樱花仙子☆ 提交于 2019-12-02 17:32:19
Can someone please explain how the Arduino bootloader works? I'm not looking for a high level answer here, I've read the code and I get the gist of it. There's a bunch of protocol interaction that happens between the Arduino IDE and the bootloader code, ultimately resulting in a number of inline assembly instructions that self-program the flash with the program being transmitted over the serial interface. What I'm not clear on is on line 270: void (*app_start)(void) = 0x0000; ...which I recognize as the declaration, and initialization to NULL, of a function pointer. There are subsequent calls

《ucore lab1 练习4》实验报告

时光总嘲笑我的痴心妄想 提交于 2019-12-02 14:44:49
[练习4]分析bootloader加载ELF格式的OS的过程 通过阅读bootmain.c,了解bootloader如何加载ELF文件。通过分析源代码和通过qemu来运行并调试bootloader&OS,理解: 1.bootloader如何读取硬盘扇区的? 2.bootloader是如何加载ELF格式的OS? 问题1:bootloader如何读取硬盘扇区 分析原理 阅读材料其实已经给出了读一个扇区的大致流程: 1.等待磁盘准备好 2.发出读取扇区的命令 3.等待磁盘准备好 4.把磁盘扇区数据读到指定内存 实际操作中,需要知道怎样与硬盘交互。阅读材料中同样给出了答案:所有的IO操作是通过CPU访问硬盘的IO地址寄存器完成。硬盘共有8个IO地址寄存器,其中第1个存储数据,第8个存储状态和命令,第3个存储要读写的扇区数,第4~7个存储要读写的起始扇区的编号(共28位)。了解这些信息,就不难编程实现啦。 分析代码 bootloader读取扇区的功能是在boot/bootmain.c的readsect函数中实现的,先贴代码: static void waitdisk ( void ) { //如果0x1F7的最高2位是01,跳出循环 while ( ( inb ( 0x1F7 ) & 0xC0 ) != 0x40 ) /* do nothing */ ; } /* readsect -

What is the booting process for ARM?

我怕爱的太早我们不能终老 提交于 2019-12-02 13:54:26
As we know, for X86 architecture: After we press the power button, machine starts to execute code at 0xFFFFFFF0, then it starts to execute code in BIOS in order to do hardware initialization. After BIOS execution, it use bootloader to load the OS image into memory. At the end, OS code starts to run. For ARM architecture, what is the booting process after use press the power button? Thanks! Currently, there are two exception models in the ARM architecture (reset is considered a kind of exception): The classic model, used in pre-Cortex chip and current Cortex-A/R chips. In it, the memory at 0

Linker file unselected

百般思念 提交于 2019-12-02 09:21:44
I am dealing with a problem in my application with the linker file. What's happening is in the explorer tab it seems the linker file it's not "selected" I have to refer that I also have a bootloader. I'm getting an error of "(944) data conflict at address 1FC02FF8h" and I think it's related with that. Can anyone help me on that? Many Thanks. Right click your linker files folder and make sure that the file is not excluded in your current config. Edit: Right Click "Linker Files"->Properties 来源: https://stackoverflow.com/questions/32049728/linker-file-unselected

API to detect if Android phone has bootloader unlocked? [closed]

时光总嘲笑我的痴心妄想 提交于 2019-12-02 06:39:21
Is there any API/code to check if Android phone's bootloader is unlocked? If there was such an API you couldn't trust it because a non-standard ROM could implement it to say whatever it wanted. 来源: https://stackoverflow.com/questions/6679643/api-to-detect-if-android-phone-has-bootloader-unlocked

Assembly (x86): <label> db 'string',0 does not get executed unless there's a jump instruction

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 05:10:48
问题 I've been banging my head against the wall in an attempt to understand why the following assembly is not correctly dumping the contents of 'HELLO_WORLD'. ; Explicitly set 16-bit [ BITS 16 ] [ ORG 0x7C00 ] ; Create label for hello world string terminated by null. HELLO_WORLD db 'hello world', 0 start: ; Move address of HELLO_WORLD into si mov SI, HELLO_WORLD call print_string ; Continue until the end of time jmp $ print_string: loop: ; Retrieve value stored in address at si mov al, [SI] mov ah

STM32L073RZ (rev Z) IAP jump to bootloader (system memory)

China☆狼群 提交于 2019-12-02 03:06:13
问题 I use the STM32L073RZ (Nucleo 64 board). I would like to jump into the system memory in application programming (IAP). My code works on the revision B of the STM32L073 microcontroller but fails on the latest revision, rev Z. I read the errata sheet, no details are given, just a limitation fixed on the dual boot mechanism into system memory according to the BFB2 bit. Is the system memory no longer supports an IAP jumping to execute its code (to flash firmwares through USB or UART without using

STM32L073RZ (rev Z) IAP jump to bootloader (system memory)

£可爱£侵袭症+ 提交于 2019-12-02 01:22:32
I use the STM32L073RZ (Nucleo 64 board). I would like to jump into the system memory in application programming (IAP). My code works on the revision B of the STM32L073 microcontroller but fails on the latest revision, rev Z. I read the errata sheet, no details are given, just a limitation fixed on the dual boot mechanism into system memory according to the BFB2 bit. Is the system memory no longer supports an IAP jumping to execute its code (to flash firmwares through USB or UART without using the BOOT0 pin) ? The function is the first line of my main program, it tests if the code has to jump

学习嵌入式开发——简介及搭建开发环境

旧城冷巷雨未停 提交于 2019-12-01 23:56:52
嵌入式技术的发展经历了单片机(SCM)、微控制器(MCU)、系统级芯片(SoC)3个阶段。 SCM——随着大规模集成电路的出现及其发展,计算机的CPU、RAM、ROM、定时数器和多种I/O接口集成在一片芯片上,形成芯片级的计算机。 MCU——MCU的特征是满足各类嵌入式应用,根据对象系统要求扩展各种外围电路与接口电路,突显其对象的智能化控制能力。实际上,MCU、SCM之间的概念在日常工作中并不严格区分,一概以单片机称呼。随着能够运行更复杂软件(比如操作系统)的SoC的出现,“单片机”通常是指不运行操作系统、功能相对单一的嵌入式系统,但这不是绝对的。 SoC——SoC的特征是实现复杂系统功能的VLSI;采用超深亚微米工艺技术;使用一个以上嵌入式CPU/数字信号处理器(DSP);外部可以对芯片进行编程;主要采用第三方IP进行设计。 嵌入式处理器种类繁多,有ARM、MIPS、PPC等多种架构。但由于ARM处理器的文档丰富,各类嵌入式软件大多支持ARM处理器,使用ARM开发板来学习嵌入式开发是一个好选择。 基于ARM的处理器以其高速度、低功耗、价格低等优点得到非常广泛的应用,它可以应用于以下领域:为无线通信、消费电子、成像设备等产品提供可运行复杂操作系统的开放应用平台;在海量存储、汽车电子、工业控制和网络应用等领域提供实时嵌入式应用;安全系统,比如信用卡、SIM卡等。