From 9d3d981661000d8496d3b7836f3bd55d6534dd05 Mon Sep 17 00:00:00 2001 From: Alistair Delva Date: Wed, 20 Oct 2021 21:31:32 +0000 Subject: [PATCH 1/8] arm64: relocate-rela: Add support for ld.lld Cap end of relocations by the binary size. Linkers like to insert some auxiliary sections between .rela.dyn and .bss_start. These sections don't make their way to the final binary, but reloc_rela still tries to relocate them, resulting in attempted read past the end of file. When linking U-Boot with ld.lld, the STATIC_RELA feature (enabled by default on arm64) breaks the build. After this patch, U-Boot can be linked successfully with and without CONFIG_STATIC_RELA. Originally-from: Elena Petrova Signed-off-by: Alistair Delva Cc: David Brazdil Cc: Scott Wood Cc: Tom Rini --- tools/relocate-rela.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/tools/relocate-rela.c b/tools/relocate-rela.c index 6a524014b7..f0bc548617 100644 --- a/tools/relocate-rela.c +++ b/tools/relocate-rela.c @@ -63,7 +63,7 @@ int main(int argc, char **argv) { FILE *f; int i, num; - uint64_t rela_start, rela_end, text_base; + uint64_t rela_start, rela_end, text_base, file_size; if (argc != 5) { fprintf(stderr, "Statically apply ELF rela relocations\n"); @@ -87,8 +87,7 @@ int main(int argc, char **argv) return 3; } - if (rela_start > rela_end || rela_start < text_base || - (rela_end - rela_start) % sizeof(Elf64_Rela)) { + if (rela_start > rela_end || rela_start < text_base) { fprintf(stderr, "%s: bad rela bounds\n", argv[0]); return 3; } @@ -96,6 +95,21 @@ int main(int argc, char **argv) rela_start -= text_base; rela_end -= text_base; + fseek(f, 0, SEEK_END); + file_size = ftell(f); + rewind(f); + + if (rela_end > file_size) { + // Most likely compiler inserted some section that didn't get + // objcopy-ed into the final binary + rela_end = file_size; + } + + if ((rela_end - rela_start) % sizeof(Elf64_Rela)) { + fprintf(stderr, "%s: rela size isn't a multiple of Elf64_Rela\n", argv[0]); + return 3; + } + num = (rela_end - rela_start) / sizeof(Elf64_Rela); for (i = 0; i < num; i++) { From 679530c3c6ac99bc4da4dbf73a8e169bc9654e5b Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 2 Nov 2021 11:36:45 +0100 Subject: [PATCH 2/8] board: rename "tqc" vendor to "tq" The subdivision name "TQ Components" hasn't been in use for a long time. Rename the vendor directory to "tq", which also matches our Device Tree vendor prefix. Signed-off-by: Matthias Schiffer --- arch/arm/mach-imx/mx6/Kconfig | 2 +- board/{tqc => tq}/tqma6/Kconfig | 8 ++++---- board/{tqc => tq}/tqma6/MAINTAINERS | 2 +- board/{tqc => tq}/tqma6/Makefile | 0 board/{tqc => tq}/tqma6/README | 0 board/{tqc => tq}/tqma6/clocks.cfg | 0 board/{tqc => tq}/tqma6/tqma6.c | 0 board/{tqc => tq}/tqma6/tqma6_bb.h | 0 board/{tqc => tq}/tqma6/tqma6_mba6.c | 0 board/{tqc => tq}/tqma6/tqma6_wru4.c | 0 board/{tqc => tq}/tqma6/tqma6dl.cfg | 0 board/{tqc => tq}/tqma6/tqma6q.cfg | 0 board/{tqc => tq}/tqma6/tqma6s.cfg | 0 13 files changed, 6 insertions(+), 6 deletions(-) rename board/{tqc => tq}/tqma6/Kconfig (90%) rename board/{tqc => tq}/tqma6/MAINTAINERS (87%) rename board/{tqc => tq}/tqma6/Makefile (100%) rename board/{tqc => tq}/tqma6/README (100%) rename board/{tqc => tq}/tqma6/clocks.cfg (100%) rename board/{tqc => tq}/tqma6/tqma6.c (100%) rename board/{tqc => tq}/tqma6/tqma6_bb.h (100%) rename board/{tqc => tq}/tqma6/tqma6_mba6.c (100%) rename board/{tqc => tq}/tqma6/tqma6_wru4.c (100%) rename board/{tqc => tq}/tqma6/tqma6dl.cfg (100%) rename board/{tqc => tq}/tqma6/tqma6q.cfg (100%) rename board/{tqc => tq}/tqma6/tqma6s.cfg (100%) diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig index b4c8511cb8..d701a46cd6 100644 --- a/arch/arm/mach-imx/mx6/Kconfig +++ b/arch/arm/mach-imx/mx6/Kconfig @@ -688,7 +688,7 @@ source "board/somlabs/visionsom-6ull/Kconfig" source "board/technexion/pico-imx6/Kconfig" source "board/technexion/pico-imx6ul/Kconfig" source "board/tbs/tbs2910/Kconfig" -source "board/tqc/tqma6/Kconfig" +source "board/tq/tqma6/Kconfig" source "board/toradex/apalis_imx6/Kconfig" source "board/toradex/colibri_imx6/Kconfig" source "board/toradex/colibri-imx6ull/Kconfig" diff --git a/board/tqc/tqma6/Kconfig b/board/tq/tqma6/Kconfig similarity index 90% rename from board/tqc/tqma6/Kconfig rename to board/tq/tqma6/Kconfig index a2a5905290..cb1b8749ce 100644 --- a/board/tqc/tqma6/Kconfig +++ b/board/tq/tqma6/Kconfig @@ -4,7 +4,7 @@ config SYS_BOARD default "tqma6" config SYS_VENDOR - default "tqc" + default "tq" config SYS_CONFIG_NAME default "tqma6" @@ -89,8 +89,8 @@ config SYS_TEXT_BASE default 0x4fc00000 if TQMA6Q || TQMA6DL config IMX_CONFIG - default "board/tqc/tqma6/tqma6q.cfg" if TQMA6Q - default "board/tqc/tqma6/tqma6dl.cfg" if TQMA6DL - default "board/tqc/tqma6/tqma6s.cfg" if TQMA6S + default "board/tq/tqma6/tqma6q.cfg" if TQMA6Q + default "board/tq/tqma6/tqma6dl.cfg" if TQMA6DL + default "board/tq/tqma6/tqma6s.cfg" if TQMA6S endif diff --git a/board/tqc/tqma6/MAINTAINERS b/board/tq/tqma6/MAINTAINERS similarity index 87% rename from board/tqc/tqma6/MAINTAINERS rename to board/tq/tqma6/MAINTAINERS index 91cd244499..dae719f00b 100644 --- a/board/tqc/tqma6/MAINTAINERS +++ b/board/tq/tqma6/MAINTAINERS @@ -1,6 +1,6 @@ TQ SYSTEMS TQMA6 BOARD M: Markus Niebel S: Maintained -F: board/tqc/tqma6/ +F: board/tq/tqma6/ F: include/configs/tqma6.h F: configs/tqma6*_defconfig diff --git a/board/tqc/tqma6/Makefile b/board/tq/tqma6/Makefile similarity index 100% rename from board/tqc/tqma6/Makefile rename to board/tq/tqma6/Makefile diff --git a/board/tqc/tqma6/README b/board/tq/tqma6/README similarity index 100% rename from board/tqc/tqma6/README rename to board/tq/tqma6/README diff --git a/board/tqc/tqma6/clocks.cfg b/board/tq/tqma6/clocks.cfg similarity index 100% rename from board/tqc/tqma6/clocks.cfg rename to board/tq/tqma6/clocks.cfg diff --git a/board/tqc/tqma6/tqma6.c b/board/tq/tqma6/tqma6.c similarity index 100% rename from board/tqc/tqma6/tqma6.c rename to board/tq/tqma6/tqma6.c diff --git a/board/tqc/tqma6/tqma6_bb.h b/board/tq/tqma6/tqma6_bb.h similarity index 100% rename from board/tqc/tqma6/tqma6_bb.h rename to board/tq/tqma6/tqma6_bb.h diff --git a/board/tqc/tqma6/tqma6_mba6.c b/board/tq/tqma6/tqma6_mba6.c similarity index 100% rename from board/tqc/tqma6/tqma6_mba6.c rename to board/tq/tqma6/tqma6_mba6.c diff --git a/board/tqc/tqma6/tqma6_wru4.c b/board/tq/tqma6/tqma6_wru4.c similarity index 100% rename from board/tqc/tqma6/tqma6_wru4.c rename to board/tq/tqma6/tqma6_wru4.c diff --git a/board/tqc/tqma6/tqma6dl.cfg b/board/tq/tqma6/tqma6dl.cfg similarity index 100% rename from board/tqc/tqma6/tqma6dl.cfg rename to board/tq/tqma6/tqma6dl.cfg diff --git a/board/tqc/tqma6/tqma6q.cfg b/board/tq/tqma6/tqma6q.cfg similarity index 100% rename from board/tqc/tqma6/tqma6q.cfg rename to board/tq/tqma6/tqma6q.cfg diff --git a/board/tqc/tqma6/tqma6s.cfg b/board/tq/tqma6/tqma6s.cfg similarity index 100% rename from board/tqc/tqma6/tqma6s.cfg rename to board/tq/tqma6/tqma6s.cfg From a5e305256b072d9eea97e106df479704f5b4f24f Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 2 Nov 2021 11:36:46 +0100 Subject: [PATCH 3/8] board: tq: fix spelling of "TQ-Systems" "TQ-Systems" is written with a dash. Signed-off-by: Matthias Schiffer --- arch/arm/mach-imx/mx6/Kconfig | 2 +- board/tq/tqma6/MAINTAINERS | 2 +- board/tq/tqma6/README | 6 +++--- board/tq/tqma6/tqma6.c | 2 +- board/tq/tqma6/tqma6_bb.h | 2 +- board/tq/tqma6/tqma6_mba6.c | 2 +- board/tq/tqma6/tqma6_wru4.c | 2 +- include/configs/tqma6.h | 2 +- include/configs/tqma6_mba6.h | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig index d701a46cd6..62de942a32 100644 --- a/arch/arm/mach-imx/mx6/Kconfig +++ b/arch/arm/mach-imx/mx6/Kconfig @@ -569,7 +569,7 @@ config TARGET_KP_IMX6Q_TPC imply CMD_SPL config TARGET_TQMA6 - bool "TQ Systems TQMa6 board" + bool "TQ-Systems TQMa6 board" select BOARD_EARLY_INIT_F select BOARD_LATE_INIT select MXC_SPI diff --git a/board/tq/tqma6/MAINTAINERS b/board/tq/tqma6/MAINTAINERS index dae719f00b..c4fb6ec206 100644 --- a/board/tq/tqma6/MAINTAINERS +++ b/board/tq/tqma6/MAINTAINERS @@ -1,4 +1,4 @@ -TQ SYSTEMS TQMA6 BOARD +TQ-SYSTEMS TQMA6 BOARD M: Markus Niebel S: Maintained F: board/tq/tqma6/ diff --git a/board/tq/tqma6/README b/board/tq/tqma6/README index c47cb21eeb..bd2466c60a 100644 --- a/board/tq/tqma6/README +++ b/board/tq/tqma6/README @@ -1,7 +1,7 @@ -U-Boot for the TQ Systems TQMa6 modules +U-Boot for the TQ-Systems TQMa6 modules This file contains information for the port of -U-Boot to the TQ Systems TQMa6 modules. +U-Boot to the TQ-Systems TQMa6 modules. 1. Boot source -------------- @@ -14,7 +14,7 @@ The following boot source is supported: 2. Building ------------ -To build U-Boot for the TQ Systems TQMa6 modules: +To build U-Boot for the TQ-Systems TQMa6 modules: make tqma6___config make diff --git a/board/tq/tqma6/tqma6.c b/board/tq/tqma6/tqma6.c index de9c00174a..1c2228c77a 100644 --- a/board/tq/tqma6/tqma6.c +++ b/board/tq/tqma6/tqma6.c @@ -3,7 +3,7 @@ * Copyright (C) 2012 Freescale Semiconductor, Inc. * Author: Fabio Estevam * - * Copyright (C) 2013, 2014 TQ Systems (ported SabreSD to TQMa6x) + * Copyright (C) 2013, 2014 TQ-Systems (ported SabreSD to TQMa6x) * Author: Markus Niebel */ diff --git a/board/tq/tqma6/tqma6_bb.h b/board/tq/tqma6/tqma6_bb.h index b0f1f99a83..ca81bdf585 100644 --- a/board/tq/tqma6/tqma6_bb.h +++ b/board/tq/tqma6/tqma6_bb.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0+ */ /* - * Copyright (C) 2013, 2014 TQ Systems + * Copyright (C) 2013, 2014 TQ-Systems * Author: Markus Niebel */ diff --git a/board/tq/tqma6/tqma6_mba6.c b/board/tq/tqma6/tqma6_mba6.c index 801619e80b..52851dd5b5 100644 --- a/board/tq/tqma6/tqma6_mba6.c +++ b/board/tq/tqma6/tqma6_mba6.c @@ -3,7 +3,7 @@ * Copyright (C) 2012 Freescale Semiconductor, Inc. * Author: Fabio Estevam * - * Copyright (C) 2013, 2014 TQ Systems (ported SabreSD to TQMa6x) + * Copyright (C) 2013, 2014 TQ-Systems (ported SabreSD to TQMa6x) * Author: Markus Niebel */ diff --git a/board/tq/tqma6/tqma6_wru4.c b/board/tq/tqma6/tqma6_wru4.c index 3b1bc603ce..5d239913fc 100644 --- a/board/tq/tqma6/tqma6_wru4.c +++ b/board/tq/tqma6/tqma6_wru4.c @@ -3,7 +3,7 @@ * Copyright (C) 2012 Freescale Semiconductor, Inc. * Author: Fabio Estevam * - * Copyright (C) 2013, 2014 TQ Systems (ported SabreSD to TQMa6x) + * Copyright (C) 2013, 2014 TQ-Systems (ported SabreSD to TQMa6x) * Author: Markus Niebel * * Copyright (C) 2015 Stefan Roese diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h index 374a65aef4..233031bc38 100644 --- a/include/configs/tqma6.h +++ b/include/configs/tqma6.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2013, 2014, 2017 Markus Niebel * - * Configuration settings for the TQ Systems TQMa6 module. + * Configuration settings for the TQ-Systems TQMa6 module. */ #ifndef __CONFIG_H diff --git a/include/configs/tqma6_mba6.h b/include/configs/tqma6_mba6.h index bee6d2f33b..a19ea351c2 100644 --- a/include/configs/tqma6_mba6.h +++ b/include/configs/tqma6_mba6.h @@ -2,7 +2,7 @@ /* * Copyright (C) 2013 - 2017 Markus Niebel * - * Configuration settings for the TQ Systems TQMa6 module on + * Configuration settings for the TQ-Systems TQMa6 module on * MBa6 starter kit */ From 5130102fc43f7f3a897796b14918305ad96e1b4c Mon Sep 17 00:00:00 2001 From: Angelo Dureghello Date: Fri, 5 Nov 2021 16:20:24 +0100 Subject: [PATCH 4/8] makefile: add missing semicolons On some distributions, as Debian GNU 11, this targets fails with errors. Signed-off-by: Angelo Dureghello --- Makefile | 2 +- scripts/Makefile.autoconf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0220e8ded9..50649963a4 100644 --- a/Makefile +++ b/Makefile @@ -1246,7 +1246,7 @@ binary_size_check: u-boot-nodtb.bin FORCE echo "u-boot.map shows a binary size of $$map_size" >&2 ; \ echo " but u-boot-nodtb.bin shows $$file_size" >&2 ; \ exit 1; \ - fi \ + fi; \ fi ifeq ($(CONFIG_INIT_SP_RELATIVE)$(CONFIG_OF_SEPARATE),yy) diff --git a/scripts/Makefile.autoconf b/scripts/Makefile.autoconf index 0bfc1b2a62..8a3efdb2db 100644 --- a/scripts/Makefile.autoconf +++ b/scripts/Makefile.autoconf @@ -61,7 +61,7 @@ quiet_cmd_autoconf = GEN $@ if [ -n "${KCONFIG_IGNORE_DUPLICATES}" ] || \ ! grep -q "$${line%=*}=" include/config/auto.conf; then \ echo "$$line"; \ - fi \ + fi; \ done > $@ quiet_cmd_u_boot_cfg = CFG $@ From 4d492b0c0f2238b22c5561437b1a519b3781f1fd Mon Sep 17 00:00:00 2001 From: Masami Hiramatsu Date: Wed, 10 Nov 2021 09:40:07 +0900 Subject: [PATCH 5/8] configs: synquacer: Fix dfu_alt_info to use nor1 Fix dfu_alt_info to use nor1 instead of the device name. This reverts a part of commit 59bd18d4c4d7 ("configs: synquacer: Remove mtdparts settings and update DFU setting") because the commit a4f2d8341455 ("mtd: spi: nor: force mtd name to "nor%d"") changed the mtd device naming scheme to nor%d. Signed-off-by: Masami Hiramatsu Acked-by: Ilias Apalodimas --- include/configs/synquacer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/configs/synquacer.h b/include/configs/synquacer.h index 28f5463763..3d099b4f11 100644 --- a/include/configs/synquacer.h +++ b/include/configs/synquacer.h @@ -52,7 +52,7 @@ /* #define CONFIG_SYS_PCI_64BIT 1 */ #define DEFAULT_DFU_ALT_INFO "dfu_alt_info=" \ - "mtd mx66u51235f=u-boot.bin raw 200000 100000;" \ + "mtd nor1=u-boot.bin raw 200000 100000;" \ "fip.bin raw 180000 78000;" \ "optee.bin raw 500000 100000\0" From 38de2bad642ad3032e56fcad3b21f12bd609a294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Cl=C3=A9ment=20Tosi?= Date: Wed, 10 Nov 2021 15:04:40 +0100 Subject: [PATCH 6/8] arm: Fix bad memcpy.S str8w macro argument count MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the extra (empty) argument passed to str8w, causing the following error: :40:47: error: too many positional arguments str8w r0, r3, r4, r5, r6, r7, r8, r9, ip, , abort=19f ^ u-boot/arch/arm/lib/memcpy.S:240:5: note: while in macro instantiation 17: forward_copy_shift pull=16 push=16 ^ Note: no functional change intended. Fixes: d8834a1323af ("arm: Use optimized memcpy and memset from linux") Signed-off-by: Pierre-Clément Tosi --- arch/arm/lib/memcpy.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/lib/memcpy.S b/arch/arm/lib/memcpy.S index f7fb77235c..eee7a219ce 100644 --- a/arch/arm/lib/memcpy.S +++ b/arch/arm/lib/memcpy.S @@ -210,7 +210,7 @@ ENTRY(memcpy) orr r9, r9, ip, lspush #\push mov ip, ip, lspull #\pull orr ip, ip, lr, lspush #\push - str8w r0, r3, r4, r5, r6, r7, r8, r9, ip, , abort=19f + str8w r0, r3, r4, r5, r6, r7, r8, r9, ip, abort=19f bge 12b PLD( cmn r2, #96 ) PLD( bge 13b ) From b5f3850727c86811767c10218b68552e63ff2a6a Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Fri, 12 Nov 2021 18:37:47 +0300 Subject: [PATCH 7/8] usb: doc: Fix spelling issues in README.usb Fix spelling issues in README.usb. Signed-off-by: Andy Shevchenko --- doc/README.usb | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/doc/README.usb b/doc/README.usb index 05c62c3413..650a6daae0 100644 --- a/doc/README.usb +++ b/doc/README.usb @@ -18,8 +18,8 @@ How it works: ------------- The USB (at least the USB UHCI) needs a frame list (4k), transfer -descripor and queue headers which are all located in the main memory. -The UHCI allocates every milisecond the PCI bus and reads the current +descriptor and queue headers which are all located in the main memory. +The UHCI allocates every millisecond the PCI bus and reads the current frame pointer. This may cause to crash the OS during boot. So the USB _MUST_ be stopped during OS boot. This is the reason, why the USB is NOT automatically started during start-up. If someone needs the USB @@ -27,10 +27,10 @@ he has to start it and should therefore be aware that he had to stop it before booting the OS. For USB keyboards this can be done by a script which is automatically -started after the U-Boot is up and running. To boot an OS with a an +started after the U-Boot is up and running. To boot an OS with a USB keyboard another script is necessary, which first disables the USB and then executes the boot command. If the boot command fails, -the script can reenable the USB kbd. +the script can re-enable the USB keyboard. Common USB Commands: - usb start: @@ -40,10 +40,10 @@ Common USB Commands: - usb info [dev]: shows all USB infos of the device dev, or of all the devices - usb stop [f]: stops the USB. If f==1 the USB will also stop if - an USB keyboard is assigned as stdin. The stdin + a USB keyboard is assigned as stdin. The stdin is then switched to serial input. Storage USB Commands: -- usb scan: scans the USB for storage devices.The USB must be +- usb scan: scans the USB for storage devices. The USB must be running for this command (usb start) - usb device [dev]: show or set current USB storage device - usb part [dev]: print partition table of one or all USB storage @@ -57,7 +57,7 @@ Storage USB Commands: Config Switches: ---------------- CONFIG_CMD_USB enables basic USB support and the usb command -CONFIG_USB_UHCI defines the lowlevel part.A lowlevel part must be defined +CONFIG_USB_UHCI defines the lowlevel part. A lowlevel part must be defined if using CONFIG_CMD_USB CONFIG_USB_KEYBOARD enables the USB Keyboard CONFIG_USB_STORAGE enables the USB storage devices @@ -124,7 +124,7 @@ bootp To enable USB Host Ethernet in U-Boot, your platform must of course support USB with CONFIG_CMD_USB enabled and working. You will need to -add some config settings to your board config: +add some settings to your board configuration: CONFIG_CMD_USB=y /* the 'usb' interactive command */ CONFIG_USB_HOST_ETHER=y /* Enable USB Ethernet adapters */ @@ -158,7 +158,7 @@ settings should start you off: You can also set the default IP address of your board and the server as well as the default file to load when a 'bootp' command is issued. However note that encoding these individual network settings into a -common exectuable is discouraged, as it leads to potential conflicts, +common executable is discouraged, as it leads to potential conflicts, and all the parameters can either get stored in the board's external environment, or get obtained from the bootp server if not set. @@ -166,7 +166,6 @@ environment, or get obtained from the bootp server if not set. #define CONFIG_SERVERIP 10.0.0.1 (replace with your value) #define CONFIG_BOOTFILE "uImage" - The 'usb start' command should identify the adapter something like this: CrOS> usb start @@ -211,8 +210,8 @@ MAC Addresses Most Ethernet dongles have a built-in MAC address which is unique in the world. This is important so that devices on the network can be -distinguised from each other. MAC address conflicts are evil and -generally result in strange and eratic behaviour. +distinguished from each other. MAC address conflicts are evil and +generally result in strange and erratic behaviour. Some boards have USB Ethernet chips on-board, and these sometimes do not have an assigned MAC address. In this case it is up to you to assign From 4b32531be236bbd9ca60f26447511f79e214f79e Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Mon, 8 Nov 2021 21:03:38 +0300 Subject: [PATCH 8/8] image: Explicitly declare do_bdinfo() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Compiler is not happy: common/image-board.c: In function ‘boot_get_kbd’: common/image-board.c:902:17: warning: implicit declaration of function ‘do_bdinfo’ [-Wimplicit-function-declaration] 902 | do_bdinfo(NULL, 0, 0, NULL); | ^~~~~~~~~ Move the forward declaration to a header. Signed-off-by: Andy Shevchenko Reviewed-by: Simon Glass --- boot/image-board.c | 1 + boot/image.c | 6 +----- include/init.h | 2 ++ 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/boot/image-board.c b/boot/image-board.c index ddf30c6730..bf8817165c 100644 --- a/boot/image-board.c +++ b/boot/image-board.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/boot/image.c b/boot/image.c index 992e72991d..f792f2aa69 100644 --- a/boot/image.c +++ b/boot/image.c @@ -9,6 +9,7 @@ #ifndef USE_HOSTCC #include #include +#include #include #include #include @@ -29,11 +30,6 @@ #include #include -#ifdef CONFIG_CMD_BDI -extern int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, - char *const argv[]); -#endif - DECLARE_GLOBAL_DATA_PTR; /* Set this if we have less than 4 MB of malloc() space */ diff --git a/include/init.h b/include/init.h index c781789e36..f2cd46dead 100644 --- a/include/init.h +++ b/include/init.h @@ -332,6 +332,8 @@ void bdinfo_print_mhz(const char *name, unsigned long hz); /* Show arch-specific information for the 'bd' command */ void arch_print_bdinfo(void); +int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); + #endif /* __ASSEMBLY__ */ /* Put only stuff here that the assembler can digest */