On 10/09/2015 08:36 AM, Daiane Angolini wrote:
On Fri, Oct 9, 2015 at 2:48 AM,  <[email protected]> wrote:
From: Chunrong Guo <[email protected]>

Cherry picked patches from future kernel versions to fix gcc5.2
build errors

Signed-off-by: Chunrong Guo <[email protected]>
Signed-off-by: Chunrong Guo <[email protected]>
Are it a duplication mistake or are you willing to point someone else
and forgot?


I appreciate to see some tested-by or acked-by from people having
problem with this kernel

Hi Daiane,

I just tested this using the linux-qoriq recipe in the meta-freescale repo @ https://github.com/Freescale/meta-freescale.git

Booted OK on my rev2.0 TWR board, and I can do basic things like ping and access my SD card.

Boot hung on my rev1.0 TWR board ( @ Starting kernel... ).


Is this as expected? I'm not clear yet on what's needed to boot a 1.0 SoC vs. a 2.0 SoC. However, please note that the ls1021atwr.conf file specifies that the layer works with the rev1.0 TWR boards, which doesn't seem to be the case.

It would be good to straighten out the 1.0 vs. 2.0 issues. I assume it could be handled with some customization of .config and dts files? Any guidance will be appreciated.

Bob




Daiane

---
  recipes-kernel/linux/linux-ls1.inc                 |  6 +++
  ...LLVMLinux-use-static-inline-in-ARM-ftrace.patch | 48 ++++++++++++++++++
  ...nux-Change-extern-inline-to-static-inline.patch | 59 ++++++++++++++++++++++
  .../0003-use-static-inline-in-ARM-lifeboot.h.patch | 53 +++++++++++++++++++
  4 files changed, 166 insertions(+)
  create mode 100644 
recipes-kernel/linux/linux-ls1/0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch
  create mode 100644 
recipes-kernel/linux/linux-ls1/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch
  create mode 100644 
recipes-kernel/linux/linux-ls1/0003-use-static-inline-in-ARM-lifeboot.h.patch

diff --git a/recipes-kernel/linux/linux-ls1.inc 
b/recipes-kernel/linux/linux-ls1.inc
index 08d88f4..971c6de 100644
--- a/recipes-kernel/linux/linux-ls1.inc
+++ b/recipes-kernel/linux/linux-ls1.inc
@@ -8,6 +8,12 @@ SRC_URI = 
"git://git.freescale.com/ppc/sdk/linux.git;branch=${SRCBRANCH} \
      file://defconfig \
  "

+SRC_URI += " \
+    file://0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch \
+    file://0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch \
+    file://0003-use-static-inline-in-ARM-lifeboot.h.patch \
+"
+
  KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
  ZIMAGE_BASE_NAME = "zImage-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"

diff --git 
a/recipes-kernel/linux/linux-ls1/0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch
 
b/recipes-kernel/linux/linux-ls1/0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch
new file mode 100644
index 0000000..47f13c7
--- /dev/null
+++ 
b/recipes-kernel/linux/linux-ls1/0001-ARM-8158-LLVMLinux-use-static-inline-in-ARM-ftrace.patch
@@ -0,0 +1,48 @@
+From aeea3592a13bf12861943e44fc48f1f270941f8d Mon Sep 17 00:00:00 2001
+From: Behan Webster <[email protected]>
+Date: Wed, 24 Sep 2014 01:06:46 +0100
+Subject: ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.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). In this case using static inline
+and removing the NULL version of return_address in return_address.c does
+the right thing.
+
+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]>
+
+diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
+index 39eb16b..bfe2a2f 100644
+--- a/arch/arm/include/asm/ftrace.h
++++ b/arch/arm/include/asm/ftrace.h
+@@ -45,7 +45,7 @@ void *return_address(unsigned int);
+
+ #else
+
+-extern inline void *return_address(unsigned int level)
++static inline void *return_address(unsigned int level)
+ {
+       return NULL;
+ }
+diff --git a/arch/arm/kernel/return_address.c 
b/arch/arm/kernel/return_address.c
+index fafedd8..f6aa84d 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
+
+-void *return_address(unsigned int level)
+-{
+-      return NULL;
+-}
+-
+ #endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / 
else */
+
+ EXPORT_SYMBOL_GPL(return_address);
+--
+cgit v0.10.2
+
diff --git 
a/recipes-kernel/linux/linux-ls1/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch
 
b/recipes-kernel/linux/linux-ls1/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch
new file mode 100644
index 0000000..0ab03fb
--- /dev/null
+++ 
b/recipes-kernel/linux/linux-ls1/0001-ARM-LLVMLinux-Change-extern-inline-to-static-inline.patch
@@ -0,0 +1,59 @@
+From a2561791169351cbf1ac5ca0c4299a0eef7eca65 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.
+
+Author: Behan Webster <[email protected]>
+Signed-off-by: Behan Webster <[email protected]>
+Reviewed-by: Mark Charlebois <[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 c81adc0..a3c24cd 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.1.4
+
diff --git 
a/recipes-kernel/linux/linux-ls1/0003-use-static-inline-in-ARM-lifeboot.h.patch 
b/recipes-kernel/linux/linux-ls1/0003-use-static-inline-in-ARM-lifeboot.h.patch
new file mode 100644
index 0000000..6d06776
--- /dev/null
+++ 
b/recipes-kernel/linux/linux-ls1/0003-use-static-inline-in-ARM-lifeboot.h.patch
@@ -0,0 +1,53 @@
+From 16b34c08f43c6e65f21a8cab536c497edb6c886e Mon Sep 17 00:00:00 2001
+From: Chunrong Guo <[email protected]>
+Date: Thu, 8 Oct 2015 22:48:22 -0500
+Subject: [PATCH] use static inline in ARM lifeboot.h
+
+---
+ drivers/input/mouse/lifebook.h   | 2 +-
+ drivers/input/mouse/sentelic.h   | 2 +-
+ drivers/input/mouse/trackpoint.h | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/input/mouse/lifebook.h b/drivers/input/mouse/lifebook.h
+index 4c4326c..e4c2453 100644
+--- a/drivers/input/mouse/lifebook.h
++++ b/drivers/input/mouse/lifebook.h
+@@ -19,7 +19,7 @@ int lifebook_init(struct psmouse *psmouse);
+ inline void lifebook_module_init(void)
+ {
+ }
+-inline int lifebook_detect(struct psmouse *psmouse, bool set_properties)
++static inline int lifebook_detect(struct psmouse *psmouse, bool 
set_properties)
+ {
+       return -ENOSYS;
+ }
+diff --git a/drivers/input/mouse/sentelic.h b/drivers/input/mouse/sentelic.h
+index aa697ec..9e69e94 100644
+--- a/drivers/input/mouse/sentelic.h
++++ b/drivers/input/mouse/sentelic.h
+@@ -123,7 +123,7 @@ struct fsp_data {
+ extern int fsp_detect(struct psmouse *psmouse, bool set_properties);
+ extern int fsp_init(struct psmouse *psmouse);
+ #else
+-inline int fsp_detect(struct psmouse *psmouse, bool set_properties)
++static inline int fsp_detect(struct psmouse *psmouse, bool set_properties)
+ {
+       return -ENOSYS;
+ }
+diff --git a/drivers/input/mouse/trackpoint.h 
b/drivers/input/mouse/trackpoint.h
+index ecd0547..693735c 100644
+--- a/drivers/input/mouse/trackpoint.h
++++ b/drivers/input/mouse/trackpoint.h
+@@ -147,7 +147,7 @@ struct trackpoint_data
+ #ifdef CONFIG_MOUSE_PS2_TRACKPOINT
+ int trackpoint_detect(struct psmouse *psmouse, bool set_properties);
+ #else
+-inline int trackpoint_detect(struct psmouse *psmouse, bool set_properties)
++static inline int trackpoint_detect(struct psmouse *psmouse, bool 
set_properties)
+ {
+       return -ENOSYS;
+ }
+--
+2.3.3
+
--
2.3.3

--
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale

--
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale

Reply via email to