This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
hw:zynq:linux:petalinux:boot_kernel [2019/03/29 12:59] jakub.moron |
hw:zynq:linux:petalinux:boot_kernel [2021/04/21 14:57] (current) jakub.moron |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Boot and Kernel configure & build with PetaLinux without BSP (board support package) ====== | + | ====== Boot and Kernel configure & build with PetaLinux 2018.3 without BSP (board support package) ====== |
- Create Vivado design and export the hardware with bitstream.\\ Default hdf (hardware description file) location is: <code> | - Create Vivado design and export the hardware with bitstream.\\ Default hdf (hardware description file) location is: <code> | ||
Line 10: | Line 10: | ||
petalinux-create --type project --template zynq --name <boot_project_name> | petalinux-create --type project --template zynq --name <boot_project_name> | ||
cd <boot_project_name> | cd <boot_project_name> | ||
+ | </code> For UltraScale+: <code> | ||
+ | petalinux-create -t project --template zynqMP --name <boot_project_name> | ||
</code> | </code> | ||
- Get hardware description from Vivado project: <code> | - Get hardware description from Vivado project: <code> | ||
Line 25: | Line 27: | ||
- Check whether all required drivers/modules are enabled in kernel config: <code> | - Check whether all required drivers/modules are enabled in kernel config: <code> | ||
petalinux-config -c kernel | petalinux-config -c kernel | ||
- | </code> Hint: you can use vim-like search ''/<search_string>'' to list all enabled drivers/modules.\\ **Remember to __Save__ changes before exit -- it seems taht there is no autosave!** \\ | + | </code> Hint: you can use vim-like search ''/<search_string>'' to list all enabled drivers/modules.\\ **Remember to __Save__ changes before exit -- it seems that there is no autosave!** \\ |
- In order to use the generic UIO driver ''uio_pdrv_genirq'' enable kernel modules in kernel config: <code> | - In order to use the generic UIO driver ''uio_pdrv_genirq'' enable kernel modules in kernel config: <code> | ||
petalinux-config -c kernel | petalinux-config -c kernel | ||
Line 36: | Line 38: | ||
</code> and add the entry at the end of this file: <code> | </code> and add the entry at the end of this file: <code> | ||
&axi_gpio_0 { | &axi_gpio_0 { | ||
- | compatible = "dmem-uio"; | + | compatible = "generic-uio"; |
}; | }; | ||
</code> for every hardware module you have.\\ Please notice that ''axi_gpio_0'' __is only an example__ of module name! | </code> for every hardware module you have.\\ Please notice that ''axi_gpio_0'' __is only an example__ of module name! | ||
Line 59: | Line 61: | ||
</code> | </code> | ||
- Determinate the bit file name in PetaLinux project (it is copied automatically from Vivado design by ''--get-hw-description''): <code> | - Determinate the bit file name in PetaLinux project (it is copied automatically from Vivado design by ''--get-hw-description''): <code> | ||
- | ls ./images/linux/*.bin | + | ls ./images/linux/*.bit |
</code> | </code> | ||
- Create ''BOOT.BIN'' image: <code> | - Create ''BOOT.BIN'' image: <code> | ||
petalinux-package --boot --format BIN --fsbl ./images/linux/zynq_fsbl.elf --fpga ./images/linux/<bit_filename>.bit --u-boot | petalinux-package --boot --format BIN --fsbl ./images/linux/zynq_fsbl.elf --fpga ./images/linux/<bit_filename>.bit --u-boot | ||
</code> | </code> |