lsxl: switch from bootm to bootz for boot commands

Use the bootz command to load zImages in case of any new boot scripts. Only
the legacy one will still use bootm. Apart form the fact, that this will
simplify the image generation process, it saves one copy of the kernel
image: Common practice is to generate an uImage with a loading address of
0x8000. This uImage contains a compressed zImage, which will unpack the
kernel image to the beginning of the RAM. But because there is already the
compressed image the uncompressor first relocates the compressed image to a
higher location. The load address is encoded into the uImage which is
generated by the distributions and thus cannot be easily changed. By using
the bootz command we can load the compressed image to a higher memory
address and the decompressor doesn't have to reloacte the image.

Signed-off-by: Michael Walle <michael@walle.cc>
This commit is contained in:
Michael Walle 2015-02-08 20:06:07 +01:00 committed by Luka Perkov
parent 145df6fe2a
commit 4fe49d7bec

View File

@ -56,6 +56,7 @@
* Commands configuration
*/
#include <config_cmd_default.h>
#define CONFIG_CMD_BOOTZ
#define CONFIG_CMD_DHCP
#define CONFIG_CMD_ELF
#define CONFIG_CMD_ENV
@ -78,6 +79,9 @@
*/
#include "mv-common.h"
/* loading initramfs images without uimage header */
#define CONFIG_SUPPORT_RAW_INITRD
/* ST M25P40 */
#undef CONFIG_SPI_FLASH_MACRONIX
#define CONFIG_SPI_FLASH_STMICRO
@ -130,22 +134,26 @@
"&& load ide ${hdpart} ${kernel_addr} /uImage.buffalo " \
"&& load ide ${hdpart} ${ramdisk_addr} /initrd.buffalo "\
"&& bootm ${kernel_addr} ${ramdisk_addr}\0" \
"bootcmd_net=bootp ${kernel_addr} uImage " \
"&& tftpboot ${ramdisk_addr} uInitrd " \
"bootcmd_net=bootp ${kernel_addr} vmlinuz " \
"&& tftpboot ${ramdisk_addr} initrd.img " \
"&& setenv ramdisk_len ${filesize} " \
"&& tftpboot ${fdt_addr} " CONFIG_FDTFILE " " \
"&& bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \
"&& bootz ${kernel_addr} " \
"${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0" \
"bootcmd_hdd=ide reset " \
"&& load ide ${hdpart} ${kernel_addr} /uImage " \
"&& load ide ${hdpart} ${ramdisk_addr} /uInitrd " \
"&& load ide ${hdpart} ${fdt_addr} " \
"/" CONFIG_FDTFILE " " \
"&& bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \
"&& load ide ${hdpart} ${kernel_addr} /vmlinuz " \
"&& load ide ${hdpart} ${ramdisk_addr} /initrd.img " \
"&& setenv ramdisk_len ${filesize} " \
"&& load ide ${hdpart} ${fdt_addr} /dtb " \
"&& bootz ${kernel_addr} " \
"${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0" \
"bootcmd_usb=usb start " \
"&& load usb 0:1 ${kernel_addr} /uImage " \
"&& load usb 0:1 ${ramdisk_addr} /uInitrd " \
"&& load usb 0:1 ${fdt_addr} " \
"/" CONFIG_FDTFILE " " \
"&& bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \
"&& load usb 0:1 ${kernel_addr} /vmlinuz " \
"&& load usb 0:1 ${ramdisk_addr} /initrd.img " \
"&& setenv ramdisk_len ${filesize} " \
"&& load usb 0:1 ${fdt_addr} " CONFIG_FDTFILE " " \
"&& bootz ${kernel_addr} " \
"${ramdisk_addr}:${ramdisk_len} ${fdt_addr}\0" \
"bootcmd_rescue=run config_nc_dhcp; run nc\0" \
"eraseenv=sf probe 0 " \
"&& sf erase " __stringify(CONFIG_ENV_OFFSET) \