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>
87 lines
2.6 KiB
Plaintext
87 lines
2.6 KiB
Plaintext
#include <configs/renesas_rcar3.config>
|
|
|
|
CONFIG_ARM=y
|
|
CONFIG_ARCH_RENESAS=y
|
|
CONFIG_RCAR_GEN3=y
|
|
CONFIG_COUNTER_FREQUENCY=16666666
|
|
CONFIG_ARCH_CPU_INIT=y
|
|
CONFIG_ENV_SIZE=0x20000
|
|
CONFIG_ENV_OFFSET=0xFFFE0000
|
|
CONFIG_DEFAULT_DEVICE_TREE="renesas/r8a77951-salvator-x"
|
|
CONFIG_SPL_TEXT_BASE=0xe6338000
|
|
CONFIG_TARGET_SALVATOR_X=y
|
|
CONFIG_SPL_HAVE_INIT_STACK=y
|
|
CONFIG_SPL_STACK=0xe6304000
|
|
CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
|
|
CONFIG_SPL_BSS_START_ADDR=0xe633f000
|
|
CONFIG_SPL_BSS_MAX_SIZE=0x1000
|
|
CONFIG_PCI=y
|
|
CONFIG_SYS_MONITOR_BASE=0x00000000
|
|
# CONFIG_EFI_UNICODE_CAPITALIZATION is not set
|
|
# CONFIG_BOOTSTD is not set
|
|
CONFIG_USE_BOOTARGS=y
|
|
CONFIG_USE_BOOTCOMMAND=y
|
|
CONFIG_BOOTCOMMAND="setexpr dloadaddr ${loadaddr} + 0x200000 && setexpr dloadaddr ${dloadaddr} \\\\& 0xffc00000 && setexpr kloadaddr ${dloadaddr} + 0x200000 && tftp ${dloadaddr} Image-r8a77951-salvator-x.dtb && tftp ${kloadaddr} Image && booti ${kloadaddr} - ${dloadaddr}"
|
|
CONFIG_DEFAULT_FDT_FILE="r8a77951-salvator-x.dtb"
|
|
# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
|
|
CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=10
|
|
CONFIG_CMD_DFU=y
|
|
CONFIG_CMD_MMC=y
|
|
CONFIG_CMD_PCI=y
|
|
CONFIG_CMD_USB=y
|
|
CONFIG_CMD_USB_MASS_STORAGE=y
|
|
CONFIG_DM_USB_GADGET=y
|
|
CONFIG_OF_LIST="renesas/r8a77951-salvator-x renesas/r8a77960-salvator-x renesas/r8a77965-salvator-x"
|
|
CONFIG_MULTI_DTB_FIT_LZO=y
|
|
CONFIG_MULTI_DTB_FIT_USER_DEFINED_AREA=y
|
|
CONFIG_OF_DTB_PROPS_REMOVE=y
|
|
CONFIG_OF_REMOVE_PROPS="dmas dma-names interrupt-parent interrupts interrupts-extended interrupt-names interrupt-map interrupt-map-mask iommus"
|
|
CONFIG_ENV_IS_IN_MMC=y
|
|
CONFIG_ENV_RELOC_GD_ENV_ADDR=y
|
|
CONFIG_ENV_MMC_EMMC_HW_PARTITION=2
|
|
CONFIG_DFU_TFTP=y
|
|
CONFIG_DFU_RAM=y
|
|
CONFIG_DFU_SF=y
|
|
CONFIG_SYS_I2C_RCAR_IIC=y
|
|
CONFIG_MISC=y
|
|
CONFIG_I2C_EEPROM=y
|
|
CONFIG_SYS_I2C_EEPROM_ADDR=0x70
|
|
CONFIG_MMC_IO_VOLTAGE=y
|
|
CONFIG_MMC_UHS_SUPPORT=y
|
|
CONFIG_MMC_HS400_SUPPORT=y
|
|
CONFIG_RENESAS_SDHI=y
|
|
CONFIG_DM_MTD=y
|
|
CONFIG_MTD_NOR_FLASH=y
|
|
CONFIG_SYS_FLASH_CFI_WIDTH_16BIT=y
|
|
CONFIG_CFI_FLASH=y
|
|
CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS=y
|
|
CONFIG_FLASH_CFI_MTD=y
|
|
CONFIG_SYS_FLASH_PROTECTION=y
|
|
CONFIG_SYS_FLASH_CFI=y
|
|
CONFIG_SYS_FLASH_QUIET_TEST=y
|
|
CONFIG_RENESAS_RPC_HF=y
|
|
CONFIG_SYS_MAX_FLASH_SECT=256
|
|
CONFIG_SYS_MAX_FLASH_BANKS_DETECT=y
|
|
CONFIG_SPI_FLASH_SPANSION=y
|
|
CONFIG_PHY_MICREL=y
|
|
CONFIG_PHY_MICREL_KSZ90X1=y
|
|
CONFIG_DM_ETH_PHY=y
|
|
CONFIG_RENESAS_RAVB=y
|
|
CONFIG_NVME_PCI=y
|
|
CONFIG_PCI_REGION_MULTI_ENTRY=y
|
|
CONFIG_PCI_RCAR_GEN3=y
|
|
CONFIG_SYSINFO=y
|
|
CONFIG_TEE=y
|
|
CONFIG_OPTEE=y
|
|
CONFIG_USB=y
|
|
CONFIG_USB_XHCI_HCD=y
|
|
CONFIG_USB_EHCI_HCD=y
|
|
CONFIG_USB_EHCI_GENERIC=y
|
|
CONFIG_USB_GADGET=y
|
|
CONFIG_USB_GADGET_MANUFACTURER="Renesas"
|
|
CONFIG_USB_GADGET_VENDOR_NUM=0x045b
|
|
CONFIG_USB_GADGET_PRODUCT_NUM=0x023c
|
|
CONFIG_USB_GADGET_DOWNLOAD=y
|
|
CONFIG_USB_RENESAS_USBHS=y
|
|
CONFIG_USB_STORAGE=y
|