bootloader

Disk Read Error while loading sectors into memory

ⅰ亾dé卋堺 提交于 2019-12-20 19:44:23
问题 I tried to develop a bootloader using this, but when it is run it shows: disk read error! If I ignore it, in a later part, it shows me wrong memory mapping. I also followed some other sources too but in vain. It feels like I'm just copying what they are doing. If I do even a little different a new kind of error generates every time. Should I use an already built bootloader or what to do? The code of disk load error is as follow: [org 0x7c00] KERNEL_OFFSET equ 0x1000 mov [BOOT_DRIVE], dl mov

Arduino Bootloader

半城伤御伤魂 提交于 2019-12-20 09:16:21
问题 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

Write Bootloader in C

醉酒当歌 提交于 2019-12-20 08:09:05
问题 I am a newbie in writing bootloaders. I have written a helloworld bootloader in asm, and I am now trying to write one in C. I have written a helloworld bootloader in C, but I cannot compile it. This is my code. What am I doing wrong? Am I taking the wrong approach entirely? void print_char(); int main(void){ char *MSG = "Hello World!"; int i; __asm__( "mov %0, %%SI;" : :"g"(MSG) ); for(i=0;i<12;i++){ __asm__( "mov %0, %%AL;" : :"g"(MSG[i]) ); print_char(); } return 0; } void print_char(){ _

Write Bootloader in C

微笑、不失礼 提交于 2019-12-20 08:08:18
问题 I am a newbie in writing bootloaders. I have written a helloworld bootloader in asm, and I am now trying to write one in C. I have written a helloworld bootloader in C, but I cannot compile it. This is my code. What am I doing wrong? Am I taking the wrong approach entirely? void print_char(); int main(void){ char *MSG = "Hello World!"; int i; __asm__( "mov %0, %%SI;" : :"g"(MSG) ); for(i=0;i<12;i++){ __asm__( "mov %0, %%AL;" : :"g"(MSG[i]) ); print_char(); } return 0; } void print_char(){ _

What is the difference between a Bootrom vs bootloader on ARM systems

二次信任 提交于 2019-12-20 08:04:36
问题 I primarily come from an x86 system background where BIOS (Firmware) is responsible for loading a bootloader (like GRUB) from PowerON which in turn loads the OS. I now have been reading the equivalent boot sequence on ARM systems and it seems there are articles on the web making references to two terms: bootrom and bootloader. Some articles mention that from PowerON the bootloader (like u-boot) is the first thing that gets executed whereas some articles say that from PowerON, a bootrom

Which addressing mode to be used to access disk?

♀尐吖头ヾ 提交于 2019-12-20 07:39:45
问题 I am learning OS development and I'm in preliminary level. I created a simple boot loader. To access other files on the disk(say HDD or USB drive), which addressing mode should I use?(CHS or LBA or INT 13h extensions). Which of these addressing mode is very efficient(means, can be used for most of the drive)? Thanks 回答1: First of all, the INT13h extensions are an extension to an API, not an HD addressing method. You have to settle on whether you are going to use the BIOS or direct hardware

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

别等时光非礼了梦想. 提交于 2019-12-20 06:02:59
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . Is there any API/code to check if Android phone's bootloader is unlocked? 回答1: 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

ArchLinux安装与配置小结

こ雲淡風輕ζ 提交于 2019-12-20 05:05:09
最近无意间发现一个基于ArchLinux的发行版—— BlackArch ,主题十分炫酷(中二)。当然渗透类的Linux 发行版已经有BackTrack和Kali了,不过都是源于Debian的,使用者众多,随波逐流无法突显我们的逼格, 要论小众,ArchLinux算是个中翘楚。呵呵开个玩笑,其实ArchLinux的亮点在于“小”,不同于其他发行版的“最小化安装”, ArchLinux的安装过程就与众不同,手动分区,手动配置bootloader,然后从网络源下载必要的包安装到指定的分区中。 安装完必备的软件(如gcc)后其余一概自己去添加,包括图形界面。对于喜欢定制而又不怕折腾的朋友来说,Arch系列确实 是一个不错的选择。正好我还没有用过Arch系的发行版,因此就在虚拟机装一个体验一回,顺便把其中遇到的坑记录一下。 安装ArchLinux 关于ArchLinux的安装,已经有无数文章介绍过了,不过质量良莠不齐,每个人遇到的问题也不尽相同,因此强烈建议先看一遍 官网的 Beginner-guide 。总的来说,操作系统的安装过程不算复杂,问题主要出现在分区和bootloader的配置上, 能解决就好办多了。 准备工作 在官网的Download界面里就有最新的iso镜像源可以下载,包括磁力链接和bt种子,下载好后烧录到光盘或者u盘,就可以作为一个操作 系统直接启动了

Assembly text colors

天涯浪子 提交于 2019-12-20 01:45:23
问题 I'm doing an iso file in assembly and I want to add color to the text (in this case: red). Does anyone know how to do it? [BITS 16] [ORG 0x7C00] jmp main main: mov si, string ; si=string call printstr jmp $ printstr: lodsb ; al=&si[0] cmp al,0 ;FLAGS = 0 jnz print ret print: mov ah,0Eh int 10h jmp printstr string db "HELLO WORLD!",13,10,0 times 510 - ($-$$) db 0 dw 0xAA55 回答1: As a preliminary advice, always setup the segment registers that your bootloader depends on. Here, because of lodsb

Grub bootloader with shared library support

邮差的信 提交于 2019-12-19 13:47:19
问题 I'd like to load a shared library (closed-source binary user-space library) at boot stage with grub boot-loader. Are there any chances for this or I must write a custom-elf-loader (grub module) to do it? 29/08/2014: For more detail, this is a programming problem in which I want to customize or add some new features to Grub boot-loader project. Thank you for your all supporting! 回答1: So, you don't make it crystal clear what you are trying to do, but: Loading a userspace (assuming Linux SysV