Giter Site home page Giter Site logo

xilinx / qemu Goto Github PK

View Code? Open in Web Editor NEW
231.0 36.0 150.0 312.32 MB

Xilinx's fork of Quick EMUlator (QEMU) with improved support and modelling for the Xilinx platforms.

Home Page: https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/821395464/QEMU+User+Documentation

License: Other

Python 3.47% C 82.99% Haxe 0.33% C++ 10.16% Objective-C 0.11% Assembly 0.62% Shell 1.36% Perl 0.22% Makefile 0.11% NSIS 0.01% GDB 0.01% Emacs Lisp 0.01% GLSL 0.01% SmPL 0.03% Dockerfile 0.01% Pawn 0.03% Meson 0.43% SourcePawn 0.08% Vim Script 0.01% POV-Ray SDL 0.06%
c qemu tcg

qemu's Introduction

QEMU README

QEMU is a generic and open source machine & userspace emulator and virtualizer.

QEMU is capable of emulating a complete machine in software without any need for hardware virtualization support. By using dynamic translation, it achieves very good performance. QEMU can also integrate with the Xen and KVM hypervisors to provide emulated hardware while allowing the hypervisor to manage the CPU. With hypervisor support, QEMU can achieve near native performance for CPUs. When QEMU emulates CPUs directly it is capable of running operating systems made for one machine (e.g. an ARMv7 board) on a different machine (e.g. an x86_64 PC board).

QEMU is also capable of providing userspace API virtualization for Linux and BSD kernel interfaces. This allows binaries compiled against one architecture ABI (e.g. the Linux PPC64 ABI) to be run on a host using a different architecture ABI (e.g. the Linux x86_64 ABI). This does not involve any hardware emulation, simply CPU and syscall emulation.

QEMU aims to fit into a variety of use cases. It can be invoked directly by users wishing to have full control over its behaviour and settings. It also aims to facilitate integration into higher level management layers, by providing a stable command line interface and monitor API. It is commonly invoked indirectly via the libvirt library when using open source applications such as oVirt, OpenStack and virt-manager.

QEMU as a whole is released under the GNU General Public License, version 2. For full licensing details, consult the LICENSE file.

Documentation

Documentation can be found hosted online at https://www.qemu.org/documentation/. The documentation for the current development version that is available at https://www.qemu.org/docs/master/ is generated from the docs/ folder in the source tree, and is built by Sphinx.

Building

QEMU is multi-platform software intended to be buildable on all modern Linux platforms, OS-X, Win32 (via the Mingw64 toolchain) and a variety of other UNIX targets. The simple steps to build QEMU are:

mkdir build
cd build
../configure
make

Additional information can also be found online via the QEMU website:

Submitting patches

The QEMU source code is maintained under the GIT version control system.

git clone https://gitlab.com/qemu-project/qemu.git

When submitting patches, one common approach is to use 'git format-patch' and/or 'git send-email' to format & send the mail to the [email protected] mailing list. All patches submitted must contain a 'Signed-off-by' line from the author. Patches should follow the guidelines set out in the style section of the Developers Guide.

Additional information on submitting patches can be found online via the QEMU website

The QEMU website is also maintained under source control.

git clone https://gitlab.com/qemu-project/qemu-web.git

A 'git-publish' utility was created to make above process less cumbersome, and is highly recommended for making regular contributions, or even just for sending consecutive patch series revisions. It also requires a working 'git send-email' setup, and by default doesn't automate everything, so you may want to go through the above steps manually for once.

For installation instructions, please go to

The workflow with 'git-publish' is:

$ git checkout master -b my-feature
$ # work on new commits, add your 'Signed-off-by' lines to each
$ git publish

Your patch series will be sent and tagged as my-feature-v1 if you need to refer back to it in the future.

Sending v2:

$ git checkout my-feature # same topic branch
$ # making changes to the commits (using 'git rebase', for example)
$ git publish

Your patch series will be sent with 'v2' tag in the subject and the git tip will be tagged as my-feature-v2.

Bug reporting

The QEMU project uses GitLab issues to track bugs. Bugs found when running code built from QEMU git or upstream released sources should be reported via:

If using QEMU via an operating system vendor pre-built binary package, it is preferable to report bugs to the vendor's own bug tracker first. If the bug is also known to affect latest upstream code, it can also be reported via GitLab.

For additional information on bug reporting consult:

ChangeLog

For version history and release notes, please visit https://wiki.qemu.org/ChangeLog/ or look at the git history for more detailed information.

Contact

The QEMU community can be contacted in a number of ways, with the two main methods being email and IRC

Information on additional methods of contacting the community can be found online via the QEMU website:

qemu's People

Contributors

afaerber avatar agraf avatar aliguori avatar alistair23 avatar aurel32 avatar berrange avatar blueswirl avatar bonzini avatar davidhildenbrand avatar dgibson avatar ebblake avatar edgarigl avatar ehabkost avatar elmarco avatar figlesia-xilinx avatar gkurz avatar huth avatar jan-kiszka avatar jnsnow avatar kevmw avatar kraxel avatar legoater avatar mcayland avatar mstsirkin avatar philmd avatar pm215 avatar rth7680 avatar stefanharh avatar stsquad avatar xanclic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qemu's Issues

update to newer qemu?

I'm in the process of writing a new chardev frontend for some custom hardware and the mainline tree has diverged substantially from Xilinx/qemu in this area... Are there any imminent plans to advance the Xilinx/qemu tree closer to mainline?

Co-simulate QEMU with SystemC

Hello,

Please find attached the build file used for generating the QNX kernel.
minimal-build.txt

Problem Statement: Not able to connect Co-simulation sample application with QNX OS on QEMU.

From the github repo: https://github.com/xilinx/systemctlm-cosim-demo. we have compiled and used the sample SystemC application.

Command used for executing Systemc co-simulation application -
LD_LIBRARY_PATH=/path/to/systemc-2.3.1/lib-linux64/ ./demo-app unix:/tmp 10000

Following command is used to boot QNX on qemu -

./qemu-system-aarch64 -M xlnx-zcu102 -m 8G -serial mon:stdio -display none \
-device loader,file=QNX-IFS.bin,cpu-num=0
-machine-path /tmp -icount 1 -sync-quantum 10000

When the above command is executed with -icount 1 the QNX kernel hangs while booting. If -icount 1 is not used the kernel does not wait for connection with Co-simulation application (SystemC application) and directly boots without waiting for connection.

Can you please help us in this issue ?

Regards
Asif

Creating and reloading snapshots for zynqmp with cosim

I'm trying to create and load snapshots for the Qemu side in a cosim enviornment using the qemu monitor. With a separate qemu instance for the zynqmp PMU I can't seem to load a saved VM regardless of how I save a snapshot (live save or stop then save). If I try to save and load two separate a snapshot for the the zynqmp and microblaze pmu it still doesn't work. By doesn't load I mean just hangs on startup if I run the following command with -loadvm TAG.

$QEMU_PATH/aarch64-softmmu/qemu-system-aarch64 -M arm-generic-fdt -serial mon:stdio -serial /dev/null -display none -device loader,file=$IMAGE_PATH/images/linux/bl31.elf,cpu-num=0 -device loader,file=$IMAGE_PATH/images/linux/Image_Modified,addr=0x00080000 -device loader,file=$IMAGE_PATH/images/linux/system_Modified.dtb,addr=0x1407f000 -device loader,file=$IMAGE_PATH/images/linux/linux-boot_Modified.elf -gdb tcp::9000 -dtb $IMAGE_PATH/images/linux/system_Modified.dtb -net nic -net nic -net nic -hw-dtb $IMAGE_PATH/images/linux/zcu102-arm.cosim.dtb -machine-path /tmp/tmp.xilinxcosim -global xlnx,zynqmp-boot.cpu-num=0 -global xlnx,zynqmp-boot.use-pmufw=true -drive if=none,format=qcow2,file=dummy1.qcow2 -net user,hostfwd=tcp::2222-:22 -net nic -m 4G -loadvm TAG

I'm unsure if snapshotting is supported or not in this case or if I'm doing something wrong. I followed this tutorial: https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/28737647/QEMU+LibSystemCTLM-SOC and used a different image built with petalinux.
I'm a little inexperienced with using qemu so I apologize if part of my question don't make a lot of sense.

Memory corruption bug in fdt_generic_util.c

Recently I decided to try building the Xilinx QEMU simulator so that I could experiment with the MPSoC virtual machine. Along the way I discovered a memory corruption bug in the code used to parse the dtb files. The reason I found this bug is because I tried to build the code on FreeBSD rather than Linux.

Getting the code to build on FreeBSD was a bit tricky in the first place because it seems it's only been developed/tested on Linux (it's not clear if you support Windows too), As a result, there are some Linux-isms and bitrot which have crept into the code. For example:

  1. The build instructions on the Xilinx web site tell you to build only the aarch64 and microblaze simulators, Unfortunately the focus on just these two virtual machines has resulted in bitrot which prevents the other simulators for compiling. Try not restricting the built to those specific targets, and it will fall over in hw/acpi/pcihp.c due to a type mismatch.

  2. The function memory_region_do_set_ram() in memory.c depends on Linux-specific APIs. In the official QEMU source tree this function is restricted to Linux using conditional compilation. I dealt with this temporarily by commenting out the call to qemu_ram_alloc_from_file() in this function. This routine doesn't seem to be necessary for the expected simulator use cases anyway.

  3. qemu-nand-creator.c unconditionally uses lseek64(). This is a common cross-platform portability issue (I'm not sure if the fault lies with POSIX or Sun Microsystems).. But on FreeBSD, there is no lseek64() because lseek() already handles 64-bit offsets.

  4. The added DTB parsing code has references to the function rawmemchr(). This function is a GNU libc extension that doesn't exist on other platforms.

I managed to overcome these issues and got the code to build on my FreeBSD/amd64 9.2-RELEASE system. Then I downloaded the zcu102-arm.dts file, compiled it with the dtc tool, and tried to run the aarch64 simulator using the command:

qemu-system-aarch64 -M arm-generic-fdt -hw-dtb zcu102-arm.dtb

Unfortunately the simulator crashed during initialization.

It turns out this is due to the following:

In hw/core/fdt_generic_util.c, you have the following code:

[...]
typedef struct QEMUIRQSharedState {
qemu_irq sink;
int num;
bool (merge_fn)(bool *, int);
/
FIXME: remove artificial limit */

define MAX_IRQ_SHARED_INPUTS 16

bool inputs[MAX_IRQ_SHARED_INPUTS];

} QEMUIRQSharedState;
[...]

[...]
static void qemu_irq_shared_handler(void *opaque, int n, int level)
{
QEMUIRQSharedState *s = opaque;

s->inputs[n] = level;
qemu_set_irq(s->sink, s->merge_fn(s->inputs, s->num));

}
[...]

Notice that the inputs[] array is 16 elements in size. It turns out however that when using the zcu102-arm.dts machine description, the number of possible 'inputs' is much grater than 16. It's more like 48 or so. However if qemu_irq_shared_handler(() is value for n which is greater than 15, then this line of code causes heap corruption due to writing outside the array bounds:

s->inputs[n] = level;

It happens that this heap corruption does not crash the simulator on Linux, but this is just out of sheer luck. On FreeBSD, it causes some of the IRQState structures to become corrupted such that the merge_fn pointer is invalid, and the program eventually tries to branch to into the weeds.

I fixed this by changing

define MAX_IRQ_SHARED_INPUTS 16

to

define MAX_IRQ_SHARED_INPUTS 256

I don't know what the shared input limit is, but 256 slots seems to be ok for now.

Sorry I don't have any patches for you, but the fix for the heap corruption is a one-liner as you can see above.

Running qemu-system-aarch64 with xilinx-zynq-a9 results in an error

Running qemu-system-aarch64 -M xilinx-zynq-a9 always results in the following error, regardless of the other options I specify:

Unexpected error in object_property_find() at qom/object.c:995:
qemu-system-aarch64: Property '.has-security-extensions' not found
Aborted (core dumped)

I'm trying to simulate a bare metal environment on the xilinx zynq-z7010.

Is there some other way I'm supposed to be doing this? Documentation is a little hazy regarding specific use.

Generating IPI interrupts with guest QNX OS on top of QEMU with Xilinx

Hello,

We are trying to configure/generate IPI interrupts using QEMU with guest OS as QNX and xilinx machine - xlnx-zcu102.
We are using following command to boot Guest OS -

./qemu-system-aarch64 -M xlnx-zcu102 -m 8G -serial mon:stdio -display none -device loader,file=QNX-IFS.bin,cpu-num=0 -global xlnx,zynqmp-boot.cpu-num=0 -global xlnx,zynqmp-boot.use-pmufw=true

We have tried following steps -

  1. For generating the interrupts we created sender and receiver application in which sender application sets the IPI register bits
    i.e we are setting bit number 24 i.e 0x1000000. We used PL0 IPI in this and the corresponding IRQ number is 61
    (We are able to successfully write these bits to specific registers and have verified this by reading the registers. The base
    address currently is 0xFF300000U ).

  2. In receiver application we are attaching corresponding IRQ number 61 using InterruptAttach().

  3. pidin irqs command is also showing that interrupt handlers are registered.

But in the receiver side we are not able to trigger the specific interrupt that we set in the sender application.
The application is getting stuck at MsgReceive() at the receiver side reason being that correct IRQ was not triggered.

We have followed given xilinx reference https://www.xilinx.com/support/documentation/user_guides/ug1085-zynq-ultrascale-
trm.pdf , page no 322.

How can we configure/generate the interrupt and check that whether the interrupt is getting triggered or not ?

Regards
Asif

Build error on macOS: 'byteswap.h' file not found

Problem

When trying to build QEMU on macOS, I get the following error:

[...]/qemu/hw/core/remote-port-proto.c:61:12: fatal error: 'byteswap.h' file not found

To Reproduce

  1. clone the repository
  2. run
    mkdir build
    cd build
    ../configure --target-list=arm-softmmu --enable-fdt --disable-xen
    make
    

Environment

  • OS: macOS 10.15.6
  • Darwin kernel version: 19.6.0
  • Compiler: Apple clang version 11.0.0

ppc405_rom.bin missing

Upon building for ppc, I tried to run any of the powerpc405 machine models but receive the following error: “qemu-system-powerpc: Could not load PowerPC BIOS ‘ppc405_rom.bin’”. It appears the ppc405_boards.c is referencing this file but it is missing from the ppc-bios folder.

RISCV Cosimulation

Hi,
I want to try RISCV QEMU Cosimulation running baremetal RISCV application running on QEMU . Could you please provide instructions or user guide for Baremetal RISCV cosimulation? Thanks

Netowrking in QEMU with xilinx-zcu102 machine

Hello All,

I am working on the networking between my host OS linux and guest OS QNX(Running on top of qemu). I have an interface xzynq0 in my guest OS with a static/dynamic IP address.

I am executing the qemu command as follows -

qemu-system-aarch64 -M xlnx-zcu102 -m 8G -serial mon:stdio -display none -device loader,file=QNX_IFS.bin,cpu-num=0 -netdev bridge,br=virbr0,id=net0,helper=/usr/lib/qemu/qemu-bridge-helper -nographic -global xlnx,zynqmp-boot.cpu-num=0 -global xlnx,zynqmp-boot.use-pmufw=true

But the observation is when i try to ping the guest OS with some IP from my host OS, it is showing destination unreachable or when i try to ping from my guest to host it shows host is down.

I do have a virbr0 bridge in my host os -

virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

And in my guest OS the interface is -

xzynq0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
address: 00:0a:35:02:78:10
media: Ethernet 100baseTX full-duplex
status: active
inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255
inet6 fe80::20a:35ff:fe02:7810%xzynq0 prefixlen 64 scopeid 0x11

The same xzynq0 interface works in the actual target hardware.
Can you please help me out here what am i missing to enable the networking. Is it the case that bridge is not getting set correctly ? Or what can be the possible reasons for the same ?

Regards
Asif

petalinux qemu booting error

I am using xilinx-zcu102-v2020.1-final.bsp version of petalinux package. I am trying to configure tap networking backend on the pre-built images. I have created a network bridge and tap interface successfully on my host machine. This is my command to boot up qemu: petalinux-boot --qemu --prebuilt 3 --qemu-args "-netdev tap,id=mynet0,ifname=tap0,script=no,downscript=no.

The linux successfully boots-up, but it has not picked up network configuration settings. when I do ifconfig on the guest machine, it still has 10.0.2.15 ip address. Then, I change the ip address manually. But still I am not able to ping and get ssh working for my guest machine.

Compiler errors

Hi, I am trying to compile the master branch on Ubuntu 14.04, but I get lots of these errors after ./configure && make:

In file included from /usr/include/libfdt.h:55:0,
from hw/core/fdt_generic_util.c:53:
/usr/include/fdt.h:58:2: error: unknown type name ‘fdt32_t’
fdt32_t magic; /* magic word FDT_MAGIC /
^
/usr/include/fdt.h:59:2: error: unknown type name ‘fdt32_t’
fdt32_t totalsize; /
total size of DT block /
^
/usr/include/fdt.h:60:2: error: unknown type name ‘fdt32_t’
fdt32_t off_dt_struct; /
offset to structure */
^

I also tried using the branch xilinx-v2016.1 and I get a different error there:

CC hw/acpi/acpi_interface.o
hw/acpi/pcihp.c: In function ‘acpi_pcihp_pc_no_hotplug’:
hw/acpi/pcihp.c:117:34: error: ‘PCIDevice’ has no member named ‘qdev’
return (pc->is_bridge && !dev->qdev.hotplugged) || !dc->hotpluggable;
^
hw/acpi/pcihp.c:118:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
cc1: all warnings being treated as errors
make: *** [hw/acpi/pcihp.o] Error 1

What is the correct way to get qemu to compile?

Remote Port Implementation for Multi-Arch QEMU

Hello,

Can you please point me to the documentation that highlights the implementation and the internal workings of the remote port which is used to connect the ZynqMP Ultrascale+ MPSoC QEMU instance to its MicroBlaze PMU QEMU instance? Also, I want to establish a connection between two APUs using the remote port, and would like to know if this is possible using the current implementation of remote ports?

Thank you

Error building qemu on Ubuntu

Hi,

I'm following these instructions to build Qemu.
The ./configure script ends succesfully, while the build process fails.
Here's the errors.

make[1]: Entering directory '/home/ubuntu/UNI/qemu/slirp'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/ubuntu/UNI/qemu/slirp'
    CHK version_gen.h
  CC      aarch64-softmmu/target/arm/translate-a64.o
/home/ubuntu/UNI/qemu/target/arm/translate-a64.c: In function ‘disas_ldst’:
/home/ubuntu/UNI/qemu/target/arm/translate-a64.c:3193:5: error: ‘fn’ may be used uninitialized in this function [- 
Werror=maybe-uninitialized]
     fn(cpu_reg(s, rt), clean_addr, tcg_rs, get_mem_index(s),
     ^
/home/ubuntu/UNI/qemu/target/arm/translate-a64.c:3119:22: note: ‘fn’ was declared here
     AtomicThreeOpFn *fn;
                      ^
cc1: all warnings being treated as errors
/home/ubuntu/UNI/qemu/rules.mak:69: recipe for target 'target/arm/translate-a64.o' failed
make[1]: *** [target/arm/translate-a64.o] Error 1
Makefile:527: recipe for target 'aarch64-softmmu/all' failed
make: *** [aarch64-softmmu/all] Error 2

How can I solve? I've also tryed to remove the -Werror flag from ./dtc/Makefile, but the result is the same.

Xilinx-Zynq does not compile in master branch

I am trying to get the SMP support for qemu-system-arm for machine "xilinx-zynq-a9". I see that the main branch does not compile the file even though the file hw/arm/xilinx_zynq.c there in the folder.
In the big_endian branch the patch for SMP is not there but it compiles with "xilinx-zynq-a9" support.

Enabling Software Generated Interrupts

Hello All,

We are trying to enable/generate software generated interrupts in ZCU102. We are using following sequence to write to the GIC Registers -

   Read(0xF9020000)  -- Reading GICC_CTLR gives the value as    0x00000001
   Read(0xF9010004 )  -- Reading GICD_TYPER gives the value as    0x00000065 
  • Write (0xF9010000 , 0x00000003 ) // GICD_CTLR Register

  • Read (0xF9010000 )

  • Write (0xF9010084 , 0x00000001) // GICD_IGROUPR1 Register

  • Read (0xF9010084 )

  • Read(0xF9010100 ) // GICD_ISENABLER0 Register

  • Write(0xF9010F00 , 0x00010000) //GICD_SGIR Register

  • Read(0xF9010F00 )

Commands we used writing and reading to the registers-

  • out32 0xF9010000 0x00000003 // writing value - 0x00000003 to GICD_CTLR register with address 0xF9010000
  • in32 0xF9010000 // Reading value from address 0xF9010000
  • out32 0xF9010084 0x00000001
  • in32 0xF9010084
  • in32 0xF9010100
  • out32 0xF9010F00 0x00010000
  • in32 0xF9010F00

But we are not able to set the SGIR Register which gives "0" when read after writing in the above sequence. Could you please suggest the possible reason why we are not able to set the SGIR Register or something we are missing in the sequence.

Regards
Asif

Problems is fdt_init_node (fdt_generic_util.c)

Testing the variable compat_len before it is initialized.
Leaking memory (device_type = g_strdup_printf("device_type:%s", device_type);

My gawd: this is bush league stuff.

I'm working on a patch.

Sockets for Cosimulation with SystemC

Hi,
I have a usecase, where i want to run Xilinx QEMU with machine option virt-cosim to create TCP socket. Current implementation of Xilinx Qemu is supporting only Unix Socket for remote port Cosimulation. Is there a way to create a TCP Socket?

I want to run QEMU on one machine and the HW model (systemC) to run on another machine. I tried to change the rp_autocreate_chardesc function in remote-port.c file, but it doesn't seems to work

Following is the change, i changed the string pattern to tcp from unix of the following line

r = asprintf(&chardesc, "tcp:%s/qemu-rport-%s%s", machine_path, prefix, server ? ",wait,server" : "");

Can you give some suggestions how to fix the problem ?

Stalling CPUs in xilinx-qemu but not in qemu-2.8

Hello,

I try to run multiple cortex-a57 cpus. If I use qemu-stable-2.8 everything works fine and if I use only one cortex-a57 with the xilinx-qemu everything also starts. But If I try to start two or more cortex-a57 xilinx-qemu the cpus stalls during the boot.

I can reproduce it every single time with the following steps:

Download xilinx qemu:
git clone https://github.com/Xilinx/qemu.git

configure xilinx qemu:
./configure --target-list=aarch64-softmmu,microblazeel-softmmu,x86_64-softmmu --enable-fdt --disable-pie --disable-brlapi --disable-rdma --disable-rbd --disable-tcmalloc --disable-xen --disable-gtk --disable-glusterfs --disable-xfsctl --disable-kvm --disable-xen --enable-debug --enable-debug-tcg --enable-debug-info
build xilnx qemu:
make

goto the arm system:
cd aarch64-softmmu/
get the kernel:
wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.1.39.tar.xz
unpack the kernel:
tar -xf linux-4.1.39.tar.xz
goto the kernel:
cd linux-4.1.39
use this config:
linux-4.1.config .txt
build the kernel:
make ARCH=arm64 CROSS_COMPILE =aarch64-linux-gnu- -j4 KCPPFLAGS= "-fno-pic -Wno-pointer-sign"
go back
cd..

This here starts fine:
./qemu-system-aarch64 -m 512 -M virt -cpu cortex-a57 -kernel linux-4.1.39/arch/arm64/boot/Image -append "init=/init lpj=34920500 console=ttyAMA0 console=ttyS0 nowatchdog rcupdate.rcu_cpu_stall_suppress=1 console=/dev/ttyS0" -nographic -smp 1
But with two cpus we stall before the linux boot:
./qemu-system-aarch64 -m 512 -M virt -cpu cortex-a57 -kernel linux-4.1.39/arch/arm64/boot/Image -append "init=/init lpj=34920500 console=ttyAMA0 console=ttyS0 nowatchdog rcupdate.rcu_cpu_stall_suppress=1 console=/dev/ttyS0" -nographic -smp 2

Maybe this is like the "target-arm: translate-a64: Fix store exclusive operations" fix.
https://github.com/Xilinx/qemu/commit/6ad38bcdbc2c1b532842704b1f21cd089009c6f9

How can we fix that?
I don't know why two or more cpus are stalling.
I have tried to remove every xilinx device in default-configs/arm-softmmu.mak , but the problem still exist.
I think the problem is in the target-arm/translate.c.

I would like to get an instruction about what it can be, or how I can fix it up.
Have a nice day

ERROR: glib-2.48 gthread-2.0 is required to compile QEMU

I'm trying to follow your installation tutorial, but it fails when I run

./configure --target-list="aarch64-softmmu,microblazeel-softmmu" --enable-fdt --disable-kvm --disable-xen

The error thrown in the terminal is

ERROR: glib-2.48 gthread-2.0 is required to compile QEMU

At this point, I'm having trouble reverting my system to those versions.

HW does not initialize properly with arm-generic-fdt and smp 1

When running qemu with smp 1, hardware initialization fails at severall assertions. Number of irq and gpio depends on number of CPU, but other initialization don't and just use DTB information. It makes following assertions fail :

hw/core/qdev:324
hw/core/sysbus.c:44

To reproduce bug : use arm-generic-fdt machine with dtb made for running smp 2 and run it smp 1.

Build error on macOS: no member named 'sem' in 'struct QemuSemaphore'

Problem

When trying to build QEMU on macOS, I get the following error, in addition to #47:

[...]/qemu/hw/core/remote-port.c:496:47: error: no member named 'sem' in 'struct QemuSemaphore'
                sem_getvalue(&s->rx_queue.sem.sem, &sval);
                              ~~~~~~~~~~~~~~~ ^

which originates from the definition of QemuSemaphore that does not include sem when CONFIG_SEM_TIMEDWAIT is not defined:

struct QemuSemaphore {
#ifndef CONFIG_SEM_TIMEDWAIT
pthread_mutex_t lock;
pthread_cond_t cond;
unsigned int count;
#else
sem_t sem;
#endif
bool initialized;
};

To Reproduce

  1. clone the repository
  2. comment out #include <byteswap.h> in hw/core/remote-port-proto.c to temporarily get rid of #47
  3. run
    mkdir build
    cd build
    ../configure --target-list=arm-softmmu --enable-fdt --disable-xen
    make
    

Environment

  • OS: macOS 10.15.6
  • Darwin kernel version: 19.6.0
  • Compiler: Apple clang version 11.0.0

Booting qnx os with qemu

Hello,

I am trying to boot QNX OS on top of qemu using QNX IFS (aarch64).

Following command is being used -

qemu-system-aarch64 -machine xlnx-zcu102 -m 1G -kernel IFS.bin -drive file=filesystem.qcow2,if=none,id=drv0 -nographic -serial mon:stdio

Using this it gives a shutdown error and the kernel does not load.

Can someone help how we can boot the QNX kernel on top of qemu with xilinx machine ?

Thanks

qemu-system-arm causes core dumped

Hi xilinx,

I am using the Xilinx/qemu now. The configuration and compilation are successful. I have built xilinx/qemu/build/aarch64-softmmu and xilinx/qemu/build/arm-softmmu.
qemu-system-aarch64 works very well, but I failed to use qemu-system-arm, even to check the machine models it supports.
The output with the error massage is in the following.

~/Documents/xilinx/qemu/build/arm-softmmu$ ./qemu-system-arm -M help

Xilinx QEMU Aug 24 2016 14:38:39.

**
ERROR:/home/jiahuan/Documents/xilinx/qemu/qom/object.c:165:type_get_parent: assertion failed: (type->parent_type != NULL)
Aborted (core dumped)

I am running qemu in Linux OS emulated by VirtualBox since my PC is win7.
I have tried with the mainline of Xilinx/qemu and the two active branches as well. All of them produce such an Error when running qemu-system-arm.
I saw an old issue #12 where you also discussed about such a problem. From your wards in this issue, this problem should have been solved, but I don't know why it happened with the latest xilinx/qemu versions.

Any tips will be appreciated.

Best regards,
Jiahuan

Compile warning on branch xilinx-master

hw/pci-host/xilinx_axipcie.c: In function ‘xilinx_axi_pcie_reset’:
hw/pci-host/xilinx_axipcie.c:139:40: warning: iteration 13u invokes undefined behavior [-Waggressive-loop-optimizations]
if (xilinx_axi_pcie_reg_info[i].name) {
^
hw/pci-host/xilinx_axipcie.c:138:5: note: containing loop
for (i = 0; i < sizeof(s->regs); ++i) {
^

This is being built using gcc 4.8.1 on Fedora 19.

Unable to compile hw/block/xen_disk

Hello,

I have downloaded with:

git clone git://github.com/Xilinx/qemu.git

I have install the dependencies:

sudo apt install libglib2.0-dev libgcrypt20-dev autoconf automake libtool qemu

I have checked out with:

git submodule update --init pixman dtc

When building with:

./configure --target-list="aarch64-softmmu,microblazeel-softmmu" --enable-fdt --disable-kvm

I get a warning that halts the build fails:
CC hw/block/pflash_cfi01.o CC hw/block/pflash_cfi02.o CC hw/block/xen_disk.o hw/block/xen_disk.c: In function ‘ioreq_runio_qemu_aio’: hw/block/xen_disk.c:557:9: error: implicit declaration of function ‘blk_aio_preadv’ [-Werror=implicit-function-declaration] blk_aio_preadv(blkdev->blk, ioreq->start, &ioreq->v, 0, ^ hw/block/xen_disk.c:557:9: error: nested extern declaration of ‘blk_aio_preadv’ [-Werror=nested-externs] hw/block/xen_disk.c:571:9: error: implicit declaration of function ‘blk_aio_pwritev’ [-Werror=implicit-function-declaration] blk_aio_pwritev(blkdev->blk, ioreq->start, &ioreq->v, 0, ^ hw/block/xen_disk.c:571:9: error: nested extern declaration of ‘blk_aio_pwritev’ [-Werror=nested-externs] cc1: all warnings being treated as errors /home/drago/MasterArbeit/qemu/qemu/rules.mak:57: recipe for target 'hw/block/xen_disk.o' failed make: *** [hw/block/xen_disk.o] Error 1
My system is a normal Linux Ubuntu:
$ uname -a Linux XXX 4.2.0-42-generic #49-Ubuntu SMP Tue Jun 28 21:26:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

$ gcc --version gcc (Ubuntu 5.2.1-22ubuntu2) 5.2.1 20151010 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I have nothing changed and have tried it twice. Every time I get the same error. Must I Ignore the warning ?

best regards,
Benjamin

error: static assertion failed: "arm generic timer needs __Int128 defined"

Hi,

Accordingly to the instruction from https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842060/QEMU we have downloaded the Xilinx QEMU and tried to build it on Ubuntu 16.04.5 32Bit OS. We have done all the following steps from the instruction:
$ git clone git://github.com/Xilinx/qemu.git
$ cd qemu
$ git submodule update --init dtc
$ ./configure --target-list="aarch64-softmmu,microblazeel-softmmu" --enable-fdt --disable-kvm --disable-xen
$ make
and we have got the error during the compilation:
/home/qemu/include/qemu/int128.h:168:1: error: static assertion failed: "arm generic timer needs __Int128 defined"
_Static_assert(0, "arm generic timer needs __Int128 defined");
^
/home/qemu/rules.mak:66: recipe for target 'stubs/qmp_pc_dimm.o' failed

Could you please help to solve this issue.

Last commit: commit 0b2f6a4

Thanks,
Best Regards,
Piotr

network-buffering

How can I separately run networking buffering thing for qemu while not providing micro-checkpointing tolerance support to it? I just want to have network buffering support which I can call manually.
Where is the script which do that?

QEMU can't realize the axi dma node

I am having an issue emulating my board, which is base on the zynq-700 board series. When I run qemu, it segfaults and dumps a core file, here is the backtrace.

I am using the 2017.3 tag for both the kernel and qemu. and here is my device tree.

The command I use to launch qemu:
/root/qemu/aarch64-softmmu/qemu-system-aarch64 -M arm-generic-fdt-7series -machine linux=on -serial /dev/null -serial mon:stdio -nographic -dtb dtree.dtb -kernel /root/linux-xlnx/arch/arm/boot/zImage -drive if=sd,format=raw,index=0,file=/root/rootfs/sd.img -append "root=/dev/mmcblk0 rw rootwait rootfstype=ext2"

Qemu segmentation fault on Ubuntu

Hello,

I am trying to run QEMU (this repository) on an arm-generic-fdt-7series. My goal for now is to get to the boot-loader, but when I run the following command:

./aarch64-softmmu/qemu-system-aarch64 -M arm-generic-fdt-7series -serial mon:stdio -serial /dev/null -display none -device loader,addr=0xfd1a0104,data=0x8000000e,data-len=4 -device loader,file=/home/tgeorge/QEMU/qemu/xilinx2016.2/zcu102/bl31.elf,cpu-num=0 -device loader,file=/home/tgeorge/QEMU/qemu/xilinx2016.2/zcu102/u-boot.elf -hw-dtb /home/tgeorge/QEMU/qemu/xilinx2016.2/zcu102/system.dtb

I get a segmentation fault (core dumped) in the terminal. Is this an issue with my command (I got from http://www.wiki.xilinx.com/QEMU+-+Zynq+UltraScalePlus), or is this an issue with the installation/bug?

Thank you for your help!

ERROR: glib-2.48 gthread-2.0 is required to compile QEMU

As reported in #40,
I have installed most of the dependencies below. I am still getting this error.

sudo apt install libglib2.0-dev libgcrypt20-dev zlib1g-dev autoconf automake libtool bison flex libpixman-1-dev libnfs-dev libiscsi-dev libaio-dev libbluetooth-dev libbrlapi-dev libbz2-dev libcap-dev libcap-ng-dev libcurl4-gnutls-dev libgtk-3-dev

../configure --target-list="aarch64-softmmu,microblazeel-softmmu" --enable-debug --enable-fdt --disable-kvm --disable-xen

Cosimulation Baremetal

Hi,

Can you please provide QEMU Cosimulation + SystemC examples for Baremetal code, Xilinx Cosimulation instructions show only Linux Cosimulation. I am very much interested to know how this works with Baremetal or any RTOS

Where is xilinx-master branch ?

Hello, the xilinx-master branch disappeared, it was the only version of qemu I managed to make work for zynq with device tree.

Furthermore xilinx wiki http://www.wiki.xilinx.com/qemu reference this branch. Could you please provide back this branch or update the wiki to point to a working version of qemu.

Regards

Fails to build with newer glibc (2.49) due to `_BSD_SOURCE` macro

When building with

./configure --target-list="aarch64-softmmu" --enable-fdt --disable-kvm

I get a warning that halts the build:

In file included from /usr/include/stdint.h:25:0,
             from /usr/lib/gcc/x86_64-linux-gnu/5/include/stdint.h:9,
             from /home/salbert/work/hzynq/zynq-vm/qemu/hw/core/remote-port-proto.c:27:
/usr/include/features.h:148:3: error: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Werror=cpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"

I think this has to do with compiling against a newer glibc (2.49.6-1).

Replacing _BSD_SOURCE with _DEFAULT_SOURCE in remote-port-proto.c fixes the build, but I don't know whether there are any side effects.

Debugging remote-port of xilinx QEMU

Hi,

I want to understand the flow how the remote-port protocol working in Xilin Qemu. Can you please suggest a good way of doing, i can use gdb but gdb is good only when i know the basic flow.

Thanks and Regards
Rajesh

Uncomplete ARM GICv1 TrustZone implementation

Hi,

the current ARM GIC implementation ignores writes to the IGROUP register if the GIC is a revision 1 GIC. This is not the correct behaviour as a revision 1 GIC with TrustZone extension does have the IGROUP register (see ARM Generic Interrupt Controller Architecture Specification 2.0, Page 4-91).

This is the check in the source code:
https://github.com/Xilinx/qemu/blob/pub/2015.2.plnx/hw/intc/arm_gic.c#L688

This results in qemu ignoring that I configured all interrupts to group 1, but won't enable any interrupt from non-secure either because qemu still thinks they belong to group 0.
https://github.com/Xilinx/qemu/blob/pub/2015.2.plnx/hw/intc/arm_gic.c#L712

A quick glance over the upstream qemu showed that they have fixed it by introducing an "gic_has_groups()" call to determine the existence of the IGROUP register and not simply the revision.
http://git.qemu.org/?p=qemu.git;a=blob;f=hw/intc/arm_gic.c;h=13e297d52eb75783e8fef53c05f373a453240112;hb=HEAD#l752

Regards,

Robert

Unable to compile using GCC6 (fc24)

I tried to build xilinxs qemu as described here and get the following error:

[...]
/home/user/xilinx-qemu/hw/intc/arm_gic.c:1322:30: error: ‘gic_cpu_ops’ defined but not used [-Werror=unused-const-variable=]
static const MemoryRegionOps gic_cpu_ops = {
                              ^~~~~~~~~~~
[...]
cc1: all warnings being treated as errors
/home/user/xilinx-qemu/rules.mak:57: recipe for target 'hw/intc/arm_gic.o' failed
make: *** [hw/intc/arm_gic.o] Error 1
make: *** Waiting for unfinished jobs....

I am using Fedora 24 (fc24) and gcc from the official repository.

$ gcc --version
gcc (GCC) 6.2.1 20160916 (Red Hat 6.2.1-2)
Copyright (C) 2016 Free Software Foundation, Inc.

Seg faults with Xilinx QEMU

Hello,
I cloned the Xilinx QEMU repo from -
https://github.com/Xilinx/qemu.git
I am on master branch and my repo is current.

I have updated dtc, capstone and ui directories in my repo in which I got the code populated by running commands -
git submodule update --init dtc
git submodule update --init capstone
and
git submodule update --init ui/keycodemapdb
respectively.

I ran -
./configure --target-list=aarch64-softmmu --enable-fdt --disable-kvm --disable-xen
make -j4

I now have the executable - /my/work/dir/aarch64-softmmu/qemu-system-aarch64.exe

After referring to - http://www.wiki.xilinx.com/QEMU+-+Zynq+UltraScalePlus
I now run QEMU with the command -
/my/work/dir/aarch64-softmmu/qemu-system-aarch64 -M arm-generic-fdt
-serial mon:stdio -display none -device loader,addr=0xfd1a0104,data=0x8000000e,data-len=4
-device loader,file=/path/to/2017.4-zcu102-release/bl31.elf,cpu-num=0
-device loader,file=/path/to/2017.4-zcu102-release/u-boot.elf
-hw-dtb /path/to/2017.4-zcu102-release/system.dtb

I obtained the bl31.elf, u-boot.elf and the system.dtb files from -
http://www.wiki.xilinx.com/file/detail/2017.4-zcu102-release.tar.xz
I am trying to bring up the arm based ZCU102 board.

The above command gave me a "Segmentation fault"

Suspecting the .dtb file I proceeded to clone a copy of the qemu-devicetrees from
https://github.com/Xilinx/qemu-devicetrees.git
I clone from master branch and got the latest code as of 4/11/2018 -
And ran make. I then used the zcu102-arm.dtb file from the newly created directory -> LATEST/LQSPI_XIP/
and ran -

/path/to/aarch64-softmmu/qemu-system-aarch64 -M arm-generic-fdt
-serial mon:stdio -device loader,addr=0xfd1a0104,data=0x8000000e,data-len=4
-device loader,file=/path/to/2017.4-zcu102-release/bl31.elf,cpu-num=0
-device loader,file=/path/to/2017.4-zcu102-release/u-boot.elf
-hw-dtb /path/to/newly/made/dtb/zcu102-arm.dtb

I now get on STDOUT -
VNC server running on ::1:5900
NOTICE: ATF running on XCZUUNKN/QEMU v1/RTL0.0 at 0xfffea000
NOTICE: BL31: Secure code at 0x60000000
NOTICE: BL31: Non secure code at 0x8000000
NOTICE: BL31: v1.3(release):47af34b
NOTICE: BL31: Built : 17:45:01, Dec 14 2017
zynqmp_clk_get_peripheral_rate mio read fail
failed to get rate
zynqmp_clk_get_peripheral_rate mio read fail
failed to get rate
zynqmp_clk_get_peripheral_rate mio read fail
failed to get rate
zynqmp_clk_get_peripheral_rate mio read fail
failed to get rate
zynqmp_clk_get_peripheral_rate mio read fail
failed to get rate
No serial driver found
resetting ...

Before I proceed any further with debug I just wanted to reach out and ask if I am using the right dtb file.
The Xilinx wiki page ->
http://www.wiki.xilinx.com/QEMU+-+Zynq+UltraScalePlus
mentions running u-boot with zynqmp-qemu-arm.dtb
Where can I find zynqmp-qemu-arm.dtb?
I cant seem to build it from qemu-devicetrees.git.

Any help with tweaking my command line is appreciated. I am just trying to bring up zcu102 straight out of the Xilinx/QEMU box.

I am running on -
MINGW64_NT-6.1 A6030524 2.5.2(0.297/5/3) 2016-07-15 08:31 x86_64 Msys
gcc version 6.1.0 (Rev1, Built by MSYS2 project)

_DEFAULT_SOURCE redefined

Hi,
On my system (the latest release of ArchLinux), config-host.mak contains the same flag and would cause a redefinition of this macro. The following is my fix and perhaps you can apply this patch to your master branch.

Compiler: g++ (GCC) 7.2.0

From 58cb86a73af85ed7be12f6f5edc56bdcb76f9d4a Mon Sep 17 00:00:00 2001
From: Medicine Yeh <[email protected]>
Date: Fri, 3 Nov 2017 12:20:43 +0800
Subject: [PATCH 2/2] Fix _DEFAULT_SOURCE redefined in Xilinx QEMU

---
 hw/core/remote-port-proto.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/core/remote-port-proto.c b/hw/core/remote-port-proto.c
index 4fc29ed..a2c7946 100644
--- a/hw/core/remote-port-proto.c
+++ b/hw/core/remote-port-proto.c
@@ -23,7 +23,9 @@
  * THE SOFTWARE.
  */
 
+#ifndef _DEFAULT_SOURCE
 #define _DEFAULT_SOURCE
+#endif
 #include <stdint.h>
 #include <stdlib.h>
 #include <stdio.h>
-- 
2.14.2

How to fix link errors?

Hello, xilinx developers.
I am new to Xilinx qemu and have a question.

I read a Xilinx wiki page (http://www.wiki.xilinx.com/QEMU)
and tried to follow the instruction there.
I checked out xilinx-master branch (commit 79eef01) and I tried

$ ./configure --target-list="arm-softmmu,microblazeel-softmmu" --enable-fdt --disable-kvm --extra-cflags=-fno-aggressive-loop-optimizations
$ make

I got link errors like as:

LINK arm-softmmu/qemu-system-arm
device_tree.o: In function qemu_devtree_num_props': /home/yamada/workspace/zynq-pf/qemu-xlnx/device_tree.c:357: undefined reference tofdt_first_property_offset'
/home/yamada/workspace/zynq-pf/qemu-xlnx/device_tree.c:359: undefined reference to fdt_next_property_offset' device_tree.o: In functionqemu_devtree_get_props':
/home/yamada/workspace/zynq-pf/qemu-xlnx/device_tree.c:372: undefined reference to fdt_first_property_offset' /home/yamada/workspace/zynq-pf/qemu-xlnx/device_tree.c:376: undefined reference tofdt_getprop_by_offset'
/home/yamada/workspace/zynq-pf/qemu-xlnx/device_tree.c:374: undefined reference to `fdt_next_property_offset'

How can I resolve this problem?

By the way, --extra-cflags=-fno-aggressive-loop-optimizations was not mentioned on
in the wiki page, but it was necessary on configuration for me to work around aggressive-loop-optimization error.
I am compiling qemu on my Ubuntu 13.10 box and the gcc version is 4.8.1

Zynq SMP 2

Hi,

A few years ago this repository's hw/arm/xilinx_zynq.c supported multi-core (2 cores). Now it seems to only support 1 core.

$ qemu-system-arm -M xilinx-zynq-a9 -smp 2
-serial vc:80Cx40C -serial vc:80Cx40C -serial vc:80Cx40C -serial vc:80Cx40C
-no-reboot -icount auto -m 1024M -kernel ../fmp_1.4.0/obj/obj_sample/fmp.bin
-> qemu-system-arm: Invalid SMP CPUs 2. The max CPUs supported by machine 'xilinx-zynq-a9' is 1

Was there any specific reason to remove that support?
Would it be hard to restore it?
I can help if you give me a short overview of the problem.

Thanks,
Daniel

arrow keys is not working in petalinux when use XilinxQemu from windows sdk

Hello All,

arrow Keys is not working in xilinx qemu prebuilt image provided in Xilinx SDK v2018.3 window10 platform using prebuilt petalinux provided by xilinx.

steps:

  • run pmu =>qemu-system-microblazeel -M microblaze-fdt -nographic -display none -kernel pre-built/linux/images/pmu_rom_qemu_sha3.elf -device loader,file=images/linux/pmufw.elf -hw-dtb images/linux/zynqmp-qemu-multiarch-pmu.dtb -machine-path ./qemu-memory -device loader,addr=0xfd1a0074,data=0x1011003,data-len=4 -device loader,addr=0xfd1a007C,data=0x1010f03,data-len=4 -global remote-port.chardesc=tcp:127.0.0.1:9000,server

  • run APU,RPU => qemu-system-aarch64 -M arm-generic-fdt -nographic -k en-us -serial mon:stdio -serial telnet::1235,server,nowait -device loader,file=images/linux/bl31.elf,cpu-num=0 -device loader,file=images/linux/Image,addr=0x00080000 -device loader,file=images/linux/system.dtb,addr=0x1407f000 -device loader,file=build/misc/linux-boot/linux-boot.elf -gdb tcp::1234 -dtb images/linux/system.dtb -hw-dtb images/linux/zynqmp-qemu-multiarch-arm.dtb -machine-path ./qemu-memory -global xlnx,zynqmp-boot.cpu-num=0 -global xlnx,zynqmp-boot.use-pmufw=true -m 2G -drive file=qemu-sd.img,if=sd,format=raw,index=1 -monitor telnet:127.0.0.1:55555,server,nowait -global remote-port.chardesc=tcp:127.0.0.1:9000 -net nic -net nic -net nic -net nic,netdev=eth0 -netdev user,id=eth0,net=192.168.144.0/24,dhcpstart=192.168.144.11,hostfwd=tcp::21-:21,hostfwd=tcp::22-:22,hostfwd=tcp::1534-:1534,hostfwd=udp::14540-:14540,hostfwd=udp::14541-:14541,hostfwd=tcp::14542-:14542,hostfwd=tcp::14543-:14543,tftp=shared

linux booted successfully and everything works ok, except the arrow keys

Xilinx Qemu user mode emulation

Hello,

We are using the Zynq chip at my company. I am trying to set up user mode Qemu emulation using the Xilinx Qemu source so we can test our software before we put it on the instrument. User mode emulation allows me to run arm binaries natively on the command line without booting an emulated box. I have been successful doing this with the standard Qemu source, but I get an error when compiling the Xilinx Qemu source. Here are the details.
I am building xilinx-master base on this document:
http://www.wiki.xilinx.com/QEMU

I use this configure command

./configure --target-list=arm-linux-user --prefix=/usr/local --disable-bsd-user --disable-linux-aio --disable-kvm --disable-xen --static

and then "make"

with the standard qemu source I get a binary "qemu-arm" and I can use it in user mode to natively run some basic arm binaries as shown here:

root@catone-build-vm:# file /usr/local/bin/arm-hello
/usr/local/bin/arm-hello: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0xa8e22e289586b839763300626c20a415cc7ade4c, stripped
root@catone-build-vm:
# arm-hello
Hello, world!

When I run the same configure and make using the Xilinx Qemu source, I get this error

target-arm/helper.o: In function pmccntr_read': /opt/xilinx-qemu/qemu/target-arm/helper.c:341: undefined reference tovm_clock'
/opt/xilinx-qemu/qemu/target-arm/helper.c:341: undefined reference to `qemu_get_clock_ns'
collect2: ld returned 1 exit status
make[1]: *** [qemu-arm] Error 1
make: *** [subdir-arm-linux-user] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.