Quantcast
Channel: Xilinx Wiki : Xilinx Wiki - all changes
Viewing all 11776 articles
Browse latest View live

Build U-Boot

$
0
0
...
Zynq Miami Board
topic_miami_defconfig
Microblaze Board
microblaze-generic_defconfig

To build U-Boot for ZC702 execute:
make zynq_zc702_configzynq_zc702_defconfig
make
To build U-Boot for ZCU102 execute:
make xilinx_zynqmp_zcu102_rev1_0_configxilinx_zynqmp_zcu102_rev1_0_defconfig
make
After the build process completes the target u-boot elf-file is created in the top level source directory, named 'u-boot'. Additionally in the tools/ directory the 'mkimage' utility is created, which is used in other tasks to wrap images into u-boot format.
...
linux-host> cd <u-boot-xlnx>
linux-host> export BUILD_DIR=$PWD/build
linux-host> make microblaze-generic_configmicroblaze-generic_defconfig
linux-host> make
Loading and running U-Boot

Build U-Boot

$
0
0

Solution ZynqMP PL Programming

$
0
0
Note: This page is under construction. Will update ASAP
Introduction
The ZynqMp Programmable Logic (PL) can be programmed by the First Stage Bootloader (FSBL), U-Boot or through Linux. Programming the PL at different stages may be advantageous for different projects and workflows.

Build U-Boot

$
0
0
...
Additional peripherals and features are considered outside the scope of this page.
Building U-Boot
There are two ways to compile u-boot for Microblaze board.
1. Using petalinux BSP
2. OSL flow to compile u-boot
1. Using Petalinux BSP
step.1. Download PetaLinux installer:
https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools.html
step.2. Install PetaLinux Tools
Step to set working environment
Bash User:
source <path-to-installed-PetaLinux>/settings.sh
C shell User
source <path-to-installed-PetaLinux>/settings.csh
step.3. Create a new petalinux project
petalinux-create -t project -s <Path of BSP>
Download BSP https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools.html
step.4. Import Hardware configuration
cd <plnx-proj-root>
petalinux-config --get-hw-description=<path-to-directory-which-contains-hardwaredescription-file>
Subsystem AUTO Hardware Settings --->” is selected
step.5. Build Petalinux
cd <plnx-proj-root>
petalinux-build
2. OSL flow to compile u-boot
The U-Boot source tree can be downloaded from the Xilinx Git server. The repository is u-boot-xlnx and the branch is master:
git clone https://github.com/Xilinx/u-boot-xlnx.git
The U-Boot compilation will use the definitions and flags defined in config.mk and xparameters.h . Import these two files generated by the petalinux project into the U-Boot directory for MicroBlaze
cp <plnx-proj-root>/components/plnx_workspace/fsboot/fsboot/mba_fs_boot_bsp/microblaze_0/include/xparameters.h <u-boot-xlnx>/board/xilinx/microblaze-generic/
cp <plnx-proj-root>/project-spec/meta-plnx-generated/recipes-bsp/u-boot/configs/config.mk <u-boot-xlnx>/board/xilinx/microblaze-generic/
Rename platform-auto.h to microblaze-generic.h
<plnx-proj-root>/project-spec/meta-plnx-generated/recipes-bsp/u-boot/configs/platform-auto.h
After renaming, copy microblaze-generic.h to the u-boot-xlnx/include/configs
<plnx-proj-root>/project-spec/meta-plnx-generated/recipes-bsp/u-boot/configs/microblaze-generic.h u-boot-xlnx/include/configs/
Replace the dts file of u-boot-xlnx via petalinux project
Convert the .dtb file into .dts file in petalinux project
dtc -I dtb -O dts -o <plnx-proj-root>/components/plnx_workspace/device-tree/device-tree-generation/plnx_microblaze-system.dts
Renamed this generated dts file to microblaze-generic.dts and copy it to the u-boot-xlnx
<plnx-proj-root>/components/plnx_workspace/device-tree/device-tree-generation/microblaze-generic.dts
cp <plnx-proj-root>/components/plnx_workspace/device-tree/device-tree-generation/microblaze-generic.dts u-boot-xlnx/arch/microblaze/dts
Remove the SPL configs from the microblaze-generic_defconfig as microblaze doesn't use SPL
Remove the following configs from < u-boot-xlnx >/configs/microblaze-generic_defconfig
CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL=y
CONFIG_SPL_BOARD_INIT=y
CONFIG_SPL_SYS_MALLOC_SIMPLE=y
CONFIG_SPL_NOR_SUPPORT=y
CONFIG_SPL_OS_BOOT=y
CONFIG_CMD_SPL=y
CONFIG_SPL_OF_CONTROL=y
CONFIG_SPL_DM=y
Go into the u-boot-xilinx top directory and run the following commands in bash to compile the u-boot
make distclean
export CROSS_COMPILE=microblazeel-xilinx-linux-gnu-
export ARCH=microblazeel
make microblaze-generic_defconfig
scripts/kconfig/merge_config.sh -m .config <plnx-proj-root >/project-spec/meta-plnx-generated/recipes-bsp/u-boot/configs/config.cfg
make

Creating the BSP required by U-Boot
To build U-Boot correctly, some information about the system will need to be provided to the U-Boot build tree. This information is generated by the U-Boot BSP.

Build U-Boot

$
0
0
...
https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools.html
step.2. Install PetaLinux Tools
Step to setset working environment
Bash

For bash
User:
source <path-to-installed-PetaLinux>/settings.sh
CFor C shell User
source <path-to-installed-PetaLinux>/settings.csh
step.3. Create a new petalinux project
...
cd <plnx-proj-root>
petalinux-build
2. OSL flow to compileCompile u-boot with petalinux generated files
The U-Boot source tree can be downloaded from the Xilinx Git server. The repository is u-boot-xlnx and the branch is master:
git clone https://github.com/Xilinx/u-boot-xlnx.git
...
scripts/kconfig/merge_config.sh -m .config <plnx-proj-root >/project-spec/meta-plnx-generated/recipes-bsp/u-boot/configs/config.cfg
make
...
by U-Boot (Unverified)
To build U-Boot correctly, some information about the system will need to be provided to the U-Boot build tree. This information is generated by the U-Boot BSP.
{uboot_bsp.tar.gz}

Build Device Tree Blob

$
0
0
...
interrupt-parent: Is a phandle that points to the interrupt controller for the current node. There is generally a top-level interrupt-parent definition for the main interrupt controller.
Device tree Generation
How to add a new driver to the DTG
1. Sync the repo https://gitenterprise.xilinx.com/Linux/device-tree-xlnx
2. Create a folder with the driver name say for example axi_iic /device-tree-linux/axi_iic/
3. Add the file data under ams like /device-tree-linux/axi_iic/data/
4. Create the files axi_iic.mdd and axi_iic.tcl under /device-tree-linux/axi_iic/data/axi_iic.mdd axi_iic.tcl
5. The syntax for the file axi_iic.mdd is as
OPTION psf_version = 3.0;
BEGIN driver axi_iic
OPTION supported_peripherals = (axi_iic);--> the axi_iic is the IP_NAME which we get from the HDF file.
OPTION supported_os_types = (DTS);
OPTION driver_state = ACTIVE;
OPTION NAME = axi_iic;
END driver
6. The syntax for the file axi_iic.tcl where you can have the properties which need to be set based on the some condition will be defined
We use HSI apis to update the node properities. The below we update the clock property for axi_iic calling a generic function as below
if {[string match -nocase $proctype "psu_cortexa53"] } {
update_clk_node $drv_handle "s_axi_aclk"
}
The generated node in the pl.dtsi should be as below
io_bd_iic_0: i2c@a1200000 {
#address-cells = <1>;
#size-cells = <0>;
clock-names = "s_axi_aclk";
clocks = <&misc_clk_0>;
compatible = "xlnx,xps-iic-2.00.a";
interrupt-names = "iic2intc_irpt";
interrupt-parent = <&gic>;
interrupts = <0 2 4>;
reg = <0x0 0xa1200000 0x0 0x10000>;
};

Task Dependencies (Pre-requisites)
Fetch Sources (Device Tree Generator sources and Linux sources)
...
# The Device Tree Generator Git repository needs to be cloned from the Xilinx. See the [[www/Fetch Sources|Fetch Sources]] page for more information on Git. Note that there are two repos for differing SDK versions below.
> [[code]]
>>> >
...
bsp/device-tree_v0_00_x//
>>> >
...
//[[code]]//
>>> >
...
like://
>>> >
...
repo>/bsp/device-tree//_v0_00_x/data/device-tree_v2_1_0.mld
>>> >
...
repo>/bsp/device-tree//_v0_00_x/data/device-tree_v2_1_0.tcl//
>>> >
> [[code]]
> SDK Menu: Xilinx Tools > Repositories > New... (<bsp repo>) > OK

Build Device Tree Blob

$
0
0
...
How to add a new driver to the DTG
1. Sync the repo https://gitenterprise.xilinx.com/Linux/device-tree-xlnx
...
example axi_iic /device-tree-linux/axi_iic/device-tree-linux/axi_iic/
3. Add
...
ams like /device-tree-linux/axi_iic/data/device-tree-linux/axi_iic/data/
4. Create
...
axi_iic.tcl under /device-tree-linux/axi_iic/data/axi_iic.mdddevice-tree-linux/axi_iic/data/axi_iic.mdd axi_iic.tcl
5. The syntax for the file axi_iic.mdd is as
OPTION psf_version = 3.0;
...
# The Device Tree Generator Git repository needs to be cloned from the Xilinx. See the [[www/Fetch Sources|Fetch Sources]] page for more information on Git. Note that there are two repos for differing SDK versions below.
> [[code]]
>>> >
...
bsp/device-tree_v0_00_x//
>>> >
...
//[[code]]//
>>> >
...
like://
>>> >
...
repo>/bsp/device-tree//_v0_00_x/data/device-tree_v2_1_0.mld
>>> >
...
repo>/bsp/device-tree//_v0_00_x/data/device-tree_v2_1_0.tcl//
>>> >
> [[code]]
> SDK Menu: Xilinx Tools > Repositories > New... (<bsp repo>) > OK

Build Device Tree Blob

$
0
0
...
# The Device Tree Generator Git repository needs to be cloned from the Xilinx. See the [[www/Fetch Sources|Fetch Sources]] page for more information on Git. Note that there are two repos for differing SDK versions below.
> [[code]]
>>> >
...
bsp/device-tree_v0_00_x//
>>> >
...
//[[code]]//
>>> >
...
like://
>>> >
...
repo>/bsp/device-tree//_v0_00_x/data/device-tree_v2_1_0.mld
>>> >
...
repo>/bsp/device-tree//_v0_00_x/data/device-tree_v2_1_0.tcl//
>>> >
> [[code]]
> SDK Menu: Xilinx Tools > Repositories > New... (<bsp repo>) > OK

Build U-Boot

$
0
0

Build Device Tree Blob

$
0
0
...
# The Device Tree Generator Git repository needs to be cloned from the Xilinx. See the [[www/Fetch Sources|Fetch Sources]] page for more information on Git. Note that there are two repos for differing SDK versions below.
> [[code]]
>>> >
...
bsp/device-tree_v0_00_x//
>>> >
...
//[[code]]//
>>> >
...
like://
>>> >
...
repo>/bsp/device-tree//_v0_00_x/data/device-tree_v2_1_0.mld
>>> >
...
repo>/bsp/device-tree//_v0_00_x/data/device-tree_v2_1_0.tcl//
>>> >
> [[code]]
> SDK Menu: Xilinx Tools > Repositories > New... (<bsp repo>) > OK

Build Device Tree Blob

$
0
0
...
# The Device Tree Generator Git repository needs to be cloned from the Xilinx. See the [[www/Fetch Sources|Fetch Sources]] page for more information on Git. Note that there are two repos for differing SDK versions below.
> [[code]]
>>> >
...
bsp/device-tree_v0_00_x//
>>> >
...
//[[code]]//
>>> >
...
like://
>>> >
...
repo>/bsp/device-tree//_v0_00_x/data/device-tree_v2_1_0.mld
>>> >
...
repo>/bsp/device-tree//_v0_00_x/data/device-tree_v2_1_0.tcl//
>>> >
> [[code]]
> SDK Menu: Xilinx Tools > Repositories > New... (<bsp repo>) > OK

Build Device Tree Blob

$
0
0
This how-to describes the process of compiling a device tree blob.
Build DeviceDevic
Device
Tree Blob
...
Getting Started.
{http://www.wiki.xilinx.com/site/embedthumbnail/toc/normal?w=225&h=100}

What is device tree?
Device tree or simply called DT is a data structure that describes the hardware. This describes the hardware which is readable by an operating system like Linux so that it doesn't need to hard code details of the machine.
...
# The Device Tree Generator Git repository needs to be cloned from the Xilinx. See the [[www/Fetch Sources|Fetch Sources]] page for more information on Git. Note that there are two repos for differing SDK versions below.
> [[code]]
>>> >
...
bsp/device-tree_v0_00_x//
>>> >
...
//[[code]]//
>>> >
...
like://
>>> >
...
repo>/bsp/device-tree//_v0_00_x/data/device-tree_v2_1_0.mld
>>> >
...
repo>/bsp/device-tree//_v0_00_x/data/device-tree_v2_1_0.tcl//
>>> >
> [[code]]
> SDK Menu: Xilinx Tools > Repositories > New... (<bsp repo>) > OK

Build Device Tree Blob

$
0
0
...
Build Devic
Device Tree Blob is a part of the Xilinx design flow described in Getting Started.
{http://www.wiki.xilinx.com/site/embedthumbnail/toc/normal?w=225&h=100}
What is device tree?
Device tree or simply called DT is a data structure that describes the hardware. This describes the hardware which is readable by an operating system like Linux so that it doesn't need to hard code details of the machine.
...
# The Device Tree Generator Git repository needs to be cloned from the Xilinx. See the [[www/Fetch Sources|Fetch Sources]] page for more information on Git. Note that there are two repos for differing SDK versions below.
> [[code]]
>>> >
...
bsp/device-tree_v0_00_x//
>>> >
...
//[[code]]//
>>> >
...
like://
>>> >
...
repo>/bsp/device-tree//_v0_00_x/data/device-tree_v2_1_0.mld
>>> >
...
repo>/bsp/device-tree//_v0_00_x/data/device-tree_v2_1_0.tcl//
>>> >
> [[code]]
> SDK Menu: Xilinx Tools > Repositories > New... (<bsp repo>) > OK

Build U-Boot

$
0
0
...
<plnx-proj-root>/project-spec/meta-plnx-generated/recipes-bsp/u-boot/configs/platform-auto.h
After renaming, copy microblaze-generic.h to the u-boot-xlnx/include/configs
<plnx-proj-root>/project-spec/meta-plnx-generated/recipes-bsp/u-boot/configs/microblaze-generic.hcp <plnx-proj-root>/project-spec/meta-plnx-generated/recipes-bsp/u-boot/configs/microblaze-generic.h u-boot-xlnx/include/configs/
Replace the dts file of u-boot-xlnx via petalinux project
Convert the .dtb file into .dts file in petalinux project

Build Device Tree Blob

$
0
0
...
1. Sync the repo https://gitenterprise.xilinx.com/Linux/device-tree-xlnx
2. Create a folder with the driver name say for example axi_iic device-tree-linux/axi_iic/
...
data under amsaxi_iic like device-tree-linux/axi_iic/data/
4. Create the files axi_iic.mdd and axi_iic.tcl under device-tree-linux/axi_iic/data/axi_iic.mdd axi_iic.tcl
5. The syntax for the file axi_iic.mdd is as
...
# The Device Tree Generator Git repository needs to be cloned from the Xilinx. See the [[www/Fetch Sources|Fetch Sources]] page for more information on Git. Note that there are two repos for differing SDK versions below.
> [[code]]
>>> >
...
bsp/device-tree_v0_00_x//
>>> >
...
//[[code]]//
>>> >
...
like://
>>> >
...
repo>/bsp/device-tree//_v0_00_x/data/device-tree_v2_1_0.mld
>>> >
...
repo>/bsp/device-tree//_v0_00_x/data/device-tree_v2_1_0.tcl//
>>> >
> [[code]]
> SDK Menu: Xilinx Tools > Repositories > New... (<bsp repo>) > OK

Build U-Boot

$
0
0

Build Device Tree Blob

$
0
0
...
# The Device Tree Generator Git repository needs to be cloned from the Xilinx. See the [[www/Fetch Sources|Fetch Sources]] page for more information on Git. Note that there are two repos for differing SDK versions below.
> [[code]]
>>> >
...
bsp/device-tree_v0_00_x//
>>> >
...
//[[code]]//
>>> >
...
like://
>>> >
...
repo>/bsp/device-tree//_v0_00_x/data/device-tree_v2_1_0.mld
>>> >
...
repo>/bsp/device-tree//_v0_00_x/data/device-tree_v2_1_0.tcl//
>>> >
> [[code]]
> SDK Menu: Xilinx Tools > Repositories > New... (<bsp repo>) > OK

Build U-Boot

$
0
0

Build Device Tree Blob

$
0
0
...
# The Device Tree Generator Git repository needs to be cloned from the Xilinx. See the [[www/Fetch Sources|Fetch Sources]] page for more information on Git. Note that there are two repos for differing SDK versions below.
> [[code]]
>>> >
...
bsp/device-tree_v0_00_x//
>>> >
...
//[[code]]//
>>> >
...
like://
>>> >
...
repo>/bsp/device-tree//_v0_00_x/data/device-tree_v2_1_0.mld
>>> >
...
repo>/bsp/device-tree//_v0_00_x/data/device-tree_v2_1_0.tcl//
>>> >
> [[code]]
> SDK Menu: Xilinx Tools > Repositories > New... (<bsp repo>) > OK

Build U-Boot

$
0
0
...
Input Files Required
config.mk (MicroBlaze only)
xparameters.h (MicroBlaze, PPC(MicroBlaze only)
Output Files Produced
u-boot
Viewing all 11776 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>