From cc434fccba4ccf8e3645346f3ae49e7b33733dc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Fri, 18 Jun 2021 15:27:03 +0200 Subject: Nokia RX-51: Add support for booting kernel in zImage format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enable U-Boot bootz command and update env scripts to try loading also zImage file and to try booting via bootz command. Update also lowlevel_init.S code for checking validity of zImage magic to correctly relocate kernel in zImage format. This change allows U-Boot to directly boot Linux kernel without need for converting kernel image into U-Boot uImage format. Signed-off-by: Pali Rohár Signed-off-by: Lokesh Vutla Link: https://lore.kernel.org/r/20210618132704.32066-1-pali@kernel.org --- include/configs/nokia_rx51.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h index fe991ea0399..742c1a64654 100644 --- a/include/configs/nokia_rx51.h +++ b/include/configs/nokia_rx51.h @@ -129,12 +129,14 @@ int rx51_kp_getc(struct stdio_dev *sdev); "scriptboot=echo Running ${mmcscriptfile} from mmc " \ "${mmcnum}:${mmcpart} ...; source ${scriptaddr}\0" \ "kernboot=echo Booting ${mmckernfile} from mmc " \ - "${mmcnum}:${mmcpart} ...; bootm ${kernaddr}\0" \ + "${mmcnum}:${mmcpart} ...; bootm ${kernaddr} || " \ + "bootz ${kernaddr}\0" \ "kerninitrdboot=echo Booting ${mmckernfile} ${mmcinitrdfile} from mmc "\ - "${mmcnum}:${mmcpart} ...; bootm ${kernaddr} ${initrdaddr}\0" \ + "${mmcnum}:${mmcpart} ...; bootm ${kernaddr} ${initrdaddr} || " \ + "bootz ${kernaddr} ${initrdaddr}\0" \ "attachboot=echo Booting attached kernel image ...;" \ "setenv setup_omap_atag 1;" \ - "bootm ${attkernaddr};" \ + "bootm ${attkernaddr} || bootz ${attkernaddr};" \ "setenv setup_omap_atag\0" \ "trymmcscriptboot=if run switchmmc; then " \ "if run scriptload; then " \ @@ -154,7 +156,8 @@ int rx51_kp_getc(struct stdio_dev *sdev); "fi; " \ "fi\0" \ "trymmcpartboot=setenv mmcscriptfile boot.scr; run trymmcscriptboot;" \ - "setenv mmckernfile uImage; run trymmckernboot\0" \ + "setenv mmckernfile uImage; run trymmckernboot;" \ + "setenv mmckernfile zImage; run trymmckernboot\0" \ "trymmcallpartboot=setenv mmcpart 1; run trymmcpartboot;" \ "setenv mmcpart 2; run trymmcpartboot;" \ "setenv mmcpart 3; run trymmcpartboot;" \ -- cgit v1.2.3