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>
12 lines
529 B
Plaintext
12 lines
529 B
Plaintext
#include <configs/renesas_rcar4_s4.config>
|
|
|
|
CONFIG_ARM=y
|
|
CONFIG_ARCH_RENESAS=y
|
|
CONFIG_RCAR_GEN4=y
|
|
CONFIG_TARGET_S4SK=y
|
|
CONFIG_DEFAULT_DEVICE_TREE="renesas/r8a779f4-s4sk"
|
|
CONFIG_BOOTCOMMAND="setexpr dloadaddr ${loadaddr} + 0x200000 && setexpr dloadaddr ${dloadaddr} \\\\& 0xffc00000 && setexpr kloadaddr ${dloadaddr} + 0x200000 && tftp ${dloadaddr} Image-r8a779f4-s4sk.dtb && tftp ${kloadaddr} Image && booti ${kloadaddr} - ${dloadaddr}"
|
|
CONFIG_DEFAULT_FDT_FILE="r8a779f4-s4sk.dtb"
|
|
CONFIG_BAUDRATE=921600
|
|
CONFIG_BOARD_LATE_INIT=y
|