From 48313fe51008f777ee97e8963ff8b392fb6c4228 Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Thu, 20 Feb 2020 17:51:14 +0000 Subject: sunxi: Move common defconfig options to Kconfig Some config symbols are found in *almost* every _defconfig file for Allwinner boards, because those options are actually a platform choice, and not a per-board decision. Some of these options are older, some have recently been added. Move those options to be set for all Allwinner boards in their respective Kconfig files. The rationales are as follows: - NR_DRAM_BANKS: All Allwinner SoC map DRAM at one contiguous region of address space only, starting at 1 GB. So it's always one bank. - SPL_{DOS,EFI}_PARTITION: The Allwinner SPL does only support raw MMC accesses, we don't care about filesystems or partitions in there, so there is no need to define those symbols at all. - USE_PREBOOT: We start USB early when a keyboard is configured, using the preboot env variable, so we need to set this variable. - SYS_RELOC_GD_ENV_ADDR: We don't specify any ENV_ADDR, so need this symbol to be set (according to 8d8ee47e03e). - SYS_USB_EVENT_POLL_VIA_INT_QUEUE: According to commit eab9433aa55428, specifying this reduces the latency of the USB keyboard handling, so this was formerly enabled in config headers for all Allwinner boards. Signed-off-by: Andre Przywara Acked-by: Maxime Ripard Tested-by: Jagan Teki # Amarula A64-Relic Reviewed-by: Jagan Teki --- Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'Kconfig') diff --git a/Kconfig b/Kconfig index 66148ce477..b4864cdf8d 100644 --- a/Kconfig +++ b/Kconfig @@ -115,6 +115,7 @@ config ENV_VARS_UBOOT_CONFIG config NR_DRAM_BANKS int "Number of DRAM banks" + default 1 if ARCH_SUNXI default 4 help This defines the number of DRAM banks. -- cgit v1.2.3 From e14ba8a57703457e31248eccd4959cead92e2063 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 30 Mar 2020 13:58:59 +0200 Subject: arch: Add explicit linker script for u-boot-elf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit f4dc714aaa2d ("arm64: Turn u-boot.bin back into an ELF file after relocate-rela") introduce REMAKE_ELF option to recreate u-boot.elf from u-boot -> u-boot.bin + DT -> u-boot.elf. The best is to ilustrate it from make V=1 output cat u-boot-nodtb.bin dts/dt.dtb > u-boot-dtb.bin cp u-boot-dtb.bin u-boot.bin aarch64-linux-gnu-objcopy -I binary -B aarch64 -O elf64-littleaarch64 u-boot.bin u-boot-elf.o aarch64-linux-gnu-ld.bfd u-boot-elf.o -o u-boot.elf --defsym="_start"=0x8000000 -Ttext=0x8000000 Last command has no explicit linker script passed that's why toolchain internal linker script is used. In Binutils 2.32 case it contains SIZEOF_HEADERS symbol which has changed behavior by commit https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=64029e93683a266c38d19789e780f3748bd6a188 which result in situation that program headers has changed from (xilinx_zynqmp_mini_defconfig) Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align LOAD 0x0000000000010000 0x00000000fffc0000 0x00000000fffc0000 0x0000000000018918 0x0000000000018918 RW 0x10000 to Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align LOAD 0x0000000000000000 0x00000000fffb0000 0x00000000fffb0000 0x0000000000028918 0x0000000000028918 RW 0x10000 Xilinx tools like XSDB or Bootgen are using program headers for loading ELF to the right location and by above binutils change ELF is loaded to incorrect location. The patch is explicitly use u-boot-elf.lds (just cat now) for u-boot.elf recreation which is called when REMAKE_ELF is setup. By purpose u-boot-elf.lds doesn't contain OUTPUT_FORMAT/OUTPUT_ARCH to be able to use by all archs. Signed-off-by: Michal Simek Reviewed-by: Tom Rini Reviewed-by: Daniel Schwierzeck Tested-By: Álvaro Fernández Rojas --- Kconfig | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Kconfig') diff --git a/Kconfig b/Kconfig index b4864cdf8d..f698e0a94f 100644 --- a/Kconfig +++ b/Kconfig @@ -299,6 +299,11 @@ config ERR_PTR_OFFSET pointer values - up to 'MAX_ERRNO' bytes below this value must be unused/invalid addresses. +config PLATFORM_ELFENTRY + string + default "__start" if MIPS + default "_start" + endmenu # General setup menu "Boot images" -- cgit v1.2.3