arm64: renesas: Clean up default boot command
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Wed, 22 Oct 2025 13:17:16 +0000 (15:17 +0200)
committerMarek Vasut <marek.vasut+renesas@mailbox.org>
Thu, 6 Nov 2025 19:13:52 +0000 (20:13 +0100)
commit057b1f8df9b5f6dced7f7db353a175744bf26031
tree8bbc49f4ca1d3b3c0211d1f2b23ed1e3e1602317
parenteb5ffe54adbd9a9636869a82b8857c9e058b466d
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>
13 files changed:
configs/hihope_rzg2_defconfig
configs/r8a77970_eagle_defconfig
configs/r8a77980_condor_defconfig
configs/r8a77990_ebisu_defconfig
configs/r8a77995_draak_defconfig
configs/r8a779a0_falcon_defconfig
configs/r8a779f0_spider_defconfig
configs/r8a779f4_s4sk_defconfig
configs/r8a779g0_whitehawk_defconfig
configs/r8a779h0_grayhawk_defconfig
configs/rcar3_salvator-x_defconfig
configs/rcar3_ulcb_defconfig
configs/silinux_ek874_defconfig