[U-Boot] [PATCH 0/4] Some things that bug me

These are some fixes to the current TOT that break my test building on OS X. Maybe some of them already addressed by some other patches. If so, please just drop the corresponding patch from the series.
Andreas Bießmann (4): tools: -Wno-deprecated-declarations for OpenSSL on darwin mxsboot: remove unused include samsung: fix mkorigenspl for darwin pci_rom: fix may be used uninitialized warning
board/samsung/origen/tools/mkorigenspl.c | 4 ++-- drivers/pci/pci_rom.c | 2 +- tools/Makefile | 8 ++++++++ tools/mxsboot.c | 1 - 4 files changed, 11 insertions(+), 4 deletions(-)

Since OpenSSL is deprecated on OS X in favour of Common Crypto API disable the warning for this host OS.
Another solution would be to add some glue layer for crypto stuff, but I think this is not worth the effort.
Signed-off-by: Andreas Bießmann andreas.devel@googlemail.com ---
tools/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/tools/Makefile b/tools/Makefile index 1382b05..2881a7c 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -129,6 +129,14 @@ endif ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_FIT_SIGNATURE),) HOSTLOADLIBES_mkimage += \ $(shell pkg-config --libs libssl libcrypto 2> /dev/null || echo "-lssl -lcrypto") + +# OS X deprecate openssl in favour of CommonCrypto, supress deprecation +# warnings on those systems +ifeq ($(HOSTOS),darwin) +HOSTCFLAGS_mxsimage.o += -Wno-deprecated-declarations +HOSTCFLAGS_image-sig.o += -Wno-deprecated-declarations +HOSTCFLAGS_rsa-sign.o += -Wno-deprecated-declarations +endif endif
HOSTLOADLIBES_dumpimage := $(HOSTLOADLIBES_mkimage)

On 16 February 2016 at 15:29, Andreas Bießmann andreas.devel@googlemail.com wrote:
Since OpenSSL is deprecated on OS X in favour of Common Crypto API disable the warning for this host OS.
Another solution would be to add some glue layer for crypto stuff, but I think this is not worth the effort.
Signed-off-by: Andreas Bießmann andreas.devel@googlemail.com
tools/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+)
Reviewed-by: Simon Glass sjg@chromium.org

On Tue, Feb 16, 2016 at 11:29:28PM +0100, Andreas Bießmann wrote:
Since OpenSSL is deprecated on OS X in favour of Common Crypto API disable the warning for this host OS.
Another solution would be to add some glue layer for crypto stuff, but I think this is not worth the effort.
Signed-off-by: Andreas Bießmann andreas.devel@googlemail.com Reviewed-by: Simon Glass sjg@chromium.org
Applied to u-boot/master, thanks!

Commit 276d3ebb883024d753cd9c69ab2fd243ffa1262e removed htole32() but missed to remove the corresponding header. This is annoying, since BSD systems do not have endian.h.
Signed-off-by: Andreas Bießmann andreas.devel@googlemail.com ---
tools/mxsboot.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/tools/mxsboot.c b/tools/mxsboot.c index 457f435..2e72009 100644 --- a/tools/mxsboot.c +++ b/tools/mxsboot.c @@ -7,7 +7,6 @@ * SPDX-License-Identifier: GPL-2.0+ */
-#include <endian.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h>

On 02/16/2016 11:29 PM, Andreas Bießmann wrote:
Commit 276d3ebb883024d753cd9c69ab2fd243ffa1262e removed htole32() but missed to remove the corresponding header. This is annoying, since BSD systems do not have endian.h.
Signed-off-by: Andreas Bießmann andreas.devel@googlemail.com
Nice, thanks!
Acked-by: Marek Vasut marex@denx.de

Am Tuesday 16 February 2016, 23:29:29 schrieb Andreas Bießmann:
Commit 276d3ebb883024d753cd9c69ab2fd243ffa1262e removed htole32() but missed to remove the corresponding header. This is annoying, since BSD systems do not have endian.h.
Signed-off-by: Andreas Bießmann andreas.devel@googlemail.com
tools/mxsboot.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/tools/mxsboot.c b/tools/mxsboot.c index 457f435..2e72009 100644 --- a/tools/mxsboot.c +++ b/tools/mxsboot.c @@ -7,7 +7,6 @@
- SPDX-License-Identifier: GPL-2.0+
*/
-#include <endian.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h>
Acked-by: Michael Heimpold mhei@heimpold.de

Hi Andreas,
On 16/02/2016 23:29, Andreas Bießmann wrote:
Commit 276d3ebb883024d753cd9c69ab2fd243ffa1262e removed htole32() but missed to remove the corresponding header. This is annoying, since BSD systems do not have endian.h.
Signed-off-by: Andreas Bießmann andreas.devel@googlemail.com
tools/mxsboot.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/tools/mxsboot.c b/tools/mxsboot.c index 457f435..2e72009 100644 --- a/tools/mxsboot.c +++ b/tools/mxsboot.c @@ -7,7 +7,6 @@
- SPDX-License-Identifier: GPL-2.0+
*/
-#include <endian.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h>
Applied to u-boot-imx, thanks !
Best regards, Stefano Babic

Compiling the mkorigenspl tool on darwin complains about undefined ulong. Fix this by using the unified way.
Signed-off-by: Andreas Bießmann andreas.devel@googlemail.com ---
board/samsung/origen/tools/mkorigenspl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/board/samsung/origen/tools/mkorigenspl.c b/board/samsung/origen/tools/mkorigenspl.c index 8b0c3ac..7b5d93b 100644 --- a/board/samsung/origen/tools/mkorigenspl.c +++ b/board/samsung/origen/tools/mkorigenspl.c @@ -83,8 +83,8 @@ int main(int argc, char **argv) for (i = 0; i < IMG_SIZE - SPL_HEADER_SIZE; i++) checksum += buffer[i+16];
- *(ulong *)buffer ^= 0x1f; - *(ulong *)(buffer+4) ^= checksum; + *(unsigned long *)buffer ^= 0x1f; + *(unsigned long *)(buffer+4) ^= checksum;
for (i = 1; i < SPL_HEADER_SIZE; i++) buffer[i] ^= buffer[i-1];

On Tue, Feb 16, 2016 at 11:29:30PM +0100, Andreas Bießmann wrote:
Compiling the mkorigenspl tool on darwin complains about undefined ulong. Fix this by using the unified way.
Signed-off-by: Andreas Bießmann andreas.devel@googlemail.com
Applied to u-boot/master, thanks!

Building pci_rom.c with my toolchain complains about may be used uninitialized rom varaible:
---8<--- +drivers/pci/pci_rom.c:269:25: note: 'rom' was declared here w+drivers/pci/pci_rom.c: In function 'dm_pci_run_vga_bios': w+drivers/pci/pci_rom.c:154:14: warning: 'rom' may be used uninitialized in this function [-Wmaybe-uninitialized] --->8---
Fix this as done in 55616b86c745fcac5a791268ab8e7cba36965c0f the ram variable.
Signed-off-by: Andreas Bießmann andreas.devel@googlemail.com ---
drivers/pci/pci_rom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c index d5bf6f4..9eb605b 100644 --- a/drivers/pci/pci_rom.c +++ b/drivers/pci/pci_rom.c @@ -266,7 +266,7 @@ int dm_pci_run_vga_bios(struct udevice *dev, int (*int15_handler)(void), int exec_method) { struct pci_child_platdata *pplat = dev_get_parent_platdata(dev); - struct pci_rom_header *rom, *ram = NULL; + struct pci_rom_header *rom = NULL, *ram = NULL; int vesa_mode = -1; bool emulate, alloced; int ret;

On Tue, 16 Feb 2016 23:29:31 +0100 Andreas Bießmann andreas.devel@googlemail.com wrote:
Building pci_rom.c with my toolchain complains about may be used uninitialized rom varaible:
---8<--- +drivers/pci/pci_rom.c:269:25: note: 'rom' was declared here w+drivers/pci/pci_rom.c: In function 'dm_pci_run_vga_bios': w+drivers/pci/pci_rom.c:154:14: warning: 'rom' may be used uninitialized in this function [-Wmaybe-uninitialized] --->8---
Fix this as done in 55616b86c745fcac5a791268ab8e7cba36965c0f the ram variable.
Signed-off-by: Andreas Bießmann andreas.devel@googlemail.com
Acked-by: Anatolij Gustschin agust@denx.de

On Tue, Feb 16, 2016 at 11:29:31PM +0100, Andreas Bießmann wrote:
Building pci_rom.c with my toolchain complains about may be used uninitialized rom varaible:
Applied to u-boot/master, thanks!
participants (7)
-
Anatolij Gustschin
-
Andreas Bießmann
-
Marek Vasut
-
Michael Heimpold
-
Simon Glass
-
Stefano Babic
-
Tom Rini