gcc5 fixes for defconfigs
Subsystems (2)
cover gcc5 fixes for defconfigs
Ever since we switched to gcc5 as default, a number of defconfigs have
been failing. Since we currently don't test the defconfigs this went largely unnoticed.
This series fixes the remaining defconfigs. Since I don't have access
to most of the boards, I couldn't test the changes, so I've opted for the safe fix: apply the patch that adds gcc5 support to kernel and boot loader.
To avoid repeating the same exercise when we switch to gcc6 as default,
I've opted for the patch that removes the version-specific compiler-gcc[345].h.
Since the same kernel patch is used by a number of defconfigs, I've
put it in a common directory under board/, and use BR2_GLOBAL_PATCH_DIR to refer to it. For U-Boot that wasn't possible because the context is always slightly different. Therefore the patches are in board-specific directories. The two Altera platforms can still share some of the patches.
This series has only been build-tested, not runtime tested. However,
the compiler-gcc.h change should be safe (if it breaks something, it would be compilation itself because a definition is missing).
Note: the yocto repository used by minnowboard_defconfig seems to be
either broken or unreliable. AFAIK minnowboard should be fully supported by the upstream kernel, so it would be nice if someone who has the board could try that.
Regards,
Arnout
----------------------------------------------------------------
The following changes since commit 35e02aeb7b493d61bbc3e90903337b4964e0213c:
assimp: fix gcc version condition (2017-02-27 22:53:24 +0100)
are available in the git repository at:
http://gitlab.com/arnout/buildroot fix-defconfigs-gcc5
for you to fetch changes up to 70688c47309c7e5bfde7a835c5af5670e8c6c942:
altera_sockit_defconfig: fix build with gcc5 (2017-02-28 18:27:38 +0100)
----------------------------------------------------------------
Arnout Vandecappelle (7):
board: add shared patch to fix linux gcc5 issues
minnowboard_defconfig: fix build with gcc5
telit_evk_pro3_defconfig: fix build with gcc5
roseapplepi_defconfig: use common kernel patch for gcc5
via_imx6_vab820_defconfig: fix build with gcc5
altera_socdk_defconfig: fix build with gcc5
altera_sockit_defconfig: fix build with gcc5
...ux-Change-extern-inline-to-static-inline-.patch | 62 ++
...c.h-remove-dependency-on-compiler-gcc-345.patch | 191 +++++++
.../0002-ARM-asm-io.h-use-static-inline.patch | 81 +++
...mon-main.c-make-show_boot_progress-__weak.patch | 43 ++
.../patches/uboot/0004-arm-board-use-__weak.patch | 88 +++
.../patches/uboot/0004-arm-board-use-__weak.patch | 80 +++
...socfpga-don-t-use-extern-inline-functions.patch | 161 ++++++
...add-to-sockit-a-working-preloader-design.patch} | 20 +-
...c-integrate-the-various-compiler-gcc-345-.patch | 173 ++++++
...LVMLinux-use-static-inline-in-ARM-ftrace.patch} | 17 +-
...ove-inline-keyword-for-exported-functions.patch | 159 ++++++
.../linux/0002-kernel-add-support-for-gcc-5.patch | 99 ----
.../0001-watchdog-add-keep-alive-support.patch} | 12 +-
...2-watchdog-add-at91sam9-watchdog-support.patch} | 14 +-
...003-at91sam9260-9g20-add-wathdog-support.patch} | 8 +-
...004-at91sam9260-9g20-fix-wathdog-support.patch} | 8 +-
.../0005-watchdog-enable-for-evk-pro3.patch} | 8 +-
...ild-update-compiler-.h-to-newest-versions.patch | 632 +++++++++++++++++++++
...c.h-remove-dependency-on-compiler-gcc-345.patch | 191 +++++++
.../0002-ARM-asm-io.h-use-static-inline.patch | 81 +++
...mon-main.c-make-show_boot_progress-__weak.patch | 35 ++
.../patches/uboot/0004-arm-board-use-__weak.patch | 88 +++
configs/altera_socdk_defconfig | 3 +
configs/altera_sockit_defconfig | 4 +-
configs/minnowboard_defconfig | 3 +
configs/roseapplepi_defconfig | 2 +-
configs/telit_evk_pro3_defconfig | 4 +-
configs/via_imx6_vab820_defconfig | 3 +
28 files changed, 2125 insertions(+), 145 deletions(-)
create mode 100644 board/altera/patches/linux/0003-ARM-LLVMLinux-Change-extern-inline-to-static-inline-.patch
create mode 100644 board/altera/patches/uboot/0001-compiler-gcc.h-remove-dependency-on-compiler-gcc-345.patch
create mode 100644 board/altera/patches/uboot/0002-ARM-asm-io.h-use-static-inline.patch
create mode 100644 board/altera/patches/uboot/0003-common-main.c-make-show_boot_progress-__weak.patch
create mode 100644 board/altera/socdk/patches/uboot/0004-arm-board-use-__weak.patch
create mode 100644 board/altera/sockit/patches/uboot/0004-arm-board-use-__weak.patch
create mode 100644 board/altera/sockit/patches/uboot/0005-socfpga-don-t-use-extern-inline-functions.patch
rename board/altera/sockit/{uboot-sockit-preloader-sample-design.patch => patches/uboot/0006-board-add-to-sockit-a-working-preloader-design.patch} (98%)
create mode 100644 board/linux-gcc-patches/linux/0001-compiler-gcc-integrate-the-various-compiler-gcc-345-.patch
rename board/{roseapplepi/patches/linux/0003-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch => linux-gcc-patches/linux/0002-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch} (82%)
create mode 100644 board/minnowboard/patches/linux/0001-pch_gbe-remove-inline-keyword-for-exported-functions.patch
delete mode 100644 board/roseapplepi/patches/linux/0002-kernel-add-support-for-gcc-5.patch
rename board/telit/evk-pro3/{barebox-2013.04.0-0001-watchdog-add-keep-alive-support.patch => patches/barebox/0001-watchdog-add-keep-alive-support.patch} (89%)
rename board/telit/evk-pro3/{barebox-2013.04.0-0002-watchdog-add-at91sam9-watchdog-support.patch => patches/barebox/0002-watchdog-add-at91sam9-watchdog-support.patch} (96%)
rename board/telit/evk-pro3/{barebox-2013.04.0-0003-at91sam9260-9g20-add-wathdog-support.patch => patches/barebox/0003-at91sam9260-9g20-add-wathdog-support.patch} (87%)
rename board/telit/evk-pro3/{barebox-2013.04.0-0004-at91sam9260-9g20-fix-wathdog-support.patch => patches/barebox/0004-at91sam9260-9g20-fix-wathdog-support.patch} (82%)
rename board/telit/evk-pro3/{barebox-2013.04.0-0005-watchdog-enable-for-evk-pro3.patch => patches/barebox/0005-watchdog-enable-for-evk-pro3.patch} (80%)
create mode 100644 board/telit/evk-pro3/patches/barebox/0006-build-update-compiler-.h-to-newest-versions.patch
create mode 100644 board/via/imx6_vab820/patches/uboot/0001-compiler-gcc.h-remove-dependency-on-compiler-gcc-345.patch
create mode 100644 board/via/imx6_vab820/patches/uboot/0002-ARM-asm-io.h-use-static-inline.patch
create mode 100644 board/via/imx6_vab820/patches/uboot/0003-common-main.c-make-show_boot_progress-__weak.patch
create mode 100644 board/via/imx6_vab820/patches/uboot/0004-arm-board-use-__weak.patchPATCH 1/7 board: add shared patch to fix linux gcc5 issues
We have several defconfigs that suffer from the missing compiler-gcc5.h issue. The patch is pretty simple and universal, so we can use the same patch for all defconfigs that require it. To make this easy, create a separate directory that can be used as BR2_GLOBAL_PATCH_DIR for the defconfigs that need it.
Instead of simply adding compiler-gcc5.h, we go directly to the patch that removes compiler-gcc[345].h and puts the gcc version dependencies directly into compiler-gcc.h. Note that on older kernels this defines some macros that are not used, but that shouldn't make a difference.
---
...c-integrate-the-various-compiler-gcc-345-.patch | 173 +++++++++++++++++++++
...LVMLinux-use-static-inline-in-ARM-ftrace.patch} | 17 +-
2 files changed, 182 insertions(+), 8 deletions(-)
create mode 100644 board/linux-gcc-patches/linux/0001-compiler-gcc-integrate-the-various-compiler-gcc-345-.patch
copy board/{roseapplepi/patches/linux/0003-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch => linux-gcc-patches/linux/0002-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch} (82%)board/linux-gcc-patches/linux/0001-compiler-gcc-integrate-the-various-compiler-gcc-345-.patch new file +173 -0
@@ -0,0 +1,173 @@ +From cb984d101b30eb7478d32df56a0023e4603cba7f Mon Sep 17 00:00:00 2001 +From: Joe Perches <[email protected]> +Date: Thu, 25 Jun 2015 15:01:02 -0700 +Subject: [PATCH] compiler-gcc: integrate the various compiler-gcc[345].h files + +As gcc major version numbers are going to advance rather rapidly in the +future, there's no real value in separate files for each compiler +version. + +Deduplicate some of the macros #defined in each file too. + +Neaten comments using normal kernel commenting style. + +[Arnout: don't remove compiler-gcc[345].h to make the patch more universal. + These headers are not used anymore, but it doesn't hurt if the files + still exist. + Also, add GCC_VERSION definition (introduced in v3.9) so the same + patch can be applied to pre- and post-v3.9 kernels.] + +Signed-off-by: Joe Perches <[email protected]> +Cc: Andi Kleen <[email protected]> +Cc: Michal Marek <[email protected]> +Cc: Segher Boessenkool <[email protected]> +Cc: Sasha Levin <[email protected]> +Cc: Anton Blanchard <[email protected]> +Cc: Alan Modra <[email protected]> +Signed-off-by: Andrew Morton <[email protected]> +Signed-off-by: Linus Torvalds <[email protected]> +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]> +--- + include/linux/compiler-gcc.h | 120 ++++++++++++++++++++++++++++++++++++++++-- + 4 files changed, 116 insertions(+), 185 deletions(-) + +diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h +index 5c2c14e3c647..dfaa7b3e9ae9 100644 +--- a/include/linux/compiler-gcc.h ++++ b/include/linux/compiler-gcc.h +@@ -122,10 +122,128 @@ + #define __maybe_unused __attribute__((unused)) + #define __always_unused __attribute__((unused)) + +-#define __gcc_header(x) #x +-#define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h) +-#define gcc_header(x) _gcc_header(x) +-#include gcc_header(__GNUC__) ++/* gcc version specific checks */ ++ ++#ifndef GCC_VERSION ++#define GCC_VERSION (__GNUC__ * 10000 \ ++ + __GNUC_MINOR__ * 100 \ ++ + __GNUC_PATCHLEVEL__) ++#endif ++ ++#if GCC_VERSION < 30200 ++# error Sorry, your compiler is too old - please upgrade it. ++#endif ++ ++#if GCC_VERSION < 30300 ++# define __used __attribute__((__unused__)) ++#else ++# define __used __attribute__((__used__)) ++#endif ++ ++#ifdef CONFIG_GCOV_KERNEL ++# if GCC_VERSION < 30400 ++# error "GCOV profiling support for gcc versions below 3.4 not included" ++# endif /* __GNUC_MINOR__ */ ++#endif /* CONFIG_GCOV_KERNEL */ ++ ++#if GCC_VERSION >= 30400 ++#define __must_check __attribute__((warn_unused_result)) ++#endif ++ ++#if GCC_VERSION >= 40000 ++ ++/* GCC 4.1.[01] miscompiles __weak */ ++#ifdef __KERNEL__ ++# if GCC_VERSION >= 40100 && GCC_VERSION <= 40101 ++# error Your version of gcc miscompiles the __weak directive ++# endif ++#endif ++ ++#define __used __attribute__((__used__)) ++#define __compiler_offsetof(a, b) \ ++ __builtin_offsetof(a, b) ++ ++#if GCC_VERSION >= 40100 && GCC_VERSION < 40600 ++# define __compiletime_object_size(obj) __builtin_object_size(obj, 0) ++#endif ++ ++#if GCC_VERSION >= 40300 ++/* 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__ */ ++#endif /* GCC_VERSION >= 40300 */ ++ ++#if GCC_VERSION >= 40500 ++/* ++ * 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__)) ++ ++#endif /* GCC_VERSION >= 40500 */ ++ ++#if GCC_VERSION >= 40600 ++/* ++ * Tell the optimizer that something else uses this function or variable. ++ */ ++#define __visible __attribute__((externally_visible)) ++#endif ++ ++/* ++ * 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 ++#if GCC_VERSION >= 40400 ++#define __HAVE_BUILTIN_BSWAP32__ ++#define __HAVE_BUILTIN_BSWAP64__ ++#endif ++#if GCC_VERSION >= 40800 || (defined(__powerpc__) && GCC_VERSION >= 40600) ++#define __HAVE_BUILTIN_BSWAP16__ ++#endif ++#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ ++ ++#if GCC_VERSION >= 50000 ++#define KASAN_ABI_VERSION 4 ++#elif GCC_VERSION >= 40902 ++#define KASAN_ABI_VERSION 3 ++#endif ++ ++#endif /* gcc version >= 40000 specific checks */ + + #if !defined(__noclone) + #define __noclone /* not needed */ +-- +2.11.0 +
board/linux-gcc-patches/linux/0002-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch renamed from board/roseapplepi/patches/linux/0003-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch +9 -8
@@ -1,4 +1,4 @@ -From 8ac9a3f6dbf00d861134bea3f2c930defed6311a Mon Sep 17 00:00:00 2001 +From aeea3592a13bf12861943e44fc48f1f270941f8d Mon Sep 17 00:00:00 2001 From: Behan Webster <[email protected]> Date: Wed, 24 Sep 2014 01:06:46 +0100 Subject: [PATCH] ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h
@@ -9,19 +9,20 @@ linkable version of the inline function). In this case using static inline and removing the NULL version of return_address in return_address.c does the right thing. +[Arnout: this patch is needed to fix the build with gcc5] + Signed-off-by: Behan Webster <[email protected]> Reviewed-by: Mark Charlebois <[email protected]> Acked-by: Steven Rostedt <[email protected]> Signed-off-by: Russell King <[email protected]> -(cherry picked from commit aeea3592a13bf12861943e44fc48f1f270941f8d) -Signed-off-by: Peter Korsgaard <[email protected]> +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]> --- arch/arm/include/asm/ftrace.h | 2 +- arch/arm/kernel/return_address.c | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h -index f89515a..2bb8cac 100644 +index 39eb16b0066f..bfe2a2f5a644 100644 --- a/arch/arm/include/asm/ftrace.h +++ b/arch/arm/include/asm/ftrace.h @@ -45,7 +45,7 @@ void *return_address(unsigned int);
@@ -34,12 +35,12 @@ index f89515a..2bb8cac 100644 return NULL; } diff --git a/arch/arm/kernel/return_address.c b/arch/arm/kernel/return_address.c -index 2f8f523..a3b587f 100755 +index fafedd86885d..f6aa84d5b93c 100644 --- a/arch/arm/kernel/return_address.c +++ b/arch/arm/kernel/return_address.c @@ -63,11 +63,6 @@ void *return_address(unsigned int level) - //#warning "TODO: return_address should use unwind tables" - //#endif + #warning "TODO: return_address should use unwind tables" + #endif -void *return_address(unsigned int level) -{
@@ -50,5 +51,5 @@ index 2f8f523..a3b587f 100755 EXPORT_SYMBOL_GPL(return_address); -- -2.10.2 +2.11.0
Signature · 1 line
2.11.0
PATCH 2/7 minnowboard_defconfig: fix build with gcc5
In reply to Arnout Vandecappelle (Essensium/Mind)The kernel don't have the compiler-gcc5.h header, so include the universal patch that fixes this issue.
--- ...ove-inline-keyword-for-exported-functions.patch | 159 +++++++++++++++++++++ configs/minnowboard_defconfig | 3 + 2 files changed, 162 insertions(+) create mode 100644 board/minnowboard/patches/linux/0001-pch_gbe-remove-inline-keyword-for-exported-functions.patch
board/minnowboard/patches/linux/0001-pch_gbe-remove-inline-keyword-for-exported-functions.patch new file +159 -0
@@ -0,0 +1,159 @@ +From a6c8ff27855951cf49bc0ecf7c7ad4dd91437357 Mon Sep 17 00:00:00 2001 +From: Andy Shevchenko <[email protected]> +Date: Fri, 28 Jun 2013 14:02:52 +0300 +Subject: [PATCH] pch_gbe: remove inline keyword for exported functions + +There is no much sense to mark functions inline that are going to be used in +the other compile modules. + +[Arnout: this patch is needed to fix the build with gcc5] + +Signed-off-by: Andy Shevchenko <[email protected]> +Signed-off-by: David S. Miller <[email protected]> +(cherry picked from commit bd79680956573dd70bfa207af6b143aa94980b96) +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]> +--- + drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_api.c | 21 +++++++++++---------- + .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 2 +- + drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.c | 3 +-- + 3 files changed, 13 insertions(+), 13 deletions(-) + +diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_api.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_api.c +index 5ae03e815ee9..82e72b21a8fb 100644 +--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_api.c ++++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_api.c +@@ -19,6 +19,7 @@ + */ + #include "pch_gbe.h" + #include "pch_gbe_phy.h" ++#include "pch_gbe_api.h" + + /* bus type values */ + #define pch_gbe_bus_type_unknown 0 +@@ -112,7 +113,7 @@ static void pch_gbe_plat_init_function_pointers(struct pch_gbe_hw *hw) + * 0: Successfully + * ENOSYS: Function is not registered + */ +-inline s32 pch_gbe_hal_setup_init_funcs(struct pch_gbe_hw *hw) ++s32 pch_gbe_hal_setup_init_funcs(struct pch_gbe_hw *hw) + { + if (!hw->reg) { + pr_err("ERROR: Registers not mapped\n"); +@@ -126,7 +127,7 @@ inline s32 pch_gbe_hal_setup_init_funcs(struct pch_gbe_hw *hw) + * pch_gbe_hal_get_bus_info - Obtain bus information for adapter + * @hw: Pointer to the HW structure + */ +-inline void pch_gbe_hal_get_bus_info(struct pch_gbe_hw *hw) ++void pch_gbe_hal_get_bus_info(struct pch_gbe_hw *hw) + { + if (!hw->func->get_bus_info) + pr_err("ERROR: configuration\n"); +@@ -141,7 +142,7 @@ inline void pch_gbe_hal_get_bus_info(struct pch_gbe_hw *hw) + * 0: Successfully + * ENOSYS: Function is not registered + */ +-inline s32 pch_gbe_hal_init_hw(struct pch_gbe_hw *hw) ++s32 pch_gbe_hal_init_hw(struct pch_gbe_hw *hw) + { + if (!hw->func->init_hw) { + pr_err("ERROR: configuration\n"); +@@ -159,7 +160,7 @@ inline s32 pch_gbe_hal_init_hw(struct pch_gbe_hw *hw) + * 0: Successfully + * Negative value: Failed + */ +-inline s32 pch_gbe_hal_read_phy_reg(struct pch_gbe_hw *hw, u32 offset, ++s32 pch_gbe_hal_read_phy_reg(struct pch_gbe_hw *hw, u32 offset, + u16 *data) + { + if (!hw->func->read_phy_reg) +@@ -176,7 +177,7 @@ inline s32 pch_gbe_hal_read_phy_reg(struct pch_gbe_hw *hw, u32 offset, + * 0: Successfully + * Negative value: Failed + */ +-inline s32 pch_gbe_hal_write_phy_reg(struct pch_gbe_hw *hw, u32 offset, ++s32 pch_gbe_hal_write_phy_reg(struct pch_gbe_hw *hw, u32 offset, + u16 data) + { + if (!hw->func->write_phy_reg) +@@ -188,7 +189,7 @@ inline s32 pch_gbe_hal_write_phy_reg(struct pch_gbe_hw *hw, u32 offset, + * pch_gbe_hal_phy_hw_reset - Hard PHY reset + * @hw: Pointer to the HW structure + */ +-inline void pch_gbe_hal_phy_hw_reset(struct pch_gbe_hw *hw) ++void pch_gbe_hal_phy_hw_reset(struct pch_gbe_hw *hw) + { + if (!hw->func->reset_phy) + pr_err("ERROR: configuration\n"); +@@ -200,7 +201,7 @@ inline void pch_gbe_hal_phy_hw_reset(struct pch_gbe_hw *hw) + * pch_gbe_hal_phy_sw_reset - Soft PHY reset + * @hw: Pointer to the HW structure + */ +-inline void pch_gbe_hal_phy_sw_reset(struct pch_gbe_hw *hw) ++void pch_gbe_hal_phy_sw_reset(struct pch_gbe_hw *hw) + { + if (!hw->func->sw_reset_phy) + pr_err("ERROR: configuration\n"); +@@ -215,7 +216,7 @@ inline void pch_gbe_hal_phy_sw_reset(struct pch_gbe_hw *hw) + * 0: Successfully + * ENOSYS: Function is not registered + */ +-inline s32 pch_gbe_hal_read_mac_addr(struct pch_gbe_hw *hw) ++s32 pch_gbe_hal_read_mac_addr(struct pch_gbe_hw *hw) + { + if (!hw->func->read_mac_addr) { + pr_err("ERROR: configuration\n"); +@@ -228,7 +229,7 @@ inline s32 pch_gbe_hal_read_mac_addr(struct pch_gbe_hw *hw) + * pch_gbe_hal_power_up_phy - Power up PHY + * @hw: Pointer to the HW structure + */ +-inline void pch_gbe_hal_power_up_phy(struct pch_gbe_hw *hw) ++void pch_gbe_hal_power_up_phy(struct pch_gbe_hw *hw) + { + if (hw->func->power_up_phy) + hw->func->power_up_phy(hw); +@@ -238,7 +239,7 @@ inline void pch_gbe_hal_power_up_phy(struct pch_gbe_hw *hw) + * pch_gbe_hal_power_down_phy - Power down PHY + * @hw: Pointer to the HW structure + */ +-inline void pch_gbe_hal_power_down_phy(struct pch_gbe_hw *hw) ++void pch_gbe_hal_power_down_phy(struct pch_gbe_hw *hw) + { + if (hw->func->power_down_phy) + hw->func->power_down_phy(hw); +diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +index f487ad71922f..a1b2be0aba94 100644 +--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c ++++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +@@ -289,7 +289,7 @@ static int hwtstamp_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) + return copy_to_user(ifr->ifr_data, &cfg, sizeof(cfg)) ? -EFAULT : 0; + } + +-inline void pch_gbe_mac_load_mac_addr(struct pch_gbe_hw *hw) ++static inline void pch_gbe_mac_load_mac_addr(struct pch_gbe_hw *hw) + { + iowrite32(0x01, &hw->reg->MAC_ADDR_LOAD); + } +diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.c +index bb8d8b45788d..7ee1c035b65e 100644 +--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.c ++++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.c +@@ -245,7 +245,7 @@ void pch_gbe_phy_power_down(struct pch_gbe_hw *hw) + * pch_gbe_phy_set_rgmii - RGMII interface setting + * @hw: Pointer to the HW structure + */ +-inline void pch_gbe_phy_set_rgmii(struct pch_gbe_hw *hw) ++void pch_gbe_phy_set_rgmii(struct pch_gbe_hw *hw) + { + pch_gbe_phy_sw_reset(hw); + } +@@ -280,7 +280,6 @@ void pch_gbe_phy_init_setting(struct pch_gbe_hw *hw) + pch_gbe_phy_read_reg_miic(hw, PHY_PHYSP_CONTROL, &mii_reg); + mii_reg |= PHYSP_CTRL_ASSERT_CRS_TX; + pch_gbe_phy_write_reg_miic(hw, PHY_PHYSP_CONTROL, mii_reg); +- + /* Setup a TX clock delay for certain boards */ + if (hw->phy.tx_clk_delay) + pch_gbe_phy_tx_clk_delay(hw); +-- +2.11.0 +
configs/minnowboard_defconfig +3 -0
@@ -8,6 +8,9 @@ BR2_ROOTFS_POST_BUILD_SCRIPT="board/minnowboard/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/minnowboard/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="minnowboard" +# Older Linux requires the gcc5 patch +BR2_GLOBAL_PATCH_DIR="board/linux-gcc-patches board/minnowboard/patches" + # Linux headers same as kernel, a 3.8 series BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_8=y BR2_PACKAGE_HOST_DOSFSTOOLS=y
Signature · 1 line
2.11.0
PATCH 3/7 telit_evk_pro3_defconfig: fix build with gcc5
In reply to Arnout Vandecappelle (Essensium/Mind)Kernel doesn't have the compiler-gcc5.h header, so include the universal patch that fixes this issue.
Barebox also doesn't have the compiler-gcc5.h header. Add this patch (cherry-picked from upstream). While we're at it, use BR2_GLOBAL_PATCH_DIR for pointing to the barebox patches rather than BR2_BAREBOX_CUSTOM_PATCH_DIR, and regenerate patches without the n/N header.
---
.../0001-watchdog-add-keep-alive-support.patch} | 12 +-
...2-watchdog-add-at91sam9-watchdog-support.patch} | 14 +-
...003-at91sam9260-9g20-add-wathdog-support.patch} | 8 +-
...004-at91sam9260-9g20-fix-wathdog-support.patch} | 8 +-
.../0005-watchdog-enable-for-evk-pro3.patch} | 8 +-
...ild-update-compiler-.h-to-newest-versions.patch | 632 +++++++++++++++++++++
configs/telit_evk_pro3_defconfig | 4 +-
7 files changed, 660 insertions(+), 26 deletions(-)
rename board/telit/evk-pro3/{barebox-2013.04.0-0001-watchdog-add-keep-alive-support.patch => patches/barebox/0001-watchdog-add-keep-alive-support.patch} (89%)
rename board/telit/evk-pro3/{barebox-2013.04.0-0002-watchdog-add-at91sam9-watchdog-support.patch => patches/barebox/0002-watchdog-add-at91sam9-watchdog-support.patch} (96%)
rename board/telit/evk-pro3/{barebox-2013.04.0-0003-at91sam9260-9g20-add-wathdog-support.patch => patches/barebox/0003-at91sam9260-9g20-add-wathdog-support.patch} (87%)
rename board/telit/evk-pro3/{barebox-2013.04.0-0004-at91sam9260-9g20-fix-wathdog-support.patch => patches/barebox/0004-at91sam9260-9g20-fix-wathdog-support.patch} (82%)
rename board/telit/evk-pro3/{barebox-2013.04.0-0005-watchdog-enable-for-evk-pro3.patch => patches/barebox/0005-watchdog-enable-for-evk-pro3.patch} (80%)
create mode 100644 board/telit/evk-pro3/patches/barebox/0006-build-update-compiler-.h-to-newest-versions.patchboard/telit/evk-pro3/patches/barebox/0001-watchdog-add-keep-alive-support.patch renamed from board/telit/evk-pro3/barebox-2013.04.0-0001-watchdog-add-keep-alive-support.patch +6 -6
@@ -1,7 +1,7 @@ -From b5e57a9f158a293b1151638336478af8a5aad0f0 Mon Sep 17 00:00:00 2001 +From 04d946493cbc9cef3d91ebf378c74c74627444c8 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD <[email protected]> Date: Wed, 14 Nov 2012 19:16:35 +0800 -Subject: [PATCH 1/5] watchdog: add keep alive support +Subject: [PATCH] watchdog: add keep alive support this will allow to ping the watchdog via poller
@@ -13,7 +13,7 @@ Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]> 3 files changed, 24 insertions(+) diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig -index 2e2900c..0b4dc84 100644 +index 2e2900c10..0b4dc8479 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -4,6 +4,7 @@ config WATCHDOG_IMX_RESET_SOURCE
@@ -25,7 +25,7 @@ index 2e2900c..0b4dc84 100644 Many platforms support a watchdog to keep track of a working machine. This framework provides routines to handle these watchdogs. diff --git a/drivers/watchdog/wd_core.c b/drivers/watchdog/wd_core.c -index 3d0cfc6..a1b9e28 100644 +index 3d0cfc635..a1b9e2880 100644 --- a/drivers/watchdog/wd_core.c +++ b/drivers/watchdog/wd_core.c @@ -17,18 +17,39 @@
@@ -69,7 +69,7 @@ index 3d0cfc6..a1b9e28 100644 } EXPORT_SYMBOL(watchdog_register); diff --git a/include/watchdog.h b/include/watchdog.h -index 3e2d08e..d5ecf2f 100644 +index 3e2d08e87..d5ecf2f6a 100644 --- a/include/watchdog.h +++ b/include/watchdog.h @@ -13,8 +13,10 @@
@@ -84,5 +84,5 @@ index 3e2d08e..d5ecf2f 100644 int watchdog_register(struct watchdog *); -- -1.8.1.4 +2.11.0
board/telit/evk-pro3/patches/barebox/0002-watchdog-add-at91sam9-watchdog-support.patch renamed from board/telit/evk-pro3/barebox-2013.04.0-0002-watchdog-add-at91sam9-watchdog-support.patch +7 -7
@@ -1,7 +1,7 @@ -From e1d54ffb987c346c45c20968be34c50c62a91c07 Mon Sep 17 00:00:00 2001 +From 57826735e3d2876ab20be73cd6c6eda5f9200c66 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD <[email protected]> Date: Wed, 14 Nov 2012 19:17:47 +0800 -Subject: [PATCH 2/5] watchdog: add at91sam9 watchdog support +Subject: [PATCH] watchdog: add at91sam9 watchdog support with keep alive support
@@ -16,7 +16,7 @@ Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]> create mode 100644 drivers/watchdog/at91sam9_wdt.h diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig -index 0b4dc84..98a21d7 100644 +index 0b4dc8479..98a21d7be 100644 --- a/drivers/watchdog/Kconfig +++ b/drivers/watchdog/Kconfig @@ -11,6 +11,13 @@ menuconfig WATCHDOG
@@ -34,7 +34,7 @@ index 0b4dc84..98a21d7 100644 bool "i.MX28" depends on ARCH_IMX28 diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile -index f522b88..3d15d52 100644 +index f522b8870..3d15d5223 100644 --- a/drivers/watchdog/Makefile +++ b/drivers/watchdog/Makefile @@ -1,3 +1,4 @@
@@ -44,7 +44,7 @@ index f522b88..3d15d52 100644 obj-$(CONFIG_WATCHDOG_IMX_RESET_SOURCE) += imxwd.o diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c new file mode 100644 -index 0000000..203d83a +index 000000000..203d83aff --- /dev/null +++ b/drivers/watchdog/at91sam9_wdt.c @@ -0,0 +1,131 @@
@@ -181,7 +181,7 @@ index 0000000..203d83a +coredevice_initcall(at91sam9_wdt_init); diff --git a/drivers/watchdog/at91sam9_wdt.h b/drivers/watchdog/at91sam9_wdt.h new file mode 100644 -index 0000000..2b68c1a +index 000000000..2b68c1a2a --- /dev/null +++ b/drivers/watchdog/at91sam9_wdt.h @@ -0,0 +1,38 @@
@@ -224,5 +224,5 @@ index 0000000..2b68c1a + +#endif -- -1.8.1.4 +2.11.0
board/telit/evk-pro3/patches/barebox/0003-at91sam9260-9g20-add-wathdog-support.patch renamed from board/telit/evk-pro3/barebox-2013.04.0-0003-at91sam9260-9g20-add-wathdog-support.patch +4 -4
@@ -1,7 +1,7 @@ -From 3338bcb05479f1149420d4a0ea3904cb9e42eef5 Mon Sep 17 00:00:00 2001 +From f14303a9444aeee718dbc549259cfe060129195f Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD <[email protected]> Date: Wed, 14 Nov 2012 19:18:22 +0800 -Subject: [PATCH 3/5] at91sam9260/9g20: add wathdog support +Subject: [PATCH] at91sam9260/9g20: add wathdog support Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]> ---
@@ -9,7 +9,7 @@ Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]> 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c -index 1c375ee..5885f91 100644 +index 1c375eef9..5885f91ed 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c @@ -10,6 +10,7 @@
@@ -36,5 +36,5 @@ index 1c375ee..5885f91 100644 +coredevice_initcall(at91_add_device_watchdog); +#endif -- -1.8.1.4 +2.11.0
board/telit/evk-pro3/patches/barebox/0004-at91sam9260-9g20-fix-wathdog-support.patch renamed from board/telit/evk-pro3/barebox-2013.04.0-0004-at91sam9260-9g20-fix-wathdog-support.patch +4 -4
@@ -1,7 +1,7 @@ -From e03bf0e3ad24898019b89eb9a6935d159c60268f Mon Sep 17 00:00:00 2001 +From a0078fcb5c3c312c5464644348d68a5d69a5904c Mon Sep 17 00:00:00 2001 From: Fabio Porcedda <[email protected]> Date: Thu, 17 Jan 2013 11:32:35 +0100 -Subject: [PATCH 4/5] at91sam9260/9g20: fix wathdog support +Subject: [PATCH] at91sam9260/9g20: fix wathdog support Signed-off-by: Fabio Porcedda <[email protected]> ---
@@ -9,7 +9,7 @@ Signed-off-by: Fabio Porcedda <[email protected]> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c -index 5885f91..df675d2 100644 +index 5885f91ed..df675d264 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c @@ -403,7 +403,7 @@ void at91_add_device_mci(short mmc_id, struct atmel_mci_platform_data *data) {}
@@ -22,5 +22,5 @@ index 5885f91..df675d2 100644 return 0; } -- -1.8.1.4 +2.11.0
board/telit/evk-pro3/patches/barebox/0005-watchdog-enable-for-evk-pro3.patch renamed from board/telit/evk-pro3/barebox-2013.04.0-0005-watchdog-enable-for-evk-pro3.patch +4 -4
@@ -1,7 +1,7 @@ -From 98c96ea36a4b3bb9b92dde849db5e8d6918b5168 Mon Sep 17 00:00:00 2001 +From c2f67ab014121023f0c02356a4ba2ab7391cff36 Mon Sep 17 00:00:00 2001 From: Fabio Porcedda <[email protected]> Date: Thu, 17 Jan 2013 11:32:59 +0100 -Subject: [PATCH 5/5] watchdog: enable for evk-pro3 +Subject: [PATCH] watchdog: enable for evk-pro3 Signed-off-by: Fabio Porcedda <[email protected]> ---
@@ -9,7 +9,7 @@ Signed-off-by: Fabio Porcedda <[email protected]> 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/telit_evk_pro3_defconfig b/arch/arm/configs/telit_evk_pro3_defconfig -index 050d176..436cecf 100644 +index 050d1763b..436cecf40 100644 --- a/arch/arm/configs/telit_evk_pro3_defconfig +++ b/arch/arm/configs/telit_evk_pro3_defconfig @@ -68,6 +68,8 @@ CONFIG_MCI_ATMEL=y
@@ -22,5 +22,5 @@ index 050d176..436cecf 100644 CONFIG_FS_FAT=y CONFIG_FS_FAT_LFN=y -- -1.8.1.4 +2.11.0
board/telit/evk-pro3/patches/barebox/0006-build-update-compiler-.h-to-newest-versions.patch new file +632 -0
632 lines not on this page · raw message
configs/telit_evk_pro3_defconfig +3 -1
@@ -2,6 +2,9 @@ BR2_arm=y BR2_arm926t=y +# Older Linux requires the gcc5 patch; barebox needs patches as well +BR2_GLOBAL_PATCH_DIR="board/linux-gcc-patches board/telit/evk-pro3/patches" + # Linux headers same as kernel, a 3.9 series BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_9=y
@@ -16,7 +19,6 @@ BR2_TARGET_ROOTFS_UBI=y BR2_TARGET_BAREBOX=y BR2_TARGET_BAREBOX_CUSTOM_VERSION=y BR2_TARGET_BAREBOX_CUSTOM_VERSION_VALUE="2013.04.0" -BR2_TARGET_BAREBOX_CUSTOM_PATCH_DIR="board/telit/evk-pro3" BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="telit_evk_pro3" # Kernel
Signature · 1 line
2.11.0
PATCH 4/7 roseapplepi_defconfig: use common kernel patch for gcc5
In reply to Arnout Vandecappelle (Essensium/Mind)We now have a universal patch for the missing compiler-gcc5.h, so this patch can be used instead of a patch specific for roseapplepi.
--- .../linux/0002-kernel-add-support-for-gcc-5.patch | 99 ---------------------- ...LLVMLinux-use-static-inline-in-ARM-ftrace.patch | 54 ------------ configs/roseapplepi_defconfig | 2 +- 3 files changed, 1 insertion(+), 154 deletions(-) delete mode 100644 board/roseapplepi/patches/linux/0002-kernel-add-support-for-gcc-5.patch delete mode 100644 board/roseapplepi/patches/linux/0003-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch
board/roseapplepi/patches/linux/0002-kernel-add-support-for-gcc-5.patch deleted +0 -99
@@ -1,99 +0,0 @@ -From 96b4fb75d15be65edc5494579e4a944534042f99 Mon Sep 17 00:00:00 2001 -From: Sasha Levin <[email protected]> -Date: Mon, 13 Oct 2014 15:51:05 -0700 -Subject: [PATCH] kernel: add support for gcc 5 - -We're missing include/linux/compiler-gcc5.h which is required now -because gcc branched off to v5 in trunk. - -Just copy the relevant bits out of include/linux/compiler-gcc4.h, -no new code is added as of now. - -This fixes a build error when using gcc 5. - -Signed-off-by: Sasha Levin <[email protected]> -Cc: <[email protected]> -Signed-off-by: Andrew Morton <[email protected]> -Signed-off-by: Linus Torvalds <[email protected]> -(cherry picked from commit 71458cfc782eafe4b27656e078d379a34e472adf) -Signed-off-by: Peter Korsgaard <[email protected]> ---- - include/linux/compiler-gcc5.h | 66 +++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 66 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..cdd1cc2 ---- /dev/null -+++ b/include/linux/compiler-gcc5.h -@@ -0,0 +1,66 @@ -+#ifndef __LINUX_COMPILER_H -+#error "Please don't include <linux/compiler-gcc5.h> directly, include <linux/compiler.h> 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. -+ * Fixed in GCC 4.8.2 and later versions. -+ * -+ * (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.10.2 -
board/roseapplepi/patches/linux/0003-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch deleted +0 -54
54 lines not on this page · raw message
configs/roseapplepi_defconfig +1 -1
@@ -3,7 +3,7 @@ BR2_cortex_a9=y BR2_ARM_ENABLE_NEON=y BR2_ARM_ENABLE_VFP=y -BR2_GLOBAL_PATCH_DIR="board/roseapplepi/patches" +BR2_GLOBAL_PATCH_DIR="board/linux-gcc-patches board/roseapplepi/patches" # Linux headers same as kernel, a 3.10 series BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_10=y BR2_ROOTFS_POST_IMAGE_SCRIPT="board/roseapplepi/post-image.sh"
Signature · 1 line
2.11.0
PATCH 5/7 via_imx6_vab820_defconfig: fix build with gcc5
In reply to Arnout Vandecappelle (Essensium/Mind)Kernel doesn't have the compiler-gcc5.h header, so include the universal patch that fixes this issue.
U-Boot doesn't have the compiler-gcc5.h header and has several other problems. Get upstream patches to fix those.
U-Boot patches are needed for several defconfigs, but they differ slightly in the context. However, the patches have been written in a generic way so they are almost identicat between boards.
---
....h-remove-dependency-on-compiler-gcc-345.patch} | 84 +++++++++++++--------
.../0002-ARM-asm-io.h-use-static-inline.patch | 81 ++++++++++++++++++++
...mon-main.c-make-show_boot_progress-__weak.patch | 35 +++++++++
.../patches/uboot/0004-arm-board-use-__weak.patch | 88 ++++++++++++++++++++++
configs/via_imx6_vab820_defconfig | 3 +
5 files changed, 258 insertions(+), 33 deletions(-)
copy board/{linux-gcc-patches/linux/0001-compiler-gcc-integrate-the-various-compiler-gcc-345-.patch => via/imx6_vab820/patches/uboot/0001-compiler-gcc.h-remove-dependency-on-compiler-gcc-345.patch} (63%)
create mode 100644 board/via/imx6_vab820/patches/uboot/0002-ARM-asm-io.h-use-static-inline.patch
create mode 100644 board/via/imx6_vab820/patches/uboot/0003-common-main.c-make-show_boot_progress-__weak.patch
create mode 100644 board/via/imx6_vab820/patches/uboot/0004-arm-board-use-__weak.patchboard/via/imx6_vab820/patches/uboot/0001-compiler-gcc.h-remove-dependency-on-compiler-gcc-345.patch renamed from board/linux-gcc-patches/linux/0001-compiler-gcc-integrate-the-various-compiler-gcc-345-.patch +51 -33
@@ -1,43 +1,35 @@ -From cb984d101b30eb7478d32df56a0023e4603cba7f Mon Sep 17 00:00:00 2001 -From: Joe Perches <[email protected]> -Date: Thu, 25 Jun 2015 15:01:02 -0700 -Subject: [PATCH] compiler-gcc: integrate the various compiler-gcc[345].h files +From 1ed5595fc67a19ccd1503659e3845452369c96ae Mon Sep 17 00:00:00 2001 +From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]> +Date: Tue, 28 Feb 2017 13:32:48 +0100 +Subject: [PATCH] compiler-gcc.h: remove dependency on compiler-gcc[345].h -As gcc major version numbers are going to advance rather rapidly in the -future, there's no real value in separate files for each compiler -version. +This is based on commit 9b2c282b348dfe966bbba967dc7a45ce817cce50 upstream. -Deduplicate some of the macros #defined in each file too. +Copy these from Linux v4.5-rc6 tag. -Neaten comments using normal kernel commenting style. +This is needed so that we can keep up with newer gcc versions. Note +that we don't have the uapi/ hierarchy from the kernel so continue to +use <linux/types.h> -[Arnout: don't remove compiler-gcc[345].h to make the patch more universal. - These headers are not used anymore, but it doesn't hurt if the files - still exist. - Also, add GCC_VERSION definition (introduced in v3.9) so the same - patch can be applied to pre- and post-v3.9 kernels.] +[Arnout: limit the changes to purely what is needed to get rid of + compiler-gcc[345].h. This gives us the best chance that the + patch applies to some random U-Boot version. Also, don't + remove compiler-gcc[345].h, in case they have changed or don't + exist yet.] -Signed-off-by: Joe Perches <[email protected]> -Cc: Andi Kleen <[email protected]> -Cc: Michal Marek <[email protected]> -Cc: Segher Boessenkool <[email protected]> -Cc: Sasha Levin <[email protected]> -Cc: Anton Blanchard <[email protected]> -Cc: Alan Modra <[email protected]> -Signed-off-by: Andrew Morton <[email protected]> -Signed-off-by: Linus Torvalds <[email protected]> +Signed-off-by: Tom Rini <[email protected]> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]> --- - include/linux/compiler-gcc.h | 120 ++++++++++++++++++++++++++++++++++++++++-- - 4 files changed, 116 insertions(+), 185 deletions(-) + include/linux/compiler-gcc.h | 155 +++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 151 insertions(+), 4 deletions(-) diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h -index 5c2c14e3c647..dfaa7b3e9ae9 100644 +index 73dcf804bc..1ad6c64b47 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h -@@ -122,10 +122,128 @@ - #define __maybe_unused __attribute__((unused)) - #define __always_unused __attribute__((unused)) +@@ -81,7 +81,154 @@ + #define __maybe_unused __attribute__((unused)) + #define __always_unused __attribute__((unused)) -#define __gcc_header(x) #x -#define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h)
@@ -132,11 +124,31 @@ index 5c2c14e3c647..dfaa7b3e9ae9 100644 + +#if GCC_VERSION >= 40600 +/* -+ * Tell the optimizer that something else uses this function or variable. ++ * When used with Link Time Optimization, gcc can optimize away C functions or ++ * variables which are referenced only from assembly code. __visible tells the ++ * optimizer that something else uses this function or variable, thus preventing ++ * this. + */ +#define __visible __attribute__((externally_visible)) +#endif + ++ ++#if GCC_VERSION >= 40900 && !defined(__CHECKER__) ++/* ++ * __assume_aligned(n, k): Tell the optimizer that the returned ++ * pointer can be assumed to be k modulo n. The second argument is ++ * optional (default 0), so we use a variadic macro to make the ++ * shorthand. ++ * ++ * Beware: Do not apply this to functions which may return ++ * ERR_PTRs. Also, it is probably unwise to apply it to functions ++ * returning extra information in the low bits (but in that case the ++ * compiler should see some alignment anyway, when the return value is ++ * massaged by 'flags = ptr & 3; ptr &= ~3;'). ++ */ ++#define __assume_aligned(a, ...) __attribute__((__assume_aligned__(a, ## __VA_ARGS__))) ++#endif ++ +/* + * GCC 'asm goto' miscompiles certain code sequences: + *
@@ -164,10 +176,16 @@ index 5c2c14e3c647..dfaa7b3e9ae9 100644 +#define KASAN_ABI_VERSION 3 +#endif + ++#if GCC_VERSION >= 40902 ++/* ++ * Tell the compiler that address safety instrumentation (KASAN) ++ * should not be applied to that function. ++ * Conflicts with inlining: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368 ++ */ ++#define __no_sanitize_address __attribute__((no_sanitize_address)) ++#endif ++ +#endif /* gcc version >= 40000 specific checks */ - - #if !defined(__noclone) - #define __noclone /* not needed */ -- 2.11.0
board/via/imx6_vab820/patches/uboot/0002-ARM-asm-io.h-use-static-inline.patch new file +81 -0
81 lines not on this page · raw message
board/via/imx6_vab820/patches/uboot/0003-common-main.c-make-show_boot_progress-__weak.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 9cc7a26c35be56cd3f8fa3e3990b9b7e69aed031 Mon Sep 17 00:00:00 2001 +From: Jeroen Hofstee <[email protected]> +Date: Thu, 26 Jun 2014 20:18:31 +0200 +Subject: [PATCH] common: main.c: make show_boot_progress __weak + +This not only looks a bit better it also prevents a +warning with W=1 (no previous prototype). + +[Arnout: this patch is needed to fix the build with gcc5] + +Signed-off-by: Jeroen Hofstee <[email protected]> +Acked-by: Simon Glass <[email protected]> +(cherry picked from commit 3422299dc28fa8257677d03cc1253e3c9bf17e9f) +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]> +--- + common/main.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/common/main.c b/common/main.c +index 145ded1fc9..b5c9bb0f35 100644 +--- a/common/main.c ++++ b/common/main.c +@@ -62,8 +62,7 @@ DECLARE_GLOBAL_DATA_PTR; + /* + * Board-specific Platform code can reimplement show_boot_progress () if needed + */ +-void inline __show_boot_progress (int val) {} +-void show_boot_progress (int val) __attribute__((weak, alias("__show_boot_progress"))); ++__weak void show_boot_progress(int val) {} + + #if defined(CONFIG_UPDATE_TFTP) + int update_tftp (ulong addr); +-- +2.11.0 +
board/via/imx6_vab820/patches/uboot/0004-arm-board-use-__weak.patch new file +88 -0
88 lines not on this page · raw message
configs/via_imx6_vab820_defconfig +3 -0
@@ -3,6 +3,9 @@ BR2_arm=y BR2_cortex_a9=y BR2_ARM_ENABLE_VFP=y +# Older Linux and U-Boot require the gcc5 patch +BR2_GLOBAL_PATCH_DIR="board/linux-gcc-patches board/via/imx6_vab820/patches" + # Linux headers same as kernel, a 3.10 series BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_10=y
Signature · 1 line
2.11.0
PATCH 6/7 altera_socdk_defconfig: fix build with gcc5
In reply to Arnout Vandecappelle (Essensium/Mind)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.
---
...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%)board/altera/patches/linux/0003-ARM-LLVMLinux-Change-extern-inline-to-static-inline-.patch new file +62 -0
@@ -0,0 +1,62 @@ +From 76ae03828756bac2c1fa2c7eff7485e5f815dbdb Mon Sep 17 00:00:00 2001 +From: Behan Webster <[email protected]> +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 <[email protected]> +Signed-off-by: Behan Webster <[email protected]> +Reviewed-by: Mark Charlebois <[email protected]> +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]> +--- + 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 +
board/altera/patches/uboot/0001-compiler-gcc.h-remove-dependency-on-compiler-gcc-345.patch renamed from board/via/imx6_vab820/patches/uboot/0001-compiler-gcc.h-remove-dependency-on-compiler-gcc-345.patch +1 -1
@@ -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)" <[email protected]> Date: Tue, 28 Feb 2017 13:32:48 +0100 Subject: [PATCH] compiler-gcc.h: remove dependency on compiler-gcc[345].h
board/altera/patches/uboot/0002-ARM-asm-io.h-use-static-inline.patch renamed from board/via/imx6_vab820/patches/uboot/0002-ARM-asm-io.h-use-static-inline.patch +1 -1
@@ -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 <[email protected]> Date: Sun, 22 Jun 2014 23:10:39 +0200 Subject: [PATCH] ARM:asm:io.h use static inline
board/altera/patches/uboot/0003-common-main.c-make-show_boot_progress-__weak.patch renamed from board/via/imx6_vab820/patches/uboot/0003-common-main.c-make-show_boot_progress-__weak.patch +13 -5
@@ -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 <[email protected]> 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 <[email protected]> (cherry picked from commit 3422299dc28fa8257677d03cc1253e3c9bf17e9f) Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]> --- - 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 <post.h> + #include <linux/ctype.h> ++#include <linux/compiler.h> + #include <menu.h> + + #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 */
board/altera/socdk/patches/uboot/0004-arm-board-use-__weak.patch renamed from board/via/imx6_vab820/patches/uboot/0004-arm-board-use-__weak.patch +4 -4
@@ -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)" <[email protected]> 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) <[email protected]> 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);
configs/altera_socdk_defconfig +3 -0
@@ -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
Signature · 1 line
2.11.0
PATCH 7/7 altera_sockit_defconfig: fix build with gcc5
In reply to Arnout Vandecappelle (Essensium/Mind)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/sockit/patches. A 5th patch is needed for more static inline issues; this is done by simply taking the code from the socdk version of U-Boot. The existing U-Boot preloader patch is also moved to board/altera/sockit/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 sockit-specific U-Boot patch starts at 0004.
---
.../patches/uboot/0004-arm-board-use-__weak.patch | 24 +--
...socfpga-don-t-use-extern-inline-functions.patch | 161 +++++++++++++++++++++
...add-to-sockit-a-working-preloader-design.patch} | 20 +--
configs/altera_sockit_defconfig | 4 +-
4 files changed, 182 insertions(+), 27 deletions(-)
copy board/{via/imx6_vab820 => altera/sockit}/patches/uboot/0004-arm-board-use-__weak.patch (80%)
create mode 100644 board/altera/sockit/patches/uboot/0005-socfpga-don-t-use-extern-inline-functions.patch
rename board/altera/sockit/{uboot-sockit-preloader-sample-design.patch => patches/uboot/0006-board-add-to-sockit-a-working-preloader-design.patch} (98%)board/altera/sockit/patches/uboot/0004-arm-board-use-__weak.patch renamed from board/via/imx6_vab820/patches/uboot/0004-arm-board-use-__weak.patch +8 -16
@@ -1,4 +1,4 @@ -From 99bd7b7fb4d58092f020a808bb57be3b4d4cfc51 Mon Sep 17 00:00:00 2001 +From 96b09bb60980d996fd2267912e23db621fa32e5e Mon Sep 17 00:00:00 2001 From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]> Date: Tue, 28 Feb 2017 14:07:30 +0100 Subject: [PATCH] arm: board: use __weak
@@ -10,14 +10,14 @@ Acked-by: Albert ARIBAUD <[email protected]> (cherry picked from commit 8590c800ee60e46f15d6085e3c1fed0d6881fc62) Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]> --- - arch/arm/lib/board.c | 40 ++++++++++++---------------------------- - 1 file changed, 12 insertions(+), 28 deletions(-) + arch/arm/lib/board.c | 36 +++++++++++------------------------- + 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c -index 51b8628b3f..3685e65134 100644 +index 109a1ac752..6515f01380 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c -@@ -82,25 +82,15 @@ extern void dataflash_print_info(void); +@@ -83,25 +83,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); +@@ -216,20 +206,16 @@ typedef int (init_fnc_t) (void); int print_cpuinfo(void);
@@ -73,16 +73,8 @@ index 51b8628b3f..3685e65134 100644 -int arch_cpu_init(void) - __attribute__((weak, alias("__arch_cpu_init"))); --int __power_init_board(void) -+__weak int power_init_board(void) - { - return 0; - } --int power_init_board(void) -- __attribute__((weak, alias("__power_init_board"))); - - /* Record the board_init_f() bootstage (after arch_cpu_init()) */ - static int mark_bootstage(void) + init_fnc_t *init_sequence[] = { + arch_cpu_init, /* basic arch cpu dependent setup */ -- 2.11.0
board/altera/sockit/patches/uboot/0005-socfpga-don-t-use-extern-inline-functions.patch new file +161 -0
161 lines not on this page · raw message
board/altera/sockit/patches/uboot/0006-board-add-to-sockit-a-working-preloader-design.patch renamed from board/altera/sockit/uboot-sockit-preloader-sample-design.patch +10 -10
@@ -1,4 +1,4 @@ -From c70f2ebb350da20af1a0ed4b7960b8e5a1952713 Mon Sep 17 00:00:00 2001 +From 7e075b45cab6bedf78e4dbcee6b453a23bd3a5e4 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdelin <[email protected]> Date: Thu, 20 Feb 2014 11:51:31 -0500 Subject: [PATCH] board: add to sockit a working preloader design
@@ -15,7 +15,7 @@ Subject: [PATCH] board: add to sockit a working preloader design 8 files changed, 218 insertions(+), 218 deletions(-) diff --git a/board/altera/socfpga_cyclone5/build.h b/board/altera/socfpga_cyclone5/build.h -index e5d9c3c..a369015 100644 +index e5d9c3ce30..a369015bfc 100644 --- a/board/altera/socfpga_cyclone5/build.h +++ b/board/altera/socfpga_cyclone5/build.h @@ -29,7 +29,7 @@
@@ -28,7 +28,7 @@ index e5d9c3c..a369015 100644 /* * Handoff files must provide user option whether to enable diff --git a/board/altera/socfpga_cyclone5/iocsr_config.c b/board/altera/socfpga_cyclone5/iocsr_config.c -index fa663e1..90fc154 100644 +index fa663e1304..90fc154d0b 100644 --- a/board/altera/socfpga_cyclone5/iocsr_config.c +++ b/board/altera/socfpga_cyclone5/iocsr_config.c @@ -7,113 +7,113 @@ const unsigned long iocsr_scan_chain0_table[((CONFIG_HPS_IOCSR_SCANCHAIN0_LENGTH
@@ -543,7 +543,7 @@ index fa663e1..90fc154 100644 }; diff --git a/board/altera/socfpga_cyclone5/pinmux_config.c b/board/altera/socfpga_cyclone5/pinmux_config.c -index 730067e..cfd74cd 100644 +index 730067e696..cfd74cd7c7 100644 --- a/board/altera/socfpga_cyclone5/pinmux_config.c +++ b/board/altera/socfpga_cyclone5/pinmux_config.c @@ -23,7 +23,7 @@ unsigned long sys_mgr_init_table[CONFIG_HPS_PINMUX_NUM] = {
@@ -597,7 +597,7 @@ index 730067e..cfd74cd 100644 0, /* GENERALIO20 */ 0, /* GENERALIO21 */ diff --git a/board/altera/socfpga_cyclone5/pinmux_config.h b/board/altera/socfpga_cyclone5/pinmux_config.h -index fb483ab..64c750a 100644 +index fb483ab57e..64c750a24d 100644 --- a/board/altera/socfpga_cyclone5/pinmux_config.h +++ b/board/altera/socfpga_cyclone5/pinmux_config.h @@ -11,15 +11,15 @@
@@ -621,7 +621,7 @@ index fb483ab..64c750a 100644 #define CONFIG_HPS_SDMMC_BUSWIDTH (4) diff --git a/board/altera/socfpga_cyclone5/sdram/sdram_config.h b/board/altera/socfpga_cyclone5/sdram/sdram_config.h -index b90d6f3..dd027ef 100755 +index b90d6f30ff..dd027efbf8 100755 --- a/board/altera/socfpga_cyclone5/sdram/sdram_config.h +++ b/board/altera/socfpga_cyclone5/sdram/sdram_config.h @@ -4,16 +4,16 @@
@@ -665,7 +665,7 @@ index b90d6f3..dd027ef 100755 #define CONFIG_HPS_SDR_CTRLCFG_DRAMINTR_INTREN (0) #define CONFIG_HPS_SDR_CTRLCFG_STATICCFG_MEMBL (2) diff --git a/board/altera/socfpga_cyclone5/sdram/sequencer_auto.h b/board/altera/socfpga_cyclone5/sdram/sequencer_auto.h -index e8c5484..919676d 100644 +index e8c548446a..919676d895 100644 --- a/board/altera/socfpga_cyclone5/sdram/sequencer_auto.h +++ b/board/altera/socfpga_cyclone5/sdram/sequencer_auto.h @@ -34,7 +34,7 @@
@@ -716,7 +716,7 @@ index e8c5484..919676d 100644 #define __RW_MGR_READ_B2B_WAIT2 0x6A #define __RW_MGR_LFSR_WR_RD_BANK_0_WAIT 0x31 diff --git a/board/altera/socfpga_cyclone5/sdram/sequencer_auto_ac_init.c b/board/altera/socfpga_cyclone5/sdram/sequencer_auto_ac_init.c -index e16efa1..20b4ca1 100644 +index e16efa1ab6..20b4ca14b8 100644 --- a/board/altera/socfpga_cyclone5/sdram/sequencer_auto_ac_init.c +++ b/board/altera/socfpga_cyclone5/sdram/sequencer_auto_ac_init.c @@ -6,16 +6,16 @@ const alt_u32 ac_rom_init[36] =
@@ -745,7 +745,7 @@ index e16efa1..20b4ca1 100644 0x30780000, 0x38780000, diff --git a/board/altera/socfpga_cyclone5/sdram/sequencer_defines.h b/board/altera/socfpga_cyclone5/sdram/sequencer_defines.h -index 52faf3f..b85b85c 100644 +index 52faf3f6d0..b85b85cacd 100644 --- a/board/altera/socfpga_cyclone5/sdram/sequencer_defines.h +++ b/board/altera/socfpga_cyclone5/sdram/sequencer_defines.h @@ -1,28 +1,28 @@
@@ -816,5 +816,5 @@ index 52faf3f..b85b85c 100644 #define SKEW_CALIBRATION 0 #define STATIC_FULL_CALIBRATION 1 -- -1.9.0 +2.11.0
configs/altera_sockit_defconfig +3 -1
@@ -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/sockit/patches" + # Linux headers same as kernel, a 3.13 series BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_13=y
@@ -31,7 +34,6 @@ BR2_TARGET_UBOOT_BOARDNAME="socfpga_cyclone5" BR2_TARGET_UBOOT_CUSTOM_GIT=y BR2_TARGET_UBOOT_CUSTOM_REPO_URL="http://git.rocketboards.org/u-boot-socfpga.git" BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_acds13.0sp1" -BR2_TARGET_UBOOT_PATCH="board/altera/sockit" BR2_TARGET_UBOOT_FORMAT_IMG=y BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.bin"
Signature · 1 line
2.11.0
cover gcc5 fixes for defconfigs
In reply to Arnout Vandecappelle (Essensium/Mind)Hello,
Quoted 20 lines · Arnout Vandecappelle (Essensium/Mind)
Ever since we switched to gcc5 as default, a number of defconfigs have
been failing. Since we currently don't test the defconfigs this went largely unnoticed.This series fixes the remaining defconfigs. Since I don't have access
to most of the boards, I couldn't test the changes, so I've opted for the safe fix: apply the patch that adds gcc5 support to kernel and boot loader.To avoid repeating the same exercise when we switch to gcc6 as default,
I've opted for the patch that removes the version-specific compiler-gcc[345].h.Since the same kernel patch is used by a number of defconfigs, I've
put it in a common directory under board/, and useBR2_GLOBAL_PATCH_DIRto refer to it. For U-Boot that wasn't possible because the context is always slightly different. Therefore the patches are in board-specific directories. The two Altera platforms can still share some of the patches.
Quoted 8 lines
This series has only been build-tested, not runtime tested. However,
thecompiler-gcc.hchange should be safe (if it breaks something, it would be compilation itself because a definition is missing).Note: the yocto repository used by
minnowboard_defconfigseems to be
either broken or unreliable. AFAIK minnowboard should be fully supported by the upstream kernel, so it would be nice if someone who has the board could try that.
Thanks for all this work.
However, it has already been noticed a while ago that these defconfigs were broken, I did a build test of all defconfigs some time ago, and reported the issue to the developers who contributed the defconfig originally. Peter also helped in this effort. See e-mails like:
[Buildroot] Altera socdk defconfig no longer builds [Buildroot] Altera sockit defconfig no longer builds [Buildroot] via_imx6_vab820_defconfig fails to build etc.
For all the boards you are fixing now, Peter or me contacted the original submitters. If they haven't been fixed by now, then I would instead suggest to simply drop support for those boards.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
cover gcc5 fixes for defconfigs
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Hi,
Quoted 5 lines
However, it has already been noticed a while ago that these defconfigs were broken, I did a build test of all defconfigs some time ago, and reported the issue to the developers who contributed the defconfig originally. Peter also helped in this effort. See e-mails like:
Quoted 8 lines
[Buildroot] Altera socdk defconfig no longer builds [Buildroot] Altera sockit defconfig no longer builds [Buildroot]
via_imx6_vab820_defconfigfails to build etc.For all the boards you are fixing now, Peter or me contacted the original submitters. If they haven't been fixed by now, then I would instead suggest to simply drop support for those boards.
I agree. Especially as we don't have access to (most) of the boards, and older bootloaders/kernels sometimes do break at runtime with newer gcc versions.
E.G. if the defconfigs aren't really supported and looked after, then we should pretend they are.
Signature · 1 line
Bye, Peter Korsgaard
cover gcc5 fixes for defconfigs
Quoted 18 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Hi,
Quoted 5 lines
However, it has already been noticed a while ago that these defconfigs were broken, I did a build test of all defconfigs some time ago, and reported the issue to the developers who contributed the defconfig originally. Peter also helped in this effort. See e-mails like:
Quoted 8 lines
[Buildroot] Altera socdk defconfig no longer builds [Buildroot] Altera sockit defconfig no longer builds [Buildroot]
via_imx6_vab820_defconfigfails to build etc.For all the boards you are fixing now, Peter or me contacted the original submitters. If they haven't been fixed by now, then I would instead suggest to simply drop support for those boards.
Quoted 6 lines
I agree. Especially as we don't have access to (most) of the boards, and older bootloaders/kernels sometimes do break at runtime with newer gcc versions.
E.G. if the defconfigs aren't really supported and looked after, then we should pretend they are.
^^^^^^ shouldn't :-)
I'll send removal patches tomorrow (hopefully).
I've marked the series as rejected in patchwork.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF