Difference between revisions of "The Linux kernel"

From IGEP - ISEE Wiki

Jump to: navigation, search
Line 35: Line 35:
 
  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 =
  
=== Linux OMAP v2.6.37 series ===
+
== Linux OMAP v2.6.37 series ==
  
 
See the [[Linux Kernel 2.6.37.y]] article
 
See the [[Linux Kernel 2.6.37.y]] article
  
== Unstable kernels ==
+
= Unstable kernels =
  
 
See the [[Linux Kernel Mainline]] article
 
See the [[Linux Kernel Mainline]] article
  
== Legacy kernels ==
+
= Legacy kernels =
  
=== Linux OMAP v2.6.35 series ===
+
== Linux OMAP v2.6.35 series ==
  
 
See the [[Linux Kernel 2.6.35.y]] article
 
See the [[Linux Kernel 2.6.35.y]] article
  
=== Linux mainline tree (development)  ===
+
= See also =
  
= See also =
 
 
*[[How to setup a cross compiler]]
 
*[[How to setup a cross compiler]]
  
 
[[Category:Linux Kernel]]
 
[[Category:Linux Kernel]]

Revision as of 13:56, 28 June 2013

<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"></meta>

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 an 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

Linux OMAP v2.6.37 series

See the Linux Kernel 2.6.37.y article

Unstable kernels

See the Linux Kernel Mainline article

Legacy kernels

Linux OMAP v2.6.35 series

See the Linux Kernel 2.6.35.y article

See also