You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(PS: before build the u-boot, modify the device tree "u-boot-xlnx/arch/arm/dts/zynqmp-zcu106-revA.dts")
(PS: if met yylloc error, please refer to (this). Then skip the next step d. and install dtc by "sudo apt install device-tree-compiler".)
d. Set up the mkimag tool path
2. Build Linux kernel
a. Set up enviroment
b. Initiate kernel configuration
c. Edit kernel configuration
i. Disable "General setup -> Initial RAM filesystem and RAM disk"
ii. Enable CPU govenors at "CPU Power Management -> CPU Frequency scaling"
iii. Enable DVFS at "Device Drivers -> Adaptive Voltage Scaling class support" and "Device Drivers -> Generic Dynamic Voltage and Frequency Scaling (DVFS) support"
iv. Save configuration
v. Enable physical memory access from userspace through /dev/mem (optional)
The default kernel setting filters the accessing physical memory through /dev/mem in userspace. This limitation can be released by modify the configuration of kenrel by editting .config file,
and make sure the option CONFIG_STRICT_DEVMEM is not set.
d. Build kernel
(PS: before build the kernel, modify the device tree "linux-xlnx/arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dts" )
(PS: again, if met yylloc error, please refer to (this). )
e. Build u-boot kernel image with command "mkimage -n 'Kernel Image' -A arm64 -O linux -C none -T kernel -a 0x8000 -e 0x8000 -d Image uImage"
3. Build device tree
a. Open a Vivado project by entering "source demo.tcl" in the vivado Tcl console. The block design diagram as shown:
This is a simple design without any function on PL. Synthesis, implement the project and generate the bit stream. Export the hardware throught "File -> Export -> Export Hardware ..".
b. Generate device tree using SDK
i. Open the SDK by "File > Launch SDK".
ii. Add device tree soure to BSP repository by "Xilinx Tools > Repositories > New... (select the device tree folder) > OK"
iii. Create new board support package project for device tree by "File > New > Board Support Package > Board Support Package OS: device-tree > Finish".
iv. Modify the device tree settings by click the "system.mss" then go to "Modify this BSP's Setting". In the "value" field of "device tree -> bootargs", enter "earlycon clk_ignore_unused consoleblank=0 cma=1700M uio_pdrv_genirq.of_id=generic-uio root=/dev/mmcblk0p2 rootfstype=ext4 rw rootwait".
v. Compile the device tree by going to the device tree BSP project folder in terminal and typing in "dtc -I dts -O dtb -o system.dtb system-top.dts".
(PS: Actually, when building both linus kernel and u-boot, the device tree is generated at "linux-xlnx/arch/arm64/boot/dts/xilinx/zynqmp-zcu106-revA.dtb" or "u-boot-xlnx/arch/arm/dts/zynqmp-zcu106-revA.dtb")
4. Build ARM Trasted Firmware
a. Set up eniroment as previous build kernel step
b. build the firmware
The new binary is at "/build/zynqmp/release/bl31/bl31.elf"
5. Generate First Stage Boot Loader (FSBL)
a. Launch Xilinx SDK as previous mentioned through Vivado.
b. Create a new project called "fsbl" by "File -> New ... Application Project (standalone) ". Click "Next" and choosing the "Zynq MP FSBL" template and click "Finish" to build the project. The fsbl.elf will be created under the compiled folder.
6. Generate Platform Management Unit Firmware (PMUFW)
a. Launch Xilinx SDK as previous mentioned through Vivado.
b. Create a new project called "pmufw" by "File -> New ... Application Project (standalone)". Choose "Target Hardware - Processor - psu_pmu_0" in the tab. Click the "Next", choose the "ZynqMP PMU Firmware" template and click "Finish" to build the project. The "pmufw.elf" will be created under the compiled folder.