bootloader

How to reduce the code space for a hexadecimal ASCII chars conversion using a _small_ code space?

ぐ巨炮叔叔 提交于 2019-11-28 13:39:46
How to reduce the code space for a hexadecimal ASCII chars conversion using a small code space? In an embedded application, I have extraordinary limited space (note 1). I need to convert bytes, from serial I/O, with the ASCII values '0' to '9' and 'A' to 'F' to the usual hexadecimal values 0 to 15. Also, all the other 240 combinations, including 'a' to 'f', need to be detected (as an error). Library functions such as scanf(), atoi(), strtol() are far too large to use. Speed is not an issue. Code size is the the limiting factor. My present method re-maps the 256 byte codes into 256 codes such

esp32 关闭日志

不羁的心 提交于 2019-11-28 13:14:09
esp32上电以及系统运行中会从串口0打印很多日志,对于没有必要查看日志的场合,打印日志的动作显得多余并且还会占用资源,下文给出关闭日志打印的方法。 1、进入工程目录 2、make menuconfig 3、关闭Bootloader 日志: Bootloader config --> Bootloader log verbosity 选定为 No output 4、关闭程序日志:Component config -> Log output -> Default log verbosity 选定为 No output 来源: https://www.cnblogs.com/zornlink/p/11408606.html

How can i put a compiled boot sector onto a USB stick or disk?

佐手、 提交于 2019-11-28 08:40:29
I'm actually interested in how an OS works, from the POST over the Boot process to the Kernel, GUI, etc. Well I have to start at the beginning: The bootsector Most tutorials only specify how to get your .bin bootstrapper onto an USB stick for Linux users. But as I'm using XP I would like to ask how do I get my 512 byte .bin onto the right position on my USB , and thats definitely not by copying it with explorer :D There's dd for Windows which I use regularly. http://www.chrysocome.net/dd use it like so: dd if=c:\my files\boot.bin of=\\.\z: bs=512 count=1 where 'z:' is the drive letter of your

How does the bios know what type of BPB is present?

陌路散爱 提交于 2019-11-28 08:16:12
问题 If I want my bootloader to boot from a usb stick, I have to include a BPB. The usb stick is running in floppy emulation mode. As seen here, there are many different BPB versions. How does the bios know what type of BPB is present? GRUB 0.97 seem to be using yet another BPB format ? I can pad my bootloader from offset 0xb a little, and then it will also work. Is there a standard/common size to use? I am not using any filesystem on my USB, just raw. I guess I need the BPB because the bios tries

Why doesn't this boot loader code work?

爷,独闯天下 提交于 2019-11-28 06:00:27
问题 My expectation is that it prints a string, but nothing is printed out. When I make the string shorter, it sometimes works, and when I make them longer again, it works sometimes. I don't know why this isn't working. Could somebody help me? Thanks. The assembly code I'm using is: (Emacs 23, Ubuntu 10.10, nasm, VirtualBox OSE) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; org 0x7c00 bits 16 str: db "Some say the world will end in fire",10,13 db "Some say in ice",10,13 db "From what I've tasted

Bootloader works in emulators but not on real hardware

烈酒焚心 提交于 2019-11-28 05:56:29
问题 I am writing a bootloader in assembly and it seems to work fine on qemu, bochs and virtualbox. However, it is not loading the kernel on real hardware (it seems). The bootloader starts off by writing a character to the video memory (for debugging), it then reads sector 2 off the drive and far jumps to the kernel. The kernel is then writing some characters to video memory. On a real machine, I see the character from the bootloader on the screen, and there it hangs (blinking caret). I have tried

CentOS启动流程

拈花ヽ惹草 提交于 2019-11-28 05:06:08
CentOS启动流程 Step 1: POST 加电自检 此过程的就是为了检测一下外界的硬件设备是否能够正常运行,如CPU,内存设备,硬盘等等这些硬件设备是否可以正常工作。 完成这一任务的是在主板上的BIOS程序 Step 2: Boot Sequence 主要实现的功能是 选择要启动的硬件设备 ,选择了之后就可以读取这个设备上位于MBR里头的bootloader了。根据BIOS中对启动顺序的设定,BIOS自己会依次扫描各个引导设备,然后第一个被扫描到具有引导程序(bootloader)的设备就被作为要启动的引导设备。 Step3: Bootloader MBR分为三个部分 MBR(Master Boot Record) MBR记录一般是在磁盘 0 磁道 1 扇区,共512个字节。前446个字节是BootLoder,后 4*16 的 64 个字节是存放分区信息的,最后 2 个字节是校验信息,一般是 55AA MBR中的bootloader,bootloader提供一个菜单给用户,让用户去选择要启动的系统或不同的内核版本,然后把用户选择的内核版本加载至RAM中的特定空间,接着在RAM中解压、展开,而后把系统控制权移交给内核。 CentOS使用GRUB(grand uniform bootloader)引导, CentOS 7 使用 GRUB2,此前版本使用GRUB.

Why do we need a bootloader in an embedded device?

巧了我就是萌 提交于 2019-11-28 04:11:40
I'm working with ELinux kernel on ARM cortex-A8. I know how the bootloader works and what job it's doing. But i've got a question - why do we need bootloader, why was the bootloader born ? Why we can't directly load the kernel into RAM from flash memory without bootloader? If we load it what will happen? In fact, processor will not support it, but why are we following the procedure? A boot loader is a computer program that loads the main operating system or runtime environment for the computer after completion of the self-tests. ^ From Wikipedia Article So basically bootloader is doing just

How can linux boot code be written in C?

不打扰是莪最后的温柔 提交于 2019-11-28 03:22:59
问题 I'm a newbie to learning OS development. From the book I read, it said that boot loader will copy first MBR into 0x7c00, and starts from there in real mode. And, example starts with 16 bit assembly code. But, when I looked at today's linux kernel, arch/x86/boot has 'header.S' and 'boot.h', but actual code is implemented in main.c. This seems to be useful by "not writing assembly." But, how is this done specifically in Linux? I can roughly imagine that there might be special gcc options and

ArmLinux BOOTLOADER全程详解

橙三吉。 提交于 2019-11-28 03:09:25
网上关于Linux的BOOTLOADER文章不少了,但是大都是vivi,blob等比较庞大的程序,读起来不太方便,编译出的文件也比较大,而且更多的是面向开发用的引导代码,做成产品时还要裁减,这一定程度影响了开发速度,对初学者学习开销也比较大,在此分析一种简单的BOOTLOADER,是在三星公司提供的2410 BOOTLOADER上稍微修改后的结果,编译出来的文件大小不超过4k,希望对大家有所帮助. 1.几个重要的概念 COMPRESSED KERNEL and DECOMPRESSED KERNEL 压缩后的KERNEL,按照文档资料,现在不提倡使用DECOMPRESSED KERNEL,而要使用COMPRESSED KERNEL,它包括了解压器.因此要在ram分配时给压缩和解压的KERNEL提供足够空间,这样它们不会相互覆盖.当执行指令跳转到 COMPRESSED KERNEL后,解压器就开始工作,如果解压器探测到解压的代码会覆盖掉COMPRESSED KERNEL,那它会直接跳到COMPRESSED KERNEL后存放数据,并且重新定位KERNEL,所以如果没有足够空间,就会出错. Jffs2 File System 可以使armlinux应用中产生的数据保存在FLASH上,我的板子还没用到这个. RAMDISK 使用RAMDISK可以使ROOT FILE