From patchwork Tue Feb 28 17:40:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 733701 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vXm8C6hq2z9s8K for ; Wed, 1 Mar 2017 04:40:59 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 4BCED307CD; Tue, 28 Feb 2017 17:40:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Y+r67KXSBIto; Tue, 28 Feb 2017 17:40:43 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 12F16303C6; Tue, 28 Feb 2017 17:40:41 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 967421C2B73 for ; Tue, 28 Feb 2017 17:40:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 0A86D89A85 for ; Tue, 28 Feb 2017 17:40:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o5SikjEcLKh1 for ; Tue, 28 Feb 2017 17:40:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exchange.essensium.com (220.77.144.195.ipv4.evonet.be [195.144.77.220]) by hemlock.osuosl.org (Postfix) with ESMTPS id 8DD4B89A92 for ; Tue, 28 Feb 2017 17:40:26 +0000 (UTC) Received: from vandecaa-laptop.local.ess-mail.com (10.3.4.138) by beleexch01.local.ess-mail.com (10.3.7.8) with Microsoft SMTP Server (TLS) id 15.0.847.32; Tue, 28 Feb 2017 18:40:04 +0100 From: "Arnout Vandecappelle (Essensium/Mind)" To: Date: Tue, 28 Feb 2017 18:40:00 +0100 Message-ID: <20170228174001.23830-7-arnout@mind.be> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170228174001.23830-1-arnout@mind.be> References: <20170228174001.23830-1-arnout@mind.be> MIME-Version: 1.0 X-Originating-IP: [10.3.4.138] X-ClientProxiedBy: beleexch01.local.ess-mail.com (10.3.7.8) To beleexch01.local.ess-mail.com (10.3.7.8) Subject: [Buildroot] [PATCH 6/7] altera_socdk_defconfig: fix build with gcc5 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Kernel doesn't have the compiler-gcc5.h header, so include the universal patch that fixes this issue. A third patch is needed to fix static inline issues. U-Boot doesn't have the compiler-gcc5.h header and has several other problems. Get upstream patches to fix those. Most patches are shared between the two Altera platforms, so they go in board/altera/patches. The 4th U-Boot patch, however, needs a slightly different context so we put it in board/altera/socdk/patches. The patches are numbered taking into account the more global ones that precede them. Therefore, the linux patch starts at 0003 (since board/linux-gcc-patches already has 0001 and 0002), and the socdk-specific U-Boot patch starts at 0004. Cc: Charles Manning Cc: Sebastien Bourdelin Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- ...ux-Change-extern-inline-to-static-inline-.patch | 62 ++++++++++++++++++++++ ...c.h-remove-dependency-on-compiler-gcc-345.patch | 2 +- .../0002-ARM-asm-io.h-use-static-inline.patch | 2 +- ...mon-main.c-make-show_boot_progress-__weak.patch | 18 +++++-- .../patches/uboot/0004-arm-board-use-__weak.patch | 8 +-- configs/altera_socdk_defconfig | 3 ++ 6 files changed, 84 insertions(+), 11 deletions(-) create mode 100644 board/altera/patches/linux/0003-ARM-LLVMLinux-Change-extern-inline-to-static-inline-.patch copy board/{via/imx6_vab820 => altera}/patches/uboot/0001-compiler-gcc.h-remove-dependency-on-compiler-gcc-345.patch (99%) copy board/{via/imx6_vab820 => altera}/patches/uboot/0002-ARM-asm-io.h-use-static-inline.patch (97%) copy board/{via/imx6_vab820 => altera}/patches/uboot/0003-common-main.c-make-show_boot_progress-__weak.patch (69%) copy board/{via/imx6_vab820 => altera/socdk}/patches/uboot/0004-arm-board-use-__weak.patch (93%) diff --git a/board/altera/patches/linux/0003-ARM-LLVMLinux-Change-extern-inline-to-static-inline-.patch b/board/altera/patches/linux/0003-ARM-LLVMLinux-Change-extern-inline-to-static-inline-.patch new file mode 100644 index 0000000000..6043d8f65d --- /dev/null +++ b/board/altera/patches/linux/0003-ARM-LLVMLinux-Change-extern-inline-to-static-inline-.patch @@ -0,0 +1,62 @@ +From 76ae03828756bac2c1fa2c7eff7485e5f815dbdb Mon Sep 17 00:00:00 2001 +From: Behan Webster +Date: Tue, 3 Sep 2013 22:27:26 -0400 +Subject: [PATCH] ARM: LLVMLinux: Change "extern inline" to "static inline" in + glue-cache.h + +With compilers which follow the C99 standard (like modern versions of gcc and +clang), "extern inline" does the wrong thing (emits code for an externally +linkable version of the inline function). "static inline" is the correct choice +instead. + +[Arnout: this patch is needed to fix the build with gcc5] + +Author: Behan Webster +Signed-off-by: Behan Webster +Reviewed-by: Mark Charlebois +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + arch/arm/include/asm/glue-cache.h | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/arch/arm/include/asm/glue-cache.h b/arch/arm/include/asm/glue-cache.h +index c81adc08b3fb..a3c24cd5b7c8 100644 +--- a/arch/arm/include/asm/glue-cache.h ++++ b/arch/arm/include/asm/glue-cache.h +@@ -130,22 +130,22 @@ + #endif + + #ifndef __ASSEMBLER__ +-extern inline void nop_flush_icache_all(void) { } +-extern inline void nop_flush_kern_cache_all(void) { } +-extern inline void nop_flush_kern_cache_louis(void) { } +-extern inline void nop_flush_user_cache_all(void) { } +-extern inline void nop_flush_user_cache_range(unsigned long a, ++static inline void nop_flush_icache_all(void) { } ++static inline void nop_flush_kern_cache_all(void) { } ++static inline void nop_flush_kern_cache_louis(void) { } ++static inline void nop_flush_user_cache_all(void) { } ++static inline void nop_flush_user_cache_range(unsigned long a, + unsigned long b, unsigned int c) { } + +-extern inline void nop_coherent_kern_range(unsigned long a, unsigned long b) { } +-extern inline int nop_coherent_user_range(unsigned long a, ++static inline void nop_coherent_kern_range(unsigned long a, unsigned long b) { } ++static inline int nop_coherent_user_range(unsigned long a, + unsigned long b) { return 0; } +-extern inline void nop_flush_kern_dcache_area(void *a, size_t s) { } ++static inline void nop_flush_kern_dcache_area(void *a, size_t s) { } + +-extern inline void nop_dma_flush_range(const void *a, const void *b) { } ++static inline void nop_dma_flush_range(const void *a, const void *b) { } + +-extern inline void nop_dma_map_area(const void *s, size_t l, int f) { } +-extern inline void nop_dma_unmap_area(const void *s, size_t l, int f) { } ++static inline void nop_dma_map_area(const void *s, size_t l, int f) { } ++static inline void nop_dma_unmap_area(const void *s, size_t l, int f) { } + #endif + + #ifndef MULTI_CACHE +-- +2.11.0 + diff --git a/board/via/imx6_vab820/patches/uboot/0001-compiler-gcc.h-remove-dependency-on-compiler-gcc-345.patch b/board/altera/patches/uboot/0001-compiler-gcc.h-remove-dependency-on-compiler-gcc-345.patch similarity index 99% copy from board/via/imx6_vab820/patches/uboot/0001-compiler-gcc.h-remove-dependency-on-compiler-gcc-345.patch copy to board/altera/patches/uboot/0001-compiler-gcc.h-remove-dependency-on-compiler-gcc-345.patch index 867cbf2126..0da784cb02 100644 --- a/board/via/imx6_vab820/patches/uboot/0001-compiler-gcc.h-remove-dependency-on-compiler-gcc-345.patch +++ b/board/altera/patches/uboot/0001-compiler-gcc.h-remove-dependency-on-compiler-gcc-345.patch @@ -1,4 +1,4 @@ -From 1ed5595fc67a19ccd1503659e3845452369c96ae Mon Sep 17 00:00:00 2001 +From ef827a0768ad9c1683f49db312f8f1823b112811 Mon Sep 17 00:00:00 2001 From: "Arnout Vandecappelle (Essensium/Mind)" Date: Tue, 28 Feb 2017 13:32:48 +0100 Subject: [PATCH] compiler-gcc.h: remove dependency on compiler-gcc[345].h diff --git a/board/via/imx6_vab820/patches/uboot/0002-ARM-asm-io.h-use-static-inline.patch b/board/altera/patches/uboot/0002-ARM-asm-io.h-use-static-inline.patch similarity index 97% copy from board/via/imx6_vab820/patches/uboot/0002-ARM-asm-io.h-use-static-inline.patch copy to board/altera/patches/uboot/0002-ARM-asm-io.h-use-static-inline.patch index 9eb42d6c31..6d6c243097 100644 --- a/board/via/imx6_vab820/patches/uboot/0002-ARM-asm-io.h-use-static-inline.patch +++ b/board/altera/patches/uboot/0002-ARM-asm-io.h-use-static-inline.patch @@ -1,4 +1,4 @@ -From 158ec652dcd8ae228eeae3ae92a3d6ba48ca228e Mon Sep 17 00:00:00 2001 +From cfdf9ef7db99c9d8bb768d334c687195f7153270 Mon Sep 17 00:00:00 2001 From: Jeroen Hofstee Date: Sun, 22 Jun 2014 23:10:39 +0200 Subject: [PATCH] ARM:asm:io.h use static inline diff --git a/board/via/imx6_vab820/patches/uboot/0003-common-main.c-make-show_boot_progress-__weak.patch b/board/altera/patches/uboot/0003-common-main.c-make-show_boot_progress-__weak.patch similarity index 69% copy from board/via/imx6_vab820/patches/uboot/0003-common-main.c-make-show_boot_progress-__weak.patch copy to board/altera/patches/uboot/0003-common-main.c-make-show_boot_progress-__weak.patch index 686d448661..7d75ef204c 100644 --- a/board/via/imx6_vab820/patches/uboot/0003-common-main.c-make-show_boot_progress-__weak.patch +++ b/board/altera/patches/uboot/0003-common-main.c-make-show_boot_progress-__weak.patch @@ -1,4 +1,4 @@ -From 9cc7a26c35be56cd3f8fa3e3990b9b7e69aed031 Mon Sep 17 00:00:00 2001 +From f87d5ac472f4a9e67730eed8cbdf8fcd71c56075 Mon Sep 17 00:00:00 2001 From: Jeroen Hofstee Date: Thu, 26 Jun 2014 20:18:31 +0200 Subject: [PATCH] common: main.c: make show_boot_progress __weak @@ -13,14 +13,22 @@ Acked-by: Simon Glass (cherry picked from commit 3422299dc28fa8257677d03cc1253e3c9bf17e9f) Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- - common/main.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) + common/main.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/main.c b/common/main.c -index 145ded1fc9..b5c9bb0f35 100644 +index 9507cec88b..7bdbc4b6b5 100644 --- a/common/main.c +++ b/common/main.c -@@ -62,8 +62,7 @@ DECLARE_GLOBAL_DATA_PTR; +@@ -42,6 +42,7 @@ + + #include + #include ++#include + #include + + #if defined(CONFIG_SILENT_CONSOLE) || defined(CONFIG_POST) || defined(CONFIG_CMDLINE_EDITING) +@@ -51,8 +52,7 @@ DECLARE_GLOBAL_DATA_PTR; /* * Board-specific Platform code can reimplement show_boot_progress () if needed */ diff --git a/board/via/imx6_vab820/patches/uboot/0004-arm-board-use-__weak.patch b/board/altera/socdk/patches/uboot/0004-arm-board-use-__weak.patch similarity index 93% copy from board/via/imx6_vab820/patches/uboot/0004-arm-board-use-__weak.patch copy to board/altera/socdk/patches/uboot/0004-arm-board-use-__weak.patch index 7a96183af3..03af699153 100644 --- a/board/via/imx6_vab820/patches/uboot/0004-arm-board-use-__weak.patch +++ b/board/altera/socdk/patches/uboot/0004-arm-board-use-__weak.patch @@ -1,4 +1,4 @@ -From 99bd7b7fb4d58092f020a808bb57be3b4d4cfc51 Mon Sep 17 00:00:00 2001 +From 2c27dbf181337d2d2176cdc84e4706062a79628e Mon Sep 17 00:00:00 2001 From: "Arnout Vandecappelle (Essensium/Mind)" Date: Tue, 28 Feb 2017 14:07:30 +0100 Subject: [PATCH] arm: board: use __weak @@ -14,10 +14,10 @@ Signed-off-by: Arnout Vandecappelle (Essensium/Mind) 1 file changed, 12 insertions(+), 28 deletions(-) diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c -index 51b8628b3f..3685e65134 100644 +index 9f861ccaf6..d939189e1b 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c -@@ -82,25 +82,15 @@ extern void dataflash_print_info(void); +@@ -77,25 +77,15 @@ extern void dataflash_print_info(void); ************************************************************************ * May be supplied by boards if desired */ @@ -52,7 +52,7 @@ index 51b8628b3f..3685e65134 100644 /* ************************************************************************ -@@ -215,27 +205,21 @@ typedef int (init_fnc_t) (void); +@@ -210,27 +200,21 @@ typedef int (init_fnc_t) (void); int print_cpuinfo(void); diff --git a/configs/altera_socdk_defconfig b/configs/altera_socdk_defconfig index f5a2fc7fd0..5cae199b9e 100644 --- a/configs/altera_socdk_defconfig +++ b/configs/altera_socdk_defconfig @@ -6,6 +6,9 @@ BR2_ARM_ENABLE_NEON=y BR2_ARM_FPU_NEON=y BR2_ARM_INSTRUCTIONS_THUMB2=y +# Older Linux and U-Boot require the gcc5 patch +BR2_GLOBAL_PATCH_DIR="board/linux-gcc-patches board/altera/patches board/altera/socdk/patches" + # Linux headers same as kernel, a 3.13 series BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_13=y