Difference between revisions of "The Linux kernel"

From IGEP - ISEE Wiki

Jump to: navigation, search
m
Line 1: Line 1:
<meta name="description" content="All you need to know about the Linux kernel for IGEP Processor Boards. How to cross compile, get stable versions and get the latest development versions, etc."></meta>
 
<meta name="keywords" content="Linux, IGEP, ARM, OMAP3, AM335x, OMAP5"></meta>
 
  
= What is Linux? =
 
  
 +
 +
=What is Linux?=
 
[[Image:tux.png|left]][http://www.kernel.org The Linux Kernel Archives]Linux is a clone of the operating system Unix, written from scratch by Linus Torvalds with assistance from a loosely-knit team of hackers across the Net. It aims towards POSIX and Single UNIX Specification compliance.
 
[[Image:tux.png|left]][http://www.kernel.org The Linux Kernel Archives]Linux is a clone of the operating system Unix, written from scratch by Linus Torvalds with assistance from a loosely-knit team of hackers across the Net. It aims towards POSIX and Single UNIX Specification compliance.
  
Line 10: Line 9:
 
Although originally developed first for 32-bit x86-based PCs (386 or higher), today Linux also runs on a multitude of other processor architectures, in both 32- and 64-bit variants.
 
Although originally developed first for 32-bit x86-based PCs (386 or higher), today Linux also runs on a multitude of other processor architectures, in both 32- and 64-bit variants.
  
= Overview of How-To =
+
=Overview of How-To=
 
+
This How-To is meant to be a starting point for people to learn build a kernel image for IGEP Processor Boards as quickly and easily as possible.
This How-To is meant to be a starting point for people to learn build a kernel image for IGEP Processor Boards as quickly and easily as possible.  
 
 
 
= How to cross compile the linux kernel  =
 
  
 +
=How to cross compile the linux kernel=
 
In order to build the Linux Kernel for IGEP PROCESSOR BOARDS it's recommended to cross-compile the kernel, that's, build the kernel in your HOST machine for a target architecture.
 
In order to build the Linux Kernel for IGEP PROCESSOR BOARDS it's recommended to cross-compile the kernel, that's, build the kernel in your HOST machine for a target architecture.
  
Line 31: Line 28:
 
  make ARCH=arm CROSS_COMPILE=[cross compiler] zImage modules
 
  make ARCH=arm CROSS_COMPILE=[cross compiler] zImage modules
  
The result will be a zImage file in arch/arm/boot directory. You can install the kernel modules to your target rootfs  
+
The result will be a zImage file in arch/arm/boot directory. You can install the kernel modules to your target rootfs
  
 
  make ARCH=arm CROSS_COMPILE=[cross compiler] modules_install INSTALL_MOD_PATH=[path to your target rootfs]
 
  make ARCH=arm CROSS_COMPILE=[cross compiler] modules_install INSTALL_MOD_PATH=[path to your target rootfs]
  
= Stable kernels =
+
=Stable kernels=
 
+
<span style="color: #ff0000;">'''NOTE: These are the kernels considered stable and recommended for normal use. CHOOSE YOUR KERNEL BASED ON THE SUPPORTED PLATFORM'''</span>
<span style="color: rgb(255, 0, 0);">'''NOTE: These are the kernels considered stable and recommended for normal use. CHOOSE YOUR KERNEL BASED ON THE SUPPORTED PLATFORM'''</span>
 
 
 
== Linux 2.6.37.y series ==
 
  
 +
==Linux 2.6.37.y series==
 
The 2.6.37.y kernel series are supported by IGEP PROCESSOR BOARDS based on:
 
The 2.6.37.y kernel series are supported by IGEP PROCESSOR BOARDS based on:
  
Line 49: Line 44:
 
See the [[Linux Kernel 2.6.37.y]] article
 
See the [[Linux Kernel 2.6.37.y]] article
  
== Linux 4.1.y-am335x series ==
+
==Linux 4.1.y-am335x series==
 
 
 
The 4.1.y kernel series are supported by IGEP PROCESSOR BOARDS based on:
 
The 4.1.y kernel series are supported by IGEP PROCESSOR BOARDS based on:
  
Line 59: Line 53:
 
See the [[Linux Kernel 4.1.y]] article
 
See the [[Linux Kernel 4.1.y]] article
  
== Linux 3.8.y-omap5 series ==
+
==Linux 3.8.y-omap5 series==
 
+
The 3.8.y kernel series are supported by IGEP PROCESSOR BOARDS based on:
The 3.8.y kernel series are supported by IGEP PROCESSOR BOARDS based on:  
 
  
 
<gallery heights="100px">
 
<gallery heights="100px">
 
File:omap5.png
 
File:omap5.png
</gallery>  
+
</gallery>
  
 
See the [[Linux Kernel 3.8.y]] article
 
See the [[Linux Kernel 3.8.y]] article
  
== Linux 3.14.28.y-iMX6 series ==
+
==Linux 3.14.28.y-iMX6 series==
 
+
The 3.14.28.y kernel series are supported by IGEP PROCESSOR BOARDS based on:
The 3.14.28.y kernel series are supported by IGEP PROCESSOR BOARDS based on:  
 
  
 
<gallery heights="100px">
 
<gallery heights="100px">
 
File:iMX6.png
 
File:iMX6.png
</gallery>  
+
</gallery>
  
 
See the&nbsp;[[Linux Kernel 3.14.28.y]]&nbsp;article
 
See the&nbsp;[[Linux Kernel 3.14.28.y]]&nbsp;article
  
= Unstable kernels =
+
=Unstable kernels=
 
+
<span style="color: #ff0000;">'''NOTE: These kernel series are where the development work takes place and you should use this if you're after to work with the latest cutting edge developments. It is possible trunk can suffer temporary periods of instability while new features are developed and if this is undesirable we recommend using one of the release branches. USE AT YOUR OWN RISK'''</span>
<span style="color: rgb(255, 0, 0);">'''NOTE: These kernel series are where the development work takes place and you should use this if you're after to work with the latest cutting edge developments. It is possible trunk can suffer temporary periods of instability while new features are developed and if this is undesirable we recommend using one of the release branches. USE AT YOUR OWN RISK'''</span>  
 
 
 
== Linux mainline series ==
 
  
 +
==Linux mainline series==
 
The mainline series are supported by IGEP Platforms based on:
 
The mainline series are supported by IGEP Platforms based on:
  
Line 95: Line 85:
 
See the [[Linux Kernel Mainline]] article
 
See the [[Linux Kernel Mainline]] article
  
= End Of Life kernels (EOL) =
+
=End Of Life kernels (EOL)=
 
 
 
An "End of Life" kernel means that its support will stop and all the users are urged to upgrade to a new version.
 
An "End of Life" kernel means that its support will stop and all the users are urged to upgrade to a new version.
  
== Linux 3.8.y-am335x series ==
+
==Linux 3.8.y-am335x series==
 
+
<span style="color: #ff0000;">'''NOTE: These kernel series are end-of-life, dead, gone, buried ..., please move to the v4.1 kernel series at this time.'''</span>
<span style="color: rgb(255, 0, 0);">'''NOTE: These kernel series are end-of-life, dead, gone, buried ..., please move to the v4.1 kernel series at this time.'''</span>  
 
  
 
The 3.8.y kernel series are supported by IGEP PROCESSOR BOARDS based on:
 
The 3.8.y kernel series are supported by IGEP PROCESSOR BOARDS based on:
Line 109: Line 97:
 
</gallery>
 
</gallery>
  
== Linux 2.6.35.y series ==
+
==Linux 2.6.35.y series==
 
+
<span style="color: #ff0000;">'''NOTE: These kernel series are end-of-life, dead, gone, buried ..., please move to the v2.6.37 kernel series at this time.'''</span>
<span style="color: rgb(255, 0, 0);">'''NOTE: These kernel series are end-of-life, dead, gone, buried ..., please move to the v2.6.37 kernel series at this time.'''</span>  
 
  
 
The 2.6.35.y kernel series are supported by IGEP PROCESSOR BOARDS based on:
 
The 2.6.35.y kernel series are supported by IGEP PROCESSOR BOARDS based on:
Line 121: Line 108:
 
See the [[Linux Kernel 2.6.35.y]] article.
 
See the [[Linux Kernel 2.6.35.y]] article.
  
= See also =
+
=See also=
 
+
* [[How to setup a cross compiler]]
*[[How to setup a cross compiler]]
 
  
 
{{Message/Forum}}
 
{{Message/Forum}}
  
 
[[Category:Linux Kernel]]
 
[[Category:Linux Kernel]]

Revision as of 12:30, 9 March 2018


What is Linux?

tux.png
The Linux Kernel ArchivesLinux is a clone of the operating system Unix, written from scratch by Linus Torvalds with assistance from a loosely-knit team of hackers across the Net. It aims towards POSIX and Single UNIX Specification compliance.

It has all the features you would expect in a modern fully-fledged Unix, including true multitasking, virtual memory, shared libraries, demand loading, shared copy-on-write executables, proper memory management, and multistack networking including IPv4 and IPv6.

Although originally developed first for 32-bit x86-based PCs (386 or higher), today Linux also runs on a multitude of other processor architectures, in both 32- and 64-bit variants.

Overview of How-To

This How-To is meant to be a starting point for people to learn build a kernel image for IGEP Processor Boards as quickly and easily as possible.

How to cross compile the linux kernel

In order to build the Linux Kernel for IGEP PROCESSOR BOARDS it's recommended to cross-compile the kernel, that's, build the kernel in your HOST machine for a target architecture.

To setup the cross-compiling there are two fundamental variables that the kernel uses to select the target architecture. Normally these values are guessed based on your build environment, but of course that environment here does not match our target embedded system, so we'll need to override them. The variables in question are ARCH and CROSS_COMPILE.

The ARCH variable is the architecture you're targetting as the kernel knows it. For IGEP PROCESSOR BOARDS you'll set to "arm" architecture.

Hopefully the CROSS_COMPILE variable is pretty self-explanatory. Set this to the prefix of your toolchain (including the trailing dash "-"). So if your toolchain is invoked as say arm-linux-gnueabi-gcc, just chop off that trailing gcc and that's what you use: arm-linux-gnu-.

There is an additional variable, INSTALL_MOD_PATH, which defines where the /lib directory will be created, and all the modules stored. While you don't have to transfer the kernel sources to your target device, if you build any modules, you'll want this directory.

As example, once you've downloaded the kernel source, you should follow these steps:

make ARCH=arm CROSS_COMPILE=[cross compiler] [defconfig]
make ARCH=arm CROSS_COMPILE=[cross compiler] zImage modules

The result will be a zImage file in arch/arm/boot directory. You can install the kernel modules to your target rootfs

make ARCH=arm CROSS_COMPILE=[cross compiler] modules_install INSTALL_MOD_PATH=[path to your target rootfs]

Stable kernels

NOTE: These are the kernels considered stable and recommended for normal use. CHOOSE YOUR KERNEL BASED ON THE SUPPORTED PLATFORM

Linux 2.6.37.y series

The 2.6.37.y kernel series are supported by IGEP PROCESSOR BOARDS based on:

See the Linux Kernel 2.6.37.y article

Linux 4.1.y-am335x series

The 4.1.y kernel series are supported by IGEP PROCESSOR BOARDS based on:

See the Linux Kernel 4.1.y article

Linux 3.8.y-omap5 series

The 3.8.y kernel series are supported by IGEP PROCESSOR BOARDS based on:

See the Linux Kernel 3.8.y article

Linux 3.14.28.y-iMX6 series

The 3.14.28.y kernel series are supported by IGEP PROCESSOR BOARDS based on:

See the Linux Kernel 3.14.28.y article

Unstable kernels

NOTE: These kernel series are where the development work takes place and you should use this if you're after to work with the latest cutting edge developments. It is possible trunk can suffer temporary periods of instability while new features are developed and if this is undesirable we recommend using one of the release branches. USE AT YOUR OWN RISK

Linux mainline series

The mainline series are supported by IGEP Platforms based on:

See the Linux Kernel Mainline article

End Of Life kernels (EOL)

An "End of Life" kernel means that its support will stop and all the users are urged to upgrade to a new version.

Linux 3.8.y-am335x series

NOTE: These kernel series are end-of-life, dead, gone, buried ..., please move to the v4.1 kernel series at this time.

The 3.8.y kernel series are supported by IGEP PROCESSOR BOARDS based on:

Linux 2.6.35.y series

NOTE: These kernel series are end-of-life, dead, gone, buried ..., please move to the v2.6.37 kernel series at this time.

The 2.6.35.y kernel series are supported by IGEP PROCESSOR BOARDS based on:

See the Linux Kernel 2.6.35.y article.

See also

Igep forum.png If you have any question, don't ask to ask at the IGEP Community Forum or the IGEP Community Chat Irc.png