]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
lsxl: switch from bootm to bootz for boot commands
authorMichael Walle <michael@walle.cc>
Sun, 8 Feb 2015 19:06:07 +0000 (20:06 +0100)
committerLuka Perkov <luka.perkov@sartura.hr>
Thu, 12 Feb 2015 14:28:02 +0000 (15:28 +0100)
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>
include/configs/lsxl.h

index dff90250a01939d86e5cc6215a47298f924af2aa..c354c292960ad511049e4acbe4f0fac5ee673d1d 100644 (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
                "&& 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)           \