Jump to content

Recommended Posts

Posted

Hi all,

 

I tried to build the kernel on my Ubuntu 15.10 machines which uses gcc 5.2 as default compiler. As mentioned in other threads this did not work. I found out two possible solutions.

 

  • Apply the following kernel patch
  • Compile the kernel with option -std=gnu98. I therefore changed the kernel makefile.

 

--- 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);



--- 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;
 }
 

 

It would be nice if one of these solutions would be integrated in a future release.

 

 

Martin

Posted

Hello Martin,

 

Please, the question needs a bit of clarification.

 

you have an ARM based board with Ubuntu 15.10 to compile an ARM kernel?

or you want to cross-compile an ARM kernel from a x86/amd64 based PC?

 

whatever the option it is wiser to use a well known toolchain, as compiling an ARM kernel can lead to unexpected issue.

 

http://www.elinux.org/Toolchains#Prebuilt_toolchains

 

So far, the Armbian crew is using the ARM crosscompiler provided by Ubuntu 14.04 x86/amd64.

 

regards,

Guillaume

Posted

Hi,

 

I'm using an x86 PC with Ubuntu 15.10 and try to cross-compile for an Olimex board. The problem with Ubuntu 15.10 is, that it uses gcc5 as default for the compiler suite as oposed to the 4.8/4.9 series which was used in Ubuntu 14.04.

 

Therfore the armbian scripts will not compile the kernel successfully on systems which use gcc5 as their compiler.

 

The patch for the kernel or the change in the kernel make should solve the problem.

Posted

Hi,

 

just another clarification. I tried to compile the 3.4 kernel. The newer mainline kernel may already have the the changes necessary for gcc5 included.

 

 

Regards

 

   Martin

Posted

Let me see if I understand the question:

A x86 PC Workstation running Ubuntu 15.10 with the x86 platform gcc 5 x86 tool chain will not cross compile a 3.4 kernel for an "Olimex board" which I suspect is running an ARM processor since he generally doesn't have an x86 SBC.

 

I got bite one time when I thought all I needed to do was change the processor type on the command line and my Visual Studio would produce the code I needed.... In the day we could change from 8080 to 8086 or Z80, now you download a tool chain built for an architecture @wildcat_paris  gave you a link to the answer  http://www.elinux.org/Toolchains#Prebuilt_toolchains

 

 

Posted

Kernel 3.4 is not recommend to compile with recent compilers. I don't expect that anyone will try to fix it to meet gcc5. I agree it's not cool that we need to use many different compilers but that's the case. Compiler is one of the top reasons why our tools is recommended to run on Ubuntu Trusty. You can compile some, but not all sources elsewhere.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines