qemu

Qemu flash boot up does not work

我怕爱的太早我们不能终老 提交于 2019-12-21 05:43:08
问题 I have a rather old (published in 2009) embedded ARM linux book that uses u-boot and qemu . The usage of qemu with the u-boot binary explained in the book is as follows: qemu-system-arm -M connex -pflash u-boot.bin -nographic It uses qemu 0.9.1, and mine is 2.1.0: qemu-system-arm --version QEMU emulator version 2.1.0, Copyright (c) 2003-2008 Fabrice Bellard When I executed the same command, however, I got these error messages. qemu-system-arm: failed to read the initial flash content qemu

Set up Beagleboard emulator with qemu in Ubuntu

狂风中的少年 提交于 2019-12-21 05:16:31
问题 To setup qemu for Beagleboard in Ubuntu 14.04, I am following steps given in link below: http://www.cnx-software.com/2011/09/26/beagleboard-emulator-in-ubuntu-with-qemu/ When I tried to run ALIP image in qemu by command : sudo qemu-system-arm -M beagle -m 256 -drive file=./beagle_sd_alip_x11.img,if=sd,cache=writeback -clock unix -serial stdio -device usb-kbd -device usb-mouse I got following error : qemu-system-arm: -M beagle: Unsupported machine type Use -machine help to list supported

qemu guest automation

旧街凉风 提交于 2019-12-20 23:32:07
问题 I've not been able to find any documentation stating the existence of an API that can be used to automate things inside of a qemu guest. For example, I would like to launch a process inside of the guest machine from the host machine. Libvirt does not appear to contain such functionality. 回答1: As far as I know, the only way to communicate to the guest is through the network bridge. 回答2: [Note: Automation without using any virtualization API. From my blog post.] Step 1: By default, qemu uses

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

Simple kernel won't boot in GRUB

跟風遠走 提交于 2019-12-20 08:36:20
问题 I'm learning a bit of OS development from OSDev.org. I have a kernel and I'm trying to boot in GRUB Legacy (0.97) using qemu. However, when I type kernel 200+9 , I get the message [Multiboot-elf, <0x100000:0x80:0x4008>(bad), entry=0x10000c] This is what I expect except for the (bad) part. If I type boot now GRUB just hangs. I think the numbers 0x100000, 0x44, 0x4008 stand for the .text segment start address, the .bss start address, and the .bss section size, respectively. I think this because

wrong memory locations when debugging in qemu with gdb

我们两清 提交于 2019-12-20 04:37:49
问题 I'm writing a little kernel in assembler. I'm running it in QEMU and have some problems with some bugs. Now I want to debug the kernel with dbg. So I assembled it like so: $ nasm -g -f elf -o myos.elf myos.asm $ objcopy --only-keep-debug myos.elf myos.sym $ objcopy -O binary myos.elf myos.bin Then I run it in QEMU with: $ qemu-system-i386 -s -S myos.bin Then I connect with gdb: $ gdb (gdb) target remote localhost:1234 Remote debugging using localhost:1234 0x0000fff0 in ?? () symbol-file myos

How to debug cross-compiled QEMU program with GDB?

蹲街弑〆低调 提交于 2019-12-20 04:15:41
问题 I'm having trouble debugging a simple program running in QEMU with GDB. GDB seems unable to find where I am in the program (in that it always displays ?? as my current location), and it never hits any breakpoint I set. In one terminal, I run QEMU: $ cat add.c int main() { int x = 9; int v = 1; while (1) { int q = x + v; } return 0; } $ riscv64-unknown-elf-gcc add.c -g $ qemu-system-riscv64 -gdb tcp::1234 -drive file=a.out,format=raw And in another terminal, I run GDB: $ riscv64-unknown-elf

How to emulate an i2c device on QEMU x86?

半腔热情 提交于 2019-12-20 03:50:31
问题 I am work on QEMU 1.5/1.6, but haven't seen any docs for adding an device on i2c bus. Can any one help? Thanks! 回答1: OK, nobody interested in this issue. I post my own solution. Cause QEMU does not support I2C bus level data transfer, it has delay when transfer multi-touch data from QEMU to guest Linux. So we create a shared memory on guest Linux kernel driver, and QEMU transfers the data directly through the shared memory, and it has a good speed. 来源: https://stackoverflow.com/questions

UART communication in Gem5 with ARM Bare-metal

依然范特西╮ 提交于 2019-12-20 02:35:36
问题 I am currently working with Gem5 and I have to access via UART from my Host to ARMv8 bare-metal option, so i tried lots way but i stocked yet. could you please let me know, how can i map my host's Serial port to ARMv8's Serial Port in bare-metal type programming. Any help would be appreciated 回答1: Working setups This repository contains a highly automated working example. Features: works on both QEMU and gem5 works on both arm and aarch64 newlib allows using the standard C library optionally