cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
1,517 Views
Registered: ‎06-07-2018

Zynq: Run bare-metal application and uboot Petalinux on sequence

Jump to solution

Hello,

 

I made a Zynq-based board using XC7Z020CLG484-2L, my board has QSPI, SD-Card and EMMC. It can boot petalinux from QSPI and run bare-metal on PS on sequence. I have attach .bif file below.

 

The process is:

- Fsbl load bitstream and run main.elf (a bare-metal application to init VDMA, sending IIC control Oled display) at first;

- main.elf return and jump to uboot address for petalinux. To do this, I have add C function to bare-metal: atexit((void*)((u32*)0x400000U)); At this step, Oled done initialization and displayed image.

- Uboot copy kernel and petalinux starts executing kernel as usual.

 

However, between "Starting kernel ..." and "Booting Linux on physical  CPU 0x0", Oled monitor suddenly turn-off and never goes back again! It seem kernel do reset PS and everything gone, except bitstream (done led still High)? (Please correct me if I am wrong.)

 

All I want to save the booting time by running init program (bare-metal application) at first and then load petalinux.

 

What must I do if I want to keep PL config (Firmware and bitstream) during the boot process of petalinux?

It quite strange because I successful do the same on Zedboard, petalinux boot from SDcard.

 

Thank you very much.

petalinux_log.png
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Contributor
Contributor
1,481 Views
Registered: ‎06-07-2018

Hello,

 

The problem is inside my device tree. After I delete some nodes of my cores on PL device tree, Petalinux can boot without reset PL.

View solution in original post

0 Kudos
3 Replies
Highlighted
Moderator
Moderator
1,486 Views
Registered: ‎06-27-2017

@eos_huyvq

 

Which procedure & petalinux version you have followed in Zed board to boot Linux successfully.

Have you refered XAPP1078 (https://www.xilinx.com/support/documentation/application_notes/xapp1078-amp-linux-bare-metal.pdf)

 

Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.

Best Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.
0 Kudos
Highlighted
Contributor
Contributor
1,477 Views
Registered: ‎06-07-2018

Hi @gudishak,

 

Thank you for reply the, I am running Vivado and Petalinux 2017.2. My procedure is:

 

- Create simple BD with 2 VDMA, Oled monitor controller via AXI IIC on PL.

- Petalinux:

+ petalinux-create --type project --template zynq --name linux_tsan

 

+ petalinux-config --get-hw-description=/media/HW/project/project.sdk/design_1_wrapper_hw_platform_0

on petalinux config diaglog I change bootargs as 160MB for Linux by mem=160M@0 , I change memory size to 0x0A000000, and finaly I change loadaddr and netstart to 0x02000000. Also change to boot from SDcard.

 

Thank you for refer me to XAPP1078, alot of infor but it not solve my issue. Because I want to use both core ARM-A9 for video streaming and image processing. Board need to "ready-to-image" on less than 5-7s, so I cannot wait for Petalinux ready after 10s and run myapp-init.

 

Do you have any suggestion for my issue?

 

0 Kudos
Highlighted
Contributor
Contributor
1,482 Views
Registered: ‎06-07-2018

Hello,

 

The problem is inside my device tree. After I delete some nodes of my cores on PL device tree, Petalinux can boot without reset PL.

View solution in original post

0 Kudos