Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 9F637E00D09; Wed, 13 Apr 2016 05:16:32 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.192.65 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-qg0-f65.google.com (mail-qg0-f65.google.com [209.85.192.65]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id AD55CE00C9D for ; Wed, 13 Apr 2016 05:16:29 -0700 (PDT) Received: by mail-qg0-f65.google.com with SMTP id b32so4396695qgf.2 for ; Wed, 13 Apr 2016 05:16:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ossystems-com-br.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :organization; bh=mSkX5m5MplfEKl33HUOP2g4AkcjEnfvPP6Em9fpI1F4=; b=ROsE+F2fXijfHeenj9wK61BMSuHAe8JLhskMQhQG5H+k5jzM4Zr8wwAbZ2HpkVmuiz Ky8Owp1ZLCXumdnBNZ04H6IRUt49umBpMYrNd7ZeS+DBhLDZU7e3kvVMcAOkE8PuWv4/ LIBfqq2lSbQhqlDlqP9IBThbHVp+5StpoWgrz0ES96OMphb/2MiklFdl+8/HuRY2dOMJ /xg03sPC1NKj+pe/LYBijBu+lPvbz+XCW2eB8UUn8ehiiCQLZBXKO5KqREJj1mO4PQE7 TITt8sKCtNRyzNK3vyPQMoZ0TSOi+3ot9ZW1RqeZsXph7MbR7Jd34VwFqv/V5zyMOHtR oaiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:organization; bh=mSkX5m5MplfEKl33HUOP2g4AkcjEnfvPP6Em9fpI1F4=; b=AK7JyVN93wmZvXGrYDBwjUDPqKWgfy5ijlcMO7fNzZVwS7OAtfnRngl7+6kiyvAoyy 0YPtA4+nwnP4fu9OGJKm/d5vTcd1zm3RswgJT532+grVM4Uovv5ZE/M605+NlbpNljin YRmwfBUKdOz9YwW9yy38Hw8hIDIMPseME6Umy4gabu5ZpZeSnAy2VE0XNYF3hf+kkXrj vx/kfOszBHZ51hoxJPv3HwQ+frFMW+Sgb3cYLWbJ0I4EkkyeGPdwxYyVDSWPR8j3VU73 CMjzY122dzJxrPmsqllIH3a2jRHtnLE0tQcf6XEgXRD32tA6BgYdE9nFV8kBE78CvpNo 0hMg== X-Gm-Message-State: AOPr4FXN2LG9LPVvE8t5hgVxFpvrx8UjAq7zJerZ5Bxd+8ye1kodw2RIF9JIOVF8mu/Z0w== X-Received: by 10.140.43.37 with SMTP id d34mr10462391qga.51.1460549788866; Wed, 13 Apr 2016 05:16:28 -0700 (PDT) Received: from monster.lab.ossystems.com.br ([187.23.154.250]) by smtp.gmail.com with ESMTPSA id 64sm15694695qgy.34.2016.04.13.05.16.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Apr 2016 05:16:27 -0700 (PDT) From: Fabio Berton To: meta-freescale@yoctoproject.org Date: Wed, 13 Apr 2016 09:16:02 -0300 Message-Id: <1460549764-725-2-git-send-email-fabio.berton@ossystems.com.br> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1460549764-725-1-git-send-email-fabio.berton@ossystems.com.br> References: <1460549764-725-1-git-send-email-fabio.berton@ossystems.com.br> Organization: O.S. Systems Software LTDA. Subject: [meta-fsl-arm-extra][PATCH v3 2/4] u-boot-variscite: Add u-boot recipe for variscite X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2016 12:16:32 -0000 Signed-off-by: Fabio Berton --- ...x-compiler-gcc5.h-to-fix-builds-with-gcc5.patch | 94 ++++++++++++++++++++++ .../0002-ARM-asm-io.h-use-static-inline.patch | 74 +++++++++++++++++ .../0003-gcc5-no-unalligned-access.patch | 19 +++++ ...2-gcc5-use_gcc_inline_version_instead_c99.patch | 57 +++++++++++++ recipes-bsp/u-boot/u-boot-variscite_2013.10.bb | 28 +++++++ 5 files changed, 272 insertions(+) create mode 100644 recipes-bsp/u-boot/u-boot-variscite-2013.10/0001-Add-linux-compiler-gcc5.h-to-fix-builds-with-gcc5.patch create mode 100644 recipes-bsp/u-boot/u-boot-variscite-2013.10/0002-ARM-asm-io.h-use-static-inline.patch create mode 100644 recipes-bsp/u-boot/u-boot-variscite-2013.10/0003-gcc5-no-unalligned-access.patch create mode 100644 recipes-bsp/u-boot/u-boot-variscite-2013.10/u-boot-002-gcc5-use_gcc_inline_version_instead_c99.patch create mode 100644 recipes-bsp/u-boot/u-boot-variscite_2013.10.bb diff --git a/recipes-bsp/u-boot/u-boot-variscite-2013.10/0001-Add-linux-compiler-gcc5.h-to-fix-builds-with-gcc5.patch b/recipes-bsp/u-boot/u-boot-variscite-2013.10/0001-Add-linux-compiler-gcc5.h-to-fix-builds-with-gcc5.patch new file mode 100644 index 0000000..c5fc731 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-variscite-2013.10/0001-Add-linux-compiler-gcc5.h-to-fix-builds-with-gcc5.patch @@ -0,0 +1,94 @@ +From 9012ad08ed7615cf0afaf8fab631239c0f148889 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Sat, 7 Feb 2015 22:52:40 +0100 +Subject: [PATCH 1/2] Add linux/compiler-gcc5.h to fix builds with gcc5 +Organization: O.S. Systems Software LTDA. + +Add linux/compiler-gcc5/h from the kernel sources at: + +commit 5631b8fba640a4ab2f8a954f63a603fa34eda96b +Author: Steven Noonan +Date: Sat Oct 25 15:09:42 2014 -0700 + + compiler/gcc4+: Remove inaccurate comment about 'asm goto' miscompiles + +Signed-off-by: Hans de Goede +--- + include/linux/compiler-gcc5.h | 65 +++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 65 insertions(+) + create mode 100644 include/linux/compiler-gcc5.h + +diff --git a/include/linux/compiler-gcc5.h b/include/linux/compiler-gcc5.h +new file mode 100644 +index 0000000..c8c5659 +--- /dev/null ++++ b/include/linux/compiler-gcc5.h +@@ -0,0 +1,65 @@ ++#ifndef __LINUX_COMPILER_H ++#error "Please don't include directly, include instead." ++#endif ++ ++#define __used __attribute__((__used__)) ++#define __must_check __attribute__((warn_unused_result)) ++#define __compiler_offsetof(a, b) __builtin_offsetof(a, b) ++ ++/* Mark functions as cold. gcc will assume any path leading to a call ++ to them will be unlikely. This means a lot of manual unlikely()s ++ are unnecessary now for any paths leading to the usual suspects ++ like BUG(), printk(), panic() etc. [but let's keep them for now for ++ older compilers] ++ ++ Early snapshots of gcc 4.3 don't support this and we can't detect this ++ in the preprocessor, but we can live with this because they're unreleased. ++ Maketime probing would be overkill here. ++ ++ gcc also has a __attribute__((__hot__)) to move hot functions into ++ a special section, but I don't see any sense in this right now in ++ the kernel context */ ++#define __cold __attribute__((__cold__)) ++ ++#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) ++ ++#ifndef __CHECKER__ ++# define __compiletime_warning(message) __attribute__((warning(message))) ++# define __compiletime_error(message) __attribute__((error(message))) ++#endif /* __CHECKER__ */ ++ ++/* ++ * Mark a position in code as unreachable. This can be used to ++ * suppress control flow warnings after asm blocks that transfer ++ * control elsewhere. ++ * ++ * Early snapshots of gcc 4.5 don't support this and we can't detect ++ * this in the preprocessor, but we can live with this because they're ++ * unreleased. Really, we need to have autoconf for the kernel. ++ */ ++#define unreachable() __builtin_unreachable() ++ ++/* Mark a function definition as prohibited from being cloned. */ ++#define __noclone __attribute__((__noclone__)) ++ ++/* ++ * Tell the optimizer that something else uses this function or variable. ++ */ ++#define __visible __attribute__((externally_visible)) ++ ++/* ++ * GCC 'asm goto' miscompiles certain code sequences: ++ * ++ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 ++ * ++ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. ++ * ++ * (asm goto is automatically volatile - the naming reflects this.) ++ */ ++#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) ++ ++#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP ++#define __HAVE_BUILTIN_BSWAP32__ ++#define __HAVE_BUILTIN_BSWAP64__ ++#define __HAVE_BUILTIN_BSWAP16__ ++#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ +-- +2.7.0 + diff --git a/recipes-bsp/u-boot/u-boot-variscite-2013.10/0002-ARM-asm-io.h-use-static-inline.patch b/recipes-bsp/u-boot/u-boot-variscite-2013.10/0002-ARM-asm-io.h-use-static-inline.patch new file mode 100644 index 0000000..2a0c199 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-variscite-2013.10/0002-ARM-asm-io.h-use-static-inline.patch @@ -0,0 +1,74 @@ +From 0104a0612ede002a03b1d6349a38ec575e76d186 Mon Sep 17 00:00:00 2001 +From: Jeroen Hofstee +Date: Sun, 22 Jun 2014 23:10:39 +0200 +Subject: [PATCH 2/2] ARM:asm:io.h use static inline +Organization: O.S. Systems Software LTDA. + +When compiling u-boot with W=1 the extern inline void for +read* is likely causing the most noise. gcc / clang will +warn there is never a actual declaration for these functions. +Instead of declaring these extern make them static inline so +it is actually declared. + +cc: Albert ARIBAUD +Signed-off-by: Jeroen Hofstee +--- + arch/arm/include/asm/io.h | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h +index 1fbc531..5f5f8d0 100644 +--- a/arch/arm/include/asm/io.h ++++ b/arch/arm/include/asm/io.h +@@ -75,42 +75,42 @@ static inline phys_addr_t virt_to_phys(void * vaddr) + #define __arch_putw(v,a) (*(volatile unsigned short *)(a) = (v)) + #define __arch_putl(v,a) (*(volatile unsigned int *)(a) = (v)) + +-extern inline void __raw_writesb(unsigned int addr, const void *data, int bytelen) ++static inline void __raw_writesb(unsigned int addr, const void *data, int bytelen) + { + uint8_t *buf = (uint8_t *)data; + while(bytelen--) + __arch_putb(*buf++, addr); + } + +-extern inline void __raw_writesw(unsigned int addr, const void *data, int wordlen) ++static inline void __raw_writesw(unsigned int addr, const void *data, int wordlen) + { + uint16_t *buf = (uint16_t *)data; + while(wordlen--) + __arch_putw(*buf++, addr); + } + +-extern inline void __raw_writesl(unsigned int addr, const void *data, int longlen) ++static inline void __raw_writesl(unsigned int addr, const void *data, int longlen) + { + uint32_t *buf = (uint32_t *)data; + while(longlen--) + __arch_putl(*buf++, addr); + } + +-extern inline void __raw_readsb(unsigned int addr, void *data, int bytelen) ++static inline void __raw_readsb(unsigned int addr, void *data, int bytelen) + { + uint8_t *buf = (uint8_t *)data; + while(bytelen--) + *buf++ = __arch_getb(addr); + } + +-extern inline void __raw_readsw(unsigned int addr, void *data, int wordlen) ++static inline void __raw_readsw(unsigned int addr, void *data, int wordlen) + { + uint16_t *buf = (uint16_t *)data; + while(wordlen--) + *buf++ = __arch_getw(addr); + } + +-extern inline void __raw_readsl(unsigned int addr, void *data, int longlen) ++static inline void __raw_readsl(unsigned int addr, void *data, int longlen) + { + uint32_t *buf = (uint32_t *)data; + while(longlen--) +-- +2.7.0 + diff --git a/recipes-bsp/u-boot/u-boot-variscite-2013.10/0003-gcc5-no-unalligned-access.patch b/recipes-bsp/u-boot/u-boot-variscite-2013.10/0003-gcc5-no-unalligned-access.patch new file mode 100644 index 0000000..dfec5a8 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-variscite-2013.10/0003-gcc5-no-unalligned-access.patch @@ -0,0 +1,19 @@ +from https://raw.githubusercontent.com/schnitzeltony/meta-gumstix-community/master/recipes-bsp/u-boot/u-boot-overo/0013-arm-Switch-to-mno-unaligned-access-when-supported-by.patch + +--- a/arch/arm/cpu/armv7/config.mk 2015-11-22 20:44:42.744557427 +0100 ++++ b/arch/arm/cpu/armv7/config.mk 2015-11-22 20:45:26.381024395 +0100 +@@ -18,9 +18,12 @@ PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_ARMV7 + PF_RELFLAGS_SLB_AT := $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) + PLATFORM_RELFLAGS += $(PF_RELFLAGS_SLB_AT) + +-# SEE README.arm-unaligned-accesses ++# On supported platforms we set the bit which causes us to trap on unaligned ++# memory access. This is the opposite of what the compiler expects to be ++# the default so we must pass in -mno-unaligned-access so that it is aware ++# of our decision. + PF_NO_UNALIGNED := $(call cc-option, -mno-unaligned-access,) +-PLATFORM_NO_UNALIGNED := $(PF_NO_UNALIGNED) ++PLATFORM_CPPFLAGS += $(PF_NO_UNALIGNED) + + ifneq ($(CONFIG_IMX_CONFIG),) + ifdef CONFIG_SPL diff --git a/recipes-bsp/u-boot/u-boot-variscite-2013.10/u-boot-002-gcc5-use_gcc_inline_version_instead_c99.patch b/recipes-bsp/u-boot/u-boot-variscite-2013.10/u-boot-002-gcc5-use_gcc_inline_version_instead_c99.patch new file mode 100644 index 0000000..d8dd6d2 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-variscite-2013.10/u-boot-002-gcc5-use_gcc_inline_version_instead_c99.patch @@ -0,0 +1,57 @@ +[RFC 08/10] inline: use the gcc inline version instead of the c99 one. + +Jeroen Hofstee jeroen at myspectrum.nl +Sat May 31 22:32:22 CEST 2014 +Previous message: [U-Boot] [RFC 07/10] ARM: make gd a function a function for clang +Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] +--- +This fixes errors like: + +make[1]: Entering directory `/home/jeroen/software/u-boot/arch/arm/cpu/armv7/omap-common' +arm-linux-gnueabi-ld.bfd -r -o libomap-common.o reset.o timer.o utils.o +timer.o: In function `get_tbclk': +/home/jeroen/software/u-boot/include/asm/io.h:81: multiple definition of `__raw_writesb' +reset.o:/home/jeroen/software/u-boot/include/asm/io.h:81: first defined here +timer.o: In function `__udelay': +/home/jeroen/software/u-boot/include/asm/io.h:88: multiple definition of `__raw_writesw' +reset.o:/home/jeroen/software/u-boot/include/asm/io.h:88: first defined here +timer.o: In function `get_ticks': +/home/jeroen/software/u-boot/include/asm/io.h:95: multiple definition of `__raw_writesl' +reset.o:/home/jeroen/software/u-boot/include/asm/io.h:95: first defined here +timer.o: In function `__raw_readsb': +/home/jeroen/software/u-boot/include/asm/io.h:102: multiple definition of `__raw_readsb' +reset.o:/home/jeroen/software/u-boot/include/asm/io.h:102: first defined here +timer.o: In function `__raw_readsw': +/home/jeroen/software/u-boot/include/asm/io.h:109: multiple definition of `__raw_readsw' +reset.o:/home/jeroen/software/u-boot/include/asm/io.h:109: first defined here +timer.o: In function `__raw_readsl': +/home/jeroen/software/u-boot/include/asm/io.h:116: multiple definition of `__raw_readsl' +reset.o:/home/jeroen/software/u-boot/include/asm/io.h:116: first defined here +make[1]: *** [libomap-common.o] Error 1 +make[1]: Leaving directory `/home/jeroen/software/u-boot/arch/arm/cpu/armv7/omap-common' +make: *** [arch/arm/cpu/armv7/omap-common/libomap-common.o] Error 2 +--- + include/linux/compiler-gcc.h | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h +index 9896e54..99c6dcc 100644 +--- a/include/linux/compiler-gcc.h ++++ b/include/linux/compiler-gcc.h +@@ -44,9 +44,10 @@ + */ + #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ + !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4) +-# define inline inline __attribute__((always_inline)) +-# define __inline__ __inline__ __attribute__((always_inline)) +-# define __inline __inline __attribute__((always_inline)) ++/* XXX: check __GNUC_STDC_INLINE__, fix line length */ ++# define inline inline __attribute__((always_inline)) __attribute__((__gnu_inline__)) ++# define __inline__ __inline__ __attribute__((always_inline)) __attribute__((__gnu_inline__)) ++# define __inline __inline __attribute__((always_inline)) __attribute__((__gnu_inline__)) + #endif + + #define __deprecated __attribute__((deprecated)) +-- +1.8.3.2 + diff --git a/recipes-bsp/u-boot/u-boot-variscite_2013.10.bb b/recipes-bsp/u-boot/u-boot-variscite_2013.10.bb new file mode 100644 index 0000000..1c07058 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-variscite_2013.10.bb @@ -0,0 +1,28 @@ +require recipes-bsp/u-boot/u-boot.inc + +DESCRIPTION = "bootloader for imx platforms" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://Licenses/README;md5=025bf9f768cbcb1a165dbe1a110babfb" +COMPATIBLE_MACHINE = "(mxs|mx6)" + +PROVIDES += "u-boot" + +UBOOT_MAKE_TARGET = "all" +UBOOT_SUFFIX = "img" + +SPL_BINARY = "SPL" + +SRCREV = "a2bb081c08f8e18cee3ffbf577adb9bdb7d5a6f9" +SRCBRANCH = "imx_v2013.10_var4" + +SRC_URI = "\ + git://github.com/varigit/uboot-imx.git;protocol=git;branch=${SRCBRANCH} \ + file://u-boot-002-gcc5-use_gcc_inline_version_instead_c99.patch \ + file://0001-Add-linux-compiler-gcc5.h-to-fix-builds-with-gcc5.patch \ + file://0002-ARM-asm-io.h-use-static-inline.patch \ + file://0003-gcc5-no-unalligned-access.patch \ +" + +S = "${WORKDIR}/git" + +PACKAGE_ARCH = "${MACHINE_ARCH}" -- 2.1.4