This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
hw:zynq:linux:petalinux:boot_kernel_2020.2 [2021/04/21 14:59] jakub.moron created |
hw:zynq:linux:petalinux:boot_kernel_2020.2 [2021/04/21 15:59] (current) jakub.moron |
||
---|---|---|---|
Line 20: | Line 20: | ||
-> kernel image settings: set ‘image storage media’ option to ‘primary sd’ | -> kernel image settings: set ‘image storage media’ option to ‘primary sd’ | ||
-> dtb image settings : set ‘image storage media’ option to ‘primary sd’ | -> dtb image settings : set ‘image storage media’ option to ‘primary sd’ | ||
- | Image Packaging Configurations: set ‘Root filesystem type’ option to ‘SD card’ | + | Image Packaging Configurations: set ‘Root filesystem type’ option to ‘EXT4 (SD/eMMC/SATA/USB)’ |
: uncheck 'Copy final images to tfpboot' | : uncheck 'Copy final images to tfpboot' | ||
</code> Select ''Exit'' to write the configuration.\\ \\ In case you want to reconfigure boot settings, run: <code> | </code> Select ''Exit'' to write the configuration.\\ \\ In case you want to reconfigure boot settings, run: <code> | ||
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 |