Files
u-boot/configs/r8a779h0_grayhawk_defconfig
Marek Vasut 057b1f8df9 arm64: renesas: Clean up default boot command
The current default boot command does not respect the Linux kernel 2 MiB
alignment requirement, present on aarch64 [1]:

"
The Image must be placed text_offset bytes from a 2MB aligned base
address anywhere in usable system RAM and called there.
"

Adjust the boot command such, that it always places both Image and DT at
the nearest highest 2 MiB aligned offset. The DT is placed at lower 2 MiB
aligned address, the aarch64 Image is placed at the next higher 2 MiB
aligned address. Is is unlikely that a DT would be larger than 2 MiB on
these systems.

Replace use of hard-coded load addresses with generic ${loadaddr} aligned
using setexpr. This way, if user picks valid ${loadaddr}, their kernel and
DT address will be correctly set as well.

Fix up boot commands to use && instead of ; to exit the boot command early
in case of failure.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/arch/arm64/booting.rst#n138

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-06 20:13:52 +01:00

23 lines
835 B
Plaintext

#include <configs/renesas_rcar4.config>
CONFIG_ARM=y
CONFIG_ARCH_RENESAS=y
CONFIG_RCAR_GEN4=y
CONFIG_ENV_SIZE=0x20000
CONFIG_ENV_OFFSET=0xFFFE0000
CONFIG_DEFAULT_DEVICE_TREE="renesas/r8a779h0-gray-hawk-single"
CONFIG_TARGET_GRAYHAWK=y
CONFIG_SYS_CLK_FREQ=16666666
CONFIG_SYS_BOOT_GET_CMDLINE=y
CONFIG_SYS_BARGSIZE=2048
CONFIG_BOOTCOMMAND="setexpr dloadaddr ${loadaddr} + 0x200000 && setexpr dloadaddr ${dloadaddr} \\\\& 0xffc00000 && setexpr kloadaddr ${dloadaddr} + 0x200000 && tftp ${dloadaddr} Image-r8a779h0-gray-hawk.dtb && tftp ${kloadaddr} Image && booti ${kloadaddr} - ${dloadaddr}"
CONFIG_DEFAULT_FDT_FILE="r8a779h0-gray-hawk.dtb"
CONFIG_SYS_CBSIZE=2048
CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_MMC_EMMC_HW_PARTITION=2
CONFIG_BITBANGMII=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_RENESAS_RAVB=y
CONFIG_BAUDRATE=921600