News:

Attention: For security reasons,please choose a user name *different* from your login name.
Also make sure to choose a secure password and change it regularly.

Main Menu

Boot a PetaLinux Image on QEMU

Started by Fady, April 21, 2015, 09:45:49 AM

Previous topic - Next topic

Fady

Hello
i'm using Petalinux 2014.4 and Vivado 2014.4 on rhel 6 and im trying to boot Petalinux image on QEMU but it didn't work.

[fa245588@is005306 TE0720-02-refplnx]$ petalinux-boot --qemu --kernel
INFO: The image provided is a zImage
INFO: TCP PORT is free
INFO: Starting arm QEMU
INFO:  qemu-system-arm -L /local/is005306/Software/petalinux-v2014.4-final/etc/qemu -M arm-generic-fdt -smp 2 -machine linux=on   --serial mon:stdio --serial /dev/null --nographic -kernel /tmp/tmp.8JUAAgPW03 -gdb tcp::9005 -dtb /local/is005306/fa245588/PetaLinux/TE0720-02-refplnx/images/linux/system.dtb

Vivado
1-download-unzip TE0720-02.zip ref design package from http://www.trenz-electronic.de/download/d0/Trenz_Electronic/d1/TE0720-GigaZee/d2/reference_designs.html
2-vivado -mode batch -source make_project.tcl
3-vivado -mode batch -source run_one.tcl
4-vivado -mode batch -source make_image.tcl
5-open vivado and extract hardware to create .hdf file

Petalinux
1- download TE0720-02-refplnx.bsp from http://www.trenz-electronic.de/download/d0/Trenz_Electronic/d1/TE0720-GigaZee/d2/reference_designs.html
2-$ petalinux-create -t project -s <path-to-bsp>
3-$ petalinux-config --get-hw-description=<path-to-directory-which-contains-hardware-description-file>
4-$ petalinux-build
5-$ petalinux-config
6-$ petalinux-boot --qemu --kernel

Regards,

Antti Lukats

Hi

are you sure the qemu problem is related to TE0720?
Do all other petalinux projects start correctly in qemu?


Fady

Hi,

I'm not sure what is the problem.
This is the first petalinux project that i'm tryin to boot on qemu.

Antti Lukats

Try with plain zynq template design first.

Fady

Hi,

Can u send me the link where i can find the plain zynq template design?
I'm using trenz TE0720 + TE0701.

Antti Lukats

www.xilinx.com, downloads petalinux...

then please type:

petalinux-create --help

and follow the Instructions, it will create just plain empty petalinux project for you, start from there.

Fady

i did the following:
1-$ petalinux-create --type project --template zynq --name test_1
2-$ petalinux-config --get-hw-description=<path-to-directory-which-contains-hardware-description-file>
(i used the .hdf file created from TE0720-02.zip ref design package download-unzip
http://www.trenz-electronic.de/download/d0/Trenz_Electronic/d1/TE0720-GigaZee/d2/reference_designs.html)
3-$ petalinux-build
and i got an  ERROR: Failed to build linux

[fa245588@is005306 test_1]$ petalinux-build             
INFO: Checking component...
INFO: Generating make files and build linux
INFO: Generating make files for the subcomponents of linux
INFO: Building linux
[INFO ] pre-build linux/rootfs/fwupgrade
[INFO ] pre-build linux/rootfs/peekpoke
[INFO ] pre-build linux/rootfs/uWeb
[INFO ] build system.dtb
[INFO ] build linux/kernel
ERROR: Failed to build linux


Antti Lukats

I asked you to make empty template project, this is REALLY REALLY VERY SIMPLE:

petalinux-create --type project --template zynq --name qemu_test
cd qemu_test
petalinux-config
<< hit enter 2 times!
petalinux-build
<< wait
petalinux-boot --qemu --kernel

I get error>>>

INFO: The image provided is a zImage
petalinux-boot: line 1443: xxd: command not found
WARNING: The QEMU subnet settings is 192.168.10.1/255.255.255.0. It is different from the one configured in PetaLinux /
WARNING: To enable the network of the QEMU MicroBlaze system. Please change the Network settings of PetaLinux and rebuild it or manually configure the network when the QEMU MicroBlaze system is boot
WARNING: Do you want to contine? (y/n)
y
INFO: TCP PORT is free
INFO: Starting arm QEMU
INFO:  qemu-system-arm -L /root/petalinux-v2014.4-final/etc/qemu -M arm-generic-fdt -smp 2 -machine linux=on   --serial /dev/null --serial mon:stdio --nographic -kernel /tmp/tmp.wCp1FVb6QN -gdb tcp::9000 -dtb /root/qemu_test/images/linux/system.dtb 
Failed to allocate 1073741824 B: Cannot allocate memory
petalinux-qemu-boot: line 594: 16534 Aborted                 $QEMU_DEBUG ${qemu_cmd} -L "${PETALINUX}/etc/qemu" ${qemu_mach} ${nic_list} ${qemu_serial} ${qemu_display} -kernel "${tmpimg}" -gdb tcp::${start_port} ${dtb_option} ${slirp_option} ${extra_args}
[root@localhost qemu_test]#

If you have questions related to petalinux and qemu, they can be answered there
http://forums.xilinx.com/t5/Embedded-Linux/bd-p/ELINUX


Fady

i made an empty template project as u told me now and i got the same error while buildin petalinux.

Antti Lukats

I am sorry, it all works here as explained to you.
qemu is not starting, it never has, but all the rest works without any issues.