This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
hw:zynq:linux:petalinux:boot_kernel_2020.2 [2021/04/21 15:00] jakub.moron |
hw:zynq:linux:petalinux:boot_kernel_2020.2 [2021/04/21 15:59] (current) jakub.moron |
||
|---|---|---|---|
| Line 41: | Line 41: | ||
| }; | }; | ||
| </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! | ||
| - | - Fix the u-boot bug -- a typo in default boot command.\\ The proper boot configure entry: <code> | ||
| - | default_bootcmd=run uenvboot; run cp_kernel2ram && bootm ${netstart} | ||
| - | </code> is created by PetaLinux as <code> | ||
| - | default_bootcmd=run uenvboot; run cp_kernel2ram && run cp_dtb2ram && booti ${netstart} - ${dtbnetstart} | ||
| - | </code> with the typo in ''booti'' instead of ''bootm'' command.\\ \\ To fix this bug, edit the ''platform-top.h'' file (it would not be overwrite if you reconfigure the boot or kernel): <code> | ||
| - | vim ./project-spec/meta-user/recipes-bsp/u-boot/files/platform-top.h | ||
| - | </code> and add the following entry at the end: <code> | ||
| - | /* Due to a bug where having u-boot load dtb from SD card causes the boot | ||
| - | * command to default to using booti instead of bootm on Zynq, the defult build | ||
| - | * fails to boot. This boot command override is a temporary workaround. | ||
| - | */ | ||
| - | #ifdef CONFIG_BOOTCOMMAND | ||
| - | #undef CONFIG_BOOTCOMMAND | ||
| - | #define CONFIG_BOOTCOMMAND "run uenvboot; run cp_kernel2ram && run cp_dtb2ram && bootm ${netstart} - ${dtbnetstart}" | ||
| - | #endif | ||
| - | </code> | ||
| - Build the boot and kernel: <code> | - Build the boot and kernel: <code> | ||
| petalinux-build | petalinux-build | ||