Re: [PATCH resend 1/2] imx: imx8mq: default select CLK_IMX8MQ
Hi Tom, Am Fr., 3. Juni 2022 um 21:49 Uhr schrieb Tom Rini : > > On Mon, May 23, 2022 at 07:38:27PM +0800, Peng Fan (OSS) wrote: > > > From: Peng Fan > > > > Since the power domain driver default select CONFIG_CLK, so we will > > meet lots failures without CLK_IMX8MQ, so default select it. > > > > Fixes: commit 4eb82c2e56a7c ("imx: power-domain: Get rid of SMCCC > > dependency") > > Signed-off-by: Peng Fan > > Applied to u-boot/master, thanks! > Unfortunately I cannot see this patch series [1][2] in master. Therefore my imx8mq board does not start. Am I missing something here? [1] https://patchwork.ozlabs.org/project/uboot/patch/20220523113828.3837-1-peng@oss.nxp.com/ [2] https://patchwork.ozlabs.org/project/uboot/patch/20220523113828.3837-2-peng@oss.nxp.com/ > -- > Tom -- Heiko
[PATCH 2/2] efi_loader: create boot options without file path
Allow creating boot options without file path, e.g. efidebug boot add -b 0001 'short dev only' host 0:1 '' efidebug boot add -B 0002 'long dev only' host 0:1 '' Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_device_path.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c index 50a988c561..c511abcd5e 100644 --- a/lib/efi_loader/efi_device_path.c +++ b/lib/efi_loader/efi_device_path.c @@ -1002,12 +1002,14 @@ struct efi_device_path *efi_dp_from_file(struct blk_desc *desc, int part, buf = dp_part_fill(buf, desc, part); /* add file-path: */ - fp = buf; - fp->dp.type = DEVICE_PATH_TYPE_MEDIA_DEVICE; - fp->dp.sub_type = DEVICE_PATH_SUB_TYPE_FILE_PATH; - fp->dp.length = (u16)fpsize; - path_to_uefi(fp->str, path); - buf += fpsize; + if (*path) { + fp = buf; + fp->dp.type = DEVICE_PATH_TYPE_MEDIA_DEVICE; + fp->dp.sub_type = DEVICE_PATH_SUB_TYPE_FILE_PATH; + fp->dp.length = (u16)fpsize; + path_to_uefi(fp->str, path); + buf += fpsize; + } *((struct efi_device_path *)buf) = END; -- 2.36.1
[PATCH 1/2] efi_loader: allow booting from short dev only DP
Allow booting from a short form device-path without file path, e.g. /HD(1,GPT,5ef79931-a1aa-4c70-9d67-611e8f69eafd,0x800,0x1000) Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_bootmgr.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c index 93f6590530..9b65f34035 100644 --- a/lib/efi_loader/efi_bootmgr.c +++ b/lib/efi_loader/efi_bootmgr.c @@ -44,7 +44,7 @@ static const struct efi_runtime_services *rs; static struct efi_device_path *expand_media_path(struct efi_device_path *device_path) { - struct efi_device_path *dp, *full_path; + struct efi_device_path *dp, *rem, *full_path; efi_handle_t handle; efi_status_t ret; @@ -57,11 +57,10 @@ struct efi_device_path *expand_media_path(struct efi_device_path *device_path) * booting from removable media. */ dp = device_path; - ret = EFI_CALL(efi_locate_device_path( - _simple_file_system_protocol_guid, - , )); + handle = efi_dp_find_obj(dp, _simple_file_system_protocol_guid, +); if (ret == EFI_SUCCESS) { - if (dp->type == DEVICE_PATH_TYPE_END) { + if (rem->type == DEVICE_PATH_TYPE_END) { dp = efi_dp_from_file(NULL, 0, "/EFI/BOOT/" BOOTEFI_NAME); full_path = efi_dp_append(device_path, dp); -- 2.36.1
[PATCH 0/2] efi_loader: allow booting from short dev only DP
Allow creating boot options without file path, e.g. efidebug boot add -b 0001 'short dev only' host 0:1 '' efidebug boot add -B 0001 'long dev only' host 0:1 '' Allow booting from a short form device-path without file path, e.g. /HD(1,GPT,5ef79931-a1aa-4c70-9d67-611e8f69eafd,0x800,0x1000) Heinrich Schuchardt (2): efi_loader: allow booting from short dev only DP efi_loader: create boot options without file path lib/efi_loader/efi_bootmgr.c | 9 - lib/efi_loader/efi_device_path.c | 14 -- 2 files changed, 12 insertions(+), 11 deletions(-) -- 2.36.1
[PATCHv2 16/18] spl: Ensure all SPL symbols in Kconfig have some SPL dependency
Tighten up symbol dependencies in a number of places. Ensure that a SPL specific option has at least a direct dependency on SPL. In places where it's clear that we depend on something more specific, use that dependency instead. This means in a very small number of places we can drop redundant dependencies. Reported-by: Pali Rohár Signed-off-by: Tom Rini --- Changes in v2: - Add the symbols in arch/arm/cpu/armv8/Kconfig from Pali's original patch --- arch/arm/Kconfig | 1 - arch/arm/cpu/armv8/Kconfig | 2 ++ arch/arm/mach-imx/imx8/Kconfig | 4 ++-- arch/x86/Kconfig | 1 + boot/Kconfig | 2 +- common/Kconfig | 3 ++- configs/at91sam9n12ek_nandflash_defconfig | 4 +--- configs/at91sam9x5ek_dataflash_defconfig | 4 +--- configs/at91sam9x5ek_nandflash_defconfig | 4 +--- configs/sama5d36ek_cmp_nandflash_defconfig | 4 +--- configs/socfpga_secu1_defconfig| 1 + drivers/firmware/Kconfig | 2 +- drivers/gpio/Kconfig | 4 ++-- drivers/i2c/muxes/Kconfig | 2 +- drivers/led/Kconfig| 4 ++-- drivers/mmc/Kconfig| 6 +- drivers/mtd/nand/raw/Kconfig | 6 -- drivers/mtd/spi/Kconfig| 2 +- drivers/power/Kconfig | 1 + drivers/power/acpi_pmc/Kconfig | 1 + drivers/power/regulator/Kconfig| 12 ++-- fs/cbfs/Kconfig| 1 + lib/Kconfig| 8 +++- lib/crypto/Kconfig | 4 ++-- lib/ecdsa/Kconfig | 1 + lib/rsa/Kconfig| 1 + test/Kconfig | 1 + 27 files changed, 50 insertions(+), 36 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index fa113e443ad2..da661ce30b03 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -,7 +,6 @@ config ARCH_SOCFPGA select SPL_DM_SERIAL select SPL_LIBCOMMON_SUPPORT select SPL_LIBGENERIC_SUPPORT - select SPL_NAND_SUPPORT if SPL_NAND_DENALI select SPL_OF_CONTROL select SPL_SEPARATE_BSS if TARGET_SOCFPGA_SOC64 select SPL_SERIAL diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig index 09f3f50fa22f..0476446bc5ba 100644 --- a/arch/arm/cpu/armv8/Kconfig +++ b/arch/arm/cpu/armv8/Kconfig @@ -76,6 +76,7 @@ config ARMV8_SEC_FIRMWARE_SUPPORT config SPL_ARMV8_SEC_FIRMWARE_SUPPORT bool "Enable ARMv8 secure monitor firmware framework support for SPL" + depends on SPL select SPL_FIT select SPL_OF_LIBFDT help @@ -83,6 +84,7 @@ config SPL_ARMV8_SEC_FIRMWARE_SUPPORT config SPL_RECOVER_DATA_SECTION bool "save/restore SPL data section" + depends on SPL help Say Y here to save SPL data section for cold boot, and restore at warm boot in SPL phase. diff --git a/arch/arm/mach-imx/imx8/Kconfig b/arch/arm/mach-imx/imx8/Kconfig index 5e1b20a42297..51c3f21b6e76 100644 --- a/arch/arm/mach-imx/imx8/Kconfig +++ b/arch/arm/mach-imx/imx8/Kconfig @@ -20,13 +20,13 @@ config MU_BASE_SPL config IMX8QM select IMX8 select SUPPORT_SPL - select SPL_RECOVER_DATA_SECTION + select SPL_RECOVER_DATA_SECTION if SPL bool config IMX8QXP select IMX8 select SUPPORT_SPL - select SPL_RECOVER_DATA_SECTION + select SPL_RECOVER_DATA_SECTION if SPL bool config SYS_SOC diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 7cbfd6c97208..6b3765c997da 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -945,6 +945,7 @@ config ACPI_GPE config SPL_ACPI_GPE bool "Support ACPI general-purpose events in SPL" + depends on SPL help Enable a driver for ACPI GPEs to allow peripherals to send interrupts via ACPI to the OS. In U-Boot this is only used when U-Boot itself diff --git a/boot/Kconfig b/boot/Kconfig index 08451c65a56b..1aee2de8f302 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -613,7 +613,7 @@ config BOOTSTAGE config SPL_BOOTSTAGE bool "Boot timing and reported in SPL" - depends on BOOTSTAGE + depends on BOOTSTAGE && SPL help Enable recording of boot time in SPL. To make this visible to U-Boot proper, enable BOOTSTAGE_STASH as well. This will stash the timing diff --git a/common/Kconfig b/common/Kconfig index 84db2e43f155..079670ddd12f 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -83,6 +83,7 @@ config LOGLEVEL config SPL_LOGLEVEL int + depends on SPL default LOGLEVEL config TPL_LOGLEVEL @@ -365,7 +366,7 @@ config LOG_SYSLOG config SPL_LOG bool "Enable logging support in SPL" - depends on LOG +
[PATCHv2 07/18] Convert CONFIG_USB_XHCI_EXYNOS et al to Kconfig
This converts the following to Kconfig: CONFIG_USB_XHCI_EXYNOS CONFIG_USB_EHCI_EXYNOS Signed-off-by: Tom Rini --- Changes in v2: - Remove another now useless comment (Minkyu) --- drivers/usb/host/Kconfig| 16 include/configs/exynos5250-common.h | 5 - include/configs/exynos5420-common.h | 2 -- include/configs/odroid.h| 3 --- include/configs/odroid_xu3.h| 3 --- include/configs/smdk5420.h | 3 --- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 5d0855ffcc79..413bec0f4a1a 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -32,6 +32,14 @@ config USB_XHCI_DWC3_OF_SIMPLE Support USB2/3 functionality in simple SoC integrations with USB controller based on the DesignWare USB3 IP Core. +config USB_XHCI_EXYNOS + bool "Support for Samsung Exynos5 family on-chip xHCI USB controller" + depends on ARCH_EXYNOS5 + default y + help + Enables support for he on-chip xHCI controller on Samsung Exynos5 + SoCs. + config USB_XHCI_MTK bool "Support for MediaTek on-chip xHCI USB controller" depends on ARCH_MEDIATEK @@ -157,6 +165,14 @@ config USB_EHCI_ATMEL ---help--- Enables support for the on-chip EHCI controller on Atmel chips. +config USB_EHCI_EXYNOS + bool "Support for Samsung Exynos EHCI USB controller" + depends on ARCH_EXYNOS + default y + ---help--- + Enables support for the on-chip EHCI controller on Samsung Exynos + SoCs. + config USB_EHCI_MARVELL bool "Support for Marvell on-chip EHCI USB controller" depends on ARCH_MVEBU || ARCH_KIRKWOOD || ARCH_ORION5X diff --git a/include/configs/exynos5250-common.h b/include/configs/exynos5250-common.h index 82cb8aff7b52..8d91a7de5cde 100644 --- a/include/configs/exynos5250-common.h +++ b/include/configs/exynos5250-common.h @@ -13,11 +13,6 @@ #define CONFIG_SYS_SDRAM_BASE 0x4000 -/* USB */ -#define CONFIG_USB_EHCI_EXYNOS - -#define CONFIG_USB_XHCI_EXYNOS - /* DRAM Memory Banks */ #define SDRAM_BANK_SIZE(256UL << 20UL) /* 256 MB */ diff --git a/include/configs/exynos5420-common.h b/include/configs/exynos5420-common.h index 5e1aba7692e0..35bf3c2fb4a7 100644 --- a/include/configs/exynos5420-common.h +++ b/include/configs/exynos5420-common.h @@ -27,6 +27,4 @@ #define CONFIG_LOWPOWER_FLAG 0x02020028 #define CONFIG_LOWPOWER_ADDR 0x0202002C -#define CONFIG_USB_XHCI_EXYNOS - #endif /* __CONFIG_EXYNOS5420_H */ diff --git a/include/configs/odroid.h b/include/configs/odroid.h index dec658dd13a3..11a4a409dbaf 100644 --- a/include/configs/odroid.h +++ b/include/configs/odroid.h @@ -149,9 +149,6 @@ /* Security subsystem - enable hw_rand() */ #define CONFIG_EXYNOS_ACE_SHA -/* USB */ -#define CONFIG_USB_EHCI_EXYNOS - /* * Supported Odroid boards: X3, U3 * TODO: Add Odroid X support diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h index 8d24a03b722d..476bde53572d 100644 --- a/include/configs/odroid_xu3.h +++ b/include/configs/odroid_xu3.h @@ -16,9 +16,6 @@ #define SDRAM_BANK_SIZE(256UL << 20UL) /* 256 MB */ -/* USB */ -#define CONFIG_USB_EHCI_EXYNOS - /* DFU */ #define DFU_DEFAULT_POLL_TIMEOUT 300 #define DFU_MANIFEST_POLL_TIMEOUT 25000 diff --git a/include/configs/smdk5420.h b/include/configs/smdk5420.h index f8d2fafd2788..254d0d91046c 100644 --- a/include/configs/smdk5420.h +++ b/include/configs/smdk5420.h @@ -19,9 +19,6 @@ #define CONFIG_SYS_SDRAM_BASE 0x2000 -/* USB */ -#define CONFIG_USB_XHCI_EXYNOS - /* DRAM Memory Banks */ #define SDRAM_BANK_SIZE(512UL << 20UL) /* 512 MB */ -- 2.25.1
[PATCH] i2c: fix stack buffer overflow vulnerability in i2c md command
From: Nicolas Iooss When running "i2c md 0 0 8100", the function do_i2c_md parses the length into an unsigned int variable named length. The value is then moved to a signed variable: int nbytes = length; #define DISP_LINE_LEN 16 int linebytes = (nbytes > DISP_LINE_LEN) ? DISP_LINE_LEN : nbytes; ret = dm_i2c_read(dev, addr, linebuf, linebytes); On systems where integers are 32 bits wide, 0x8100 is a negative value to "nbytes > DISP_LINE_LEN" is false and linebytes gets assigned 0x8100 instead of 16. The consequence is that the function which reads from the i2c device (dm_i2c_read or i2c_read) is called with a 16-byte stack buffer to fill but with a size parameter which is too large. In some cases, this could trigger a crash. But with some i2c drivers, such as drivers/i2c/nx_i2c.c (used with "nexell,s5pxx18-i2c" bus), the size is actually truncated to a 16-bit integer. This is because function i2c_transfer expects an unsigned short length. In such a case, an attacker who can control the response of an i2c device can overwrite the return address of a function and execute arbitrary code through Return-Oriented Programming. Fix this issue by using unsigned integers types in do_i2c_md. While at it, make also alen unsigned, as signed sizes can cause vulnerabilities when people forgot to check that they can be negative. Signed-off-by: Nicolas Iooss --- cmd/i2c.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/cmd/i2c.c b/cmd/i2c.c index 9050b2b8d27a..bd04b14024be 100644 --- a/cmd/i2c.c +++ b/cmd/i2c.c @@ -200,10 +200,10 @@ void i2c_init_board(void) * * Returns the address length. */ -static uint get_alen(char *arg, int default_len) +static uint get_alen(char *arg, uint default_len) { - int j; - int alen; + uintj; + uintalen; alen = default_len; for (j = 0; j < 8; j++) { @@ -247,7 +247,7 @@ static int do_i2c_read(struct cmd_tbl *cmdtp, int flag, int argc, { uintchip; uintdevaddr, length; - int alen; + uintalen; u_char *memaddr; int ret; #if CONFIG_IS_ENABLED(DM_I2C) @@ -301,7 +301,7 @@ static int do_i2c_write(struct cmd_tbl *cmdtp, int flag, int argc, { uintchip; uintdevaddr, length; - int alen; + uintalen; u_char *memaddr; int ret; #if CONFIG_IS_ENABLED(DM_I2C) @@ -469,8 +469,8 @@ static int do_i2c_md(struct cmd_tbl *cmdtp, int flag, int argc, { uintchip; uintaddr, length; - int alen; - int j, nbytes, linebytes; + uintalen; + uintj, nbytes, linebytes; int ret; #if CONFIG_IS_ENABLED(DM_I2C) struct udevice *dev; @@ -589,9 +589,9 @@ static int do_i2c_mw(struct cmd_tbl *cmdtp, int flag, int argc, { uintchip; ulong addr; - int alen; + uintalen; uchar byte; - int count; + uintcount; int ret; #if CONFIG_IS_ENABLED(DM_I2C) struct udevice *dev; @@ -676,8 +676,8 @@ static int do_i2c_crc(struct cmd_tbl *cmdtp, int flag, int argc, { uintchip; ulong addr; - int alen; - int count; + uintalen; + uintcount; uchar byte; ulong crc; ulong err; @@ -985,7 +985,7 @@ static int do_i2c_loop(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { uintchip; - int alen; + uintalen; uintaddr; uintlength; u_char bytes[16]; -- 2.32.0
Re: [PATCH] crypto: fsl_hash: Remove unnecessary alignment check in, caam_hash()
On 10. 06. 22 13:47, Fabio Estevam wrote: [EXTERNAL EMAIL] Hi Michal, On Fri, Jun 10, 2022 at 7:02 AM Michal Vokáč wrote: Hi Fabio, I had the very same problem/error on i.MX6 and figured out that CONFIG_ARCH_MISC_INIT=y must be enabled otherwise the caam_jr driver is not initialized. Yes, correct. There is a patch from Gaurav to address this: https://lists.denx.de/pipermail/u-boot/2022-June/485959.html OK, thanks for the reference. It took me some time to reply to the thread and this patch came in the meantime. Hash algo:sha256 Hash value: 13e0b23bd49f9e86a0425080fc788db67bf318d6f103f217d5705a455737e91c Verifying Hash Integrity ... sha256CACHE: Misaligned operation at range [122c4604, 122ce684] + OK Loading fdt from 0x122c4604 to 0x1800 Booting using the fdt blob at 0x1800 Loading Kernel Image Using Device Tree in place at 1800, end 1800d04d On a imx6sabresd the board simply hangs in SPL, when CONFIG_IMX_HAB=y: https://lists.denx.de/pipermail/u-boot/2022-June/485993.html Does your board use SPL? Normally it does but I am not that far yet. We are in a process of upgrade from v2019.07 to the latest version and moving everything from the legacy support to the driver model etc. is quite challenging. So far I am building just the non-SPL version and loading it over the NXP uuu tool to fail-fast. I expect ton of new problems once I move to the SPL version :) Regards, Michal
Re: [PATCH] crypto: fsl_hash: Remove unnecessary alignment check in, caam_hash()
On Fri, Apr 29, 2022 at 10:35 AM Stefan Roese wrote: While working on an LX2160 based board and updating to latest mainline I noticed problems using the HW accelerated hash functions on this platform, when trying to boot a FIT Kernel image. Here the resulting error message: Using 'conf-freescale_lx2160a.dtb' configuration Trying 'kernel-1' kernel subimage Verifying Hash Integrity ... sha256Error: Address arguments are not aligned CAAM was not setup properly or it is faulty error! Bad hash value for 'hash-1' hash node in 'kernel-1' image node Bad Data Hash ERROR: can't get kernel image! Testing and checking with Gaurav Jain from NXP has revealed, that this alignment check is not necessary here at all. So let's remove this check completely. Signed-off-by: Stefan Roese Cc: Gaurav Jain Cc: dullf...@yahoo.com I applied this patch against top of tree U-Boot, but I am still getting the following error on a kontron-sl-mx8mm board with the options below selected: CONFIG_IMX_HAB=y CONFIG_SPL_DRIVERS_MISC=y ### Loading kernel from FIT Image at 4200 ... Using 'conf-freescale_imx8mm-kontron-n801x-s.dtb' configuration Trying 'kernel-1' kernel subimage Description: Linux kernel Created: 2022-06-07 1:58:57 UTC Type: Kernel Image Compression: gzip compressed Data Start: 0x42000100 Data Size:7609360 Bytes = 7.3 MiB Architecture: AArch64 OS: Linux Load Address: 0x4048 Entry Point: 0x4048 Hash algo:sha256 Hash value: d20b5d533e123096edb05a6433d850c0fafb4b39a6e6d47e9bade3f6fa7c26ce Verifying Hash Integrity ... sha256dev_get_priv: null device Hi Fabio, I had the very same problem/error on i.MX6 and figured out that CONFIG_ARCH_MISC_INIT=y must be enabled otherwise the caam_jr driver is not initialized. I also tried this patch. Now the caam_hash() returns OK and I can boot the board but I am still seeing a warning regarding wrong alignment from cache lib: => bootm 1200#conf-4 ## Loading kernel from FIT Image at 1200 ... Using 'conf-4' configuration Verifying Hash Integrity ... OK Trying 'kernel' kernel subimage Description: Kernel Type: Kernel Image Compression: uncompressed Data Start: 0x12dc Data Size:2901024 Bytes = 2.8 MiB Architecture: ARM OS: Linux Load Address: 0x1080 Entry Point: 0x1080 Hash algo:sha256 Hash value: a3343f1df615f14677176ea4966644fcaa25b31bd3808682567b7fedf704cfb8 Verifying Hash Integrity ... sha256CACHE: Misaligned operation at range [12dc, 122c451c] + OK ## Loading fdt from FIT Image at 1200 ... Using 'conf-4' configuration Verifying Hash Integrity ... OK Trying 'fdt-4' fdt subimage Description: Orion Flattened Device Tree blob Type: Flat Device Tree Compression: uncompressed Data Start: 0x122c4604 Data Size:41038 Bytes = 40.1 KiB Architecture: ARM Load Address: 0x1800 Hash algo:sha256 Hash value: 13e0b23bd49f9e86a0425080fc788db67bf318d6f103f217d5705a455737e91c Verifying Hash Integrity ... sha256CACHE: Misaligned operation at range [122c4604, 122ce684] + OK Loading fdt from 0x122c4604 to 0x1800 Booting using the fdt blob at 0x1800 Loading Kernel Image Using Device Tree in place at 1800, end 1800d04d Starting kernel ... Michal
[PATCH 15/15] Globally remove most CONFIG_SPL_BUILD tests from config headers
With the exception of how PowerPC handles SPL and TPL (which has its own issues), we cannot safely hide options under CONFIG_SPL_BUILD. Largely remove the places that have this test today. Signed-off-by: Tom Rini --- include/configs/am335x_igep003x.h | 2 -- include/configs/am335x_sl50.h | 4 include/configs/apalis_imx6.h | 4 include/configs/baltos.h| 2 -- include/configs/brppt1.h| 2 -- include/configs/brsmarc1.h | 3 --- include/configs/brxre1.h| 3 --- include/configs/capricorn-common.h | 3 --- include/configs/clearfog.h | 6 -- include/configs/cm_fx6.h| 6 -- include/configs/cm_t335.h | 4 include/configs/colibri_imx6.h | 4 include/configs/controlcenterdc.h | 2 -- include/configs/da850evm.h | 2 -- include/configs/db-88f6820-amc.h| 2 -- include/configs/db-88f6820-gp.h | 2 -- include/configs/db-mv784mp-gp.h | 2 -- include/configs/dh_imx6.h | 2 -- include/configs/draco.h | 6 -- include/configs/dragonboard820c.h | 2 -- include/configs/ds414.h | 2 -- include/configs/helios4.h | 6 -- include/configs/imx6dl-mamoj.h | 2 -- include/configs/imx8mm_data_modul_edm_sbc.h | 4 include/configs/imx8mm_evk.h| 2 -- include/configs/imx8mm_icore_mx8mm.h| 4 include/configs/imx8mm_venice.h | 4 include/configs/imx8mn_evk.h| 2 -- include/configs/imx8mn_venice.h | 4 include/configs/imx8mp_dhcom_pdk2.h | 4 include/configs/imx8mp_evk.h| 2 -- include/configs/imx8mp_venice.h | 4 include/configs/imx8mq_cm.h | 2 -- include/configs/imx8mq_evk.h| 2 -- include/configs/iot2050.h | 4 include/configs/kontron-sl-mx6ul.h | 4 include/configs/kontron-sl-mx8mm.h | 4 include/configs/kp_imx6q_tpc.h | 2 -- include/configs/kylin_rk3036.h | 6 -- include/configs/ls1012a_common.h| 2 -- include/configs/ls1012afrdm.h | 2 -- include/configs/ls1012afrwy.h | 2 -- include/configs/ls1043a_common.h| 2 -- include/configs/ls1046a_common.h| 2 -- include/configs/ls1046afrwy.h | 2 -- include/configs/ls2080aqds.h| 2 +- include/configs/mx6cuboxi.h | 5 - include/configs/mx6sxsabresd.h | 4 include/configs/mx6ul_14x14_evk.h | 4 include/configs/novena.h| 5 - include/configs/omap3_igep00x0.h| 4 include/configs/opos6uldev.h| 4 include/configs/pdu001.h| 2 -- include/configs/pomelo.h| 2 -- include/configs/poplar.h| 2 -- include/configs/px30_common.h | 4 include/configs/pxm2.h | 7 --- include/configs/qemu-riscv.h| 2 -- include/configs/rastaban.h | 6 -- include/configs/rk3036_common.h | 3 --- include/configs/rk3066_common.h | 4 include/configs/rk3128_common.h | 4 include/configs/rk3188_common.h | 3 --- include/configs/rk322x_common.h | 3 --- include/configs/rk3288_common.h | 3 --- include/configs/rk3308_common.h | 4 include/configs/rk3328_common.h | 4 include/configs/rk3368_common.h | 3 --- include/configs/rk3568_common.h | 2 -- include/configs/rut.h | 8 include/configs/rv1108_common.h | 3 +-- include/configs/sandbox.h | 2 -- include/configs/siemens-am33x-common.h | 6 -- include/configs/sifive-unleashed.h | 2 -- include/configs/sifive-unmatched.h | 2 -- include/configs/smartweb.h | 2 -- include/configs/socfpga_soc64_common.h | 15 --- include/configs/sunxi-common.h | 6 -- include/configs/synquacer.h | 4 include/configs/taurus.h| 6 -- include/configs/tegra-common-post.h | 5 - include/configs/thuban.h| 6 -- include/configs/ti_omap4_common.h | 2 -- include/configs/uniphier.h | 4 include/configs/verdin-imx8mm.h | 4 include/configs/verdin-imx8mp.h | 4 include/configs/x530.h | 2 -- include/configs/xilinx_zynqmp.h
[PATCH 14/15] Convert CONFIG_SYS_MPC85XX_NO_RESETVEC to Kconfig
This converts the following to Kconfig: CONFIG_SYS_MPC85XX_NO_RESETVEC Signed-off-by: Tom Rini --- README | 5 - arch/powerpc/cpu/mpc85xx/Kconfig | 23 arch/powerpc/cpu/mpc85xx/u-boot-spl.lds | 6 ++--- arch/powerpc/cpu/mpc85xx/u-boot.lds | 4 ++-- configs/P1010RDB-PA_36BIT_NAND_defconfig | 2 ++ configs/P1010RDB-PA_36BIT_NOR_defconfig | 1 + configs/P1010RDB-PA_36BIT_SDCARD_defconfig | 2 ++ configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig | 2 ++ configs/P1010RDB-PA_NAND_defconfig | 2 ++ configs/P1010RDB-PA_NOR_defconfig| 1 + configs/P1010RDB-PA_SDCARD_defconfig | 2 ++ configs/P1010RDB-PA_SPIFLASH_defconfig | 2 ++ configs/P1010RDB-PB_36BIT_NAND_defconfig | 2 ++ configs/P1010RDB-PB_36BIT_NOR_defconfig | 1 + configs/P1010RDB-PB_36BIT_SDCARD_defconfig | 2 ++ configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig | 2 ++ configs/P1010RDB-PB_NAND_defconfig | 2 ++ configs/P1010RDB-PB_NOR_defconfig| 1 + configs/P1010RDB-PB_SDCARD_defconfig | 2 ++ configs/P1010RDB-PB_SPIFLASH_defconfig | 2 ++ configs/P1020RDB-PC_36BIT_NAND_defconfig | 2 ++ configs/P1020RDB-PC_36BIT_SDCARD_defconfig | 2 ++ configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig | 2 ++ configs/P1020RDB-PC_36BIT_defconfig | 1 + configs/P1020RDB-PC_NAND_defconfig | 2 ++ configs/P1020RDB-PC_SDCARD_defconfig | 2 ++ configs/P1020RDB-PC_SPIFLASH_defconfig | 2 ++ configs/P1020RDB-PC_defconfig| 1 + configs/P1020RDB-PD_NAND_defconfig | 2 ++ configs/P1020RDB-PD_SDCARD_defconfig | 2 ++ configs/P1020RDB-PD_SPIFLASH_defconfig | 2 ++ configs/P1020RDB-PD_defconfig| 1 + configs/P2020RDB-PC_36BIT_NAND_defconfig | 2 ++ configs/P2020RDB-PC_36BIT_SDCARD_defconfig | 2 ++ configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig | 2 ++ configs/P2020RDB-PC_36BIT_defconfig | 1 + configs/P2020RDB-PC_NAND_defconfig | 2 ++ configs/P2020RDB-PC_SDCARD_defconfig | 2 ++ configs/P2020RDB-PC_SPIFLASH_defconfig | 2 ++ configs/P2020RDB-PC_defconfig| 1 + configs/T1024RDB_NAND_defconfig | 2 ++ configs/T1024RDB_SDCARD_defconfig| 1 + configs/T1024RDB_SPIFLASH_defconfig | 1 + configs/T1042D4RDB_NAND_defconfig| 2 ++ configs/T1042D4RDB_SDCARD_defconfig | 1 + configs/T1042D4RDB_SPIFLASH_defconfig| 1 + configs/T2080QDS_NAND_defconfig | 2 ++ configs/T2080QDS_SDCARD_defconfig| 1 + configs/T2080QDS_SPIFLASH_defconfig | 1 + configs/T2080RDB_NAND_defconfig | 2 ++ configs/T2080RDB_SDCARD_defconfig| 1 + configs/T2080RDB_SPIFLASH_defconfig | 1 + configs/T2080RDB_revD_NAND_defconfig | 2 ++ configs/T2080RDB_revD_SDCARD_defconfig | 1 + configs/T2080RDB_revD_SPIFLASH_defconfig | 1 + configs/T4240RDB_SDCARD_defconfig| 1 + configs/qemu-ppce500_defconfig | 1 + include/configs/P1010RDB.h | 7 -- include/configs/T102xRDB.h | 9 include/configs/T104xRDB.h | 9 include/configs/T208xQDS.h | 9 include/configs/T208xRDB.h | 9 include/configs/T4240RDB.h | 3 --- include/configs/p1_p2_rdb_pc.h | 7 -- include/configs/qemu-ppce500.h | 2 -- scripts/config_whitelist.txt | 1 - 66 files changed, 113 insertions(+), 66 deletions(-) diff --git a/README b/README index c95f4334199e..841f8ce082c0 100644 --- a/README +++ b/README @@ -2164,11 +2164,6 @@ Low Level (hardware related) configuration options: proper). Code that needs stage-specific behavior should check this. -- CONFIG_SYS_MPC85XX_NO_RESETVEC - Only for 85xx systems. If this variable is specified, the section - .resetvec is not kept and the section .bootpg is placed in the - previous 4k of the .text section. - - CONFIG_ARCH_MAP_SYSMEM Generally U-Boot (and in particular the md command) uses effective address. It is therefore not necessary to regard diff --git a/arch/powerpc/cpu/mpc85xx/Kconfig b/arch/powerpc/cpu/mpc85xx/Kconfig index c1b4e94d9191..02efa1c60301 100644 --- a/arch/powerpc/cpu/mpc85xx/Kconfig +++ b/arch/powerpc/cpu/mpc85xx/Kconfig @@ -1185,6 +1185,29 @@ config SYS_FSL_LBC_CLK_DIV Defines divider of platform clock(clock input to eLBC controller). +config SYS_MPC85XX_NO_RESETVEC + bool "Discard resetvec section and move bootpg section up" + depends on MPC85xx + help + If this variable is specified, the section
[PATCH 13/15] Remove CONFIG_SPL_RAW_IMAGE_ARM_TRUSTED_FIRMWARE and CONFIG_SPL_ABORT_ON_RAW_IMAGE
These symbols do not exist in mainline, remove them. Signed-off-by: Tom Rini --- include/configs/capricorn-common.h | 3 --- include/configs/cgtqmx8.h | 4 include/configs/imx8mm-cl-iot-gate.h| 3 --- include/configs/imx8mm_beacon.h | 3 --- include/configs/imx8mm_data_modul_edm_sbc.h | 4 include/configs/imx8mm_evk.h| 3 --- include/configs/imx8mm_icore_mx8mm.h| 2 -- include/configs/imx8mm_venice.h | 3 --- include/configs/imx8mn_beacon.h | 4 include/configs/imx8mn_evk.h| 6 -- include/configs/imx8mn_venice.h | 5 - include/configs/imx8mp_dhcom_pdk2.h | 6 -- include/configs/imx8mp_evk.h| 2 -- include/configs/imx8mp_rsb3720.h| 2 -- include/configs/imx8mp_venice.h | 5 - include/configs/imx8mq_cm.h | 3 --- include/configs/imx8mq_evk.h| 2 -- include/configs/imx8mq_phanbell.h | 2 -- include/configs/imx8qm_mek.h| 4 include/configs/imx8qxp_mek.h | 4 include/configs/imx8ulp_evk.h | 2 -- include/configs/kontron_pitx_imx8m.h| 3 --- include/configs/phycore_imx8mm.h| 2 -- include/configs/phycore_imx8mp.h| 2 -- include/configs/pico-imx8mq.h | 2 -- include/configs/verdin-imx8mm.h | 2 -- include/configs/verdin-imx8mp.h | 2 -- 27 files changed, 85 deletions(-) diff --git a/include/configs/capricorn-common.h b/include/configs/capricorn-common.h index 4ca9e13ecf7a..456d1828d629 100644 --- a/include/configs/capricorn-common.h +++ b/include/configs/capricorn-common.h @@ -19,9 +19,6 @@ #define CONFIG_MALLOC_F_ADDR 0x0012 -#define CONFIG_SPL_RAW_IMAGE_ARM_TRUSTED_FIRMWARE -#define CONFIG_SPL_ABORT_ON_RAW_IMAGE - #endif /* CONFIG_SPL_BUILD */ /* ENET1 connects to base board and MUX with ESAI */ diff --git a/include/configs/cgtqmx8.h b/include/configs/cgtqmx8.h index 0266d6988ce1..f53c49db3899 100644 --- a/include/configs/cgtqmx8.h +++ b/include/configs/cgtqmx8.h @@ -16,10 +16,6 @@ #define CONFIG_SERIAL_LPUART_BASE 0x5a06 #define CONFIG_MALLOC_F_ADDR 0x0012 - -#define CONFIG_SPL_RAW_IMAGE_ARM_TRUSTED_FIRMWARE - -#define CONFIG_SPL_ABORT_ON_RAW_IMAGE #endif /* Flat Device Tree Definitions */ diff --git a/include/configs/imx8mm-cl-iot-gate.h b/include/configs/imx8mm-cl-iot-gate.h index c559778c1d32..8303c68e369e 100644 --- a/include/configs/imx8mm-cl-iot-gate.h +++ b/include/configs/imx8mm-cl-iot-gate.h @@ -19,9 +19,6 @@ #ifdef CONFIG_SPL_BUILD /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ #define CONFIG_MALLOC_F_ADDR 0x912000 -/* For RAW image gives a error info not panic */ -#define CONFIG_SPL_ABORT_ON_RAW_IMAGE - #endif /* GUIDs for capsule updatable firmware images */ diff --git a/include/configs/imx8mm_beacon.h b/include/configs/imx8mm_beacon.h index 897eac66b148..131eedac6c5e 100644 --- a/include/configs/imx8mm_beacon.h +++ b/include/configs/imx8mm_beacon.h @@ -16,9 +16,6 @@ #ifdef CONFIG_SPL_BUILD /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ #define CONFIG_MALLOC_F_ADDR 0x93 -/* For RAW image gives a error info not panic */ -#define CONFIG_SPL_ABORT_ON_RAW_IMAGE - #endif /* Initial environment variables */ diff --git a/include/configs/imx8mm_data_modul_edm_sbc.h b/include/configs/imx8mm_data_modul_edm_sbc.h index bb19aa292b81..f8af3baef6f4 100644 --- a/include/configs/imx8mm_data_modul_edm_sbc.h +++ b/include/configs/imx8mm_data_modul_edm_sbc.h @@ -16,10 +16,6 @@ #ifdef CONFIG_SPL_BUILD #define CONFIG_MALLOC_F_ADDR 0x93 - -/* For RAW image gives a error info not panic */ -#define CONFIG_SPL_ABORT_ON_RAW_IMAGE - #endif /* Link Definitions */ diff --git a/include/configs/imx8mm_evk.h b/include/configs/imx8mm_evk.h index 983743b50936..d239c926ad5c 100644 --- a/include/configs/imx8mm_evk.h +++ b/include/configs/imx8mm_evk.h @@ -18,9 +18,6 @@ #ifdef CONFIG_SPL_BUILD /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ #define CONFIG_MALLOC_F_ADDR 0x93 -/* For RAW image gives a error info not panic */ -#define CONFIG_SPL_ABORT_ON_RAW_IMAGE - #endif #ifndef CONFIG_SPL_BUILD diff --git a/include/configs/imx8mm_icore_mx8mm.h b/include/configs/imx8mm_icore_mx8mm.h index e6642936cba0..f02d6d58c4ad 100644 --- a/include/configs/imx8mm_icore_mx8mm.h +++ b/include/configs/imx8mm_icore_mx8mm.h @@ -17,8 +17,6 @@ #ifdef CONFIG_SPL_BUILD /* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ # define CONFIG_MALLOC_F_ADDR 0x93 -/* For RAW image gives a error info not panic */ -# define CONFIG_SPL_ABORT_ON_RAW_IMAGE #endif /* CONFIG_SPL_BUILD */ #ifndef CONFIG_SPL_BUILD diff --git a/include/configs/imx8mm_venice.h b/include/configs/imx8mm_venice.h index 595c10749668..573af3b7e286
[PATCH 12/15] siemens: Move CONFIG_FACTORYSET to Kconfig
Introduce board/siemens/common/Kconfig and have it hold FACTORYSET to start with. Use select for this on the boards that need it. Cc: Anatolij Gustschin Cc: Samuel Egli Signed-off-by: Tom Rini --- arch/arm/Kconfig | 1 + arch/arm/mach-imx/imx8/Kconfig | 2 ++ arch/arm/mach-omap2/am33xx/Kconfig | 6 ++ board/siemens/common/Kconfig | 2 ++ include/configs/capricorn-common.h | 2 -- include/configs/draco.h| 2 -- include/configs/etamin.h | 2 -- include/configs/pxm2.h | 2 -- include/configs/rastaban.h | 2 -- include/configs/rut.h | 2 -- include/configs/thuban.h | 2 -- 11 files changed, 11 insertions(+), 14 deletions(-) create mode 100644 board/siemens/common/Kconfig diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index b60b47743e79..4b21955e8e69 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -2331,6 +2331,7 @@ source "board/hisilicon/poplar/Kconfig" source "board/isee/igep003x/Kconfig" source "board/kontron/sl28/Kconfig" source "board/myir/mys_6ulx/Kconfig" +source "board/siemens/common/Kconfig" source "board/seeed/npi_imx6ull/Kconfig" source "board/socionext/developerbox/Kconfig" source "board/st/stv0991/Kconfig" diff --git a/arch/arm/mach-imx/imx8/Kconfig b/arch/arm/mach-imx/imx8/Kconfig index 51c3f21b6e76..2ba7454457dd 100644 --- a/arch/arm/mach-imx/imx8/Kconfig +++ b/arch/arm/mach-imx/imx8/Kconfig @@ -57,11 +57,13 @@ config TARGET_COLIBRI_IMX8X config TARGET_DENEB bool "Support i.MX8QXP Capricorn Deneb board" select BOARD_LATE_INIT + select FACTORYSET select IMX8QXP config TARGET_GIEDI bool "Support i.MX8QXP Capricorn Giedi board" select BOARD_LATE_INIT + select FACTORYSET select IMX8QXP config TARGET_IMX8QM_MEK diff --git a/arch/arm/mach-omap2/am33xx/Kconfig b/arch/arm/mach-omap2/am33xx/Kconfig index 23865d4c0704..bd6b08655260 100644 --- a/arch/arm/mach-omap2/am33xx/Kconfig +++ b/arch/arm/mach-omap2/am33xx/Kconfig @@ -138,6 +138,7 @@ config TARGET_DRACO select DM select DM_GPIO select DM_SERIAL + select FACTORYSET imply CMD_DM config TARGET_ETAMIN @@ -146,6 +147,7 @@ config TARGET_ETAMIN select DM select DM_GPIO select DM_SERIAL + select FACTORYSET imply CMD_DM config TARGET_PCM051 @@ -168,6 +170,7 @@ config TARGET_PXM2 select DM select DM_GPIO select DM_SERIAL + select FACTORYSET imply CMD_DM config TARGET_RASTABAN @@ -176,6 +179,7 @@ config TARGET_RASTABAN select DM select DM_GPIO select DM_SERIAL + select FACTORYSET imply CMD_DM config TARGET_RUT @@ -184,6 +188,7 @@ config TARGET_RUT select DM select DM_GPIO select DM_SERIAL + select FACTORYSET imply CMD_DM config TARGET_THUBAN @@ -192,6 +197,7 @@ config TARGET_THUBAN select DM select DM_GPIO select DM_SERIAL + select FACTORYSET imply CMD_DM config TARGET_PDU001 diff --git a/board/siemens/common/Kconfig b/board/siemens/common/Kconfig new file mode 100644 index ..131439fcfeac --- /dev/null +++ b/board/siemens/common/Kconfig @@ -0,0 +1,2 @@ +config FACTORYSET + bool diff --git a/include/configs/capricorn-common.h b/include/configs/capricorn-common.h index 933fcfcfd287..4ca9e13ecf7a 100644 --- a/include/configs/capricorn-common.h +++ b/include/configs/capricorn-common.h @@ -24,8 +24,6 @@ #endif /* CONFIG_SPL_BUILD */ -#define CONFIG_FACTORYSET - /* ENET1 connects to base board and MUX with ESAI */ #define CONFIG_FEC_ENET_DEV1 #define CONFIG_FEC_MXC_PHYADDR 0x0 diff --git a/include/configs/draco.h b/include/configs/draco.h index d30560810133..b4998f5c2e56 100644 --- a/include/configs/draco.h +++ b/include/configs/draco.h @@ -27,8 +27,6 @@ /* Physical Memory Map */ #define CONFIG_MAX_RAM_BANK_SIZE (1024 << 20)/* 1GB */ -#define CONFIG_FACTORYSET - /* Define own nand partitions */ #define CONFIG_ENV_RANGE(4 * CONFIG_SYS_ENV_SECT_SIZE) diff --git a/include/configs/etamin.h b/include/configs/etamin.h index 654faedf33e9..654bfc612168 100644 --- a/include/configs/etamin.h +++ b/include/configs/etamin.h @@ -75,8 +75,6 @@ #define EEPROM_ADDR_DDR3 0x90 #define EEPROM_ADDR_CHIP 0x120 -#define CONFIG_FACTORYSET - /* nedded by compliance test in read mode */ /* Define own nand partitions */ diff --git a/include/configs/pxm2.h b/include/configs/pxm2.h index 7272470d12e6..ad05920ad6b1 100644 --- a/include/configs/pxm2.h +++ b/include/configs/pxm2.h @@ -30,8 +30,6 @@ /* Physical Memory Map */ #define CONFIG_MAX_RAM_BANK_SIZE (512 << 20) /* 1GB */ -#define CONFIG_FACTORYSET - #ifndef CONFIG_SPL_BUILD /* Use common default */ diff --git a/include/configs/rastaban.h b/include/configs/rastaban.h index 8e20a448d2a7..6c942a809809 100644 ---
[PATCH 10/15] arm: samsung: Migrate a number of symbols to Kconfig
- In a number of cases, use CONFIG_ARCH_EXYNOS[45] rather than CONFIG_EXYNOS[45] - In other cases, test for CONFIG_ARCH_EXYNOS or CONFIG_ARCH_S5PC1XX - Migrate specific SoC CONFIG values to Kconfig - Use CONFIG_TARGET_x rather than CONFIG_x - Migrate other CONFIG_EXYNOS_x symbols to Kconfig - Reference CONFIG_EXYNOS_RELOCATE_CODE_BASE directly as EXYNOS_RELOCATE_CODE_BASE - Rename CONFIG_S5P_PA_SYSRAM to CONFIG_SMP_PEN_ADDR to match the rest of U-Boot usage. Cc: Minkyu Kang Signed-off-by: Tom Rini --- arch/arm/Kconfig| 3 ++ arch/arm/dts/Makefile | 8 ++--- arch/arm/include/asm/spl.h | 5 ++-- arch/arm/mach-exynos/Kconfig| 39 + arch/arm/mach-exynos/Makefile | 4 +-- arch/arm/mach-exynos/dmc_init_exynos4.c | 2 +- arch/arm/mach-exynos/exynos4_setup.h| 4 +-- arch/arm/mach-exynos/lowlevel_init.c| 8 +++-- arch/arm/mach-exynos/sec_boot.S | 2 +- board/samsung/arndale/arndale.c | 4 +-- configs/odroid-xu3_defconfig| 1 + configs/odroid_defconfig| 1 + configs/trats2_defconfig| 1 + configs/trats_defconfig | 1 + drivers/i2c/exynos_hs_i2c.c | 2 +- drivers/i2c/s3c24x0_i2c.c | 4 +-- include/configs/arndale.h | 6 +--- include/configs/espresso7420.h | 2 -- include/configs/exynos-common.h | 4 --- include/configs/exynos4-common.h| 2 -- include/configs/exynos5-common.h| 10 --- include/configs/exynos5-dt-common.h | 2 -- include/configs/exynos5250-common.h | 2 -- include/configs/exynos5420-common.h | 7 - include/configs/exynos7420-common.h | 4 --- include/configs/exynos78x0-common.h | 4 --- include/configs/odroid.h| 3 -- include/configs/odroid_xu3.h| 3 -- include/configs/origen.h| 4 --- include/configs/s5p_goni.h | 5 include/configs/smdkc100.h | 8 - include/configs/smdkv310.h | 2 -- include/configs/trats.h | 5 include/configs/trats2.h| 3 -- include/power/fg_battery_cell_params.h | 2 +- scripts/Makefile.spl| 6 ++-- 36 files changed, 74 insertions(+), 99 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index da661ce30b03..b60b47743e79 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -609,6 +609,9 @@ config ARM64_SUPPORT_AARCH32 help This ARM64 system supports AArch32 execution state. +config S5P + def_bool y if ARCH_EXYNOS || ARCH_S5PC1XX + choice prompt "Target select" default TARGET_HIKEY diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 0a2713c06a3c..539eeb5a87a2 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -5,9 +5,9 @@ dtb-$(CONFIG_TARGET_TAURUS) += at91sam9g20-taurus.dtb dtb-$(CONFIG_TARGET_CORVUS) += at91sam9g45-corvus.dtb dtb-$(CONFIG_TARGET_GURNARD) += at91sam9g45-gurnard.dtb -dtb-$(CONFIG_S5PC100) += s5pc1xx-smdkc100.dtb -dtb-$(CONFIG_S5PC110) += s5pc1xx-goni.dtb -dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \ +dtb-$(CONFIG_TARGET_SMDKC100) += s5pc1xx-smdkc100.dtb +dtb-$(CONFIG_TARGET_S5P_GONI) += s5pc1xx-goni.dtb +dtb-$(CONFIG_ARCH_EXYNOS4) += exynos4210-origen.dtb \ exynos4210-smdkv310.dtb \ exynos4210-universal_c210.dtb \ exynos4210-trats.dtb \ @@ -19,7 +19,7 @@ dtb-$(CONFIG_TARGET_HIKEY960) += hi3660-hikey960.dtb dtb-$(CONFIG_TARGET_POPLAR) += hi3798cv200-poplar.dtb -dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ +dtb-$(CONFIG_ARCH_EXYNOS5) += exynos5250-arndale.dtb \ exynos5250-snow.dtb \ exynos5250-spring.dtb \ exynos5250-smdk5250.dtb \ diff --git a/arch/arm/include/asm/spl.h b/arch/arm/include/asm/spl.h index b5790bd0bc45..0ece4b09060a 100644 --- a/arch/arm/include/asm/spl.h +++ b/arch/arm/include/asm/spl.h @@ -6,9 +6,8 @@ #ifndef_ASM_SPL_H_ #define_ASM_SPL_H_ -#if defined(CONFIG_ARCH_OMAP2PLUS) \ - || defined(CONFIG_EXYNOS4) || defined(CONFIG_EXYNOS5) \ - || defined(CONFIG_EXYNOS4210) || defined(CONFIG_ARCH_K3) +#if defined(CONFIG_ARCH_EXYNOS4) || defined(CONFIG_ARCH_EXYNOS5) || \ + defined(CONFIG_ARCH_K3) || defined(CONFIG_ARCH_OMAP2PLUS) /* Platform-specific defines */ #include diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 77fb9d1775bb..84102908561e 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -54,11 +54,15 @@ endchoice if ARCH_EXYNOS4 +config EXYNOS4210 + bool + choice prompt "EXYNOS4 board select" config TARGET_SMDKV310 bool "Exynos4210 SMDKV310 board" + select EXYNOS4210 select OF_CONTROL select SUPPORT_SPL @@ -70,6 +74,7 @@ config TARGET_S5PC210_UNIVERSAL config TARGET_ORIGEN
[PATCH 11/15] video: Migrate exynos display options to Kconfig
Following how it's done for the majority of drivers, add a new VIDEO_EXYNOS option and Kconfig file under drivers/video/exynos and list the current options there. Cc: Anatolij Gustschin Cc: Jaehoon Chung Cc: Minkyu Kang Signed-off-by: Tom Rini --- It would be good to have help options here, but I don't know the underlying parts, so what to add would be appreciated, or done as a follow-up. On a related note, the drivers themselves should be under something in the top-level MAINTAINERS file as they are not currently. --- configs/peach-pi_defconfig | 3 +++ configs/peach-pit_defconfig | 3 +++ configs/snow_defconfig | 3 +++ configs/spring_defconfig| 3 +++ drivers/video/Kconfig | 2 ++ drivers/video/exynos/Kconfig| 20 include/configs/exynos5-dt-common.h | 7 --- include/configs/peach-pi.h | 7 --- include/configs/smdk5250.h | 3 --- include/configs/smdk5420.h | 3 --- include/configs/trats.h | 1 - include/configs/trats2.h| 1 - 12 files changed, 34 insertions(+), 22 deletions(-) create mode 100644 drivers/video/exynos/Kconfig diff --git a/configs/peach-pi_defconfig b/configs/peach-pi_defconfig index 27be6075661b..d6662e18ab7b 100644 --- a/configs/peach-pi_defconfig +++ b/configs/peach-pi_defconfig @@ -84,6 +84,9 @@ CONFIG_DM_VIDEO=y # CONFIG_VIDEO_BPP8 is not set CONFIG_VIDCONSOLE_AS_LCD=y CONFIG_DISPLAY=y +CONFIG_VIDEO_EXYNOS=y +CONFIG_EXYNOS_DP=y +CONFIG_EXYNOS_FB=y CONFIG_VIDEO_BRIDGE=y CONFIG_VIDEO_BRIDGE_PARADE_PS862X=y CONFIG_LCD=y diff --git a/configs/peach-pit_defconfig b/configs/peach-pit_defconfig index 296b4ceb195b..07740571c757 100644 --- a/configs/peach-pit_defconfig +++ b/configs/peach-pit_defconfig @@ -83,6 +83,9 @@ CONFIG_DM_VIDEO=y # CONFIG_VIDEO_BPP8 is not set CONFIG_VIDCONSOLE_AS_LCD=y CONFIG_DISPLAY=y +CONFIG_VIDEO_EXYNOS=y +CONFIG_EXYNOS_DP=y +CONFIG_EXYNOS_FB=y CONFIG_VIDEO_BRIDGE=y CONFIG_VIDEO_BRIDGE_PARADE_PS862X=y CONFIG_LCD=y diff --git a/configs/snow_defconfig b/configs/snow_defconfig index 4377a58130e3..8d1b28dcf8c5 100644 --- a/configs/snow_defconfig +++ b/configs/snow_defconfig @@ -94,6 +94,9 @@ CONFIG_DM_VIDEO=y # CONFIG_VIDEO_BPP8 is not set CONFIG_VIDCONSOLE_AS_LCD=y CONFIG_DISPLAY=y +CONFIG_VIDEO_EXYNOS=y +CONFIG_EXYNOS_DP=y +CONFIG_EXYNOS_FB=y CONFIG_VIDEO_BRIDGE=y CONFIG_VIDEO_BRIDGE_PARADE_PS862X=y CONFIG_VIDEO_BRIDGE_NXP_PTN3460=y diff --git a/configs/spring_defconfig b/configs/spring_defconfig index ad017564d994..366790b4efe4 100644 --- a/configs/spring_defconfig +++ b/configs/spring_defconfig @@ -95,6 +95,9 @@ CONFIG_DM_VIDEO=y # CONFIG_VIDEO_BPP8 is not set CONFIG_VIDCONSOLE_AS_LCD=y CONFIG_DISPLAY=y +CONFIG_VIDEO_EXYNOS=y +CONFIG_EXYNOS_DP=y +CONFIG_EXYNOS_FB=y CONFIG_VIDEO_BRIDGE=y CONFIG_VIDEO_BRIDGE_PARADE_PS862X=y CONFIG_LCD=y diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 965b5879274e..4ecc158c4605 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -583,6 +583,8 @@ config ATMEL_HLCD source "drivers/video/ti/Kconfig" +source "drivers/video/exynos/Kconfig" + config LOGICORE_DP_TX bool "Enable Logicore DP TX driver" depends on DISPLAY diff --git a/drivers/video/exynos/Kconfig b/drivers/video/exynos/Kconfig new file mode 100644 index ..37e661b1edd2 --- /dev/null +++ b/drivers/video/exynos/Kconfig @@ -0,0 +1,20 @@ + +menuconfig VIDEO_EXYNOS + bool "Enable Exynos video support" + depends on DM_VIDEO + help + Enable support for various video output options on Exynos SoCs. + +if VIDEO_EXYNOS + +config EXYNOS_DP + bool "Exynos Display Port support" + +config EXYNOS_FB + bool "Exynos FIMD support" + +config EXYNOS_MIPI_DSIM + bool "Exynos MIPI DSI support" + depends on EXYNOS_FB + +endif diff --git a/include/configs/exynos5-dt-common.h b/include/configs/exynos5-dt-common.h index 38f6940a3dbc..a94f5a15f0d1 100644 --- a/include/configs/exynos5-dt-common.h +++ b/include/configs/exynos5-dt-common.h @@ -19,11 +19,4 @@ #define FLASH_SIZE (4 << 20) #define CONFIG_SPI_BOOTING -/* Display */ -#ifdef CONFIG_LCD -#define CONFIG_EXYNOS_FB -#define CONFIG_EXYNOS_DP -#define LCD_BPPLCD_COLOR16 -#endif - #endif diff --git a/include/configs/peach-pi.h b/include/configs/peach-pi.h index ff4180a8331d..7a8d3c63d445 100644 --- a/include/configs/peach-pi.h +++ b/include/configs/peach-pi.h @@ -22,13 +22,6 @@ #define CONFIG_SYS_SDRAM_BASE 0x2000 -/* Display */ -#ifdef CONFIG_LCD -#define CONFIG_EXYNOS_FB -#define CONFIG_EXYNOS_DP -#define LCD_BPPLCD_COLOR16 -#endif - #define CONFIG_POWER_TPS65090_EC /* DRAM Memory Banks */ diff --git a/include/configs/smdk5250.h b/include/configs/smdk5250.h index 1ea3b650cd26..c6d2b23197d1 100644 --- a/include/configs/smdk5250.h +++ b/include/configs/smdk5250.h @@ -12,7 +12,4 @@
[PATCH 05/15] Convert CONFIG_LBA48 et al to Kconfig
This converts the following to Kconfig: CONFIG_LBA48 CONFIG_SYS_64BIT_LBA Signed-off-by: Tom Rini --- README | 12 arch/arm/mach-kirkwood/include/mach/config.h | 2 -- configs/A10-OLinuXino-Lime_defconfig | 1 + configs/A20-OLinuXino-Lime2-eMMC_defconfig | 1 + configs/A20-OLinuXino-Lime2_defconfig| 1 + configs/A20-OLinuXino-Lime_defconfig | 1 + configs/A20-OLinuXino_MICRO-eMMC_defconfig | 1 + configs/A20-OLinuXino_MICRO_defconfig| 1 + configs/A20-Olimex-SOM-EVB_defconfig | 1 + configs/A20-Olimex-SOM204-EVB-eMMC_defconfig | 1 + configs/A20-Olimex-SOM204-EVB_defconfig | 1 + configs/Bananapi_M2_Ultra_defconfig | 1 + configs/Bananapi_defconfig | 1 + configs/Bananapro_defconfig | 1 + configs/Cubieboard2_defconfig| 1 + configs/Cubieboard_defconfig | 1 + configs/Cubietruck_defconfig | 1 + configs/Itead_Ibox_A20_defconfig | 1 + configs/Lamobo_R1_defconfig | 1 + configs/Linksprite_pcDuino3_Nano_defconfig | 1 + configs/Linksprite_pcDuino3_defconfig| 1 + configs/Marsboard_A10_defconfig | 1 + configs/Mele_A1000_defconfig | 1 + configs/Mele_M5_defconfig| 1 + configs/Orangepi_defconfig | 1 + configs/Orangepi_mini_defconfig | 1 + configs/P1020RDB-PC_36BIT_NAND_defconfig | 1 + configs/P1020RDB-PC_36BIT_SDCARD_defconfig | 1 + configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig | 1 + configs/P1020RDB-PC_36BIT_defconfig | 1 + configs/P1020RDB-PC_NAND_defconfig | 1 + configs/P1020RDB-PC_SDCARD_defconfig | 1 + configs/P1020RDB-PC_SPIFLASH_defconfig | 1 + configs/P1020RDB-PC_defconfig| 1 + configs/P1020RDB-PD_NAND_defconfig | 1 + configs/P1020RDB-PD_SDCARD_defconfig | 1 + configs/P1020RDB-PD_SPIFLASH_defconfig | 1 + configs/P1020RDB-PD_defconfig| 1 + configs/P2020RDB-PC_36BIT_NAND_defconfig | 1 + configs/P2020RDB-PC_36BIT_SDCARD_defconfig | 1 + configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig | 1 + configs/P2020RDB-PC_36BIT_defconfig | 1 + configs/P2020RDB-PC_NAND_defconfig | 1 + configs/P2020RDB-PC_SDCARD_defconfig | 1 + configs/P2020RDB-PC_SPIFLASH_defconfig | 1 + configs/P2020RDB-PC_defconfig| 1 + configs/P4080DS_SDCARD_defconfig | 1 + configs/P4080DS_SPIFLASH_defconfig | 1 + configs/P4080DS_defconfig| 1 + configs/Wits_Pro_A20_DKT_defconfig | 1 + configs/apalis_imx6_defconfig| 1 + configs/bananapi_m1_plus_defconfig | 1 + configs/bananapi_m2_berry_defconfig | 1 + configs/bayleybay_defconfig | 2 ++ configs/cherryhill_defconfig | 2 ++ configs/chromebook_coral_defconfig | 2 ++ configs/chromebook_link64_defconfig | 2 ++ configs/chromebook_link_defconfig| 2 ++ configs/chromebook_samus_defconfig | 2 ++ configs/chromebook_samus_tpl_defconfig | 2 ++ configs/chromebox_panther_defconfig | 2 ++ configs/clearfog_gt_8k_defconfig | 2 ++ configs/cm_fx6_defconfig | 1 + ...nga-qeval20-qa3-e3845-internal-uart_defconfig | 2 ++ configs/conga-qeval20-qa3-e3845_defconfig| 2 ++ configs/coreboot64_defconfig | 2 ++ configs/coreboot_defconfig | 2 ++ configs/cougarcanyon2_defconfig | 2 ++ configs/crownbay_defconfig | 2 ++ configs/d2net_v2_defconfig | 2 ++ configs/db-mv784mp-gp_defconfig | 1 + configs/dfi-bt700-q7x-151_defconfig | 2 ++ configs/dh_imx6_defconfig| 1 + configs/dns325_defconfig | 1 + configs/dreamplug_defconfig | 1 + configs/ds109_defconfig | 1 + configs/edminiv2_defconfig | 1 + configs/efi-x86_payload32_defconfig | 2 ++ configs/efi-x86_payload64_defconfig | 2 ++ configs/goflexhome_defconfig | 1 + configs/guruplug_defconfig | 1 + configs/gwventana_emmc_defconfig | 1 + configs/gwventana_gw5904_defconfig | 1 + configs/gwventana_nand_defconfig | 1 + configs/highbank_defconfig | 1 +
[PATCH 09/15] arm: exynos: Remove old pwm backlight driver
Remove the unused older exynos pwm backlight driver. Signed-off-by: Tom Rini --- .../mach-exynos/include/mach/pwm_backlight.h | 20 - drivers/video/exynos/exynos_pwm_bl.c | 44 --- 2 files changed, 64 deletions(-) delete mode 100644 arch/arm/mach-exynos/include/mach/pwm_backlight.h delete mode 100644 drivers/video/exynos/exynos_pwm_bl.c diff --git a/arch/arm/mach-exynos/include/mach/pwm_backlight.h b/arch/arm/mach-exynos/include/mach/pwm_backlight.h deleted file mode 100644 index c7d3a91e3183.. --- a/arch/arm/mach-exynos/include/mach/pwm_backlight.h +++ /dev/null @@ -1,20 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2012 Samsung Electronics - * - * Author: Donghwa Lee - */ - -#ifndef _PWM_BACKLIGHT_H_ -#define _PWM_BACKLIGHT_H_ - -struct pwm_backlight_data { - int pwm_id; - int period; - int max_brightness; - int brightness; -}; - -extern int exynos_pwm_backlight_init(struct pwm_backlight_data *pd); - -#endif /* _PWM_BACKLIGHT_H_ */ diff --git a/drivers/video/exynos/exynos_pwm_bl.c b/drivers/video/exynos/exynos_pwm_bl.c deleted file mode 100644 index a3d467aa23b5.. --- a/drivers/video/exynos/exynos_pwm_bl.c +++ /dev/null @@ -1,44 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * PWM BACKLIGHT driver for Board based on EXYNOS. - * - * Author: Donghwa Lee - * - * Derived from linux/drivers/video/backlight/pwm_backlight.c - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -static struct pwm_backlight_data *pwm; - -static int exynos_pwm_backlight_update_status(void) -{ - int brightness = pwm->brightness; - int max = pwm->max_brightness; - - if (brightness == 0) { - pwm_config(pwm->pwm_id, 0, pwm->period); - pwm_disable(pwm->pwm_id); - } else { - pwm_config(pwm->pwm_id, - brightness * pwm->period / max, pwm->period); - pwm_enable(pwm->pwm_id); - } - return 0; -} - -int exynos_pwm_backlight_init(struct pwm_backlight_data *pd) -{ - pwm = pd; - - exynos_pwm_backlight_update_status(); - - return 0; -} -- 2.25.1
[PATCH 07/15] block: ide: Remove ide_preinit function
The only platform currently that defines an ide_preinit function has an empty one that immediately returns. Remove this hook. Signed-off-by: Tom Rini --- board/freescale/m5253demo/m5253demo.c | 5 - drivers/block/ide.c | 9 - include/configs/M5253DEMO.h | 5 - include/ide.h | 4 4 files changed, 23 deletions(-) diff --git a/board/freescale/m5253demo/m5253demo.c b/board/freescale/m5253demo/m5253demo.c index 2a4703579dab..85f5f0c03409 100644 --- a/board/freescale/m5253demo/m5253demo.c +++ b/board/freescale/m5253demo/m5253demo.c @@ -93,11 +93,6 @@ int testdram(void) #ifdef CONFIG_IDE #include -int ide_preinit(void) -{ - return (0); -} - void ide_set_reset(int idereset) { atac_t *ata = (atac_t *) CONFIG_SYS_ATA_BASE_ADDR; diff --git a/drivers/block/ide.c b/drivers/block/ide.c index e8518ff3a11a..3270a9f032f3 100644 --- a/drivers/block/ide.c +++ b/drivers/block/ide.c @@ -695,15 +695,6 @@ void ide_init(void) unsigned char c; int i, bus; -#ifdef CONFIG_IDE_PREINIT - WATCHDOG_RESET(); - - if (ide_preinit()) { - puts("ide_preinit failed\n"); - return; - } -#endif /* CONFIG_IDE_PREINIT */ - WATCHDOG_RESET(); /* ATAPI Drives seems to need a proper IDE Reset */ diff --git a/include/configs/M5253DEMO.h b/include/configs/M5253DEMO.h index 384217a0d989..840d3b4672e6 100644 --- a/include/configs/M5253DEMO.h +++ b/include/configs/M5253DEMO.h @@ -19,11 +19,6 @@ . = DEFINED(env_offset) ? env_offset : .; \ env/embedded.o(.text*); -#ifdef CONFIG_IDE -/* ATA */ -# define CONFIG_IDE_PREINIT 1 -#endif - #ifdef CONFIG_DRIVER_DM9000 # define CONFIG_DM9000_BASE (CONFIG_SYS_CS1_BASE | 0x300) # define DM9000_IOCONFIG_DM9000_BASE diff --git a/include/ide.h b/include/ide.h index 2994b7a76226..426cef4e39e0 100644 --- a/include/ide.h +++ b/include/ide.h @@ -33,10 +33,6 @@ ulong ide_write(struct blk_desc *block_dev, lbaint_t blknr, lbaint_t blkcnt, const void *buffer); #endif -#ifdef CONFIG_IDE_PREINIT -int ide_preinit(void); -#endif - #if defined(CONFIG_OF_IDE_FIXUP) int ide_device_present(int dev); #endif -- 2.25.1
[PATCH 06/15] ata: sata_sil: Remove useless BLK guard in sata_sil.h
Now that the driver only supports CONFIG_BLK, remove the useless guard in sata_sil.h. Signed-off-by: Tom Rini --- drivers/ata/sata_sil.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/ata/sata_sil.h b/drivers/ata/sata_sil.h index bea4322c919d..9ad09e5461d2 100644 --- a/drivers/ata/sata_sil.h +++ b/drivers/ata/sata_sil.h @@ -212,12 +212,10 @@ enum { CMD_ERR = 0x21, }; -#if CONFIG_IS_ENABLED(BLK) #define ATA_MAX_PORTS 32 struct sil_sata_priv { int port_num; struct sil_sata *sil_sata_desc[ATA_MAX_PORTS]; }; -#endif #endif -- 2.25.1
[PATCH 04/15] Convert CONFIG_FSL_SATA_V2 to Kconfig
This converts the following to Kconfig: CONFIG_FSL_SATA_V2 Signed-off-by: Tom Rini --- configs/P1010RDB-PA_36BIT_NAND_defconfig | 1 + configs/P1010RDB-PA_36BIT_NOR_defconfig | 1 + configs/P1010RDB-PA_36BIT_SDCARD_defconfig | 1 + configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig | 1 + configs/P1010RDB-PA_NAND_defconfig | 1 + configs/P1010RDB-PA_NOR_defconfig| 1 + configs/P1010RDB-PA_SDCARD_defconfig | 1 + configs/P1010RDB-PA_SPIFLASH_defconfig | 1 + configs/P1010RDB-PB_36BIT_NAND_defconfig | 1 + configs/P1010RDB-PB_36BIT_NOR_defconfig | 1 + configs/P1010RDB-PB_36BIT_SDCARD_defconfig | 1 + configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig | 1 + configs/P1010RDB-PB_NAND_defconfig | 1 + configs/P1010RDB-PB_NOR_defconfig| 1 + configs/P1010RDB-PB_SDCARD_defconfig | 1 + configs/P1010RDB-PB_SPIFLASH_defconfig | 1 + configs/P2041RDB_NAND_defconfig | 1 + configs/P2041RDB_SDCARD_defconfig| 1 + configs/P2041RDB_SPIFLASH_defconfig | 1 + configs/P2041RDB_defconfig | 1 + configs/P3041DS_NAND_defconfig | 1 + configs/P3041DS_SDCARD_defconfig | 1 + configs/P3041DS_SPIFLASH_defconfig | 1 + configs/P3041DS_defconfig| 1 + configs/P5040DS_NAND_defconfig | 1 + configs/P5040DS_SDCARD_defconfig | 1 + configs/P5040DS_SPIFLASH_defconfig | 1 + configs/P5040DS_defconfig| 1 + configs/T2080QDS_NAND_defconfig | 1 + configs/T2080QDS_SDCARD_defconfig| 1 + configs/T2080QDS_SECURE_BOOT_defconfig | 1 + configs/T2080QDS_SPIFLASH_defconfig | 1 + configs/T2080QDS_SRIO_PCIE_BOOT_defconfig| 1 + configs/T2080QDS_defconfig | 1 + configs/T2080RDB_NAND_defconfig | 1 + configs/T2080RDB_SDCARD_defconfig| 1 + configs/T2080RDB_SPIFLASH_defconfig | 1 + configs/T2080RDB_defconfig | 1 + configs/T2080RDB_revD_NAND_defconfig | 1 + configs/T2080RDB_revD_SDCARD_defconfig | 1 + configs/T2080RDB_revD_SPIFLASH_defconfig | 1 + configs/T2080RDB_revD_defconfig | 1 + configs/T4240RDB_SDCARD_defconfig| 1 + configs/T4240RDB_defconfig | 1 + drivers/ata/Kconfig | 7 +++ include/configs/P1010RDB.h | 1 - include/configs/P2041RDB.h | 1 - include/configs/P3041DS.h| 1 - include/configs/P5040DS.h| 1 - include/configs/T104xRDB.h | 1 - include/configs/T208xQDS.h | 1 - include/configs/T208xRDB.h | 1 - include/configs/T4240RDB.h | 1 - 53 files changed, 51 insertions(+), 8 deletions(-) diff --git a/configs/P1010RDB-PA_36BIT_NAND_defconfig b/configs/P1010RDB-PA_36BIT_NAND_defconfig index 6c4142c200b5..85fa20534637 100644 --- a/configs/P1010RDB-PA_36BIT_NAND_defconfig +++ b/configs/P1010RDB-PA_36BIT_NAND_defconfig @@ -73,6 +73,7 @@ CONFIG_BOOTFILE="uImage" CONFIG_USE_ETHPRIME=y CONFIG_ETHPRIME="eTSEC1" CONFIG_DM=y +CONFIG_FSL_SATA_V2=y CONFIG_SYS_SATA_MAX_DEVICE=2 CONFIG_FSL_CAAM=y CONFIG_DDR_CLK_FREQ= diff --git a/configs/P1010RDB-PA_36BIT_NOR_defconfig b/configs/P1010RDB-PA_36BIT_NOR_defconfig index fb74f9bd5b4f..1972f140f90d 100644 --- a/configs/P1010RDB-PA_36BIT_NOR_defconfig +++ b/configs/P1010RDB-PA_36BIT_NOR_defconfig @@ -42,6 +42,7 @@ CONFIG_BOOTFILE="uImage" CONFIG_USE_ETHPRIME=y CONFIG_ETHPRIME="eTSEC1" CONFIG_DM=y +CONFIG_FSL_SATA_V2=y CONFIG_SYS_SATA_MAX_DEVICE=2 CONFIG_FSL_CAAM=y CONFIG_DDR_CLK_FREQ= diff --git a/configs/P1010RDB-PA_36BIT_SDCARD_defconfig b/configs/P1010RDB-PA_36BIT_SDCARD_defconfig index 324ad908bb09..b057d1fad3d8 100644 --- a/configs/P1010RDB-PA_36BIT_SDCARD_defconfig +++ b/configs/P1010RDB-PA_36BIT_SDCARD_defconfig @@ -63,6 +63,7 @@ CONFIG_BOOTFILE="uImage" CONFIG_USE_ETHPRIME=y CONFIG_ETHPRIME="eTSEC1" CONFIG_DM=y +CONFIG_FSL_SATA_V2=y CONFIG_SYS_SATA_MAX_DEVICE=2 CONFIG_FSL_CAAM=y CONFIG_DDR_CLK_FREQ= diff --git a/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig b/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig index 2299f450a972..da5041068af3 100644 --- a/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig +++ b/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig @@ -66,6 +66,7 @@ CONFIG_BOOTFILE="uImage" CONFIG_USE_ETHPRIME=y CONFIG_ETHPRIME="eTSEC1" CONFIG_DM=y +CONFIG_FSL_SATA_V2=y CONFIG_SYS_SATA_MAX_DEVICE=2 CONFIG_FSL_CAAM=y CONFIG_DDR_CLK_FREQ= diff --git a/configs/P1010RDB-PA_NAND_defconfig b/configs/P1010RDB-PA_NAND_defconfig index 5813c75f10a6..b5ec62d3f9ae 100644 --- a/configs/P1010RDB-PA_NAND_defconfig +++ b/configs/P1010RDB-PA_NAND_defconfig @@ -72,6 +72,7 @@ CONFIG_BOOTFILE="uImage" CONFIG_USE_ETHPRIME=y CONFIG_ETHPRIME="eTSEC1" CONFIG_DM=y
[PATCH 03/15] ata: fsl_sata: Remove legacy non-BLK code
The migration deadline for this has passed and all boards have been updated, remove this legacy code and references for it. Signed-off-by: Tom Rini --- drivers/ata/fsl_sata.c | 70 ++-- drivers/ata/fsl_sata.h | 2 - include/configs/MPC837XERDB.h| 9 include/configs/P1010RDB.h | 7 include/configs/P2041RDB.h | 7 include/configs/T104xRDB.h | 4 -- include/configs/T208xQDS.h | 6 --- include/configs/T208xRDB.h | 6 --- include/configs/T4240RDB.h | 14 --- include/configs/corenet_ds.h | 7 include/configs/ls1028aqds.h | 1 - include/configs/ls1028ardb.h | 1 - include/configs/ls1088a_common.h | 5 --- include/configs/ls2080aqds.h | 5 --- include/configs/ls2080ardb.h | 5 --- include/configs/lx2160a_common.h | 7 16 files changed, 3 insertions(+), 153 deletions(-) diff --git a/drivers/ata/fsl_sata.c b/drivers/ata/fsl_sata.c index d1bab931895a..6db4247368eb 100644 --- a/drivers/ata/fsl_sata.c +++ b/drivers/ata/fsl_sata.c @@ -6,10 +6,13 @@ */ #include +#include #include #include #include #include +#include +#include #include #include #include @@ -21,33 +24,6 @@ #include #include "fsl_sata.h" -#if CONFIG_IS_ENABLED(BLK) -#include -#include -#include -#include -#else -#ifndef CONFIG_SYS_SATA1_FLAGS - #define CONFIG_SYS_SATA1_FLAGS FLAGS_DMA -#endif -#ifndef CONFIG_SYS_SATA2_FLAGS - #define CONFIG_SYS_SATA2_FLAGS FLAGS_DMA -#endif - -static struct fsl_sata_info fsl_sata_info[] = { -#ifdef CONFIG_SATA1 - {CONFIG_SYS_SATA1, CONFIG_SYS_SATA1_FLAGS}, -#else - {0, 0}, -#endif -#ifdef CONFIG_SATA2 - {CONFIG_SYS_SATA2, CONFIG_SYS_SATA2_FLAGS}, -#else - {0, 0}, -#endif -}; -#endif - static inline void sdelay(unsigned long sec) { unsigned long i; @@ -86,11 +62,7 @@ static int ata_wait_register(unsigned __iomem *addr, u32 mask, return (i < timeout_msec) ? 0 : -1; } -#if !CONFIG_IS_ENABLED(BLK) -int init_sata(int dev) -#else static int init_sata(struct fsl_ata_priv *priv, int dev) -#endif { u32 length, align; cmd_hdr_tbl_t *cmd_hdr; @@ -129,15 +101,9 @@ static int init_sata(struct fsl_ata_priv *priv, int dev) snprintf(sata->name, 12, "SATA%d:", dev); /* Set the controller register base address to device struct */ -#if !CONFIG_IS_ENABLED(BLK) - sata_dev_desc[dev].priv = (void *)sata; - reg = (fsl_sata_reg_t *)(fsl_sata_info[dev].sata_reg_base); - sata->dma_flag = fsl_sata_info[dev].flags; -#else reg = (fsl_sata_reg_t *)(priv->base + priv->offset * dev); sata->dma_flag = priv->flag; priv->fsl_sata = sata; -#endif sata->reg_base = reg; /* Allocate the command header table, 4 bytes aligned */ @@ -738,17 +704,11 @@ static u32 ata_low_level_rw_lba28(fsl_sata_t *sata, u32 blknr, u32 blkcnt, /* * SATA interface between low level driver and command layer */ -#if !CONFIG_IS_ENABLED(BLK) -ulong sata_read(int dev, ulong blknr, lbaint_t blkcnt, void *buffer) -{ - fsl_sata_t *sata = (fsl_sata_t *)sata_dev_desc[dev].priv; -#else static ulong sata_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, void *buffer) { struct fsl_ata_priv *priv = dev_get_plat(dev); fsl_sata_t *sata = priv->fsl_sata; -#endif u32 rc; if (sata->lba48) @@ -760,17 +720,11 @@ static ulong sata_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, return rc; } -#if !CONFIG_IS_ENABLED(BLK) -ulong sata_write(int dev, ulong blknr, lbaint_t blkcnt, const void *buffer) -{ - fsl_sata_t *sata = (fsl_sata_t *)sata_dev_desc[dev].priv; -#else static ulong sata_write(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, const void *buffer) { struct fsl_ata_priv *priv = dev_get_plat(dev); fsl_sata_t *sata = priv->fsl_sata; -#endif u32 rc; if (sata->lba48) { @@ -801,17 +755,11 @@ static void fsl_sata_identify(fsl_sata_t *sata, u16 *id) ata_swap_buf_le16(id, ATA_ID_WORDS); } -#if !CONFIG_IS_ENABLED(BLK) -int scan_sata(int dev) -{ - fsl_sata_t *sata = (fsl_sata_t *)sata_dev_desc[dev].priv; -#else static int scan_sata(struct udevice *dev) { struct blk_desc *desc = dev_get_uclass_plat(dev); struct fsl_ata_priv *priv = dev_get_plat(dev); fsl_sata_t *sata = priv->fsl_sata; -#endif unsigned char serial[ATA_ID_SERNO_LEN + 1]; unsigned char firmware[ATA_ID_FW_REV_LEN + 1]; @@ -853,22 +801,12 @@ static int scan_sata(struct udevice *dev) debug("Device supports LBA28\n\r"); #endif -#if !CONFIG_IS_ENABLED(BLK) - memcpy(sata_dev_desc[dev].product, serial, sizeof(serial)); - memcpy(sata_dev_desc[dev].revision, firmware, sizeof(firmware)); - memcpy(sata_dev_desc[dev].vendor, product, sizeof(product)); -
[PATCH 02/15] ata: dwc_ahsata: Remove legacy non-CONFIG_AHCI code
The migration deadline for this has passed and all boards have been updated, remove this legacy code and references for it. Signed-off-by: Tom Rini --- drivers/ata/dwc_ahsata.c | 133 --- include/configs/cm_fx6.h | 2 - include/configs/ge_bx50v3.h | 2 - include/configs/gw_ventana.h | 2 - include/configs/m53menlo.h | 2 - include/configs/mx53loco.h | 2 - include/configs/mx6cuboxi.h | 2 - include/configs/nitrogen6x.h | 2 - include/configs/tbs2910.h| 2 - include/configs/wandboard.h | 2 - 10 files changed, 151 deletions(-) diff --git a/drivers/ata/dwc_ahsata.c b/drivers/ata/dwc_ahsata.c index d9fd850c6fae..1a2c3c2fe707 100644 --- a/drivers/ata/dwc_ahsata.c +++ b/drivers/ata/dwc_ahsata.c @@ -844,138 +844,6 @@ static ulong sata_write_common(struct ahci_uc_priv *uc_priv, return rc; } -#if !CONFIG_IS_ENABLED(AHCI) -static int ahci_init_one(int pdev) -{ - int rc; - struct ahci_uc_priv *uc_priv = NULL; - - uc_priv = malloc(sizeof(struct ahci_uc_priv)); - if (!uc_priv) - return -ENOMEM; - - memset(uc_priv, 0, sizeof(struct ahci_uc_priv)); - uc_priv->dev = pdev; - - uc_priv->host_flags = ATA_FLAG_SATA - | ATA_FLAG_NO_LEGACY - | ATA_FLAG_MMIO - | ATA_FLAG_PIO_DMA - | ATA_FLAG_NO_ATAPI; - - uc_priv->mmio_base = (void __iomem *)CONFIG_DWC_AHSATA_BASE_ADDR; - - /* initialize adapter */ - rc = ahci_host_init(uc_priv); - if (rc) - goto err_out; - - ahci_print_info(uc_priv); - - /* Save the uc_private struct to block device struct */ - sata_dev_desc[pdev].priv = uc_priv; - - return 0; - -err_out: - if (uc_priv) - free(uc_priv); - return rc; -} - -int init_sata(int dev) -{ - struct ahci_uc_priv *uc_priv = NULL; - -#if defined(CONFIG_MX6) - if (!is_mx6dq() && !is_mx6dqp()) - return 1; -#endif - if (dev < 0 || dev > (CONFIG_SYS_SATA_MAX_DEVICE - 1)) { - printf("The sata index %d is out of ranges\n\r", dev); - return -1; - } - - ahci_init_one(dev); - - uc_priv = sata_dev_desc[dev].priv; - - return dwc_ahci_start_ports(uc_priv) ? 1 : 0; -} - -int reset_sata(int dev) -{ - struct ahci_uc_priv *uc_priv; - struct sata_host_regs *host_mmio; - - if (dev < 0 || dev > (CONFIG_SYS_SATA_MAX_DEVICE - 1)) { - printf("The sata index %d is out of ranges\n\r", dev); - return -1; - } - - uc_priv = sata_dev_desc[dev].priv; - if (NULL == uc_priv) - /* not initialized, so nothing to reset */ - return 0; - - host_mmio = uc_priv->mmio_base; - setbits_le32(_mmio->ghc, SATA_HOST_GHC_HR); - while (readl(_mmio->ghc) & SATA_HOST_GHC_HR) - udelay(100); - - free(uc_priv); - memset(_dev_desc[dev], 0, sizeof(struct blk_desc)); - - return 0; -} - -int sata_port_status(int dev, int port) -{ - struct sata_port_regs *port_mmio; - struct ahci_uc_priv *uc_priv = NULL; - - if (dev < 0 || dev > (CONFIG_SYS_SATA_MAX_DEVICE - 1)) - return -EINVAL; - - if (sata_dev_desc[dev].priv == NULL) - return -ENODEV; - - uc_priv = sata_dev_desc[dev].priv; - port_mmio = uc_priv->port[port].port_mmio; - - return readl(_mmio->ssts) & SATA_PORT_SSTS_DET_MASK; -} - -/* - * SATA interface between low level driver and command layer - */ -ulong sata_read(int dev, ulong blknr, lbaint_t blkcnt, void *buffer) -{ - struct ahci_uc_priv *uc_priv = sata_dev_desc[dev].priv; - - return sata_read_common(uc_priv, _dev_desc[dev], blknr, blkcnt, - buffer); -} - -ulong sata_write(int dev, ulong blknr, lbaint_t blkcnt, const void *buffer) -{ - struct ahci_uc_priv *uc_priv = sata_dev_desc[dev].priv; - - return sata_write_common(uc_priv, _dev_desc[dev], blknr, blkcnt, -buffer); -} - -int scan_sata(int dev) -{ - struct ahci_uc_priv *uc_priv = sata_dev_desc[dev].priv; - struct blk_desc *pdev = _dev_desc[dev]; - - return dwc_ahsata_scan_common(uc_priv, pdev); -} -#endif /* CONFIG_IS_ENABLED(AHCI) */ - -#if CONFIG_IS_ENABLED(AHCI) - int dwc_ahsata_port_status(struct udevice *dev, int port) { struct ahci_uc_priv *uc_priv = dev_get_uclass_priv(dev); @@ -1109,4 +977,3 @@ U_BOOT_DRIVER(dwc_ahsata_ahci) = { .probe= dwc_ahsata_probe, }; #endif -#endif diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h index 07ad6fde28d0..a0bbb409cff4 100644 --- a/include/configs/cm_fx6.h +++ b/include/configs/cm_fx6.h @@ -151,8 +151,6 @@ /* SATA */ #define CONFIG_LBA48 -#define CONFIG_DWC_AHSATA_PORT_ID 0 -#define CONFIG_DWC_AHSATA_BASE_ADDR
[PATCH 01/15] xtensa: Switch to using CONFIG_XTENSA for building device trees
The only use of CONFIG_XTFPGA was to build all of the in-tree device trees. Switch to using CONFIG_XTENSA instead of a non-Kconfig symbol. Signed-off-by: Tom Rini --- arch/xtensa/dts/Makefile | 2 +- include/configs/xtfpga.h | 6 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/arch/xtensa/dts/Makefile b/arch/xtensa/dts/Makefile index fbbdefaf2cf1..c22c50ac4e5d 100644 --- a/arch/xtensa/dts/Makefile +++ b/arch/xtensa/dts/Makefile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0+ -dtb-$(CONFIG_XTFPGA) += ml605.dtb ml605_nommu.dtb kc705.dtb kc705_nommu.dtb +dtb-$(CONFIG_XTENSA) += ml605.dtb ml605_nommu.dtb kc705.dtb kc705_nommu.dtb include $(srctree)/scripts/Makefile.dts diff --git a/include/configs/xtfpga.h b/include/configs/xtfpga.h index 7392582b5e46..f1ea47654671 100644 --- a/include/configs/xtfpga.h +++ b/include/configs/xtfpga.h @@ -16,12 +16,6 @@ * differences. */ -/*=*/ -/* Board and Processor */ -/*=*/ - -#define CONFIG_XTFPGA - /*===*/ /* RAM Layout*/ /*===*/ -- 2.25.1
Re: [PATCH 1/1] efi_loader: correctly identify binary name
On Fri, Jun 10, 2022 at 08:55:24PM +0200, Heinrich Schuchardt wrote: > Only on the sandbox the default EFI binary name (e.g. BOOTX64.EFI) must > match the host architecture. > > In all other cases we must use the target architecture. So most of the new code, particularly else clause of "#ifdef CONFIG_SANDBOX", is the same as the *original* commit in my (or rather Kojima-san's) patch. Please retain the original copyright. [1] https://lists.denx.de/pipermail/u-boot/2022-April/482711.html -Takahiro Akashi > Use #elif where appropriate. > > Reported-by: Vagrant Cascadian > Signed-off-by: Heinrich Schuchardt > --- > include/efi_default_filename.h | 40 +- > 1 file changed, 25 insertions(+), 15 deletions(-) > > diff --git a/include/efi_default_filename.h b/include/efi_default_filename.h > index 13b9de8754..fc46e386a6 100644 > --- a/include/efi_default_filename.h > +++ b/include/efi_default_filename.h > @@ -14,32 +14,42 @@ > > #undef BOOTEFI_NAME > > +#ifdef CONFIG_SANDBOX > + > #if HOST_ARCH == HOST_ARCH_X86_64 > #define BOOTEFI_NAME "BOOTX64.EFI" > -#endif > - > -#if HOST_ARCH == HOST_ARCH_X86 > +#elif HOST_ARCH == HOST_ARCH_X86 > #define BOOTEFI_NAME "BOOTIA32.EFI" > -#endif > - > -#if HOST_ARCH == HOST_ARCH_AARCH64 > +#elif HOST_ARCH == HOST_ARCH_AARCH64 > #define BOOTEFI_NAME "BOOTAA64.EFI" > -#endif > - > -#if HOST_ARCH == HOST_ARCH_ARM > +#elif HOST_ARCH == HOST_ARCH_ARM > #define BOOTEFI_NAME "BOOTARM.EFI" > -#endif > - > -#if HOST_ARCH == HOST_ARCH_RISCV32 > +#elif HOST_ARCH == HOST_ARCH_RISCV32 > #define BOOTEFI_NAME "BOOTRISCV32.EFI" > +#elif HOST_ARCH == HOST_ARCH_RISCV64 > +#define BOOTEFI_NAME "BOOTRISCV64.EFI" > +#else > +#error Unsupported UEFI architecture > #endif > > -#if HOST_ARCH == HOST_ARCH_RISCV64 > +#else > + > +#if defined(CONFIG_ARM64) > +#define BOOTEFI_NAME "BOOTAA64.EFI" > +#elif defined(CONFIG_ARM) > +#define BOOTEFI_NAME "BOOTARM.EFI" > +#elif defined(CONFIG_X86_64) > +#define BOOTEFI_NAME "BOOTX64.EFI" > +#elif defined(CONFIG_X86) > +#define BOOTEFI_NAME "BOOTIA32.EFI" > +#elif defined(CONFIG_ARCH_RV32I) > +#define BOOTEFI_NAME "BOOTRISCV32.EFI" > +#elif defined(CONFIG_ARCH_RV64I) > #define BOOTEFI_NAME "BOOTRISCV64.EFI" > +#else > +#error Unsupported UEFI architecture > #endif > > -#ifndef BOOTEFI_NAME > -#error Unsupported UEFI architecture > #endif > > #endif > -- > 2.36.1 >
Re: [PATCH 4/4] spi: synquacer: simplify tx completion checking
On Tue, May 17, 2022 at 05:41:39PM +0900, Masahisa Kojima wrote: > There is a TX-FIFO and Shift Register empty(TFES) status > bit in spi controller. This commit checks the TFES bit > to wait the TX transfer completes. > > Signed-off-by: Masahisa Kojima > Signed-off-by: Satoru Okamoto > Acked-by: Jassi Brar Applied to u-boot/next, thanks! -- Tom signature.asc Description: PGP signature
Re: [PATCH 3/4] spi: synquacer: DMSTART bit must not be set while transferring
On Tue, May 17, 2022 at 05:41:38PM +0900, Masahisa Kojima wrote: > DMSTART bit must not be set while there is active transfer. > This commit sets the DMSTART bit only when the transfer begins. > > Signed-off-by: Masahisa Kojima > Signed-off-by: Satoru Okamoto > Acked-by: Jassi Brar Applied to u-boot/next, thanks! -- Tom signature.asc Description: PGP signature
Re: [PATCH 2/4] spi: synquacer: wait until slave is deselected
On Tue, May 17, 2022 at 05:41:37PM +0900, Masahisa Kojima wrote: > synquacer_cs_set() function does not wait the chip select > is deasserted when the driver sets the DMSTOP to deselect > the slave. > This commit checks the Slave Select Released(SRS) bit to wait > until the slave is deselected. > > Signed-off-by: Masahisa Kojima > Signed-off-by: Satoru Okamoto > Acked-by: Jassi Brar Applied to u-boot/next, thanks! -- Tom signature.asc Description: PGP signature
Re: [PATCH 1/4] spi: synquacer: busy variable must be initialized before use
On Tue, May 17, 2022 at 05:41:36PM +0900, Masahisa Kojima wrote: > "busy" variable is ORed without being initialized, > must be zeroed before use. > > Signed-off-by: Masahisa Kojima > Signed-off-by: Satoru Okamoto > Acked-by: Jassi Brar Applied to u-boot/next, thanks! -- Tom signature.asc Description: PGP signature
Re: [PATCH v1] rng: nuvoton: Add NPCM7xx rng driver
On Tue, May 24, 2022 at 04:56:57PM +0800, Jim Liu wrote: > Add Nuvoton BMC NPCM750 rng driver. > > Signed-off-by: Jim Liu Applied to u-boot/next, thanks! -- Tom signature.asc Description: PGP signature
Re: [PATCH v1] pinctrl: nuvoton: Add NPCM7xx pinctrl driver
On Tue, May 17, 2022 at 04:30:32PM +0800, Jim Liu wrote: > Add Nuvoton BMC NPCM750 Pinmux and Pinconf support. > > Signed-off-by: Jim Liu Applied to u-boot/next, thanks! -- Tom signature.asc Description: PGP signature
Re: [PATCH v3 1/1] arm: bcmbca: introduce the bcmbca architecture and 47622 SOC
On Mon, May 09, 2022 at 09:28:02AM -0700, William Zhang wrote: > This is the initial support for Broadcom's ARM-based 47622 SOC. > > In this change, our first SOC is an armv7 platform called 47622. The > initial support includes a bare-bone implementation and dts with ARM > PL011 uart. > > The SOC-specific code resides in arch/arm/mach-bcmbca/ and board > related code is in board/broadcom/bcmba. > > The u-boot image can be loaded from flash or network to the entry > point address in the memory and boot from there. > > Signed-off-by: William Zhang > Signed-off-by: Kursad Oney > Signed-off-by: Anand Gore > Reviewed-by: Philippe Reynes Applied to u-boot/next, thanks! -- Tom signature.asc Description: PGP signature
Re: [PATCH v2 01/12] drivers: mmc: am654_sdhci: Add new compatible for AM62 SoC
On Wed, May 25, 2022 at 01:38:39PM +0530, Vignesh Raghavendra wrote: > From: Aswath Govindraju > > The phy used in the 8 bit instance has been changed to the phy used in 4 > bit instance on AM62 SoC. This implies the phy configuration required for > both the instances of mmc are similar. Therefore, add a new compatible > for AM62 SoC using the driver data of am64 4 bit instance. > > Signed-off-by: Aswath Govindraju > Signed-off-by: Vignesh Raghavendra > Reviewed-by: Jaehoon Chung For the series, applied to u-boot/next, thanks! -- Tom signature.asc Description: PGP signature
Re: [PATCH 3/3] configs: am65_evm_r5_usb*_defconfig: Sync the checks for size of image and stack from generic r5 defconfig
On Wed, May 18, 2022 at 04:49:14PM +0530, Aswath Govindraju wrote: > Sync the configs required for enabling checks for size of image and stack > from generic r5 defconfig file. > > Signed-off-by: Aswath Govindraju Applied to u-boot/next, thanks! -- Tom signature.asc Description: PGP signature
Re: [PATCH 2/3] arm: mach-k3: am6_init: Fix the path and value's length in the fixup performed for usb boot
On Wed, May 18, 2022 at 04:49:13PM +0530, Aswath Govindraju wrote: > The node name of the bus in the device tree has changed. Also, the length > argument to be passed should be the length of new value. Therefore, fix the > path to usb device tree node as well as the length argument passed. > > Signed-off-by: Aswath Govindraju Applied to u-boot/next, thanks! -- Tom signature.asc Description: PGP signature
Re: [PATCH 1/3] arm: dts: k3-am654-r5-base-board: Fix the dt properties in usb0 instance
On Wed, May 18, 2022 at 04:49:12PM +0530, Aswath Govindraju wrote: > For dfu boot mode, the clocks property needs to be deleted and dr_mode > needs to be set to peripheral. Therefore, add the required fixes for the > same. > > Signed-off-by: Aswath Govindraju Applied to u-boot/next, thanks! -- Tom signature.asc Description: PGP signature
Re: [PATCH 3/3] ARM: omap3: evm: Fix 'fitImage' booting
On Sun, May 15, 2022 at 10:25:05PM -0500, Derald D. Woods wrote: > This commit sets two additional variables in the default BOOTCOMMAND. > Adding 'boot=mmc' and 'addr_fit=0x8b00' removes the need for a > special 'uEnv.txt' to be created. The 'addr_fit' variable is the key > piece here. It is normally defined as 0x9000, in the macro > DEFAULT_FIT_TI_ARGS. For this OMAP34XX board, 0x8b00 works without > touching other varibles. This was tested with a 'fitImage' created > using the following FIT source: > Applied to u-boot/next, thanks! -- Tom signature.asc Description: PGP signature
Re: [PATCH 2/3] ARM: omap3: evm: Complete DM_I2C migration
On Sun, May 15, 2022 at 10:25:04PM -0500, Derald D. Woods wrote: > This commits enables DM_I2C and sets the default bus to 0. > > Signed-off-by: Derald D. Woods Applied to u-boot/next, thanks! -- Tom signature.asc Description: PGP signature
Re: [PATCH 1/3] ARM: omap3: evm: Power on MMC when setting up PMIC
On Sun, May 15, 2022 at 10:25:03PM -0500, Derald D. Woods wrote: > This commit copies the related code changes from the BeagleBoard. > > Reference: > - > https://source.denx.de/u-boot/u-boot/-/commit/848cfe098f59c47a2542385513fb554430b874d6 > > Signed-off-by: Derald D. Woods Applied to u-boot/next, thanks! -- Tom signature.asc Description: PGP signature
Re: [PATCH 1/9] arm: dts: k3-j721e-mcu-wakeup: Add HyperBus Controller node
On Mon, May 09, 2022 at 11:50:09AM +0530, Vaishnav Achath wrote: > Add DT node for HyperBus Memory Controller and hbmc-mux in the > FSS. hbmc-am654 driver uses syscon_get_regmap() call which fails > with current compatible setting. > > Signed-off-by: Vaishnav Achath For the series, applied to u-boot/next, thanks! -- Tom signature.asc Description: PGP signature
Re: [PATCH v2 1/4] EFI: Populate descriptor_count value only when image_info_size is not zero
Hi Sughosh, On Wed, 1 Jun 2022 at 19:01, Sughosh Ganu wrote: > The GetImageInfo function of the Firmware Mangement Protocol(FMP) gets > called initially to query the size of the image descriptor array that > would have to be allocated. During this call, the rest of the function > arguments, specifically pointers might be passed as NULL. Do not > populate the descriptor_count value before it is known that the call > to GetImageInfo has been made with the allocated buffer for the image > descriptors. > > Signed-off-by: Sughosh Ganu > Reviewed-by: Heinrich Schuchardt > Reviewed-by: Ilias Apalodimas > --- > This patch solves the hang issue I observed on master with CapsuleApp.efi when doing FS5:EFI/BOOT/app/CapsuleApp.efi -P Which is part of the SystemReady IR ACS compliance suite. Tested on a RockPi4b board. Tested-by: Peter Griffin Peter > Changes since V1: None > > lib/efi_loader/efi_firmware.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/lib/efi_loader/efi_firmware.c b/lib/efi_loader/efi_firmware.c > index fe4e084106..9cdefab41f 100644 > --- a/lib/efi_loader/efi_firmware.c > +++ b/lib/efi_loader/efi_firmware.c > @@ -130,9 +130,6 @@ static efi_status_t efi_fill_image_desc_array( > struct efi_fw_image *fw_array; > int i; > > - fw_array = update_info.images; > - *descriptor_count = num_image_type_guids; > - > total_size = sizeof(*image_info) * num_image_type_guids; > > if (*image_info_size < total_size) { > @@ -142,6 +139,8 @@ static efi_status_t efi_fill_image_desc_array( > } > *image_info_size = total_size; > > + fw_array = update_info.images; > + *descriptor_count = num_image_type_guids; > *descriptor_version = EFI_FIRMWARE_IMAGE_DESCRIPTOR_VERSION; > *descriptor_size = sizeof(*image_info); > *package_version = 0x; /* not supported */ > -- > 2.25.1 > >
[PATCH 1/1] efi_loader: correctly identify binary name
Only on the sandbox the default EFI binary name (e.g. BOOTX64.EFI) must match the host architecture. In all other cases we must use the target architecture. Use #elif where appropriate. Reported-by: Vagrant Cascadian Signed-off-by: Heinrich Schuchardt --- include/efi_default_filename.h | 40 +- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/include/efi_default_filename.h b/include/efi_default_filename.h index 13b9de8754..fc46e386a6 100644 --- a/include/efi_default_filename.h +++ b/include/efi_default_filename.h @@ -14,32 +14,42 @@ #undef BOOTEFI_NAME +#ifdef CONFIG_SANDBOX + #if HOST_ARCH == HOST_ARCH_X86_64 #define BOOTEFI_NAME "BOOTX64.EFI" -#endif - -#if HOST_ARCH == HOST_ARCH_X86 +#elif HOST_ARCH == HOST_ARCH_X86 #define BOOTEFI_NAME "BOOTIA32.EFI" -#endif - -#if HOST_ARCH == HOST_ARCH_AARCH64 +#elif HOST_ARCH == HOST_ARCH_AARCH64 #define BOOTEFI_NAME "BOOTAA64.EFI" -#endif - -#if HOST_ARCH == HOST_ARCH_ARM +#elif HOST_ARCH == HOST_ARCH_ARM #define BOOTEFI_NAME "BOOTARM.EFI" -#endif - -#if HOST_ARCH == HOST_ARCH_RISCV32 +#elif HOST_ARCH == HOST_ARCH_RISCV32 #define BOOTEFI_NAME "BOOTRISCV32.EFI" +#elif HOST_ARCH == HOST_ARCH_RISCV64 +#define BOOTEFI_NAME "BOOTRISCV64.EFI" +#else +#error Unsupported UEFI architecture #endif -#if HOST_ARCH == HOST_ARCH_RISCV64 +#else + +#if defined(CONFIG_ARM64) +#define BOOTEFI_NAME "BOOTAA64.EFI" +#elif defined(CONFIG_ARM) +#define BOOTEFI_NAME "BOOTARM.EFI" +#elif defined(CONFIG_X86_64) +#define BOOTEFI_NAME "BOOTX64.EFI" +#elif defined(CONFIG_X86) +#define BOOTEFI_NAME "BOOTIA32.EFI" +#elif defined(CONFIG_ARCH_RV32I) +#define BOOTEFI_NAME "BOOTRISCV32.EFI" +#elif defined(CONFIG_ARCH_RV64I) #define BOOTEFI_NAME "BOOTRISCV64.EFI" +#else +#error Unsupported UEFI architecture #endif -#ifndef BOOTEFI_NAME -#error Unsupported UEFI architecture #endif #endif -- 2.36.1
Re: [PATCH 1/3] Kconfig: set i.MX8MQ SYS_MALLOC_F_LEN
Hi Peng, Am Fr., 29. Apr. 2022 um 09:20 Uhr schrieb Peng Fan (OSS) : > > From: Peng Fan > > set SPL_SYS_MALLOC_F_LEN to 0x2000 > set SYS_MALLOC_F_LEN to 0x1 > > This is to prepare enable CLK_IMX8MQ for i.MX8MQ > > Fixes: commit 4eb82c2e56a7c ("imx: power-domain: Get rid of SMCCC dependency") > Signed-off-by: Peng Fan The kontron pitx-imx8m board (imx8mq SoC) does not start properly in since 4eb82c2e56a7c. This is still valid in the 2022.7-rcX. I see in patchwork that this commit is superseded. Are there others available that will fix your mentioned problem? > --- > Kconfig | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/Kconfig b/Kconfig > index bdae59e06f4..4559b627707 100644 > --- a/Kconfig > +++ b/Kconfig > @@ -257,7 +257,7 @@ config SYS_MALLOC_F_LEN > default 0x4000 if SANDBOX || RISCV || ARCH_APPLE || ROCKCHIP_RK3368 > || \ > ROCKCHIP_RK3399 > default 0x8000 if RCAR_GEN3 > - default 0x1 if ARCH_IMX8 || (ARCH_IMX8M && !IMX8MQ) || \ > + default 0x1 if ARCH_IMX8 || ARCH_IMX8M || \ >ARCH_LS1012A || ARCH_LS1021A || ARCH_LS1043A || \ >ARCH_LS1046A > default 0x2000 > @@ -285,6 +285,7 @@ config SPL_SYS_MALLOC_F_LEN > depends on SYS_MALLOC_F && SPL > default 0 if !SPL_FRAMEWORK > default 0x2800 if RCAR_GEN3 > + default 0x2000 if IMX8MQ > default SYS_MALLOC_F_LEN > help > In SPL memory is very limited on many platforms. Still, > -- > 2.36.0 > Thanks -- Heiko
[PATCH v16 1/2] net: Add TCP protocol
From: "Ying-Chun Liu (PaulLiu)" Currently file transfers are done using tftp or NFS both over udp. This requires a request to be sent from client (u-boot) to the boot server. The current standard is TCP with selective acknowledgment. Signed-off-by: Duncan Hare Signed-off-by: Duncan Hare Signed-off-by: Ying-Chun Liu (PaulLiu) Cc: Christian Gmeiner Cc: Joe Hershberger Cc: Michal Simek Cc: Ramon Fried --- v1-v12: Made by Duncan, didn't tracked. v13: Fix some issues which is reviewed by Christian v14: Add options to enable/disable SACK. v15: Fix various syntax errors reviewed by Michal. Remove magic numbers. Use kernel-doc format. v16: Add more kernel-doc. Fix more double spaces. --- include/net.h | 36 ++- include/net/tcp.h | 312 net/Kconfig | 16 ++ net/Makefile | 1 + net/net.c | 30 ++ net/tcp.c | 720 ++ 6 files changed, 1106 insertions(+), 9 deletions(-) create mode 100644 include/net/tcp.h create mode 100644 net/tcp.c diff --git a/include/net.h b/include/net.h index e3889a0bc8..b7bac86cf1 100644 --- a/include/net.h +++ b/include/net.h @@ -365,6 +365,7 @@ struct vlan_ethernet_hdr { #define PROT_NCSI 0x88f8 /* NC-SI control packets*/ #define IPPROTO_ICMP1 /* Internet Control Message Protocol*/ +#define IPPROTO_TCP6 /* Transmission Control Protocol*/ #define IPPROTO_UDP17 /* User Datagram Protocol */ /* @@ -688,19 +689,36 @@ static inline void net_send_packet(uchar *pkt, int len) (void) eth_send(pkt, len); } -/* - * Transmit "net_tx_packet" as UDP packet, performing ARP request if needed - * (ether will be populated) - * - * @param ether Raw packet buffer - * @param dest IP address to send the datagram to - * @param dport Destination UDP port - * @param sport Source UDP port - * @param payload_len Length of data after the UDP header +/** + * net_send_ip_packet() - Transmit "net_tx_packet" as UDP or TCP packet, + *send ARP request if needed (ether will be populated) + * @ether: Raw packet buffer + * @dest: IP address to send the datagram to + * @dport: Destination UDP port + * @sport: Source UDP port + * @payload_len: Length of data after the UDP header + * @action: TCP action to be performed + * @tcp_seq_num: TCP sequence number of this transmission + * @tcp_ack_num: TCP stream acknolegement number + * + * Return: 0 on success, other value on failure */ int net_send_ip_packet(uchar *ether, struct in_addr dest, int dport, int sport, int payload_len, int proto, u8 action, u32 tcp_seq_num, u32 tcp_ack_num); +/** + * net_send_tcp_packet() - Transmit TCP packet. + * @payload_len: length of payload + * @dport: Destination TCP port + * @sport: Source TCP port + * @action: TCP action to be performed + * @tcp_seq_num: TCP sequence number of this transmission + * @tcp_ack_num: TCP stream acknolegement number + * + * Return: 0 on success, other value on failure + */ +int net_send_tcp_packet(int payload_len, int dport, int sport, u8 action, + u32 tcp_seq_num, u32 tcp_ack_num); int net_send_udp_packet(uchar *ether, struct in_addr dest, int dport, int sport, int payload_len); diff --git a/include/net/tcp.h b/include/net/tcp.h new file mode 100644 index 00..9c97f2f315 --- /dev/null +++ b/include/net/tcp.h @@ -0,0 +1,312 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * TCP Support with SACK for file transfer. + * + * Copyright 2017 Duncan Hare, All rights reserved. + */ + +#define TCP_ACTIVITY 127 /* Number of packets received */ + /* before console progress mark */ +/** + * struct ip_tcp_hdr - IP and TCP header + * @ip_hl_v: header length and version + * @ip_tos: type of service + * @ip_len: total length + * @ip_id: identification + * @ip_off: fragment offset field + * @ip_ttl: time to live + * @ip_p: protocol + * @ip_sum: checksum + * @ip_src: Source IP address + * @ip_dst: Destination IP address + * @tcp_src: TCP source port + * @tcp_dst: TCP destination port + * @tcp_seq: TCP sequence number + * @tcp_ack: TCP Acknowledgment number + * @tcp_hlen: 4 bits TCP header Length/4, 4 bits reserved, 2 more bits reserved + * @tcp_flag: flags of TCP + * @tcp_win: TCP windows size + * @tcp_xsum: Checksum + * @tcp_ugr: Pointer to urgent data + */ +struct ip_tcp_hdr { + u8 ip_hl_v; + u8 ip_tos; + u16 ip_len; + u16 ip_id; + u16 ip_off; + u8 ip_ttl; + u8 ip_p; + u16 ip_sum; + struct in_addr ip_src; + struct in_addr ip_dst; + u16 tcp_src; + u16 tcp_dst; + u32 tcp_seq; + u32 tcp_ack; + u8
[PATCH v16 2/2] net: Add wget application
From: "Ying-Chun Liu (PaulLiu)" This commit adds a simple wget command that can download files from http server. The command syntax is wget ${loadaddr} Signed-off-by: Duncan Hare Signed-off-by: Ying-Chun Liu (PaulLiu) Cc: Christian Gmeiner Cc: Joe Hershberger Cc: Michal Simek Cc: Ramon Fried --- v1-v12: Made by Duncan, didn't tracked. v13: Fix some issues which is reviewed by Christian v14: Add options to enable/disable SACK. v15: Fix various syntax errors reviewed by Michal. Remove magic numbers. Use kernel-doc format. v16: Add more kernel-doc. Fix more double spaces. --- cmd/Kconfig| 7 + cmd/net.c | 13 ++ include/net.h | 2 +- include/net/wget.h | 22 +++ net/Makefile | 1 + net/net.c | 6 + net/wget.c | 426 + 7 files changed, 476 insertions(+), 1 deletion(-) create mode 100644 include/net/wget.h create mode 100644 net/wget.c diff --git a/cmd/Kconfig b/cmd/Kconfig index 09193b61b9..5a5f2f1df8 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1715,6 +1715,13 @@ config NFS_TIMEOUT "ERROR: Cannot umount" in nfs command, try longer timeout such as 1. +config CMD_WGET + bool "wget" + select TCP + help + wget is a simple command to download kernel, or other files, + from a http server over TCP. + config CMD_MII bool "mii" imply CMD_MDIO diff --git a/cmd/net.c b/cmd/net.c index 3619c843d8..60fd785061 100644 --- a/cmd/net.c +++ b/cmd/net.c @@ -124,6 +124,19 @@ U_BOOT_CMD( ); #endif +#if defined(CONFIG_CMD_WGET) +static int do_wget(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]) +{ + return netboot_common(WGET, cmdtp, argc, argv); +} + +U_BOOT_CMD( + wget, 3, 1, do_wget, + "boot image via network using HTTP protocol", + "[loadAddress] [[hostIPaddr:]path and image name]" +); +#endif + static void netboot_update_env(void) { char tmp[22]; diff --git a/include/net.h b/include/net.h index b7bac86cf1..fb80a8981d 100644 --- a/include/net.h +++ b/include/net.h @@ -559,7 +559,7 @@ extern int net_restart_wrap; /* Tried all network devices */ enum proto_t { BOOTP, RARP, ARP, TFTPGET, DHCP, PING, DNS, NFS, CDP, NETCONS, SNTP, - TFTPSRV, TFTPPUT, LINKLOCAL, FASTBOOT, WOL, UDP + TFTPSRV, TFTPPUT, LINKLOCAL, FASTBOOT, WOL, UDP, WGET }; extern charnet_boot_file_name[1024];/* Boot File name */ diff --git a/include/net/wget.h b/include/net/wget.h new file mode 100644 index 00..da0920de11 --- /dev/null +++ b/include/net/wget.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Duncan Hare Copyright 2017 + */ + +/** + * wget_start() - begin wget + */ +void wget_start(void); + +enum wget_state { + WGET_CLOSED, + WGET_CONNECTING, + WGET_CONNECTED, + WGET_TRANSFERRING, + WGET_TRANSFERRED +}; + +#define DEBUG_WGET 0 /* Set to 1 for debug messages */ +#define SERVER_PORT80 +#define WGET_RETRY_COUNT 30 +#define WGET_TIMEOUT 2000UL diff --git a/net/Makefile b/net/Makefile index d131d1cb1a..4f757a224c 100644 --- a/net/Makefile +++ b/net/Makefile @@ -31,6 +31,7 @@ obj-$(CONFIG_UDP_FUNCTION_FASTBOOT) += fastboot.o obj-$(CONFIG_CMD_WOL) += wol.o obj-$(CONFIG_PROT_UDP) += udp.o obj-$(CONFIG_PROT_TCP) += tcp.o +obj-$(CONFIG_CMD_WGET) += wget.o # Disable this warning as it is triggered by: # sprintf(buf, index ? "foo%d" : "foo", index) diff --git a/net/net.c b/net/net.c index 751d0251be..cee2ff8100 100644 --- a/net/net.c +++ b/net/net.c @@ -117,6 +117,7 @@ #include "wol.h" #endif #include +#include /** BOOTP EXTENTIONS **/ @@ -505,6 +506,11 @@ restart: nfs_start(); break; #endif +#if defined(CONFIG_CMD_WGET) + case WGET: + wget_start(); + break; +#endif #if defined(CONFIG_CMD_CDP) case CDP: cdp_start(); diff --git a/net/wget.c b/net/wget.c new file mode 100644 index 00..6a2e92f17b --- /dev/null +++ b/net/wget.c @@ -0,0 +1,426 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * WGET/HTTP support driver based on U-BOOT's nfs.c + * Copyright Duncan Hare 2017 + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +static const char bootfile1[] = "GET "; +static const char bootfile3[] = " HTTP/1.0\r\n\r\n"; +static const char http_eom[] = "\r\n\r\n"; +static const char http_ok[] = "200"; +static const char content_len[] = "Content-Length"; +static const char linefeed[] = "\r\n"; +static struct in_addr web_server_ip; +static int our_port; +static int wget_timeout_count; + +struct pkt_qd { + uchar *pkt; + unsigned int tcp_seq_num; + unsigned int len; +}; + +/* + * This is a control structure for out of order packets
[PATCH v16 0/2] add TCP and HTTP for downloading images
From: "Ying-Chun Liu (PaulLiu)" This patch is a refresh from previous patches made by Duncan Hare . I've contacted him and continue to work on this patch. This patch introduce a TCP stack with SACK. And a simple wget command to download images from http server. v1-v12: Made by Duncan, didn't tracked. v13: Fix some issues which is reviewed by Christian v14: Add options to enable/disable SACK. v15: Fix various syntax errors reviewed by Michal. Remove magic numbers. Use kernel-doc format. v16: Add more kernel-doc. Fix more double spaces. Ying-Chun Liu (PaulLiu) (2): net: Add TCP protocol net: Add wget application cmd/Kconfig| 7 + cmd/net.c | 13 + include/net.h | 38 ++- include/net/tcp.h | 312 include/net/wget.h | 22 ++ net/Kconfig| 16 + net/Makefile | 2 + net/net.c | 36 +++ net/tcp.c | 720 + net/wget.c | 426 +++ 10 files changed, 1582 insertions(+), 10 deletions(-) create mode 100644 include/net/tcp.h create mode 100644 include/net/wget.h create mode 100644 net/tcp.c create mode 100644 net/wget.c -- 2.35.1
[PATCH v15 1/2] net: Add TCP protocol
From: "Ying-Chun Liu (PaulLiu)" Currently file transfers are done using tftp or NFS both over udp. This requires a request to be sent from client (u-boot) to the boot server. The current standard is TCP with selective acknowledgment. Signed-off-by: Duncan Hare Signed-off-by: Duncan Hare Signed-off-by: Ying-Chun Liu (PaulLiu) Cc: Christian Gmeiner Cc: Joe Hershberger Cc: Michal Simek Cc: Ramon Fried --- v1-v12: Made by Duncan, didn't tracked. v13: Fix some issues which is reviewed by Christian v14: Add options to enable/disable SACK. v15: Fix various syntax errors reviewed by Michal. Remove magic numbers. Use kernel-doc format. --- include/net.h | 36 ++- include/net/tcp.h | 312 net/Kconfig | 16 ++ net/Makefile | 1 + net/net.c | 30 ++ net/tcp.c | 712 ++ 6 files changed, 1098 insertions(+), 9 deletions(-) create mode 100644 include/net/tcp.h create mode 100644 net/tcp.c diff --git a/include/net.h b/include/net.h index e3889a0bc8..b7bac86cf1 100644 --- a/include/net.h +++ b/include/net.h @@ -365,6 +365,7 @@ struct vlan_ethernet_hdr { #define PROT_NCSI 0x88f8 /* NC-SI control packets*/ #define IPPROTO_ICMP1 /* Internet Control Message Protocol*/ +#define IPPROTO_TCP6 /* Transmission Control Protocol*/ #define IPPROTO_UDP17 /* User Datagram Protocol */ /* @@ -688,19 +689,36 @@ static inline void net_send_packet(uchar *pkt, int len) (void) eth_send(pkt, len); } -/* - * Transmit "net_tx_packet" as UDP packet, performing ARP request if needed - * (ether will be populated) - * - * @param ether Raw packet buffer - * @param dest IP address to send the datagram to - * @param dport Destination UDP port - * @param sport Source UDP port - * @param payload_len Length of data after the UDP header +/** + * net_send_ip_packet() - Transmit "net_tx_packet" as UDP or TCP packet, + *send ARP request if needed (ether will be populated) + * @ether: Raw packet buffer + * @dest: IP address to send the datagram to + * @dport: Destination UDP port + * @sport: Source UDP port + * @payload_len: Length of data after the UDP header + * @action: TCP action to be performed + * @tcp_seq_num: TCP sequence number of this transmission + * @tcp_ack_num: TCP stream acknolegement number + * + * Return: 0 on success, other value on failure */ int net_send_ip_packet(uchar *ether, struct in_addr dest, int dport, int sport, int payload_len, int proto, u8 action, u32 tcp_seq_num, u32 tcp_ack_num); +/** + * net_send_tcp_packet() - Transmit TCP packet. + * @payload_len: length of payload + * @dport: Destination TCP port + * @sport: Source TCP port + * @action: TCP action to be performed + * @tcp_seq_num: TCP sequence number of this transmission + * @tcp_ack_num: TCP stream acknolegement number + * + * Return: 0 on success, other value on failure + */ +int net_send_tcp_packet(int payload_len, int dport, int sport, u8 action, + u32 tcp_seq_num, u32 tcp_ack_num); int net_send_udp_packet(uchar *ether, struct in_addr dest, int dport, int sport, int payload_len); diff --git a/include/net/tcp.h b/include/net/tcp.h new file mode 100644 index 00..9c97f2f315 --- /dev/null +++ b/include/net/tcp.h @@ -0,0 +1,312 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * TCP Support with SACK for file transfer. + * + * Copyright 2017 Duncan Hare, All rights reserved. + */ + +#define TCP_ACTIVITY 127 /* Number of packets received */ + /* before console progress mark */ +/** + * struct ip_tcp_hdr - IP and TCP header + * @ip_hl_v: header length and version + * @ip_tos: type of service + * @ip_len: total length + * @ip_id: identification + * @ip_off: fragment offset field + * @ip_ttl: time to live + * @ip_p: protocol + * @ip_sum: checksum + * @ip_src: Source IP address + * @ip_dst: Destination IP address + * @tcp_src: TCP source port + * @tcp_dst: TCP destination port + * @tcp_seq: TCP sequence number + * @tcp_ack: TCP Acknowledgment number + * @tcp_hlen: 4 bits TCP header Length/4, 4 bits reserved, 2 more bits reserved + * @tcp_flag: flags of TCP + * @tcp_win: TCP windows size + * @tcp_xsum: Checksum + * @tcp_ugr: Pointer to urgent data + */ +struct ip_tcp_hdr { + u8 ip_hl_v; + u8 ip_tos; + u16 ip_len; + u16 ip_id; + u16 ip_off; + u8 ip_ttl; + u8 ip_p; + u16 ip_sum; + struct in_addr ip_src; + struct in_addr ip_dst; + u16 tcp_src; + u16 tcp_dst; + u32 tcp_seq; + u32 tcp_ack; + u8 tcp_hlen; + u8 tcp_flags; +
[PATCH v15 2/2] net: Add wget application
From: "Ying-Chun Liu (PaulLiu)" This commit adds a simple wget command that can download files from http server. The command syntax is wget ${loadaddr} Signed-off-by: Duncan Hare Signed-off-by: Ying-Chun Liu (PaulLiu) Cc: Christian Gmeiner Cc: Joe Hershberger Cc: Michal Simek Cc: Ramon Fried --- v1-v12: Made by Duncan, didn't tracked. v13: Fix some issues which is reviewed by Christian v14: Add options to enable/disable SACK. v15: Fix various syntax errors reviewed by Michal. Remove magic numbers. Use kernel-doc format. --- cmd/Kconfig| 7 + cmd/net.c | 13 ++ include/net.h | 2 +- include/net/wget.h | 22 +++ net/Makefile | 1 + net/net.c | 6 + net/wget.c | 426 + 7 files changed, 476 insertions(+), 1 deletion(-) create mode 100644 include/net/wget.h create mode 100644 net/wget.c diff --git a/cmd/Kconfig b/cmd/Kconfig index 09193b61b9..5a5f2f1df8 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1715,6 +1715,13 @@ config NFS_TIMEOUT "ERROR: Cannot umount" in nfs command, try longer timeout such as 1. +config CMD_WGET + bool "wget" + select TCP + help + wget is a simple command to download kernel, or other files, + from a http server over TCP. + config CMD_MII bool "mii" imply CMD_MDIO diff --git a/cmd/net.c b/cmd/net.c index 3619c843d8..60fd785061 100644 --- a/cmd/net.c +++ b/cmd/net.c @@ -124,6 +124,19 @@ U_BOOT_CMD( ); #endif +#if defined(CONFIG_CMD_WGET) +static int do_wget(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]) +{ + return netboot_common(WGET, cmdtp, argc, argv); +} + +U_BOOT_CMD( + wget, 3, 1, do_wget, + "boot image via network using HTTP protocol", + "[loadAddress] [[hostIPaddr:]path and image name]" +); +#endif + static void netboot_update_env(void) { char tmp[22]; diff --git a/include/net.h b/include/net.h index b7bac86cf1..fb80a8981d 100644 --- a/include/net.h +++ b/include/net.h @@ -559,7 +559,7 @@ extern int net_restart_wrap; /* Tried all network devices */ enum proto_t { BOOTP, RARP, ARP, TFTPGET, DHCP, PING, DNS, NFS, CDP, NETCONS, SNTP, - TFTPSRV, TFTPPUT, LINKLOCAL, FASTBOOT, WOL, UDP + TFTPSRV, TFTPPUT, LINKLOCAL, FASTBOOT, WOL, UDP, WGET }; extern charnet_boot_file_name[1024];/* Boot File name */ diff --git a/include/net/wget.h b/include/net/wget.h new file mode 100644 index 00..da0920de11 --- /dev/null +++ b/include/net/wget.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Duncan Hare Copyright 2017 + */ + +/** + * wget_start() - begin wget + */ +void wget_start(void); + +enum wget_state { + WGET_CLOSED, + WGET_CONNECTING, + WGET_CONNECTED, + WGET_TRANSFERRING, + WGET_TRANSFERRED +}; + +#define DEBUG_WGET 0 /* Set to 1 for debug messages */ +#define SERVER_PORT80 +#define WGET_RETRY_COUNT 30 +#define WGET_TIMEOUT 2000UL diff --git a/net/Makefile b/net/Makefile index d131d1cb1a..4f757a224c 100644 --- a/net/Makefile +++ b/net/Makefile @@ -31,6 +31,7 @@ obj-$(CONFIG_UDP_FUNCTION_FASTBOOT) += fastboot.o obj-$(CONFIG_CMD_WOL) += wol.o obj-$(CONFIG_PROT_UDP) += udp.o obj-$(CONFIG_PROT_TCP) += tcp.o +obj-$(CONFIG_CMD_WGET) += wget.o # Disable this warning as it is triggered by: # sprintf(buf, index ? "foo%d" : "foo", index) diff --git a/net/net.c b/net/net.c index 751d0251be..cee2ff8100 100644 --- a/net/net.c +++ b/net/net.c @@ -117,6 +117,7 @@ #include "wol.h" #endif #include +#include /** BOOTP EXTENTIONS **/ @@ -505,6 +506,11 @@ restart: nfs_start(); break; #endif +#if defined(CONFIG_CMD_WGET) + case WGET: + wget_start(); + break; +#endif #if defined(CONFIG_CMD_CDP) case CDP: cdp_start(); diff --git a/net/wget.c b/net/wget.c new file mode 100644 index 00..4389e4ca23 --- /dev/null +++ b/net/wget.c @@ -0,0 +1,426 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * WGET/HTTP support driver based on U-BOOT's nfs.c + * Copyright Duncan Hare 2017 + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +static const char bootfile1[] = "GET "; +static const char bootfile3[] = " HTTP/1.0\r\n\r\n"; +static const char http_eom[] = "\r\n\r\n"; +static const char http_ok[] = "200"; +static const char content_len[] = "Content-Length"; +static const char linefeed[] = "\r\n"; +static struct in_addr web_server_ip; +static int our_port; +static int wget_timeout_count; + +struct pkt_qd { + uchar *pkt; + unsigned int tcp_seq_num; + unsigned int len; +}; + +/* + * This is a control structure for out of order packets received. + * The actual packet bufers are in the kernel
[PATCH v15 0/2] add TCP and HTTP for downloading images
From: "Ying-Chun Liu (PaulLiu)" This patch is a refresh from previous patches made by Duncan Hare . I've contacted him and continue to work on this patch. This patch introduce a TCP stack with SACK. And a simple wget command to download images from http server. v1-v12: Made by Duncan, didn't tracked. v13: Fix some issues which is reviewed by Christian v14: Add options to enable/disable SACK. v15: Fix various syntax errors reviewed by Michal. Remove magic numbers. Use kernel-doc format. Ying-Chun Liu (PaulLiu) (2): net: Add TCP protocol net: Add wget application cmd/Kconfig| 7 + cmd/net.c | 13 + include/net.h | 38 ++- include/net/tcp.h | 312 include/net/wget.h | 22 ++ net/Kconfig| 16 + net/Makefile | 2 + net/net.c | 36 +++ net/tcp.c | 712 + net/wget.c | 426 +++ 10 files changed, 1574 insertions(+), 10 deletions(-) create mode 100644 include/net/tcp.h create mode 100644 include/net/wget.h create mode 100644 net/tcp.c create mode 100644 net/wget.c -- 2.35.1
Re: [SPAM] Re: [PATCH v2] xilinx: zynqmp: Do not use 0 as spl bss start address
El Fri, Jun 10, 2022 at 04:42:55PM +0200, Stefan Herbrechtsmeier deia: > Hi Michal, > > what is the default entry address for the aft / bl31.bin? > > I have a bl31.bin with an entry address of 0x1000 and this is inside the > BSS. > Me too, load address at 0x1000, but for me in SPL text, not BSS. I have a litle customized, a little old TF-A for rk3399 / Rock pi 4 loading at address 0 with entry at 0x1000. But include/configs/rk3399_common.h sets my CONFIG_SPL_BSS_START_ADDR=0x40, away from harm. I had problems booting anyway. Now I can load U-Boot from MMC with these patches https://lists.denx.de/pipermail/u-boot/2022-June/485497.html In particular CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x15000 This is defined in arch/arm/mach-rockchip/Kconfig and says it's to avoid conflicts with SPL text area, not BSS But I found other boards with CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x4000, so I thought some low addresses where normal. I don't know. I had to modify the code loading from SPI because, unlike MMC code, it thought address 0 meant no destination (I can send those patches when I have them cleaner if anyone wants them). I just realised that I have CONFIG_SPL_TEXT_BASE=0x0. I'm not finding where that's defined, maybe it's simply because it's not defined anywhere, so maybe the solution for me would be setting CONFIG_SPL_TEXT_BASE to 0x1000 or something. Or maybe it needs to be at 0x0 because it is bootrom who is loading it, and it won't look where I define it? I can't remember whether I tried this. Maybe you can try to look at the size of a file bl31_0x.bin that is generated when you build U-boot with BL31 pointing at your bl31.elf (check u-boot.its if that's not the name for you). Then set CONFIG_SPL_BSS_START_ADDR to that size + L (L= value of load property in entry atf_1 of u-boot.its). This should leave a hole at the beginning of U-Boot to make room for your TF-A, and leave BSS elsewhere. The sources and build scripts for TF-A are public, so maybe one could look at what's the criteria for putting images at different addresses?
Re: [PATCH 7/8] binman_sym: guard with CONFIG_IS_ENABLED(BINMAN_SYMBOLS)
On 04/06/2022 14:50, Alper Nebi Yasak wrote: > On 03/06/2022 10:17, Peng Fan (OSS) wrote: >> From: Peng Fan >> >> There is case that CONFIG_BINMAN is defined, but >> CONFIG_SPL_BINMAN_SYMBOLS is not defined. In that case, there will be >> build failure. So use CONFIG_SPL_BINMAN_SYMBOLS to guard the macros, and >> define CONFIG_SPL_BINMAN_SYMBOLS in binman syms test. >> >> Tested-by: Tim Harvey #imx8m[m,n,p]-venice >> Signed-off-by: Peng Fan >> --- >> include/binman_sym.h| 2 +- >> tools/binman/test/Makefile | 2 +- >> tools/binman/test/generated/autoconf.h | 3 +++ >> tools/binman/test/u_boot_binman_syms.c | 2 +- >> tools/binman/test/u_boot_binman_syms_size.c | 2 +- >> 5 files changed, 7 insertions(+), 4 deletions(-) >> create mode 100644 tools/binman/test/generated/autoconf.h > > Reviewed-by: Alper Nebi Yasak Looks like I have misunderstood things here a bit. CONFIG_BINMAN enables you to declare and use symbols. CONFIG_SPL/TPL_BINMAN_SYMBOLS declares certain symbols ('u_boot_any'). The name is a bit misleading, as if it enables support for using symbols, and that confused me. I have sent a patch [1] that fixes the build error mentioned here, which should be used instead of this patch. Please: - Rebase on top of that series [1] - Maybe drop config changes in 1/8 and 2/8 (they're now unnecessary) - Disable CONFIG_SPL/TPL/VPL_BINMAN_SYMBOLS for i.MX8M boards - Change the if statement to if (IS_ENABLED(CONFIG_BINMAN)) in patch 5/8 - Drop this patch 7/8 Sorry for the confusion. [1] spl: binman: Fix use of undeclared u_boot_any symbols https://lore.kernel.org/u-boot/20220610105806.27177-2-alpernebiya...@gmail.com/
Re: [PATCH 2/8] configs: imx8mm_data_modul_edm_sbc: not select SPL_RAM_DEVICE
On 08/06/2022 01:54, Marek Vasut wrote: > I still don't see why we should randomly damage board configs to work > around what looks like a bug in binman -- are we now implementing > workarounds instead of trying to fully understand issues and implement > proper fixes for those ? > > Why can't we fix binman instead ? There aren't many people who understand binman internals enough to fix things properly. Simon is less active recently, I'm not as productive as I'd like (even then I don't know the C parts), and my availability will get way worse in a few weeks. I wanted to prioritize reviews so that others' work don't stall, didn't know when this could be fixed, thus a clean workaround until then (not 'instead of') seemed OK. Anyway, doesn't matter now that I managed to send a fix, but I didn't want to keep the question unanswered.
Re: Boot regression on am335x-hs-evm
On Fri, Jun 10, 2022 at 05:45:04PM +0200, LABBE Corentin wrote: > Le Fri, Jun 10, 2022 at 11:01:47AM -0400, Tom Rini a écrit : > > On Fri, Jun 10, 2022 at 04:51:12PM +0200, LABBE Corentin wrote: > > > Le Fri, Jun 10, 2022 at 08:16:10AM -0400, Tom Rini a écrit : > > > > On Fri, Jun 10, 2022 at 11:59:23AM +0200, LABBE Corentin wrote: > > > > > Hello > > > > > > > > > > I hit a boot regression on am335x-hs-evm. > > > > > On current uboot, the board does not boot at all. > > > > > This board uses both MLO and u-boot.img and only MLO was the problem. > > > > > > > > > > After a bisect, I found that e41651fffda7 ("dm: Support parent > > > > > devices with of-platdata") was the problem. > > > > > Reverting this patch lead to a success boot. > > > > > > > > > > I cutdown the revert to a minimal fix: > > > > > --- a/drivers/core/lists.c > > > > > +++ b/drivers/core/lists.c > > > > > @@ -120,6 +120,7 @@ int lists_bind_drivers(struct udevice *parent, > > > > > bool pre_reloc_only) > > > > > int ret; > > > > > > > > > > ret = bind_drivers_pass(parent, pre_reloc_only); > > > > > + return ret; > > > > > if (!ret) > > > > > break; > > > > > if (ret != -EAGAIN && !result) > > > > > > > > > > I cannot debug further since printf() is not working at this stage. > > > > > > > > > > Since I wanted to know which error was badly handled, I tried to do > > > > > this: > > > > > --- a/arch/arm/mach-omap2/sec-common.c > > > > > +++ b/arch/arm/mach-omap2/sec-common.c > > > > > @@ -111,6 +111,8 @@ static u32 find_sig_start(char *image, size_t > > > > > size) > > > > > return 0; > > > > > } > > > > > > > > > > +extern int errorcount; > > > > > + > > > > > int secure_boot_verify_image(void **image, size_t *size) > > > > > { > > > > > int result = 1; > > > > > @@ -178,6 +180,7 @@ auth_exit: > > > > > * via YMODEM. This is done to avoid disturbing the YMODEM > > > > > serial > > > > > * protocol transactions. > > > > > */ > > > > > + printf("ERRORCOUNT %d\n", errorcount); > > > > > if (!(IS_ENABLED(CONFIG_SPL_BUILD) && > > > > > IS_ENABLED(CONFIG_SPL_YMODEM_SUPPORT) && > > > > > spl_boot_device() == BOOT_DEVICE_UART)) > > > > > --- a/drivers/core/lists.c > > > > > +++ b/drivers/core/lists.c > > > > > @@ -20,6 +20,10 @@ > > > > > #include > > > > > #include > > > > > > > > > > +static int _errorcount; > > > > > +int errorlist[1024]; > > > > > +int errorcount; > > > > > + > > > > > struct driver *lists_driver_lookup_name(const char *name) > > > > > { > > > > > struct driver *drv = > > > > > @@ -120,8 +124,9 @@ int lists_bind_drivers(struct udevice *parent, > > > > > bool pre_reloc_only) > > > > > int ret; > > > > > > > > > > ret = bind_drivers_pass(parent, pre_reloc_only); > > > > > - if (!ret) > > > > > - break; > > > > > + errorlist[_errorcount] = ret; > > > > > + _errorcount++; > > > > > + errorcount = _errorcount; > > > > > if (ret != -EAGAIN && !result) > > > > > result = ret; > > > > > } > > > > > > > > > > But errorcount is always 0 which is puzzling me since according to my > > > > > think, lists_bind_drivers() is ran before secure_boot_verify_image(). > > > > > > > > > > Any idea on how to debug further ? > > > > > > > > You should be able to enable DEBUG_UART and get output that way. But > > > > it's likely something related to the space constraints of the HS chip > > > > rather than GP. > > > > > > > > > > Hello > > > > > > Thanks for your suggestion, I successfully got futher with: > > > diff --git a/drivers/core/lists.c b/drivers/core/lists.c > > > index b23ee3030e..415ba814f1 100644 > > > --- a/drivers/core/lists.c > > > +++ b/drivers/core/lists.c > > > @@ -111,6 +111,8 @@ int lists_bind_drivers(struct udevice *parent, bool > > > pre_reloc_only) > > > int result = 0; > > > int pass; > > > > > > + debug_uart_init(); > > > + > > > /* > > > * 10 passes is 10 levels deep in the devicetree, which is > > > plenty. If > > > * OF_PLATDATA_PARENT is not enabled, then bind_drivers_pass() > > > will > > > diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig > > > index b4805a2e4e..7ab059b4ea 100644 > > > --- a/drivers/serial/Kconfig > > > +++ b/drivers/serial/Kconfig > > > @@ -158,6 +158,7 @@ config TPL_DM_SERIAL > > > > > > config DEBUG_UART > > > bool "Enable an early debug UART for debugging" > > > + default y > > > help > > > The debug UART is intended for use very early in U-Boot to debug > > > problems when an ICE or other debug mechanism is not available. > > > @@ -185,7 +186,7 @@ config DEBUG_UART > > > choice > > > prompt "Select
Re: Boot regression on am335x-hs-evm
Le Fri, Jun 10, 2022 at 11:01:47AM -0400, Tom Rini a écrit : > On Fri, Jun 10, 2022 at 04:51:12PM +0200, LABBE Corentin wrote: > > Le Fri, Jun 10, 2022 at 08:16:10AM -0400, Tom Rini a écrit : > > > On Fri, Jun 10, 2022 at 11:59:23AM +0200, LABBE Corentin wrote: > > > > Hello > > > > > > > > I hit a boot regression on am335x-hs-evm. > > > > On current uboot, the board does not boot at all. > > > > This board uses both MLO and u-boot.img and only MLO was the problem. > > > > > > > > After a bisect, I found that e41651fffda7 ("dm: Support parent devices > > > > with of-platdata") was the problem. > > > > Reverting this patch lead to a success boot. > > > > > > > > I cutdown the revert to a minimal fix: > > > > --- a/drivers/core/lists.c > > > > +++ b/drivers/core/lists.c > > > > @@ -120,6 +120,7 @@ int lists_bind_drivers(struct udevice *parent, bool > > > > pre_reloc_only) > > > > int ret; > > > > > > > > ret = bind_drivers_pass(parent, pre_reloc_only); > > > > + return ret; > > > > if (!ret) > > > > break; > > > > if (ret != -EAGAIN && !result) > > > > > > > > I cannot debug further since printf() is not working at this stage. > > > > > > > > Since I wanted to know which error was badly handled, I tried to do > > > > this: > > > > --- a/arch/arm/mach-omap2/sec-common.c > > > > +++ b/arch/arm/mach-omap2/sec-common.c > > > > @@ -111,6 +111,8 @@ static u32 find_sig_start(char *image, size_t size) > > > > return 0; > > > > } > > > > > > > > +extern int errorcount; > > > > + > > > > int secure_boot_verify_image(void **image, size_t *size) > > > > { > > > > int result = 1; > > > > @@ -178,6 +180,7 @@ auth_exit: > > > > * via YMODEM. This is done to avoid disturbing the YMODEM > > > > serial > > > > * protocol transactions. > > > > */ > > > > + printf("ERRORCOUNT %d\n", errorcount); > > > > if (!(IS_ENABLED(CONFIG_SPL_BUILD) && > > > > IS_ENABLED(CONFIG_SPL_YMODEM_SUPPORT) && > > > > spl_boot_device() == BOOT_DEVICE_UART)) > > > > --- a/drivers/core/lists.c > > > > +++ b/drivers/core/lists.c > > > > @@ -20,6 +20,10 @@ > > > > #include > > > > #include > > > > > > > > +static int _errorcount; > > > > +int errorlist[1024]; > > > > +int errorcount; > > > > + > > > > struct driver *lists_driver_lookup_name(const char *name) > > > > { > > > > struct driver *drv = > > > > @@ -120,8 +124,9 @@ int lists_bind_drivers(struct udevice *parent, bool > > > > pre_reloc_only) > > > > int ret; > > > > > > > > ret = bind_drivers_pass(parent, pre_reloc_only); > > > > - if (!ret) > > > > - break; > > > > + errorlist[_errorcount] = ret; > > > > + _errorcount++; > > > > + errorcount = _errorcount; > > > > if (ret != -EAGAIN && !result) > > > > result = ret; > > > > } > > > > > > > > But errorcount is always 0 which is puzzling me since according to my > > > > think, lists_bind_drivers() is ran before secure_boot_verify_image(). > > > > > > > > Any idea on how to debug further ? > > > > > > You should be able to enable DEBUG_UART and get output that way. But > > > it's likely something related to the space constraints of the HS chip > > > rather than GP. > > > > > > > Hello > > > > Thanks for your suggestion, I successfully got futher with: > > diff --git a/drivers/core/lists.c b/drivers/core/lists.c > > index b23ee3030e..415ba814f1 100644 > > --- a/drivers/core/lists.c > > +++ b/drivers/core/lists.c > > @@ -111,6 +111,8 @@ int lists_bind_drivers(struct udevice *parent, bool > > pre_reloc_only) > > int result = 0; > > int pass; > > > > + debug_uart_init(); > > + > > /* > > * 10 passes is 10 levels deep in the devicetree, which is plenty. > > If > > * OF_PLATDATA_PARENT is not enabled, then bind_drivers_pass() will > > diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig > > index b4805a2e4e..7ab059b4ea 100644 > > --- a/drivers/serial/Kconfig > > +++ b/drivers/serial/Kconfig > > @@ -158,6 +158,7 @@ config TPL_DM_SERIAL > > > > config DEBUG_UART > > bool "Enable an early debug UART for debugging" > > + default y > > help > > The debug UART is intended for use very early in U-Boot to debug > > problems when an ICE or other debug mechanism is not available. > > @@ -185,7 +186,7 @@ config DEBUG_UART > > choice > > prompt "Select which UART will provide the debug UART" > > depends on DEBUG_UART > > - default DEBUG_UART_NS16550 > > + default DEBUG_UART_OMAP > > > > config DEBUG_UART_ALTERA_JTAGUART > > bool "Altera JTAG UART" > > @@ -406,7 +407,7 @@ endchoice > > config DEBUG_UART_BASE > > hex "Base address of
Re: Boot regression on am335x-hs-evm
On Fri, Jun 10, 2022 at 04:51:12PM +0200, LABBE Corentin wrote: > Le Fri, Jun 10, 2022 at 08:16:10AM -0400, Tom Rini a écrit : > > On Fri, Jun 10, 2022 at 11:59:23AM +0200, LABBE Corentin wrote: > > > Hello > > > > > > I hit a boot regression on am335x-hs-evm. > > > On current uboot, the board does not boot at all. > > > This board uses both MLO and u-boot.img and only MLO was the problem. > > > > > > After a bisect, I found that e41651fffda7 ("dm: Support parent devices > > > with of-platdata") was the problem. > > > Reverting this patch lead to a success boot. > > > > > > I cutdown the revert to a minimal fix: > > > --- a/drivers/core/lists.c > > > +++ b/drivers/core/lists.c > > > @@ -120,6 +120,7 @@ int lists_bind_drivers(struct udevice *parent, bool > > > pre_reloc_only) > > > int ret; > > > > > > ret = bind_drivers_pass(parent, pre_reloc_only); > > > + return ret; > > > if (!ret) > > > break; > > > if (ret != -EAGAIN && !result) > > > > > > I cannot debug further since printf() is not working at this stage. > > > > > > Since I wanted to know which error was badly handled, I tried to do this: > > > --- a/arch/arm/mach-omap2/sec-common.c > > > +++ b/arch/arm/mach-omap2/sec-common.c > > > @@ -111,6 +111,8 @@ static u32 find_sig_start(char *image, size_t size) > > > return 0; > > > } > > > > > > +extern int errorcount; > > > + > > > int secure_boot_verify_image(void **image, size_t *size) > > > { > > > int result = 1; > > > @@ -178,6 +180,7 @@ auth_exit: > > > * via YMODEM. This is done to avoid disturbing the YMODEM serial > > > * protocol transactions. > > > */ > > > + printf("ERRORCOUNT %d\n", errorcount); > > > if (!(IS_ENABLED(CONFIG_SPL_BUILD) && > > > IS_ENABLED(CONFIG_SPL_YMODEM_SUPPORT) && > > > spl_boot_device() == BOOT_DEVICE_UART)) > > > --- a/drivers/core/lists.c > > > +++ b/drivers/core/lists.c > > > @@ -20,6 +20,10 @@ > > > #include > > > #include > > > > > > +static int _errorcount; > > > +int errorlist[1024]; > > > +int errorcount; > > > + > > > struct driver *lists_driver_lookup_name(const char *name) > > > { > > > struct driver *drv = > > > @@ -120,8 +124,9 @@ int lists_bind_drivers(struct udevice *parent, bool > > > pre_reloc_only) > > > int ret; > > > > > > ret = bind_drivers_pass(parent, pre_reloc_only); > > > - if (!ret) > > > - break; > > > + errorlist[_errorcount] = ret; > > > + _errorcount++; > > > + errorcount = _errorcount; > > > if (ret != -EAGAIN && !result) > > > result = ret; > > > } > > > > > > But errorcount is always 0 which is puzzling me since according to my > > > think, lists_bind_drivers() is ran before secure_boot_verify_image(). > > > > > > Any idea on how to debug further ? > > > > You should be able to enable DEBUG_UART and get output that way. But > > it's likely something related to the space constraints of the HS chip > > rather than GP. > > > > Hello > > Thanks for your suggestion, I successfully got futher with: > diff --git a/drivers/core/lists.c b/drivers/core/lists.c > index b23ee3030e..415ba814f1 100644 > --- a/drivers/core/lists.c > +++ b/drivers/core/lists.c > @@ -111,6 +111,8 @@ int lists_bind_drivers(struct udevice *parent, bool > pre_reloc_only) > int result = 0; > int pass; > > + debug_uart_init(); > + > /* > * 10 passes is 10 levels deep in the devicetree, which is plenty. If > * OF_PLATDATA_PARENT is not enabled, then bind_drivers_pass() will > diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig > index b4805a2e4e..7ab059b4ea 100644 > --- a/drivers/serial/Kconfig > +++ b/drivers/serial/Kconfig > @@ -158,6 +158,7 @@ config TPL_DM_SERIAL > > config DEBUG_UART > bool "Enable an early debug UART for debugging" > + default y > help > The debug UART is intended for use very early in U-Boot to debug > problems when an ICE or other debug mechanism is not available. > @@ -185,7 +186,7 @@ config DEBUG_UART > choice > prompt "Select which UART will provide the debug UART" > depends on DEBUG_UART > - default DEBUG_UART_NS16550 > + default DEBUG_UART_OMAP > > config DEBUG_UART_ALTERA_JTAGUART > bool "Altera JTAG UART" > @@ -406,7 +407,7 @@ endchoice > config DEBUG_UART_BASE > hex "Base address of UART" > depends on DEBUG_UART > - default 0 if DEBUG_UART_SANDBOX > + default 0x44e09000 > help > This is the base address of your UART for memory-mapped UARTs. > > @@ -416,7 +417,7 @@ config DEBUG_UART_BASE > config DEBUG_UART_CLOCK > int "UART input clock" > depends on
Re: Boot regression on am335x-hs-evm
Le Fri, Jun 10, 2022 at 08:16:10AM -0400, Tom Rini a écrit : > On Fri, Jun 10, 2022 at 11:59:23AM +0200, LABBE Corentin wrote: > > Hello > > > > I hit a boot regression on am335x-hs-evm. > > On current uboot, the board does not boot at all. > > This board uses both MLO and u-boot.img and only MLO was the problem. > > > > After a bisect, I found that e41651fffda7 ("dm: Support parent devices with > > of-platdata") was the problem. > > Reverting this patch lead to a success boot. > > > > I cutdown the revert to a minimal fix: > > --- a/drivers/core/lists.c > > +++ b/drivers/core/lists.c > > @@ -120,6 +120,7 @@ int lists_bind_drivers(struct udevice *parent, bool > > pre_reloc_only) > > int ret; > > > > ret = bind_drivers_pass(parent, pre_reloc_only); > > + return ret; > > if (!ret) > > break; > > if (ret != -EAGAIN && !result) > > > > I cannot debug further since printf() is not working at this stage. > > > > Since I wanted to know which error was badly handled, I tried to do this: > > --- a/arch/arm/mach-omap2/sec-common.c > > +++ b/arch/arm/mach-omap2/sec-common.c > > @@ -111,6 +111,8 @@ static u32 find_sig_start(char *image, size_t size) > > return 0; > > } > > > > +extern int errorcount; > > + > > int secure_boot_verify_image(void **image, size_t *size) > > { > > int result = 1; > > @@ -178,6 +180,7 @@ auth_exit: > > * via YMODEM. This is done to avoid disturbing the YMODEM serial > > * protocol transactions. > > */ > > + printf("ERRORCOUNT %d\n", errorcount); > > if (!(IS_ENABLED(CONFIG_SPL_BUILD) && > > IS_ENABLED(CONFIG_SPL_YMODEM_SUPPORT) && > > spl_boot_device() == BOOT_DEVICE_UART)) > > --- a/drivers/core/lists.c > > +++ b/drivers/core/lists.c > > @@ -20,6 +20,10 @@ > > #include > > #include > > > > +static int _errorcount; > > +int errorlist[1024]; > > +int errorcount; > > + > > struct driver *lists_driver_lookup_name(const char *name) > > { > > struct driver *drv = > > @@ -120,8 +124,9 @@ int lists_bind_drivers(struct udevice *parent, bool > > pre_reloc_only) > > int ret; > > > > ret = bind_drivers_pass(parent, pre_reloc_only); > > - if (!ret) > > - break; > > + errorlist[_errorcount] = ret; > > + _errorcount++; > > + errorcount = _errorcount; > > if (ret != -EAGAIN && !result) > > result = ret; > > } > > > > But errorcount is always 0 which is puzzling me since according to my > > think, lists_bind_drivers() is ran before secure_boot_verify_image(). > > > > Any idea on how to debug further ? > > You should be able to enable DEBUG_UART and get output that way. But > it's likely something related to the space constraints of the HS chip > rather than GP. > Hello Thanks for your suggestion, I successfully got futher with: diff --git a/drivers/core/lists.c b/drivers/core/lists.c index b23ee3030e..415ba814f1 100644 --- a/drivers/core/lists.c +++ b/drivers/core/lists.c @@ -111,6 +111,8 @@ int lists_bind_drivers(struct udevice *parent, bool pre_reloc_only) int result = 0; int pass; + debug_uart_init(); + /* * 10 passes is 10 levels deep in the devicetree, which is plenty. If * OF_PLATDATA_PARENT is not enabled, then bind_drivers_pass() will diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index b4805a2e4e..7ab059b4ea 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -158,6 +158,7 @@ config TPL_DM_SERIAL config DEBUG_UART bool "Enable an early debug UART for debugging" + default y help The debug UART is intended for use very early in U-Boot to debug problems when an ICE or other debug mechanism is not available. @@ -185,7 +186,7 @@ config DEBUG_UART choice prompt "Select which UART will provide the debug UART" depends on DEBUG_UART - default DEBUG_UART_NS16550 + default DEBUG_UART_OMAP config DEBUG_UART_ALTERA_JTAGUART bool "Altera JTAG UART" @@ -406,7 +407,7 @@ endchoice config DEBUG_UART_BASE hex "Base address of UART" depends on DEBUG_UART - default 0 if DEBUG_UART_SANDBOX + default 0x44e09000 help This is the base address of your UART for memory-mapped UARTs. @@ -416,7 +417,7 @@ config DEBUG_UART_BASE config DEBUG_UART_CLOCK int "UART input clock" depends on DEBUG_UART - default 0 if DEBUG_UART_SANDBOX + default 4800 help The UART input clock determines the speed of the internal UART circuitry. The baud rate is derived from this by dividing the input @@ -428,7 +429,7 @@ config DEBUG_UART_CLOCK config DEBUG_UART_SHIFT int "UART register shift"
Re: [PATCH v2] xilinx: zynqmp: Do not use 0 as spl bss start address
Hi Michal, what is the default entry address for the aft / bl31.bin? I have a bl31.bin with an entry address of 0x1000 and this is inside the BSS. Regards Stefan Am 07.06.2022 um 10:13 schrieb Michal Simek: út 7. 6. 2022 v 9:44 odesílatel Stefan Herbrechtsmeier napsal: From: Stefan Herbrechtsmeier Do not use 0 as address for memory because of the special meaning for pointers (null pointer). Change the spl bss start address to the second page. Signed-off-by: Stefan Herbrechtsmeier --- The problem was discovered with a static array initialized with zero. The compiler placed the array at address 0 and thereby a pointer to the array was interpreted as null pointer. Changes in v2: - Rework commit message and replace address null by 0 include/configs/xilinx_zynqmp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h index f25d796a1e..21a5cf1617 100644 --- a/include/configs/xilinx_zynqmp.h +++ b/include/configs/xilinx_zynqmp.h @@ -209,7 +209,7 @@ #define CONFIG_SPL_MAX_SIZE0x4 /* Just random location in OCM */ -#define CONFIG_SPL_BSS_START_ADDR 0x0 +#define CONFIG_SPL_BSS_START_ADDR 0x1000 #define CONFIG_SPL_BSS_MAX_SIZE0x8 #if defined(CONFIG_SPL_SPI_FLASH_SUPPORT) -- 2.30.2 Applied. M
Re: imx8m(n): garbage on serial line
Hi, Am Fr., 10. Juni 2022 um 15:00 Uhr schrieb Fabio Estevam : > > Hi Heiko, > > On Fri, Jun 10, 2022 at 7:29 AM Heiko Thiery wrote: > > > > Hi, > > > > I just rebased my pending patch for adding support for the NXP imx8mn > > ddr3l evk board. When applying on the current master I see some > > garbage on the serial input. > > > > Can anyone confirm that behavior or is it just here? > > Just tried booting on a imx8mn ddr4 evk and such a problem does not happen: > > U-Boot SPL 2022.07-rc4-7-g57bd363de7 (Jun 10 2022 - 09:42:49 -0300) > SEC0: RNG instantiated > Normal Boot > WDT: Started watchdog@3028 with servicing (60s timeout) > Trying to boot from BOOTROM > image offset 0x8000, pagesize 0x200, ivt offset 0x0 > NOTICE: BL31: v2.7(release):v2.7.0 > NOTICE: BL31: Built : 09:42:28, Jun 10 2022 > > > U-Boot 2022.07-rc4-7-g57bd363de7 (Jun 10 2022 - 09:42:49 -0300) > > CPU: Freescale i.MX8MNano Quad rev1.0 at 1200 MHz > Reset cause: POR > Model: NXP i.MX8MNano DDR4 EVK board > DRAM: 2 GiB > Core: 139 devices, 22 uclasses, devicetree: separate > WDT: Started watchdog@3028 with servicing (60s timeout) > MMC: FSL_SDHC: 1, FSL_SDHC: 2 > Loading Environment from MMC... OK > In:serial@3089 > Out: serial@3089 > Err: serial@3089 > Net: eth0: ethernet@30be > Hit any key to stop autoboot: 0 > > Also tried booting on a imx8mm evk and did not see the serial garbage either. > > Not sure why this happens on the imx8mn ddr3 evk and on the > kontron_sl_imx8mm though. Yes, this is strange. > > None of the boards I have physical access show the problem. The > Kontron board have remote access only, > so not very easy to run git bisect. > > Are you able to bisect it with the kontron_sl_imx8mm board? Unfortunately only next week again. But I will try on my imx8mq later. -- Heiko
Re: [PATCH v2 0/7] Add video damage tracking
On 10/06/2022 00:59, Alexander Graf wrote: This patch set speeds up graphics output on ARM by a factor of 60x. On most ARM SBCs, we keep the frame buffer in DRAM and map it as cached, but need it accessible by the display controller which reads directly from a later point of consistency. Hence, we flush the frame buffer to DRAM on every change. The full frame buffer. Unfortunately, with the advent of 4k displays, we are seeing frame buffers that can take a while to flush out. This was reported by Da Xue with grub, which happily print 1000s of spaces on the screen to draw a menu. Every printed space triggers a cache flush. This patch set implements the easiest mitigation against this problem: Damage tracking. We remember the lowest common denominator region that was touched since the last video_sync() call and only flush that. The most typical writer to the frame buffer is the video console, which always writes rectangles of characters on the screen and syncs afterwards. With this patch set applied, we reduce drawing a large grub menu (with serial console attached for size information) on an RK3399-ROC system at 1440p from 55 seconds to less than 1 second. Version 2 also implements VIDEO_COPY using this mechanism, reducing its overhead compared to before as well. So even x86 systems should be faster with this now :). Series tested on RPi4, thanks a lot! Tested-by: Matthias Brugger Alternatives considered: 1) Lazy sync - Sandbox does this. It only calls video_sync(true) ever so often. We are missing timers to do this generically. 2) Double buffering - We could try to identify whether anything changed at all and only draw to the FB if it did. That would require maintaining a second buffer that we need to scan. 3) Text buffer - Maintain a buffer of all text printed on the screen with respective location. Don't write if the old and new character are identical. This would limit applicability to text only and is an optimization on top of this patch set. 4) Hash screen lines - Create a hash (sha256?) over every line when it changes. Only flush when it does. I'm not sure if this would waste more time, memory and cache than the current approach. It would make full screen updates much more expensive. v1 -> v2: - new patch: video: Use VIDEO_DAMAGE for VIDEO_COPY - Remove ifdefs - Fix dcache range; we were flushing too much before - Fix ranges in truetype target - Limit rotate to necessary damange Alexander Graf (7): dm: video: Add damage tracking API dm: video: Add damage notification on display clear vidconsole: Add damage notifications to all vidconsole drivers video: Add damage notification on bmp display efi_loader: GOP: Add damage notification on BLT video: Only dcache flush damaged lines video: Use VIDEO_DAMAGE for VIDEO_COPY configs/chromebook_coral_defconfig | 1 + configs/chromebook_link_defconfig| 1 + configs/chromebook_samus_defconfig | 1 + configs/minnowmax_defconfig | 1 + configs/sandbox_defconfig| 1 + configs/xilinx_zynqmp_virt_defconfig | 1 + drivers/video/Kconfig| 21 ++- drivers/video/console_normal.c | 22 ++-- drivers/video/console_rotate.c | 87 - drivers/video/console_truetype.c | 30 +++-- drivers/video/vidconsole-uclass.c| 16 --- drivers/video/video-uclass.c | 185 --- drivers/video/video_bmp.c| 7 +- include/video.h | 54 +++- include/video_console.h | 49 --- lib/efi_loader/efi_gop.c | 7 +- 16 files changed, 247 insertions(+), 237 deletions(-)
Re: [u-boot PATCH 2/3] tools/fdtgrep: Include __symbols__ table
On Mon, May 09, 2022 at 10:29:35AM +0300, Roger Quadros wrote: > This is required for overlays to work at SPL. > > Signed-off-by: Roger Quadros This breaks booting my dra7xx_evm and I get no output in SPL. -- Tom signature.asc Description: PGP signature
Re: imx8m(n): garbage on serial line
Hi Heiko, On Fri, Jun 10, 2022 at 7:29 AM Heiko Thiery wrote: > > Hi, > > I just rebased my pending patch for adding support for the NXP imx8mn > ddr3l evk board. When applying on the current master I see some > garbage on the serial input. > > Can anyone confirm that behavior or is it just here? Just tried booting on a imx8mn ddr4 evk and such a problem does not happen: U-Boot SPL 2022.07-rc4-7-g57bd363de7 (Jun 10 2022 - 09:42:49 -0300) SEC0: RNG instantiated Normal Boot WDT: Started watchdog@3028 with servicing (60s timeout) Trying to boot from BOOTROM image offset 0x8000, pagesize 0x200, ivt offset 0x0 NOTICE: BL31: v2.7(release):v2.7.0 NOTICE: BL31: Built : 09:42:28, Jun 10 2022 U-Boot 2022.07-rc4-7-g57bd363de7 (Jun 10 2022 - 09:42:49 -0300) CPU: Freescale i.MX8MNano Quad rev1.0 at 1200 MHz Reset cause: POR Model: NXP i.MX8MNano DDR4 EVK board DRAM: 2 GiB Core: 139 devices, 22 uclasses, devicetree: separate WDT: Started watchdog@3028 with servicing (60s timeout) MMC: FSL_SDHC: 1, FSL_SDHC: 2 Loading Environment from MMC... OK In:serial@3089 Out: serial@3089 Err: serial@3089 Net: eth0: ethernet@30be Hit any key to stop autoboot: 0 Also tried booting on a imx8mm evk and did not see the serial garbage either. Not sure why this happens on the imx8mn ddr3 evk and on the kontron_sl_imx8mm though. None of the boards I have physical access show the problem. The Kontron board have remote access only, so not very easy to run git bisect. Are you able to bisect it with the kontron_sl_imx8mm board?
[PATCH] board: ti: j721e: Return if there is an error while configuring SerDes
While configuring SerDes, errors could be encountered, in these cases, return instead of going ahead. This is will help in booting even if configuration of SerDes fails. Signed-off-by: Aswath Govindraju --- board/ti/j721e/evm.c | 32 ++-- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c index e6ff54c065de..c62716788e2e 100644 --- a/board/ti/j721e/evm.c +++ b/board/ti/j721e/evm.c @@ -380,19 +380,25 @@ void configure_serdes_torrent(void) ret = uclass_get_device_by_driver(UCLASS_PHY, DM_DRIVER_GET(torrent_phy_provider), ); - if (ret) + if (ret) { printf("Torrent init failed:%d\n", ret); + return; + } serdes.dev = dev; serdes.id = 0; ret = generic_phy_init(); - if (ret) - printf("phy_init failed!!\n"); + if (ret) { + printf("phy_init failed!!: %d\n", ret); + return; + } ret = generic_phy_power_on(); - if (ret) - printf("phy_power_on failed !!\n"); + if (ret) { + printf("phy_power_on failed!!: %d\n", ret); + return; + } } void configure_serdes_sierra(void) @@ -408,21 +414,27 @@ void configure_serdes_sierra(void) ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(sierra_phy_provider), ); - if (ret) + if (ret) { printf("Sierra init failed:%d\n", ret); + return; + } count = device_get_child_count(dev); for (i = 0; i < count; i++) { ret = device_get_child(dev, i, _dev); - if (ret) - printf("probe of sierra child node %d failed\n", i); + if (ret) { + printf("probe of sierra child node %d failed: %d\n", i, ret); + return; + } if (link_dev->driver->id == UCLASS_PHY) { link.dev = link_dev; link.id = link_count++; ret = generic_phy_power_on(); - if (ret) - printf("phy_power_on failed !!\n"); + if (ret) { + printf("phy_power_on failed!!: %d\n", ret); + return; + } } } } -- 2.17.1
Re: Reproducibility issue due to use of uname
On 6/9/22 18:06, Vagrant Cascadian wrote: It looks like u-boot 2022.07-rc1 introduced a reproducibility issue that is dependent on the running kernel. I believe the commit that triggered this issue is: f7691a6d736bec7915c227ac14076f9993a27367 sandbox: allow cross-compiling sandbox Thanks for reporting the issue. Said patch does not change the value of MK_ARCH for CROSS_COMPILE="". So this is not the relevant patch. While the use of uname in the Makefile goes back well before this commit, previously it had no apparent effect on the builds... When building natively (e.g. CROSS_COMPILE is not set) with a 32-bit userland toolchain, but running a 64-bit kernel, 32-bit arm targets end up with BOOTAA64.EFI embedded in the binaries: https://tests.reproducible-builds.org/debian/rb-pkg/experimental/armhf/diffoscope-results/u-boot.html The EFI boot manager can boot according to boot options define as UEFI variables BOOT. We recently introduced support for booting via these variables if they only point to a block device without a filename. In this case we need to provide the name of the EFI binary. Only for the sandbox this should depend on host architecture. I need to correct include/efi_default_filename.h to only use variable HOST_ARCH for the sandbox. Best regards Heinrich /EFI/BOOT/BOOTARM.EFI vs. /EFI/BOOT/BOOTAA64.EFI live well, vagrant
Re: [PATCH] dt-bindings: mtd: partitions: add UBI binding
On Thu, Feb 17, 2022 at 11:24:48AM +0100, Rafał Miłecki wrote: > From: Rafał Miłecki > > UBI is often used on embedded devices to store UBI volumes with device > configuration / calibration data. Such volumes may need to be documented > and referenced for proper boot & setup. > > Some examples: > 1. U-Boot environment variables > 2. Device calibration data > 3. Default setup (e.g. initial password) > > Signed-off-by: Rafał Miłecki This is very useful and can replace the downstream hacks we are currently using for this purpose in OpenWrt. Reviewed-by: Daniel Golle > --- > .../bindings/mtd/partitions/ubi.yaml | 67 +++ > 1 file changed, 67 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mtd/partitions/ubi.yaml > > diff --git a/Documentation/devicetree/bindings/mtd/partitions/ubi.yaml > b/Documentation/devicetree/bindings/mtd/partitions/ubi.yaml > new file mode 100644 > index ..cd081f06d4cb > --- /dev/null > +++ b/Documentation/devicetree/bindings/mtd/partitions/ubi.yaml > @@ -0,0 +1,67 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mtd/partitions/ubi.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: UBI (Unsorted Block Images) device > + > +description: | > + UBI is a layer providing logical volumes (consisting of logical blocks) on > top > + of raw flash devices. It deals with low-level flash issues (bit-flips, bad > + physical eraseblocks, wearing) providing a reliable data storage. > + > + UBI device is built and stored in a single flash partition. > + > + Some (usually embedded) devices use UBI volumes of specific names or > indexes > + to store setup / configuration data. This binding allows describing such > + volumes so they can be identified and referenced by consumers. > + > +maintainers: > + - Rafał Miłecki > + > +allOf: > + - $ref: partition.yaml# > + > +properties: > + compatible: > +const: ubi > + > +patternProperties: > + "^volume-[0-9a-f]+$": > +type: object > +description: UBI volume > +properties: > + volume-name: > +$ref: /schemas/types.yaml#/definitions/string > + volume-id: > +$ref: /schemas/types.yaml#/definitions/uint32 > +anyOf: > + - required: > + - volume-name > + - required: > + - volume-id > + > +unevaluatedProperties: false > + > +examples: > + - | > +partitions { > +compatible = "fixed-partitions"; > +#address-cells = <1>; > +#size-cells = <1>; > + > +partition@0 { > +compatible = "ubi"; > +reg = <0x000 0x100>; > +label = "filesystem"; > + > +env: volume-0 { > +volume-name = "u-boot-env"; > +}; > + > +calibration: volume-1 { > +volume-id = <99>; > +}; > +}; > +}; > -- > 2.34.1 >
Re: Boot regression on am335x-hs-evm
On Fri, Jun 10, 2022 at 11:59:23AM +0200, LABBE Corentin wrote: > Hello > > I hit a boot regression on am335x-hs-evm. > On current uboot, the board does not boot at all. > This board uses both MLO and u-boot.img and only MLO was the problem. > > After a bisect, I found that e41651fffda7 ("dm: Support parent devices with > of-platdata") was the problem. > Reverting this patch lead to a success boot. > > I cutdown the revert to a minimal fix: > --- a/drivers/core/lists.c > +++ b/drivers/core/lists.c > @@ -120,6 +120,7 @@ int lists_bind_drivers(struct udevice *parent, bool > pre_reloc_only) > int ret; > > ret = bind_drivers_pass(parent, pre_reloc_only); > + return ret; > if (!ret) > break; > if (ret != -EAGAIN && !result) > > I cannot debug further since printf() is not working at this stage. > > Since I wanted to know which error was badly handled, I tried to do this: > --- a/arch/arm/mach-omap2/sec-common.c > +++ b/arch/arm/mach-omap2/sec-common.c > @@ -111,6 +111,8 @@ static u32 find_sig_start(char *image, size_t size) > return 0; > } > > +extern int errorcount; > + > int secure_boot_verify_image(void **image, size_t *size) > { > int result = 1; > @@ -178,6 +180,7 @@ auth_exit: > * via YMODEM. This is done to avoid disturbing the YMODEM serial > * protocol transactions. > */ > + printf("ERRORCOUNT %d\n", errorcount); > if (!(IS_ENABLED(CONFIG_SPL_BUILD) && > IS_ENABLED(CONFIG_SPL_YMODEM_SUPPORT) && > spl_boot_device() == BOOT_DEVICE_UART)) > --- a/drivers/core/lists.c > +++ b/drivers/core/lists.c > @@ -20,6 +20,10 @@ > #include > #include > > +static int _errorcount; > +int errorlist[1024]; > +int errorcount; > + > struct driver *lists_driver_lookup_name(const char *name) > { > struct driver *drv = > @@ -120,8 +124,9 @@ int lists_bind_drivers(struct udevice *parent, bool > pre_reloc_only) > int ret; > > ret = bind_drivers_pass(parent, pre_reloc_only); > - if (!ret) > - break; > + errorlist[_errorcount] = ret; > + _errorcount++; > + errorcount = _errorcount; > if (ret != -EAGAIN && !result) > result = ret; > } > > But errorcount is always 0 which is puzzling me since according to my think, > lists_bind_drivers() is ran before secure_boot_verify_image(). > > Any idea on how to debug further ? You should be able to enable DEBUG_UART and get output that way. But it's likely something related to the space constraints of the HS chip rather than GP. -- Tom signature.asc Description: PGP signature
Re: [PATCH v5 10/23] FWU: cmd: Add a command to read FWU metadata
On Thu, Jun 09, 2022 at 05:59:57PM +0530, Sughosh Ganu wrote: > Add a command to read the metadata as specified in the FWU > specification and print the fields of the metadata. > > Signed-off-by: Sughosh Ganu > --- > cmd/Kconfig | 7 + > cmd/Makefile| 1 + > cmd/fwu_mdata.c | 74 + > 3 files changed, 82 insertions(+) > create mode 100644 cmd/fwu_mdata.c > > diff --git a/cmd/Kconfig b/cmd/Kconfig > index 09193b61b9..275becd837 100644 > --- a/cmd/Kconfig > +++ b/cmd/Kconfig > @@ -144,6 +144,13 @@ config CMD_CPU > internal name) and clock frequency. Other information may be > available depending on the CPU driver. > > +config CMD_FWU_METADATA > + bool "fwu metadata read" > + depends on FWU_MULTI_BANK_UPDATE > + default y if FWU_MULTI_BANK_UPDATE > + help > + Command to read the metadata and dump it's contents > + > config CMD_LICENSE > bool "license" > select BUILD_BIN2C > diff --git a/cmd/Makefile b/cmd/Makefile > index 5e43a1e022..259a93bc65 100644 > --- a/cmd/Makefile > +++ b/cmd/Makefile > @@ -76,6 +76,7 @@ obj-$(CONFIG_CMD_FPGA) += fpga.o > obj-$(CONFIG_CMD_FPGAD) += fpgad.o > obj-$(CONFIG_CMD_FS_GENERIC) += fs.o > obj-$(CONFIG_CMD_FUSE) += fuse.o > +obj-$(CONFIG_CMD_FWU_METADATA) += fwu_mdata.o > obj-$(CONFIG_CMD_GETTIME) += gettime.o > obj-$(CONFIG_CMD_GPIO) += gpio.o > obj-$(CONFIG_CMD_HVC) += smccc.o > diff --git a/cmd/fwu_mdata.c b/cmd/fwu_mdata.c > new file mode 100644 > index 00..bc20ca26a3 > --- /dev/null > +++ b/cmd/fwu_mdata.c > @@ -0,0 +1,74 @@ > +/* SPDX-License-Identifier: GPL-2.0+ */ > +/* > + * Copyright (c) 2022, Linaro Limited > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > + > +static void print_mdata(struct fwu_mdata *mdata) > +{ > + int i, j; > + struct fwu_image_entry *img_entry; > + struct fwu_image_bank_info *img_info; > + u32 nimages, nbanks; nit but we don't really need those two. Just use the define. > + > + printf("\tFWU Metadata\n"); > + printf("crc32: %#x\n", mdata->crc32); > + printf("version: %#x\n", mdata->version); > + printf("active_index: %#x\n", mdata->active_index); > + printf("previous_active_index: %#x\n", mdata->previous_active_index); > + > + nimages = CONFIG_FWU_NUM_IMAGES_PER_BANK; > + nbanks = CONFIG_FWU_NUM_BANKS; > + printf("\tImage Info\n"); > + for (i = 0; i < nimages; i++) { > + img_entry = >img_entry[i]; > + printf("\nImage Type Guid: %pUL\n", > _entry->image_type_uuid); > + printf("Location Guid: %pUL\n", _entry->location_uuid); > + for (j = 0; j < nbanks; j++) { > + img_info = _entry->img_bank_info[j]; > + printf("Image Guid: %pUL\n", _info->image_uuid); > + printf("Image Acceptance: %#x\n", img_info->accepted); Can we do 'yes/no' on the image acceptance please? > + } > + } > +} > + > +int do_fwu_mdata_read(struct cmd_tbl *cmdtp, int flag, > + int argc, char * const argv[]) > +{ > + struct udevice *dev; > + int ret = CMD_RET_SUCCESS; > + struct fwu_mdata *mdata = NULL; > + > + if (uclass_get_device(UCLASS_FWU_MDATA, 0, ) || !dev) { > + log_err("Unable to get FWU metadata device\n"); > + return CMD_RET_FAILURE; > + } > + > + ret = fwu_get_mdata(); > + if (ret < 0) { > + log_err("Unable to get valid FWU metadata\n"); > + ret = CMD_RET_FAILURE; > + goto out; > + } > + > + print_mdata(mdata); > + > +out: > + free(mdata); > + return ret; > +} > + > +U_BOOT_CMD( > + fwu_mdata_read, 1, 1, do_fwu_mdata_read, > + "Read and print FWU metadata", > + "" > +); > -- > 2.25.1 > Regards /Ilias
Re: [EXT] RE: [PATCH] i.MX8M: crypto: disable JR0 in SPL, U-Boot
Hi Gaurav, On Fri, Jun 10, 2022 at 8:51 AM Gaurav Jain wrote: > > Hi Fabio > > I can not see the patch in my mails. > Can you include me using my mail id. I added your email, when submitting: http://lists.infradead.org/pipermail/linux-arm-kernel/2022-June/749625.html Regards, Fabio Estevam
Re: [PATCH v5 07/23] FWU: STM32MP1: Add support to read boot index from backup register
That's looks ok to me, but I'd rather ST people to have a look On Thu, 9 Jun 2022 at 15:31, Sughosh Ganu wrote: > > The FWU Multi Bank Update feature allows the platform to boot the > firmware images from one of the partitions(banks). The first stage > bootloader(fsbl) passes the value of the boot index, i.e. the bank > from which the firmware images were booted from to U-Boot. On the > STM32MP157C-DK2 board, this value is passed through one of the SoC's > backup register. Add a function to read the boot index value from the > backup register. > > Signed-off-by: Sughosh Ganu > --- > arch/arm/mach-stm32mp/include/mach/stm32.h | 4 > board/st/stm32mp1/stm32mp1.c | 7 +++ > include/fwu.h | 2 +- > 3 files changed, 12 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/mach-stm32mp/include/mach/stm32.h > b/arch/arm/mach-stm32mp/include/mach/stm32.h > index 47e88fc3dc..40995ee142 100644 > --- a/arch/arm/mach-stm32mp/include/mach/stm32.h > +++ b/arch/arm/mach-stm32mp/include/mach/stm32.h > @@ -100,6 +100,7 @@ enum boot_device { > #define TAMP_BACKUP_REGISTER(x)(STM32_TAMP_BASE + 0x100 + 4 > * x) > #define TAMP_BACKUP_MAGIC_NUMBER TAMP_BACKUP_REGISTER(4) > #define TAMP_BACKUP_BRANCH_ADDRESS TAMP_BACKUP_REGISTER(5) > +#define TAMP_FWU_BOOT_INFO_REG TAMP_BACKUP_REGISTER(10) > #define TAMP_COPRO_RSC_TBL_ADDRESS TAMP_BACKUP_REGISTER(17) > #define TAMP_COPRO_STATE TAMP_BACKUP_REGISTER(18) > #define TAMP_BOOT_CONTEXT TAMP_BACKUP_REGISTER(20) > @@ -118,6 +119,9 @@ enum boot_device { > #define TAMP_BOOT_INSTANCE_MASKGENMASK(3, 0) > #define TAMP_BOOT_FORCED_MASK GENMASK(7, 0) > #define TAMP_BOOT_DEBUG_ON BIT(16) > +#define TAMP_FWU_BOOT_IDX_MASK GENMASK(3, 0) > + > +#define TAMP_FWU_BOOT_IDX_OFFSET 0 > > enum forced_boot_mode { > BOOT_NORMAL = 0x00, > diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c > index e68bf09955..dff41ed6f6 100644 > --- a/board/st/stm32mp1/stm32mp1.c > +++ b/board/st/stm32mp1/stm32mp1.c > @@ -1081,4 +1081,11 @@ int fwu_plat_get_update_index(u32 *update_idx) > return ret; > } > > +void fwu_plat_get_bootidx(void *boot_idx) > +{ > + u32 *bootidx = boot_idx; > + > + *bootidx = (readl(TAMP_FWU_BOOT_INFO_REG) >> > + TAMP_FWU_BOOT_IDX_OFFSET) & TAMP_FWU_BOOT_IDX_MASK; > +} > #endif /* CONFIG_FWU_MULTI_BANK_UPDATE */ > diff --git a/include/fwu.h b/include/fwu.h > index 36e58afa29..41774ff9e2 100644 > --- a/include/fwu.h > +++ b/include/fwu.h > @@ -46,7 +46,7 @@ int fwu_revert_boot_index(void); > int fwu_accept_image(efi_guid_t *img_type_id, u32 bank); > int fwu_clear_accept_image(efi_guid_t *img_type_id, u32 bank); > > - > +void fwu_plat_get_bootidx(void *boot_idx); > int fwu_plat_get_alt_num(struct udevice *dev, efi_guid_t *image_guid, > int *alt_num); > int fwu_plat_get_update_index(u32 *update_idx); > -- > 2.25.1 > Acked-by: Ilias Apalodimas
Re: [PATCH v5 06/23] FWU: stm32mp1: Add helper functions for accessing FWU metadata
Hi Sughosh, On Thu, Jun 09, 2022 at 05:59:53PM +0530, Sughosh Ganu wrote: > Add helper functions needed for accessing the FWU metadata which > contains information on the updatable images. These functions have > been added for the STM32MP157C-DK2 board which has the updatable > images on the uSD card, formatted as GPT partitions. > > Signed-off-by: Sughosh Ganu > --- > board/st/stm32mp1/stm32mp1.c | 115 +++ > include/fwu.h| 2 + > 2 files changed, 117 insertions(+) > > diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c > index 62d98ad776..e68bf09955 100644 > --- a/board/st/stm32mp1/stm32mp1.c > +++ b/board/st/stm32mp1/stm32mp1.c > @@ -7,9 +7,11 @@ > > #include > #include > +#include > #include > #include > #include > +#include > #include > #include > #include > @@ -25,9 +27,11 @@ > #include > #include > #include > +#include > #include > #include > #include > +#include > #include > #include > #include > @@ -967,3 +971,114 @@ static void board_copro_image_process(ulong fw_image, > size_t fw_size) > } > > U_BOOT_FIT_LOADABLE_HANDLER(IH_TYPE_COPRO, board_copro_image_process); > + > +#if defined(CONFIG_FWU_MULTI_BANK_UPDATE) > +#include > +#include > + > +static int get_gpt_dfu_identifier(struct blk_desc *desc, efi_guid_t > *image_guid) > +{ > + int i; > + struct disk_partition info; > + efi_guid_t unique_part_guid; > + > + for (i = 1; i < MAX_SEARCH_PARTITIONS; i++) { > + if (part_get_info(desc, i, )) > + continue; > + uuid_str_to_bin(info.uuid, unique_part_guid.b, > + UUID_STR_FORMAT_GUID); > + > + if (!guidcmp(_part_guid, image_guid)) > + return i; > + } > + > + log_err("No partition found with image_guid %pUs\n", image_guid); > + return -ENOENT; > +} > + > +static int gpt_plat_get_alt_num(struct blk_desc *desc, efi_guid_t > *image_guid, > + int *alt_num) Does this really need to be defined per platform? Most of the stuff in here are generic apart from the info of were the metadata is stored. So wouldn't it better to move this in the generic API and add an argument for the dfu device type? The platform portion would then just call this function with an extra arg e.g DFU_DEV_MMC > +{ > + int ret = -1; > + int i, part, dev_num; > + int nalt; > + struct dfu_entity *dfu; > + > + dev_num = desc->devnum; > + part = get_gpt_dfu_identifier(desc, image_guid); > + if (part < 0) > + return -ENOENT; > + > + dfu_init_env_entities(NULL, NULL); [...] Regards /Ilias
RE: [EXT] RE: [PATCH] i.MX8M: crypto: disable JR0 in SPL, U-Boot
Hi Fabio I can not see the patch in my mails. Can you include me using my mail id. Regards Gaurav Jain > -Original Message- > From: Fabio Estevam > Sent: Friday, June 10, 2022 1:36 AM > To: Gaurav Jain > Cc: ZHIZHIKIN Andrey ; u- > b...@lists.denx.de; Stefano Babic ; Tommaso Merciai > ; Michael Trimarchi > ; Marek Vasut ; Simon > Glass ; Patrick Delaunay ; > Stefan Roese ; Horia Geanta ; Pankaj > Gupta ; Varun Sethi ; Ye Li > ; Michael Walle ; dl-uboot-imx i...@nxp.com> > Subject: Re: [EXT] RE: [PATCH] i.MX8M: crypto: disable JR0 in SPL, U-Boot > > Caution: EXT Email > > Hi Gaurav, > > On Thu, Jun 9, 2022 at 10:12 AM Gaurav Jain wrote: > > > > I suggest that this is submitted into Kernel, and then picked up > > > during the next DTB re-sync. > > > > Ok. Fabio has already submitted a patch for this. > > Yes, if you have a chance please send your Tested-by or Reviewed-by to that > patch. > > Thanks
Re: [PATCH] crypto: fsl_hash: Remove unnecessary alignment check in, caam_hash()
Hi Michal, On Fri, Jun 10, 2022 at 7:02 AM Michal Vokáč wrote: > Hi Fabio, > I had the very same problem/error on i.MX6 and figured out that > CONFIG_ARCH_MISC_INIT=y must be enabled otherwise the caam_jr driver > is not initialized. Yes, correct. There is a patch from Gaurav to address this: https://lists.denx.de/pipermail/u-boot/2022-June/485959.html > Hash algo:sha256 > Hash value: > 13e0b23bd49f9e86a0425080fc788db67bf318d6f103f217d5705a455737e91c > Verifying Hash Integrity ... sha256CACHE: Misaligned operation at range > [122c4604, 122ce684] > + OK > Loading fdt from 0x122c4604 to 0x1800 > Booting using the fdt blob at 0x1800 > Loading Kernel Image > Using Device Tree in place at 1800, end 1800d04d On a imx6sabresd the board simply hangs in SPL, when CONFIG_IMX_HAB=y: https://lists.denx.de/pipermail/u-boot/2022-June/485993.html Does your board use SPL? Regards, Fabio Estevam
Re: imx8m(n): garbage on serial line
Hi Heiko, On Fri, Jun 10, 2022 at 7:29 AM Heiko Thiery wrote: > > Hi, > > I just rebased my pending patch for adding support for the NXP imx8mn > ddr3l evk board. When applying on the current master I see some > garbage on the serial input. > > Can anyone confirm that behavior or is it just here? > > U-Boot 2022.07-rc4-00011-gacd4e97ae6 (Jun 10 2022 - 09:46:24 +0200) > > CPU: Freescale i.MX8MNano UltraLite Quad rev1.0 at 1200 MHz > Reset cause: WDOG > Model: NXP i.MX8MNano DDR3L EVK board > DRAM: 1 GiB > Core: 140 devices, 18 uclasses, devicetree: separate > WDT: Started watchdog@3028 with servicing (60s timeout) > MMC: FSL_SDHC: 1, FSL_SDHC: 2 > Loading Environment from MMC... OK > In:serial > Out: serial > Err: serial > Net: eth0: ethernet@30be > Hit any key to stop autoboot: 0 > u-boot=> [25;88R > Unknown command '[25' - try 'help' > Unknown command '88R' - try 'help' > u-boot=> > Unknown command '[25' - try 'help' > Unknown command '88R' - try 'help' > u-boot=> Yes, I see the same on the Kontron i.MX8MM N801X S board: U-Boot 2022.07-rc3 (Jun 07 2022 - 22:29:02 +) CPU: Freescale i.MX8MMQ rev1.0 1600 MHz (running at 1200 MHz) CPU: Industrial temperature grade (-40C to 105C) at 50C Reset cause: POR Model: Kontron i.MX8MM N801X S DRAM: 4 GiB Core: 177 devices, 27 uclasses, devicetree: separate WDT: Not starting watchdog@3028 MMC: FSL_SDHC: 0, FSL_SDHC: 1 Loading Environment from MMC... OK In:serial Out: serial Err: serial SEC0: RNG instantiated Net: Could not get PHY for FEC0: addr 0 No ethernet found. Hit any key to stop autoboot: 0 => [55;203R Unknown command '[55' - try 'help' Unknown command '203R' - try 'help' I haven't had a chance to debug/bisect it yet. Regards, Fabio Estevam
[PATCH] intel: n5x: ddr: update license
From: Tien Fong Chee All the source code of sdram_n5x.c are from Intel, update the license to use both GPL2.0 and BSD-3 Clause because this copy of code may used for open source and internal project. Signed-off-by: Tien Fong Chee --- drivers/ddr/altera/sdram_n5x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ddr/altera/sdram_n5x.c b/drivers/ddr/altera/sdram_n5x.c index ac13ac4319..737a4e2ff1 100644 --- a/drivers/ddr/altera/sdram_n5x.c +++ b/drivers/ddr/altera/sdram_n5x.c @@ -1,6 +1,6 @@ -// SPDX-License-Identifier: GPL-2.0 +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation * */ -- 2.19.0
Re: [PATCH 0/5] spl: binman: Fixes for BINMAN_SYMBOLS
On 6/10/22 12:58, Alper Nebi Yasak wrote: There's some trouble with an i.MX8M series [1] trying to use binman symbols. The crux of it is the 'u_boot_any' symbols BINMAN_SYMBOLS configs declare, and the boards creating partial binman images including an SPL without a U-Boot the symbol is referring to. Nice ! Thanks !
Re: [SPAM] Boot regression on am335x-hs-evm
El Fri, Jun 10, 2022 at 11:59:23AM +0200, LABBE Corentin deia: > --- a/drivers/core/lists.c > +++ b/drivers/core/lists.c > @@ -20,6 +20,10 @@ > #include > #include > > +static int _errorcount; > +int errorlist[1024]; > +int errorcount; > + > struct driver *lists_driver_lookup_name(const char *name) > { > struct driver *drv = > @@ -120,8 +124,9 @@ int lists_bind_drivers(struct udevice *parent, bool > pre_reloc_only) > int ret; > > ret = bind_drivers_pass(parent, pre_reloc_only); > - if (!ret) > - break; > + errorlist[_errorcount] = ret; > + _errorcount++; > + errorcount = _errorcount; > if (ret != -EAGAIN && !result) > result = ret; > } > > But errorcount is always 0 which is puzzling me since according to my think, > lists_bind_drivers() is ran before secure_boot_verify_image(). > I'm not sure at which point your code is called, but do you have working BSS? README: [...] lowlevel_init(): - no global_data or BSS [...] board_init_f(): [...] - global_data is available - stack is in SRAM - BSS is not available, so you cannot use global/static variables, only stack variables and global_data > Any idea on how to debug further ? > maybe you can add a field to global_data ?
[PATCH 5/5] spl: binman: Add a config option for binman symbols in VPL
The SPL code declares binman symbols for U-Boot phases depending on CONFIG_IS_ENABLED(BINMAN_SYMBOLS). This config exists for SPL and TPL, also add a version for VPL. Signed-off-by: Alper Nebi Yasak --- common/spl/Kconfig.vpl | 12 1 file changed, 12 insertions(+) diff --git a/common/spl/Kconfig.vpl b/common/spl/Kconfig.vpl index ba1ea6075b94..29fa1cf400ba 100644 --- a/common/spl/Kconfig.vpl +++ b/common/spl/Kconfig.vpl @@ -198,4 +198,16 @@ config VPL_TEXT_BASE help The address in memory that VPL will be running from. +config VPL_BINMAN_SYMBOLS + bool "Declare binman symbols for U-Boot phases in VPL" + depends on VPL_FRAMEWORK && BINMAN + default y + help + This enables use of symbols in VPL which refer to U-Boot phases, + enabling VPL to obtain the location and size of its next phase simply + by calling spl_get_image_pos() and spl_get_image_size(). + + For this to work, you must have all U-Boot phases in the same binman + image, so binman can update VPL with the locations of everything. + endmenu -- 2.36.1
[PATCH 4/5] spl: binman: Let u-boot-spl/vpl symbol declarations be disabled
The SPL/TPL_BINMAN_SYMBOLS config only disables the u_boot_any symbol. Extend its #if directive to cover declarations for all phases. Update the Kconfig prompt and help message to make it clearer about this. Signed-off-by: Alper Nebi Yasak --- common/spl/Kconfig | 12 ++-- common/spl/Kconfig.tpl | 12 ++-- common/spl/spl.c | 3 ++- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 2ad2351c6eb3..f32548b8c9a7 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -186,16 +186,16 @@ config SPL_SHOW_ERRORS This adds a small amount to SPL code size, perhaps 100 bytes. config SPL_BINMAN_SYMBOLS - bool "Declare binman symbols in SPL" + bool "Declare binman symbols for U-Boot phases in SPL" depends on SPL_FRAMEWORK && BINMAN default y help - This enables use of symbols in SPL which refer to U-Boot, enabling SPL - to obtain the location of U-Boot simply by calling spl_get_image_pos() - and spl_get_image_size(). + This enables use of symbols in SPL which refer to U-Boot phases, + enabling SPL to obtain the location and size of its next phase simply + by calling spl_get_image_pos() and spl_get_image_size(). - For this to work, you must have a U-Boot image in the binman image, so - binman can update SPL with the location of it. + For this to work, you must have all U-Boot phases in the same binman + image, so binman can update SPL with the locations of everything. source "common/spl/Kconfig.nxp" diff --git a/common/spl/Kconfig.tpl b/common/spl/Kconfig.tpl index 834cb6b6dd82..3a97487c9983 100644 --- a/common/spl/Kconfig.tpl +++ b/common/spl/Kconfig.tpl @@ -9,16 +9,16 @@ config TPL_SIZE_LIMIT If this value is zero, it is ignored. config TPL_BINMAN_SYMBOLS - bool "Declare binman symbols in TPL" + bool "Declare binman symbols for U-Boot phases in TPL" depends on TPL_FRAMEWORK && BINMAN default y help - This enables use of symbols in TPL which refer to U-Boot, enabling TPL - to obtain the location of U-Boot simply by calling spl_get_image_pos() - and spl_get_image_size(). + This enables use of symbols in TPL which refer to U-Boot phases, + enabling TPL to obtain the location and size of its next phase simply + by calling spl_get_image_pos() and spl_get_image_size(). - For this to work, you must have a U-Boot image in the binman image, so - binman can update TPL with the location of it. + For this to work, you must have all U-Boot phases in the same binman + image, so binman can update TPL with the locations of everything. config TPL_FRAMEWORK bool "Support TPL based upon the common SPL framework" diff --git a/common/spl/spl.c b/common/spl/spl.c index 5630dcdb5c1e..4579289f9d83 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -55,7 +55,6 @@ u32 *boot_params_ptr = NULL; /* See spl.h for information about this */ binman_sym_declare(ulong, u_boot_any, image_pos); binman_sym_declare(ulong, u_boot_any, size); -#endif #ifdef CONFIG_TPL binman_sym_declare(ulong, u_boot_spl, image_pos); @@ -67,6 +66,8 @@ binman_sym_declare(ulong, u_boot_vpl, image_pos); binman_sym_declare(ulong, u_boot_vpl, size); #endif +#endif /* BINMAN_SYMBOLS */ + /* Define board data structure */ static struct bd_info bdata __attribute__ ((section(".data"))); -- 2.36.1
[PATCH 3/5] spl: binman: Declare extern symbols for VPL as well
The binman extern symbol declarations in spl.h are missing the VPL symbols recently added to spl.c, add them like the others. Signed-off-by: Alper Nebi Yasak --- include/spl.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/spl.h b/include/spl.h index 83ac583e0b49..1778e0f53686 100644 --- a/include/spl.h +++ b/include/spl.h @@ -288,6 +288,8 @@ binman_sym_extern(ulong, u_boot_any, image_pos); binman_sym_extern(ulong, u_boot_any, size); binman_sym_extern(ulong, u_boot_spl, image_pos); binman_sym_extern(ulong, u_boot_spl, size); +binman_sym_extern(ulong, u_boot_vpl, image_pos); +binman_sym_extern(ulong, u_boot_vpl, size); /** * spl_get_image_pos() - get the image position of the next phase -- 2.36.1
[PATCH 2/5] spl: binman: Make TPL_BINMAN_SYMBOLS depend on TPL_FRAMEWORK
TPL_BINMAN_SYMBOLS depends on SPL_FRAMEWORK. The code this enables is compiled by checking CONFIG_$(SPL_TPL_)FRAMEWORK, so it should depend on TPL_FRAMEWORK instead (which in turn depends on SPL_FRAMEWORK). This was most likely a typo due to copy-pasting the config's SPL version, fix it. Signed-off-by: Alper Nebi Yasak --- common/spl/Kconfig.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/spl/Kconfig.tpl b/common/spl/Kconfig.tpl index 9a0e719cf949..834cb6b6dd82 100644 --- a/common/spl/Kconfig.tpl +++ b/common/spl/Kconfig.tpl @@ -10,7 +10,7 @@ config TPL_SIZE_LIMIT config TPL_BINMAN_SYMBOLS bool "Declare binman symbols in TPL" - depends on SPL_FRAMEWORK && BINMAN + depends on TPL_FRAMEWORK && BINMAN default y help This enables use of symbols in TPL which refer to U-Boot, enabling TPL -- 2.36.1
[PATCH 1/5] spl: binman: Fix use of undeclared u_boot_any symbols
Some SPL functions directly use the binman 'u_boot_any' symbols to get U-Boot's binman image position. These symbols are declared by the SPL/TPL_BINMAN_SYMBOLS configs, but they are accessed by macros defined by just CONFIG_BINMAN. So when BINMAN is enabled and BINMAN_SYMBOLS is disabled, the code tries to use undeclared symbols and we get an error. Therefore, any use of 'u_boot_any' symbols in the code is an implicit dependency on SPL/TPL_BINMAN_SYMBOLS. However, in the current uses they are meant to be the next phase's values, where that happens to be U-Boot. In the meantime, helper funcions spl_get_image_pos/size() were introduced to get these values. Convert all uses of u_boot_any symbols to these functions, so we only access these symbols at one place. Make sure they will not use these symbols when the BINMAN_SYMBOLS configs are disabled, by returning early in those cases. Signed-off-by: Alper Nebi Yasak --- common/spl/spl.c | 10 +++--- common/spl/spl_ram.c | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index 2a69a7c9324d..5630dcdb5c1e 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -149,9 +149,11 @@ void spl_fixup_fdt(void *fdt_blob) #endif } -#if CONFIG_IS_ENABLED(BINMAN_SYMBOLS) ulong spl_get_image_pos(void) { + if (!CONFIG_IS_ENABLED(BINMAN_SYMBOLS)) + return BINMAN_SYM_MISSING; + #ifdef CONFIG_VPL if (spl_next_phase() == PHASE_VPL) return binman_sym(ulong, u_boot_vpl, image_pos); @@ -163,6 +165,9 @@ ulong spl_get_image_pos(void) ulong spl_get_image_size(void) { + if (!CONFIG_IS_ENABLED(BINMAN_SYMBOLS)) + return BINMAN_SYM_MISSING; + #ifdef CONFIG_VPL if (spl_next_phase() == PHASE_VPL) return binman_sym(ulong, u_boot_vpl, size); @@ -171,7 +176,6 @@ ulong spl_get_image_size(void) binman_sym(ulong, u_boot_spl, size) : binman_sym(ulong, u_boot_any, size); } -#endif /* BINMAN_SYMBOLS */ ulong spl_get_image_text_base(void) { @@ -222,7 +226,7 @@ __weak struct image_header *spl_get_load_buffer(ssize_t offset, size_t size) void spl_set_header_raw_uboot(struct spl_image_info *spl_image) { - ulong u_boot_pos = binman_sym(ulong, u_boot_any, image_pos); + ulong u_boot_pos = spl_get_image_pos(); spl_image->size = CONFIG_SYS_MONITOR_LEN; diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c index 829645925718..d64710878cf2 100644 --- a/common/spl/spl_ram.c +++ b/common/spl/spl_ram.c @@ -70,7 +70,7 @@ static int spl_ram_load_image(struct spl_image_info *spl_image, load.read = spl_ram_load_read; spl_load_simple_fit(spl_image, , 0, header); } else { - ulong u_boot_pos = binman_sym(ulong, u_boot_any, image_pos); + ulong u_boot_pos = spl_get_image_pos(); debug("Legacy image\n"); /* -- 2.36.1
[PATCH 0/5] spl: binman: Fixes for BINMAN_SYMBOLS
There's some trouble with an i.MX8M series [1] trying to use binman symbols. The crux of it is the 'u_boot_any' symbols BINMAN_SYMBOLS configs declare, and the boards creating partial binman images including an SPL without a U-Boot the symbol is referring to. Normally this should be easy to resolve by disabling BINMAN_SYMBOLS configs, but that causes a build error. Apparently some parts of the SPL code (RAW_IMAGE_SUPPORT, RAM_DEVICE) use the symbols directly without guarding them by BINMAN_SYMBOLS, implicitly requiring it. The first patch fixes the issue above, the rest are minor things I tinkered with while trying to understand the issue. These apply onto u-boot/next. I have also triggered an Azure CI run [2] via a Github pull request. [1] arm64: binman: use binman symbols for imx https://lore.kernel.org/u-boot/20220603071715.15212-1-peng@oss.nxp.com/ [2] #20220610.3 spl: binman: Fixes for BINMAN_SYMBOLS https://dev.azure.com/u-boot/u-boot/_build/results?buildId=4431=results Alper Nebi Yasak (5): spl: binman: Fix use of undeclared u_boot_any symbols spl: binman: Make TPL_BINMAN_SYMBOLS depend on TPL_FRAMEWORK spl: binman: Declare extern symbols for VPL as well spl: binman: Let u-boot-spl/vpl symbol declarations be disabled spl: binman: Add a config option for binman symbols in VPL common/spl/Kconfig | 12 ++-- common/spl/Kconfig.tpl | 14 +++--- common/spl/Kconfig.vpl | 12 common/spl/spl.c | 13 + common/spl/spl_ram.c | 2 +- include/spl.h | 2 ++ 6 files changed, 37 insertions(+), 18 deletions(-) -- 2.36.1
imx8m(n): garbage on serial line
Hi, I just rebased my pending patch for adding support for the NXP imx8mn ddr3l evk board. When applying on the current master I see some garbage on the serial input. Can anyone confirm that behavior or is it just here? U-Boot 2022.07-rc4-00011-gacd4e97ae6 (Jun 10 2022 - 09:46:24 +0200) CPU: Freescale i.MX8MNano UltraLite Quad rev1.0 at 1200 MHz Reset cause: WDOG Model: NXP i.MX8MNano DDR3L EVK board DRAM: 1 GiB Core: 140 devices, 18 uclasses, devicetree: separate WDT: Started watchdog@3028 with servicing (60s timeout) MMC: FSL_SDHC: 1, FSL_SDHC: 2 Loading Environment from MMC... OK In:serial Out: serial Err: serial Net: eth0: ethernet@30be Hit any key to stop autoboot: 0 u-boot=> [25;88R Unknown command '[25' - try 'help' Unknown command '88R' - try 'help' u-boot=> Unknown command '[25' - try 'help' Unknown command '88R' - try 'help' u-boot=> Thanks -- Heiko
Boot regression on am335x-hs-evm
Hello I hit a boot regression on am335x-hs-evm. On current uboot, the board does not boot at all. This board uses both MLO and u-boot.img and only MLO was the problem. After a bisect, I found that e41651fffda7 ("dm: Support parent devices with of-platdata") was the problem. Reverting this patch lead to a success boot. I cutdown the revert to a minimal fix: --- a/drivers/core/lists.c +++ b/drivers/core/lists.c @@ -120,6 +120,7 @@ int lists_bind_drivers(struct udevice *parent, bool pre_reloc_only) int ret; ret = bind_drivers_pass(parent, pre_reloc_only); + return ret; if (!ret) break; if (ret != -EAGAIN && !result) I cannot debug further since printf() is not working at this stage. Since I wanted to know which error was badly handled, I tried to do this: --- a/arch/arm/mach-omap2/sec-common.c +++ b/arch/arm/mach-omap2/sec-common.c @@ -111,6 +111,8 @@ static u32 find_sig_start(char *image, size_t size) return 0; } +extern int errorcount; + int secure_boot_verify_image(void **image, size_t *size) { int result = 1; @@ -178,6 +180,7 @@ auth_exit: * via YMODEM. This is done to avoid disturbing the YMODEM serial * protocol transactions. */ + printf("ERRORCOUNT %d\n", errorcount); if (!(IS_ENABLED(CONFIG_SPL_BUILD) && IS_ENABLED(CONFIG_SPL_YMODEM_SUPPORT) && spl_boot_device() == BOOT_DEVICE_UART)) --- a/drivers/core/lists.c +++ b/drivers/core/lists.c @@ -20,6 +20,10 @@ #include #include +static int _errorcount; +int errorlist[1024]; +int errorcount; + struct driver *lists_driver_lookup_name(const char *name) { struct driver *drv = @@ -120,8 +124,9 @@ int lists_bind_drivers(struct udevice *parent, bool pre_reloc_only) int ret; ret = bind_drivers_pass(parent, pre_reloc_only); - if (!ret) - break; + errorlist[_errorcount] = ret; + _errorcount++; + errorcount = _errorcount; if (ret != -EAGAIN && !result) result = ret; } But errorcount is always 0 which is puzzling me since according to my think, lists_bind_drivers() is ran before secure_boot_verify_image(). Any idea on how to debug further ? Thanks Regards