cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Participant
Participant
787 Views
Registered: ‎04-01-2019

Petalinux - cannot build properly

Jump to solution

Hi everyone,

I used Petalinux 2017.4 last year and successfully generated BOOT.bin and image.ub for many projects. I used as well Linux Mint 18.3, as Linux Mint 19, as Ubuntu 16.04. Everything worked well and I could boot the Petalinux from SD card and using Qemu. After a few months I try to do it again, but now I cannot generate Petalinux image properly. There are no errors while building, I have got it done successfully. But when I insert the SD card I see that nothing happens, the bitstream does not program the PL. I haven't changed anything in Petalinux installation, I tried to reinstall it using Ubuntu 16.04 Virtual Machine. The result is the same...

If I run 'petalinux-boot --qemu --u-boot' it runs fine, but if I run 'petalinux-boot --qemu --kernel' I see only:

petalinux-boot --qemu -v --kernel
INFO: The image provided is a zImage
INFO: Set QEMU tftp to /media/robert/home2/Zybo-Z7-20/images/linux
INFO: TCP PORT is free
INFO: Starting arm QEMU
INFO: qemu-system-aarch64 -M arm-generic-fdt-7series -machine linux=on -serial /dev/null -serial mon:stdio -display none -kernel /media/robert/home2/Zybo-Z7-20/build/qemu_image.elf -gdb tcp::9000 -dtb /media/robert/home2/Zybo-Z7-20/images/linux/system.dtb -net nic,vlan=1 -net user,vlan=1,tftp=/media/robert/home2/Zybo-Z7-20/images/linux -net nic -device loader,addr=0xf8000008,data=0xDF0D,data-len=4 -device loader,addr=0xf8000140,data=0x00500801,data-len=4 -device loader,addr=0xf800012c,data=0x1ed044d,data-len=4 -device loader,addr=0xf8000108,data=0x0001e008,data-len=4 -device loader,addr=0xF8000910,data=0xF,data-len=0x4
Warning: vlan 0 is not connected to host network
rom: requested regions overlap (rom bootloader. free=0x00000000034d8658, addr=0x0000000000000000)
Uncompressing Linux... done, booting the kernel.

Error: unrecognized/unsupported machine ID (r1 = 0x00000d32).

Available machine support:

ID (hex) NAME
ffffffff Generic DT based system
ffffffff ARM-Versatile Express
ffffffff Xilinx Zynq Platform

Please check your kernel config and/or bootloader.
QEMU: Terminated

 

Or sometimes, I think it depends on the petalinux-build run:

petalinux-boot --qemu -v --kernel
INFO: The image provided is a zImage
INFO: Set QEMU tftp to /media/robert/home2/Zybo-Z7-20/images/linux
INFO: TCP PORT is free
INFO: Starting arm QEMU
INFO: qemu-system-aarch64 -M arm-generic-fdt-7series -machine linux=on -serial /dev/null -serial mon:stdio -display none -kernel /media/robert/home2/Zybo-Z7-20/build/qemu_image.elf -gdb tcp::9000 -dtb /media/robert/home2/Zybo-Z7-20/images/linux/system.dtb -net nic,vlan=1 -net user,vlan=1,tftp=/media/robert/home2/Zybo-Z7-20/images/linux -net nic -device loader,addr=0xf8000008,data=0xDF0D,data-len=4 -device loader,addr=0xf8000140,data=0x00500801,data-len=4 -device loader,addr=0xf800012c,data=0x1ed044d,data-len=4 -device loader,addr=0xf8000108,data=0x0001e008,data-len=4 -device loader,addr=0xF8000910,data=0xF,data-len=0x4
Warning: vlan 0 is not connected to host network
rom: requested regions overlap (rom bootloader. free=0x00000000034d8658, addr=0x0000000000000000)

 

It gets stuck and the Linux image does not get uncompressed. I know its the reason why the SD card does not work. I tried also to generate without setting anything, just using initram file system option.

 

In an old project it boots like this:

rom: requested regions overlap (rom bootloader. free=0x00000000003bae68, addr=0x0000000000000000)
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 4.9.0-xilinx-v2017.4 (robert@robert) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11)) #1 SMP PREEMPT Fri Apr 5 13:59:27 CEST 2019
CPU: ARMv7 Processor [410fc090] revision 0 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
OF: fdt: Machine model: Zynq Zybo Z7 Development Board
bootconsole [earlycon0] enabled

And so on, everything is ok. I noted down the commands to use so I do the same everytime I run the build.

 

Using the last year generated images i can successfully run Petalinux using Qemu and SD card.

I don't know what is happening, i do the following:

1) I use Zybo Z7-20 development board and Petalinux-Zybo-Z7-20-2017.4-2.bsp from Digilent github.

2) source /opt/pkg/petalinux/settings.sh 

3) petalinux-create -t project -s /your_path/Petalinux-Zybo-Z7-20-2017.4-2.bsp

4) cd into project dir: Zybo-Z7-20

5) petalinux-config --get-hw-description /your_path/VIVADO_PROJECT.sdk. I've tryed to run config without my hw-desciption, but it has the same result...

6) petalinux-build

7) petalinux-package --boot --force --fsbl images/linux/your_elf_name.elf --fpga images/linux/your_hdl_wrapper.bit --u-boot

 

I'm lost, because the same happens on my three PC's and the result is the same. The fresh Virtualbox did also not help.

Because Digilent does provide only Petalinux 2017.4 .bsp I use that Petalinux version, inline with Vivado 2017.4.

Can I debug it further or repair somehow?

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Participant
Participant
456 Views
Registered: ‎04-01-2019

Hi @smahalle ,

Finally I managed to build a proper, runnable Petalinux system. I give the solution if someone else has the same problem.

First I used the old project in a new location. To get rid of errors I used:

petalinux-build -x mrproper

I build the project and it worked, so I knew Petalinux tools work well.

Then I build a minimal system consisting only of the Zynq processor in Vivado Block Design. I saw the Petalinux build was successful, but the board didn't boot.

The solution was simple, I configured the Zynq processor on my own and it was one by one as in the old project and didn't work. Then I used "Run Block Automation" in Vivado and used "apply board preset". Then the build Petalinux project did boot properly form SD card.

The only difference I found was that makin DDR and FIXED_IO in Vivado Block Design as external results in names like "DDR_0" and the "Run Block Automation" creates name like "DDR".

The funny thing is that Bare Metal applications, as well simply Hello World from template as my advanced tests worked well, petalinux-build had no errors at all, but then the system did not boot from SD card... 

Thank you far all the answers!

View solution in original post

0 Kudos
7 Replies
Highlighted
Xilinx Employee
Xilinx Employee
751 Views
Registered: ‎09-17-2019

Hi @_engineer ,

Can you please once try to boot the board using prebuilt images using the following command.

petalinux-boot --qemu --prebuilt 3

Thanks & Regards,

Shubhangi

0 Kudos
Highlighted
Participant
Participant
685 Views
Registered: ‎04-01-2019

The result is:

 

$ petalinux-boot --qemu --prebuilt 3
INFO: The image provided is a zImage
INFO: Set QEMU tftp to /home/robertn/Desktop/Zybo-Z7-20/images/linux
INFO: TCP PORT is free
INFO: Starting arm QEMU
INFO: qemu-system-aarch64 -M arm-generic-fdt-7series -machine linux=on -serial /dev/null -serial mon:stdio -display none -kernel /home/robertn/Desktop/Zybo-Z7-20/build/qemu_image.elf -gdb tcp::9000 -dtb /home/robertn/Desktop/Zybo-Z7-20/pre-built/linux/images/system.dtb -net nic,vlan=1 -net user,vlan=1,tftp=/home/robertn/Desktop/Zybo-Z7-20/images/linux -net nic -device loader,addr=0xf8000008,data=0xDF0D,data-len=4 -device loader,addr=0xf8000140,data=0x00500801,data-len=4 -device loader,addr=0xf800012c,data=0x1ed044d,data-len=4 -device loader,addr=0xf8000108,data=0x0001e008,data-len=4 -device loader,addr=0xF8000910,data=0xF,data-len=0x4
Warning: vlan 0 is not connected to host network
rom: requested regions overlap (rom bootloader. free=0x00000000034db8a0, addr=0x0000000000000000)
Uncompressing Linux... done, booting the kernel.

Error: unrecognized/unsupported machine ID (r1 = 0x00000d32).

Available machine support:

ID (hex) NAME
ffffffff Generic DT based system
ffffffff ARM-Versatile Express
ffffffff Xilinx Zynq Platform

Please check your kernel config and/or bootloader.

 

 

0 Kudos
Highlighted
Moderator
Moderator
636 Views
Registered: ‎09-12-2007

What is  petalinux-config → Yocto settings  → () MACHINE NAME set to?

0 Kudos
Highlighted
Participant
Participant
600 Views
Registered: ‎04-01-2019

Unfortunately there is no such option, see the whole Yocto Settings list in screenshot.

SCR1.png

 

But mayby this config info will be enough?

project-spec/configs/config:190:CONFIG_SUBSYSTEM_UBOOT_CONFIG_TARGET="zynq_zyboz7_config"
project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi:7: compatible = "digilent,zynq-zyboz7", "xlnx,zynq-7000";

 

The kernel and the u-boot should be both configured for Zybo Z7 board.

0 Kudos
Highlighted
Participant
Participant
565 Views
Registered: ‎04-01-2019

So @stephenm and @smahalle is there nothing else I can do? By now I cannot choose any answer as a solution :/ 

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
547 Views
Registered: ‎09-17-2019

Hi @_engineer 

If --template option is used instead of a bsp. you can use the petalinux-config command to choose
default board configs, 

Set CONFIG_SUBSYSTEM_MACHINE_NAME as required. The possible values are: ac701-full,
kc705-lite, zc1751-dc1, zc706, zcu102-revb, zedboard, ac701-lite, kcu105,
zc1751-dc2, zcu102-rev1.0, kc705-full, zc702, zcu102-reva, and zcu106-reva. In
petalinux-config DTG Settings ---> (template) MACHINE_NAME, change the template to any of the
above mentioned possible value.

Thanks & Regards,

Shubhangi

Highlighted
Participant
Participant
457 Views
Registered: ‎04-01-2019

Hi @smahalle ,

Finally I managed to build a proper, runnable Petalinux system. I give the solution if someone else has the same problem.

First I used the old project in a new location. To get rid of errors I used:

petalinux-build -x mrproper

I build the project and it worked, so I knew Petalinux tools work well.

Then I build a minimal system consisting only of the Zynq processor in Vivado Block Design. I saw the Petalinux build was successful, but the board didn't boot.

The solution was simple, I configured the Zynq processor on my own and it was one by one as in the old project and didn't work. Then I used "Run Block Automation" in Vivado and used "apply board preset". Then the build Petalinux project did boot properly form SD card.

The only difference I found was that makin DDR and FIXED_IO in Vivado Block Design as external results in names like "DDR_0" and the "Run Block Automation" creates name like "DDR".

The funny thing is that Bare Metal applications, as well simply Hello World from template as my advanced tests worked well, petalinux-build had no errors at all, but then the system did not boot from SD card... 

Thank you far all the answers!

View solution in original post

0 Kudos