08-06-2020 08:03 AM
Hello everyone,
I am using zcu104 board and I am trying to create a project with petalinux which is compatible with board. I tried to open a project with zcu104 official BSP and then implementing my hardware design with petalinux-config --get-hw-description command. When I build that, the PL part of my project didn't show up in Device Tree and the ip drivers didn't builded properly as well. How should I use BSP to create my project ?
08-11-2020 04:30 AM - edited 08-11-2020 04:34 AM
Hi @cakmakhasankaan ,
We can go step by step:
cp /.../xapp1078_2018.2/design/work/project_1/project_1.sdk/design_1_wrapper.hdf ../hwdef petalinux-config --get-hw-description=../hwdef petalinux-build
ll images/linux/ petalinux-package --boot --fsbl images/linux/zynq_fsbl.elf --fpga /..../xapp1078_2018.2/design/work/project_1/project_1.runs/impl_1/design_1_wrapper.bit --u-boot --force ll images/linux/It generates a bin file, that contains no software on CPUs.
//arch = zynq; split = false; format = BIN the_ROM_image: { [bootloader]/home/..../xapp1078_2018.2/design/work/project_1/project_1.sdk/fsbl/Debug/fsbl.elf /home/..../xapp1078_2018.2/design/work/project_1/project_1.sdk/design_1_wrapper_hw_platform_0/design_1_wrapper.bit /opt/Petalinux/xapp1078_2014.4/plnx-project/images/linux/u-boot.elf /home/..../xapp1078_2018.2/design/work/project_1/project_1.sdk/app_cpu1/Debug/app_cpu1.elf }Last of them shows your app_cpu1 software.
Saban
08-11-2020 03:07 AM
Hi @cakmakhasankaan ,
I'm using Xapp1078 to get a design, CPU0 is Petalinux and CPU1 is Bare Metal.
I can share Xilinx's documantation about how you create petalinux project. It uses Vivado 2014, but you can replace it by your version. It does not metter.
At the end you can check your ips in pl.dtsi file by searching in your petalinux folders.
Create, configure & build Petalinux Project On a linux host machine that includes the Petalinux 2014.4 build environment, create the directory <xapp1078_2014.4> cd <xapp1078_2014.4> source </opt/petalinux-v2014.4-final>/settings.sh This command will setup the Petalinux environment. If Petalinux is not installed in the directory /opt/petalinux-v2014.4-final, then replace this part of the path with the location of your petalinux install petalinux-create -t project -n plnx-project This command creates a new petalinux project named plnx-project in the current directory cd plnx-project mkdir ../hwdef Create a directory that will contain the Vivado exported hdf file cp /home/saban/vivado/xapp1078_2014.4/design/work/project_1/project_1.sdk/design_1_wrapper.hdf ../hwdef source /opt/Xilinx/PetaLinux/settings.sh cd /opt/Xilinx/PetaLinux/xapp1078_2018.2/plnx-project/ cp ~/Desktop/Files_From_Windows_2018.2/zsys_wrapper.hdf ../hwdef This command copies the Vivado exported hdf file petalinux-config --get-hw-description=../hwdef This command configures petalinux to point to the directory that contains the hdf file A dts file is created in subsystems/linux/configs/device-tree. This dts file can be modified When the Linux System Configuration window appears: select Kernel Bootargs Deselect 'generate boot args automatically' by pressing 'n' Select 'user set kernel bootargs' and press enter Enter the following: console=ttyPS0,115200 earlyprintk maxcpus=1 mem=768M Select Ok Select Exit Select Exit Select Yes Saves the new configuration
Saban
08-11-2020 04:05 AM
Thank you @sabankocal for your answer but it does not answer that which hardware will be used on board when the project have 2 hardware design which come from both board support package and another hardware from get-hw-description command. To explain my problem further, I have a hardware design that I want to implement on the board but I lack of software part which comes from board support package. How can I take only the software from BSP and take hardware design from mine ?
08-11-2020 04:30 AM - edited 08-11-2020 04:34 AM
Hi @cakmakhasankaan ,
We can go step by step:
cp /.../xapp1078_2018.2/design/work/project_1/project_1.sdk/design_1_wrapper.hdf ../hwdef petalinux-config --get-hw-description=../hwdef petalinux-build
ll images/linux/ petalinux-package --boot --fsbl images/linux/zynq_fsbl.elf --fpga /..../xapp1078_2018.2/design/work/project_1/project_1.runs/impl_1/design_1_wrapper.bit --u-boot --force ll images/linux/It generates a bin file, that contains no software on CPUs.
//arch = zynq; split = false; format = BIN the_ROM_image: { [bootloader]/home/..../xapp1078_2018.2/design/work/project_1/project_1.sdk/fsbl/Debug/fsbl.elf /home/..../xapp1078_2018.2/design/work/project_1/project_1.sdk/design_1_wrapper_hw_platform_0/design_1_wrapper.bit /opt/Petalinux/xapp1078_2014.4/plnx-project/images/linux/u-boot.elf /home/..../xapp1078_2018.2/design/work/project_1/project_1.sdk/app_cpu1/Debug/app_cpu1.elf }Last of them shows your app_cpu1 software.
Saban