* [PATCH 1/2] imx: bootaux: Fix build warning when LTO is enabled
@ 2023-01-04 19:02 Philippe Schenker
2023-01-04 19:02 ` [PATCH 2/2] configs: verdin-imx8mm: Add bootaux command Philippe Schenker
0 siblings, 1 reply; 3+ messages in thread
From: Philippe Schenker @ 2023-01-04 19:02 UTC (permalink / raw)
To: u-boot
Cc: Francesco Dolcini, Philippe Schenker, Fabio Estevam,
NXP i.MX U-Boot Team, Stefano Babic
From: Francesco Dolcini <francesco.dolcini@toradex.com>
Fix conflicting declaration of hostmap[] variable. When building with
CONFIG_LTO=y we get the following warning:
KSLCC keep-syms-lto.o
LTO u-boot
arch/arm/mach-imx/imx_bootaux.c:24:31: warning: type of ‘hostmap’ does not match original declaration [-Wlto-type-mismatch]
24 | const __weak struct rproc_att hostmap[] = { };
| ^
arch/arm/mach-imx/imx8m/soc.c:1590:24: note: array types have different bounds
1590 | const struct rproc_att hostmap[] = {
| ^
arch/arm/mach-imx/imx8m/soc.c:1590:24: note: ‘hostmap’ was previously declared here
OBJCOPY u-boot.srec
OBJCOPY u-boot-nodtb.bin
Just remove the __weak declaration and add an extern, in any case this
variable is supposed to be declared in the SOC file and there is no way
to have imx_bootaux build with this variable not declared.
In addition to that the weak variable definition is not correct,
get_host_mapping() will just reference non initialized data, if ever now
will have a build error instead of undefined behavior at runtime.
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
---
arch/arm/mach-imx/imx_bootaux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-imx/imx_bootaux.c b/arch/arm/mach-imx/imx_bootaux.c
index 8115bf40f1a9..6c00ef6007e7 100644
--- a/arch/arm/mach-imx/imx_bootaux.c
+++ b/arch/arm/mach-imx/imx_bootaux.c
@@ -21,7 +21,7 @@
#define SRC_M4_REG_OFFSET 0
#endif
-const __weak struct rproc_att hostmap[] = { };
+extern const struct rproc_att hostmap[];
static const struct rproc_att *get_host_mapping(unsigned long auxcore)
{
--
2.39.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 2/2] configs: verdin-imx8mm: Add bootaux command
2023-01-04 19:02 [PATCH 1/2] imx: bootaux: Fix build warning when LTO is enabled Philippe Schenker
@ 2023-01-04 19:02 ` Philippe Schenker
2023-01-31 9:49 ` sbabic
0 siblings, 1 reply; 3+ messages in thread
From: Philippe Schenker @ 2023-01-04 19:02 UTC (permalink / raw)
To: u-boot; +Cc: Philippe Schenker, Marcel Ziswiler
From: Philippe Schenker <philippe.schenker@toradex.com>
The i.MX 8M Mini SoC does incorporate an additional M-Core. To be able
to load it with a firmware, enable bootaux command as other Toradex
modules also have it enabled to be consistent.
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
---
configs/verdin-imx8mm_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/configs/verdin-imx8mm_defconfig b/configs/verdin-imx8mm_defconfig
index 62f85883cb2d..5b5f7c051e54 100644
--- a/configs/verdin-imx8mm_defconfig
+++ b/configs/verdin-imx8mm_defconfig
@@ -16,6 +16,7 @@ CONFIG_SPL_MMC=y
CONFIG_SPL_SERIAL=y
CONFIG_SPL_DRIVERS_MISC=y
CONFIG_SPL=y
+CONFIG_IMX_BOOTAUX=y
CONFIG_SYS_LOAD_ADDR=0x48200000
CONFIG_SYS_MEMTEST_START=0x40000000
CONFIG_SYS_MEMTEST_END=0x80000000
--
2.39.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] configs: verdin-imx8mm: Add bootaux command
2023-01-04 19:02 ` [PATCH 2/2] configs: verdin-imx8mm: Add bootaux command Philippe Schenker
@ 2023-01-31 9:49 ` sbabic
0 siblings, 0 replies; 3+ messages in thread
From: sbabic @ 2023-01-31 9:49 UTC (permalink / raw)
To: Philippe Schenker, u-boot
> From: Philippe Schenker <philippe.schenker@toradex.com>
> The i.MX 8M Mini SoC does incorporate an additional M-Core. To be able
> to load it with a firmware, enable bootaux command as other Toradex
> modules also have it enabled to be consistent.
> Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-31 9:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-04 19:02 [PATCH 1/2] imx: bootaux: Fix build warning when LTO is enabled Philippe Schenker
2023-01-04 19:02 ` [PATCH 2/2] configs: verdin-imx8mm: Add bootaux command Philippe Schenker
2023-01-31 9:49 ` sbabic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox