Jump to content
  • 0

How to build a custom Linux using Yocto Project For Zedboard?


MSenturk

Question

Hello Everybody, I was trying to build a custom Linux using Yocto Project for Zedboard. I have very limited knowledge on Embedded Linux and Yocto. I mainly followed two tutorial videos I found on Youtube. The first one using Zedboard: https://youtu.be/XPnmB-THjiY and the second one using Zybo board: https://youtu.be/FMCfn0zwhaQ. However, Unfortunately I failed. I format an SD Card. Created two partions: One is ROOT_FS ext4 type and the other one is ZED_BOOT FAT16 type. I put the rootfs.tar.gz file to the ROOT_FS and untar it. After that, I put boot.bin, core-image-minimal-zedboard-zynq7-20230714063552.rootfs.cpio.gz.u-boot, u-boot.img, uEnv.txt, uImage and Zynq-zed.dtb files. The thing is they use uImage.dtb files in both tutorials but there is no uImage.dtb file in my build. I don't know why but the outputs of my build are kinda different from those in the tutorials. I used 3.2.4 Gatesgarth version of Yocto, maybe this is the reason. When I open the uEnv.txt file, It says "devicetree_image=zynq-zed.dtb" and "kernel_image=uImage". So I put these files to the ZED_BOOT. When I insert the SD card to the Zedboard, I can't get any reaction from it. I also tried the reference sd card comes in the box and it worked. So, I don't think the problem is about connections or jumpers etc. I am suspicious about I don't have Xilinx tools Installed. Is it mandatory to install them? What might be the problem? Thank You.

Screenshot from 2023-07-25 13-53-04_2.png

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Have you tried using petalinux(based on yocto)?

during boot zedboard searches for BOOT.BIN on the boot partition.

This file contains the fsbl, bistream and u-boot(compiled to contain a dtb) .

petalinux boot order: u-boot loads boot.scr(boot instruction for u-boot) which by default tries to boot from Image.ub (a FIT containing: .dtb, kernel, and initramfs)
 

If you use yocto(not petalinux) make sure you generate a BOOT.BIN(enabling fsbl debug helps in this situation. Also after fsbl loads u-boot you can try various ways in u-boot CLI to load and boot linux kernel.

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841862/Install+and+Build+with+Xilinx+Yocto#InstallandBuildwithXilinxYocto-InstalltheImages

Link to comment
Share on other sites

  • 0
1 hour ago, Ionel said:

Have you tried using petalinux(based on yocto)?

during boot zedboard searches for BOOT.BIN on the boot partition.

This file contains the fsbl, bistream and u-boot(compiled to contain a dtb) .

petalinux boot order: u-boot loads boot.scr(boot instruction for u-boot) which by default tries to boot from Image.ub (a FIT containing: .dtb, kernel, and initramfs)
 

If you use yocto(not petalinux) make sure you generate a BOOT.BIN(enabling fsbl debug helps in this situation. Also after fsbl loads u-boot you can try various ways in u-boot CLI to load and boot linux kernel.

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841862/Install+and+Build+with+Xilinx+Yocto#InstallandBuildwithXilinxYocto-InstalltheImages

Actually, I am trying to understand the differences between Yocto Project and Petalinux. I am asked to use Yocto Project. There is a boot.bin file generated by Yocto as you can see from the screenshot I added. I copied it to the sd card's boot partition. But I am kinda suspicious about boot.bin. I found another post about the same problem but for zc702: https://stackoverflow.com/questions/68098124/zc702-not-booting-up-my-yocto-created-build

Link to comment
Share on other sites

  • 0

To check if your boot.bin is ok. Enable fsbl debug and listen on UART during the boot process. You may need to connect as soon as you power the board to catch those messages.

To enable fsbl debug:  Create a .bbappend for fsbl recipe in your layer or directly edit fsbl recipe and add line:

YAML_COMPILER_FLAGS_append = " -DFSBL_DEBUG_INFO"

In newer version I think the syntax is:

YAML_COMPILER_FLAGS:append = " -DFSBL_DEBUG_INFO"


This way you know if there is something wrong on the first step of the boot process.

Link to comment
Share on other sites

  • 0
7 hours ago, Ionel said:

To check if your boot.bin is ok. Enable fsbl debug and listen on UART during the boot process. You may need to connect as soon as you power the board to catch those messages.

To enable fsbl debug:  Create a .bbappend for fsbl recipe in your layer or directly edit fsbl recipe and add line:

YAML_COMPILER_FLAGS_append = " -DFSBL_DEBUG_INFO"

In newer version I think the syntax is:

YAML_COMPILER_FLAGS:append = " -DFSBL_DEBUG_INFO"


This way you know if there is something wrong on the first step of the boot process.

Where should I create the .bbappend file or Where can I find the fsbl recipe file? Can I add it to local.conf file (asking for the first answer of this question: https://support.xilinx.com/s/question/0D52E00006hpgTWSAY/bitbake-recipe-modification-for-fsbl-build?language=en_US) ? Do I need to rebuild an Image after adding this line?  

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...