Jump to content
  • 0

Petalinux Getting Started Help


m3atwad

Question

Hello,

I bought a Zedboard recently and have a couple questions.

 

1. Are there any current petalinux example projects at this resource link?  So a vivado/petalinux project I could use as an example?

https://digilent.com/reference/programmable-logic/zedboard/start

2. I am attempting to just boot the most basic example (shown below) from JTAG.  My process is to generate a Vivado project with ONLY the PS ARM system as shown below.

image.thumb.png.689e75cc6d396e43f999b6a28ac74d7b.png

I then export this and bring it in to a petalinux project using "petalinux-config --get-hw-description=./".  I then leave the petalinux config menu and run petalinux-build.  

At this point I connect via jtag using XSCT and use the following example in (from Xilinx documentation linked below).

https://xilinx.github.io/Embedded-Design-Tutorials/docs/2021.2/build/html/docs/Introduction/Zynq7000-EDT/7-linux-booting-debug.html

image.thumb.png.8ce41d3e8fc42f109c5953b57f21ef27.png

 

I follow steps 1,2,3,4 with my zynq board. 

 

I can successfully get zynq_fsbl.elf and u-boot.elf loaded into the zynq part via xsct.  I load and run zynq_fsbl.elf first then stop the arm (arm0) load u-boot.elf and type "con" to run the cpu.  I expect to see the u-boot menu on my console (zedboard USB console port), but don't.  I don't see anything ever on my console.

I do no modifications to petalinux though, so no changes to any of the default configs.  This is ultimately the problem.  I do however see u-boot boot with quite a bit of stuff being printed to the console when I execute

"petalinux-boot --jtag --u-boot"

 

So I know my console works, but I can't manually step through the JTAG boot process.  To make this more concise I tried to list my questions below.

 

Questions

1. Do I need to add anything to my Vivado block diagram shown here?  Or can I just build with the single PS block to run the ARMs?

2. Does petalinux need any configuration modifications for the zedboard?  For example, does u-boot environment variables need to be modified to get the console UART output to work?

3. Is my my process of: Build PS block in vivado, export the XSC file to petalinux, build the petalinux project with this XSA with NO modifications, load zynq_fsbl.elf and u-boot.elf to boot a minimal u-boot?  I don't load the FPGA image or any of the linux OS stuff yet because I don't have u-boot working yet - could this be an issue?

4. I found an article about modifying the u-boot bootcmd - is this necessary for my basic board bring up effort right now?

https://www.fpgadeveloper.com/how-to-modify-u-boot-environment-variables-in-petalinux/

 

 

Long story short, I'm just trying to step through jtag booting with this most basic project as a starting point and am missing something.

 

Thanks for any help!

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

For a quick test you can use the sdcard. Place boot.bin, boot.scr and image.ub files on the sdcard and set bootmode to sdcard (not jtag).Then watch the boot process on serial port(UART over USB).

boot.bin file can be generated using petalinux-package command. Check command output to be sure bitstream(.bit) file is included. "petalinux-package --boot --u-boot --fpga --fsbl" Check ug1144 for more details on petalinux.

Regarding your test for booting using jtag/debug mode, did you reached step 10.4 bulet point 5 where you stop boot process by pressing Enter key on serial console(not the xsct console)?

Quote

I expect to see the u-boot menu on my console (zedboard USB console port), but don't.  I don't see anything ever on my console.


As mention in instructions [10.4 bulet point4] on serial(usb) console you will receive a message to press a key to stop the boot process. By doing this you can reach u-boot CLI. At this point in xsct console you are instructed to suspend the boot process load image.ub file in RAM the resume the u-boot process and run a boot command to continue into next boot stage: loading linux kernel, device tree,rootfs etc..

 

Q1: It shoud be ok for this test.

Q2: It should just work no chages are needed.

There are two parts at work: board UART over USB and your tool/software that conects to the UART(serial) [I personaly use picocom].There are some software that do not work as expected for example you can not send but you can receive. In short you should know your tool.

Q3.a:It's ok.

Q3.b: u-boot can be dependent on the bitstream (bitstream == hardware) . Bitstream should be loaded since it is part of the hardware(Step 8). Anything else at the apropiate time.

Q4: No. bootm command is suficient to use image.ub you loaded in RAM at step 10.4. Bulet point 7.

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...