]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
vexpress64: Clean up BASE_FVP boot configuration
authorPeter Hoyes <Peter.Hoyes@arm.com>
Thu, 11 Nov 2021 09:26:01 +0000 (09:26 +0000)
committerTom Rini <trini@konsulko.com>
Wed, 5 Jan 2022 03:48:48 +0000 (22:48 -0500)
Move env var address values to #defines so they can be reused elsewhere.

Rename env var names to those recommended in the README and modify
addresses to allow more space for the kernel.

Fix issue where fdt is called with invalid arguments when booting
without a ramdisk.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
configs/vexpress_aemv8a_semi_defconfig
include/configs/vexpress_aemv8.h

index 7d1a1b56d9d102afd8b6a7a37dec3b7f5be07e2d..f9abf29b26036980eaa5b6da14c4ad304ccdd802 100644 (file)
@@ -15,7 +15,7 @@ CONFIG_ANDROID_BOOT_IMAGE=y
 CONFIG_BOOTDELAY=1
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=ttyAMA0 earlycon=pl011,0x1c090000 debug user_debug=31 loglevel=9"
-CONFIG_BOOTCOMMAND="if smhload ${boot_name} ${boot_addr}; then   set bootargs;   abootimg addr ${boot_addr};   abootimg get dtb --index=0 fdt_addr;   bootm ${boot_addr} ${boot_addr}   ${fdt_addr}; else;   set fdt_high 0xffffffffffffffff;   set initrd_high 0xffffffffffffffff;   smhload ${kernel_name} ${kernel_addr};   smhload ${fdtfile} ${fdt_addr};   smhload ${initrd_name} ${initrd_addr}   initrd_end;   fdt addr ${fdt_addr}; fdt resize;   fdt chosen ${initrd_addr} ${initrd_end};   booti $kernel_addr - $fdt_addr; fi"
+CONFIG_BOOTCOMMAND="if smhload ${boot_name} ${boot_addr_r}; then   set bootargs;   abootimg addr ${boot_addr_r};   abootimg get dtb --index=0 fdt_addr_r;   bootm ${boot_addr_r} ${boot_addr_r}   ${fdt_addr_r}; else;   set fdt_high 0xffffffffffffffff;   set initrd_high 0xffffffffffffffff;   smhload ${kernel_name} ${kernel_addr};   smhload ${fdtfile} ${fdt_addr_r};   smhload ${ramdisk_name} ${ramdisk_addr_r}   ramdisk_end;   fdt addr ${fdt_addr_r}; fdt resize;   fdt chosen ${ramdisk_addr_r} ${ramdisk_end};   booti $kernel_addr - $fdt_addr_r; fi"
 # CONFIG_DISPLAY_CPUINFO is not set
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_SYS_PROMPT="VExpress64# "
index 52fc15d5fc85147cdc5fdd6c6589372bd8f60406..5f7d19daad30965ad123a43180ff8a97ccea51df 100644 (file)
@@ -7,6 +7,8 @@
 #ifndef __VEXPRESS_AEMV8_H
 #define __VEXPRESS_AEMV8_H
 
+#include <linux/stringify.h>
+
 #define CONFIG_REMAKE_ELF
 
 /* Link Definitions */
                                BOOTENV
 
 #elif CONFIG_TARGET_VEXPRESS64_BASE_FVP
+
+#define VEXPRESS_KERNEL_ADDR   0x80080000
+#define VEXPRESS_FDT_ADDR      0x8fc00000
+#define VEXPRESS_BOOT_ADDR     0x8fd00000
+#define VEXPRESS_RAMDISK_ADDR  0x8fe00000
+
 #define CONFIG_EXTRA_ENV_SETTINGS      \
                                "kernel_name=Image\0"           \
-                               "kernel_addr=0x80080000\0"      \
-                               "initrd_name=ramdisk.img\0"     \
-                               "initrd_addr=0x88000000\0"      \
-                               "fdtfile=devtree.dtb\0"         \
-                               "fdt_addr=0x83000000\0"         \
-                               "boot_name=boot.img\0"          \
-                               "boot_addr=0x8007f800\0"
+                               "kernel_addr_r=" __stringify(VEXPRESS_KERNEL_ADDR) "\0" \
+                               "ramdisk_name=ramdisk.img\0"    \
+                               "ramdisk_addr_r=" __stringify(VEXPRESS_RAMDISK_ADDR) "\0" \
+                               "fdtfile=devtree.dtb\0" \
+                               "fdt_addr_r=" __stringify(VEXPRESS_FDT_ADDR) "\0"       \
+                               "boot_name=boot.img\0" \
+                               "boot_addr_r=" __stringify(VEXPRESS_BOOT_ADDR) "\0"
+
 #endif
 
 /* Monitor Command Prompt */