cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
foss_enth
Visitor
Visitor
559 Views
Registered: ‎07-20-2021

PetaLinux build fail

Hello FPGA community,

I am a new learner so please bear with me if the question is too vague. I will add details as required. I am trying to build my first PetaLinux for a custom board based on Zynq7010. I get a build error message. I tried twice from sctratch, i.e. a new design in Vivado, new Ubuntu virtual machine, installed PetaLinu, created a new project but got the same build error.

Here are a few details about my setup:

- Installed Vivado 2020.2 on Windows 10 laptop.

- Installed PetaLinux 2020.2 on virtual machine running Ubuntu 18.04.3.

And here is the error message:

ERROR: Task (~/petalinux2020.2/ebaz4205_NoY3/components/yocto/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/u-boot/u-boot-xlnx_2020.2.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3334 tasks of which 2606 didn't need to be rerun and 1 failed.

Let me know if you need further information.

Thank you for your support.

0 Kudos
11 Replies
rambati
Xilinx Employee
Xilinx Employee
509 Views
Registered: ‎06-10-2021

HI @foss_enth 

May i know the which procedure your following ,Are you building with bsp or Are you building with template flow.

If you're building in template flow please share you xsa design , I can try at my end will see what is the issue.

Before that please make sure that your building petalinux in non root user and out of NFS location, You should install petalinux in local disk only.

Please cross-check petalinux build steps also once for template flow

1. petalinux-create --type project --template zynq --name cus_project
2. cd cus_project
3. petalinux-config --get-hw-description=<PATH TO HDF>
4. petalinux-build

Bsp flow

petalinux-create --type project -s <PATH TO BSP>
cd <plnx proj>
petalinux-config
petalinux-build

If all above are correct please error log and hdf file

Thanks and Regards

Raviteja

-----------------------------------------------------------------------------

Don't Forget to Reply, Give Kudos, Accepted as Solution

-----------------------------------------------------------------------------

0 Kudos
foss_enth
Visitor
Visitor
484 Views
Registered: ‎07-20-2021

Hi @rambati 

Thank you for your reply. I am following the correct steps for template flow as shown above.

I have attached my *.xsa file. I attached also the latest console log and bitbake log files. If these files do not include the log you requested then please tell me where to find it or give me a file name to search for.

Thanks for looking into this.

NB: please note that when I posted this reply, the *.xsa file was removed and this error message was displayed in red:

"The attachment's designzynq7010_ps_wrapper.xsa content type (application/octet-stream) does not match its file extension and has been removed."

I have therefore, zipped the *.xsa file then attached it.

0 Kudos
rambati
Xilinx Employee
Xilinx Employee
477 Views
Registered: ‎06-10-2021

Hi @foss_enth 

I am able to build at my end with your .xsa file

see log message here,

NOTE: Setscene tasks completed
NOTE: Tasks Summary: Attempted 3513 tasks of which 2615 didn't need to be rerun and all succeeded.
INFO: Failed to copy built images to tftp dir: /tftpboot
[INFO] Successfully built project

i wanted to know did you configured anything in petalinux-config, If not it should work

I would request you to do

petalinux-build -x mrproper

then petalinux-build

If still does not work please try to create new project and try again

Thanks and Regards

Raviteja

----------------------------------------------------------------------------------

Don't forget to Reply, Give Kudos and Accepted as Solution

----------------------------------------------------------------------------------

0 Kudos
FOSS_entho
Newbie
Newbie
433 Views
Registered: ‎07-29-2021

Hi @rambati 

Yes, I made a few changes in petalinux-config. Most notably, I changed the default u-boot partition to "primary sd", and the netboot offset to 0x08000000. These changes did work for someone using PetaLinux2019. See: https://webuiltawallwebuiltthepyramids.blogspot.com/2021/01/ebaz4205-petalinux-installation.html What files do you need to be able to exactly reproduce my PetaLinux configuration?

NB: I had to create a new account to be able to reply as I could not reply using @foss_enth 

0 Kudos
rambati
Xilinx Employee
Xilinx Employee
409 Views
Registered: ‎06-10-2021

Hi @FOSS_entho 

We don't need to change default u-boot partition, It is already in "primary sd" and how did you changed netboot offset

can you provide steps you have modified

I would request you to build without any modifications and then check it is working as you expected or not.

Thanks and Regards

Raviteja

---------------------------------------------------------------------------------

Don't Forget to Reply, Give Kudos and Accepted as Solution

---------------------------------------------------------------------------------

0 Kudos
foss_enth
Visitor
Visitor
386 Views
Registered: ‎07-20-2021

Hi @rambati 

I have tried again with minimum configuration changes as follows:

Auto Config Settings --> Check: * kernel autoconfig and *u-boot autoconfig

u-boot Configuration --> Change netboot offset to 0x08000000.

I still get a build error. I'll try again without any changes and report back...

 

0 Kudos
foss_enth
Visitor
Visitor
363 Views
Registered: ‎07-20-2021

Hi @rambati 

I can confirm that the build is successful with the default configuration.

I packaged the necessary fiiles then copied them to an SD card (FAT32 formatted). Unfortunately, the board does not boot.

It looks like the build fails as soon as I select kernel and u-boot autoconfig. If I do not, then I will not be able to change the netboot offset.

0 Kudos
rambati
Xilinx Employee
Xilinx Employee
303 Views
Registered: ‎06-10-2021

HI @foss_enth 

Why it is not booting could please share log file and what are the you're copying into sd card.

You should copy image.ub and BOOT.BIN into sd card 

Thanks and Regards

Raviteja

 

0 Kudos
foss_enth
Visitor
Visitor
280 Views
Registered: ‎07-20-2021

Hi @rambati 

I am pleased to say there has been some progress over the weekend.

There are two reasons which cause boot failure;

1- Copying BOOT.BIN and image.ub to the SD card is not enough. The image.scr file also must be included. This is one of the differences between PetaLinux 2019 and 2020 versions.

2- By default, image.scr script tries to load image.ub to RAM at 0x10000000 which is 256MiB. This is fine for boards incorporating larger amounts of RAM, however my custom board features a single 256MiB RAM chip, and therefore it is impossible to load image.ub at this address. 

To change the default RAM loading address one must choose in hardware configuration step "u-boot autoconfig" then change the address, for example to 0x08000000 as indicated above. Unfortunately, this causes the build process to fail. Why? I think this is a question for you @rambati: Why does build fail when the option "u-boot autoconfig" is selected?

I found a workaround to boot anyway after inspecting the boot.scr file. When booting from SD card the script attempts first to load image.ub. If it does not find it, it will then attemp to load the three files used to make image.ub individually, i.e. rootfs.cpio.gz.u-boot AND uImage AND system.dtb.

0 Kudos
rambati
Xilinx Employee
Xilinx Employee
264 Views
Registered: ‎06-10-2021

HI @foss_enth 

Please go through this AR for u-boot modifications https://www.xilinx.com/support/answers/75730.html

Hope it should helpful

Thanks and Regards

Raviteja

---------------------------------------------------------------------------------

Don't Forget to Reply, Give Kudos and Accepted as Solution

---------------------------------------------------------------------------------

0 Kudos
foss_enth
Visitor
Visitor
249 Views
Registered: ‎07-20-2021

Thanks @rambati . I do not think that AR# 75730 is talking about the same issue.

I have a few more questions I would appreciate if you could help me with. I am going to post them one at a time:

1- When trying to boot from SD card including BOOT.BIN AND image.ub only, then it does not boot and kernel fails to load but network (ethernet) seems to work, as the board gets assigned a valid IP address from my router. However, when I include image.scr file although the board boots to linux successfully, the network does not work: udhcpc starts then sends three times discover then does not manage to get a lease and forks to background! whatever this means see exerpt below:

Configuring network interfaces... macb e000b000.ethernet eth0: unable to generate target frequency: 25000000 Hz
macb e000b000.ethernet eth0: link up (100/Full)
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
udhcpc: started, v1.31.0
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: no lease, forking to background
done.

I have included the full UART log and output of ifconfig and cat /etc/network/interfaces

root@zynq7010:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0A:35:00:1E:53
UP BROADCAST RUNNING 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)
Interrupt:25 Base address:0xb000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 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)

0 Kudos