bootloader

Can ARM qemu system emulator boot from card image without kernel param?

感情迁移 提交于 2019-12-01 04:18:04
问题 I've seen a lot of examples how to run a QEMU ARM board emulator. In every case, besides SD card image param, QEMU was also always supplied with kernel param, i.e.: qemu-system-arm -M versatilepb \ -kernel vmlinuz-2.6.18-6-versatile \ #KERNEL PARAM HERE -initrd initrd.gz \ -hda hda.img -append "root=/dev/ram" I am palying with bootloaders and want to create my own bootable SD card, but don't have a real board yet and want to learn with an emulated one. However, if run as described above, QEMU

VirtualBox - No bootable medium found

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 04:15:10
问题 There are a lot of question on stackoverflow with the similar title. I read all of them, but none of them answers my problem. This is why I opened this question. I am creating an operating system in assembler and C. I found that I must compile C code to binary format, extract text section and save it as a file, then convert it to ISO, then mount it to virtual optical dive of diskete and then load my OS in VirtualBox. So, that is a lot of work I want to avoid. I don't want to convert my binary

Run a UEFI shell command from inside UEFI application

£可爱£侵袭症+ 提交于 2019-12-01 04:12:11
I'm new to UEFI application development. My requirement is that, I need to run an UEFI shell command from my UEFI application ( app.efi ) source code. Need guidance on how I can do this. Example, cp command in UEFI shell is used to copy a file from one path to another. I want to do this programmatically inside my application ( app.efi ) source code. EDIT: I'm looking for something similar to system("command"); function in Linux . How to achieve this? Calling a UEFI shell command from a UEFI application can be done using the EFI_SHELL_EXECUTE function of EFI_SHELL_PROTOCOL , defined under

Run a UEFI shell command from inside UEFI application

雨燕双飞 提交于 2019-12-01 01:35:06
问题 I'm new to UEFI application development. My requirement is that, I need to run an UEFI shell command from my UEFI application ( app.efi ) source code. Need guidance on how I can do this. Example, cp command in UEFI shell is used to copy a file from one path to another. I want to do this programmatically inside my application ( app.efi ) source code. EDIT: I'm looking for something similar to system("command"); function in Linux. How to achieve this? 回答1: Calling a UEFI shell command from a

Simple NASM “boot program” not accessing memory correctly?

断了今生、忘了曾经 提交于 2019-11-30 21:24:18
**Note that when I say boot program, I don't mean a program that boots an OS. I mean, a simple program that runs when you start up the computer and does something. Alright, so I'm not extremely well-versed in Assembly/NASM, but I think I have a good enough grasp on it to write simple boot programs. Well, I thought I had a good enough grasp. Apparently not. I tried a simple boot program I found online. It ran fine (prints the letter 'A'). I then modified it to print a letter stored in memory. It failed; instead of printing an 'A', it prints a smiley face. (I swear, the computer's laughing at me

Loading second stage of a bootloader

旧时模样 提交于 2019-11-30 21:02:04
I'm trying to create a small operating system for x86 machines and started writing the code for a fairly minimal bootloader. The bootloader I created is quite simple, it loads a small second bootloader from the sector located directly after the master boot record and jumps to that code. The bootloader code in the master boot record seems to run fine, the problem occurs when it tries to jump to the second stage bootloader. This second stage bootloader is supposed to output a letter indicating success (the letter S) so I can tell the code is being executed. The problem is nothing ever appears on

基于Linux与lpc3250开发板的交叉开发环境搭建

China☆狼群 提交于 2019-11-30 19:56:22
### 一、Bootloader的安装(在windows下进行) 1、什么是Bootloader: 要想弄明白什么是Bootloader,我们先从PC上的bootloader说起。PC上的BIOS和硬盘上的引导记录有着和嵌入式开发板中的bootloader类似的作用。PC的Bootloader由BIOS和MBR组成,BIOS固化在主板的一个芯片上,MBR则是硬盘的主引导扇区的缩写。PC启动后,首先执行BIOS的启动程序,根据用户的COMS设置,BOIS加载硬盘MBR的启动数据,并把系统的控制权交给保存在MBR中的OS Loader(如grub),最后再由OS Loader将控制权交给OS内核。 了解了什么是PC中的Bootloader,我们再来看什么是嵌入式系统中的Bootloader。嵌入式系统中没有与BIOS类似的芯片,这就需要开发人员自己设计Boootloader。不过,我们不必从零开始写这些代码,已经有公司和组织为大多数嵌入式系统写好了Bootloader。 2、lpc3250的Bootloader组成: kickstart:位于Flash的Block0,负责加载从Flash Block1开始的程序,这里只的是S1L。开发板上电后,kickstart被内部的IROM加载并执行。IROM只能加载Block1以内的映像,而kickstart被加载后将被允许加载从Flash

Reading from memory in 8086 real mode while using 'ORG 0x0000'

[亡魂溺海] 提交于 2019-11-30 16:35:25
I've been messing around with x86-16 assembly and running it with VirtualBox. For some reason when I read from memory and try to print it as a character, I get completely different results from what I was expecting. However when I hard-code the character as part of the instruction, it works fine. Here's the code: ORG 0 BITS 16 push word 0xB800 ; Address of text screen video memory in real mode for colored monitors push cs pop ds ; ds = cs pop es ; es = 0xB800 jmp start ; input = di (position*2), ax (character and attributes) putchar: stosw ret ; input = si (NUL-terminated string) print: cli

STM32 IAP在线升级在项目中的应用

让人想犯罪 __ 提交于 2019-11-30 05:48:28
IAP即在线应用编程,平时我们写好的程序都是通过下载器去下载的,但是对于组装好的产品在想更新底层硬件代码是很麻烦的事情,如果在公司情况还没那么糟糕,要是发出去的产品出现bug,你不可能要用户给你下载程序的。IAP这种技术,我们就可以像软件一样,可以实现远程更新了。我们需要做的就是,写FLASH读写接口,程序可以通过串口,网口等进行下发,然后内部调用FLASH写函数,把代码写到对于区域即可。 当然这只是一个大概思路,具体实现还是要注意很多细节的东西。网上也有好多关于这方面的教程,但是能用到项目中的却很少,我写这边文章就是想和大家分享我在项目中实际应用。 想了想,就以我实际开发过程来写吧,这里对新人来说也可以当作一篇教程来学习。 一、FLASH读写接口的实现 这里大家可以参考原子哥的FLASH模拟EEPROM实验来写。因为我们做写的是程序,数据流很大,需要做一些改动,这样写入速度会快很多。 首先我们来了解一下STM32F1的FLASH,如下图,我们要看的只有主存储区,可以看到单片机内部FLASH是按2K一页来区分的,而且对其读写是有如下几点要求: 每次写入必须为2个字节。 写入地址为2的倍数。 写入之前必须是被擦除的(即其值为0xFFFF),也可以理解为,写入数据只能把位写0,不能置1。 写入速度≤24MHz。 擦除方式:页擦除和正片擦除(这个要注意,如果你是做数据保存

Simple NASM “boot program” not accessing memory correctly?

自古美人都是妖i 提交于 2019-11-30 05:41:14
问题 **Note that when I say boot program, I don't mean a program that boots an OS. I mean, a simple program that runs when you start up the computer and does something. Alright, so I'm not extremely well-versed in Assembly/NASM, but I think I have a good enough grasp on it to write simple boot programs. Well, I thought I had a good enough grasp. Apparently not. I tried a simple boot program I found online. It ran fine (prints the letter 'A'). I then modified it to print a letter stored in memory.