From bc2ad9f04dd9d15e7134f7e1b6386d1995772d69 Mon Sep 17 00:00:00 2001 From: Michael Walle Date: Sun, 8 Feb 2015 20:06:05 +0100 Subject: lsxl: use default load addresses for legacy boot The load addresses for the bootcmd_legacy script were taken from the original bootloader from Buffalo. But newer kernels are too big and the uncompressing will overwrite parts of the initial ramdisk. Therefore, we switch to the load addresses which are also used by the other boot script. Signed-off-by: Michael Walle --- include/configs/lsxl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/configs/lsxl.h b/include/configs/lsxl.h index a14bfe3a85..6c8e369861 100644 --- a/include/configs/lsxl.h +++ b/include/configs/lsxl.h @@ -127,9 +127,9 @@ "ramdisk_addr=0x01000000\0" \ "fdt_addr=0x01ff0000\0" \ "bootcmd_legacy=ide reset " \ - "&& load ide ${hdpart} 0x00100000 /uImage.buffalo " \ - "&& load ide ${hdpart} 0x00800000 /initrd.buffalo " \ - "&& bootm 0x00100000 0x00800000\0" \ + "&& 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 " \ "&& tftpboot ${fdt_addr} " CONFIG_FDTFILE " " \ -- cgit v1.2.3 From 145df6fe2a5897cfda0ca2992d0e08cdb9cc0cde Mon Sep 17 00:00:00 2001 From: Michael Walle Date: Sun, 8 Feb 2015 20:06:06 +0100 Subject: lsxl: place the dtb below the inital ramdisk The dtb was loaded at a memory address after the initial ramdisk. Thus a large ramdisk would overwrite the dtb. Move it to "ramdisk_start - 64k". 64k should be enough for the device tree blob. Also the kernel documentation arm/Booting suggests to put the dtb before the initial ramdisk. Signed-off-by: Michael Walle --- include/configs/lsxl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/lsxl.h b/include/configs/lsxl.h index 6c8e369861..dff90250a0 100644 --- a/include/configs/lsxl.h +++ b/include/configs/lsxl.h @@ -125,7 +125,7 @@ "hdpart=0:1\0" \ "kernel_addr=0x00800000\0" \ "ramdisk_addr=0x01000000\0" \ - "fdt_addr=0x01ff0000\0" \ + "fdt_addr=0x00ff0000\0" \ "bootcmd_legacy=ide reset " \ "&& load ide ${hdpart} ${kernel_addr} /uImage.buffalo " \ "&& load ide ${hdpart} ${ramdisk_addr} /initrd.buffalo "\ -- cgit v1.2.3 From 4fe49d7becc2dfb7288f8b265e0976428b64323c Mon Sep 17 00:00:00 2001 From: Michael Walle Date: Sun, 8 Feb 2015 20:06:07 +0100 Subject: 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 --- include/configs/lsxl.h | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) (limited to 'include') diff --git a/include/configs/lsxl.h b/include/configs/lsxl.h index dff90250a0..c354c29296 100644 --- a/include/configs/lsxl.h +++ b/include/configs/lsxl.h @@ -56,6 +56,7 @@ * Commands configuration */ #include +#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) \ -- cgit v1.2.3