Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

The Linux kernel

338 bytes added, 13:46, 12 March 2018
Linux kernels
<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? = 
[[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.
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.
This =How-To is meant to be a starting point cross compile the linux kernel=In order to build the Linux Kernel for people IGEP PROCESSOR BOARDS it's recommended to learn cross-compile the kernel, that's, build a the kernel image in your HOST machine for IGEP Processor Boards as quickly and easily as possiblea target architecture.
= How to To [[Ubuntu 16.04 LTS Toolchain|setup the cross compile -compiling]] there are two fundamental variables that the linux 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.
In order to build The ARCH variable is the Linux Kernel for IGEP Processor boards itarchitecture you's recommended to cross-compile re targetting as the kernel, thatknows it. For IGEP PROCESSOR BOARDS you's, build the kernel in your HOST machine for a target ll set to "arm" 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-gnueabignueabihf-gcc, just chop off that trailing gcc and that's what you use: arm-linux-gnugnueabihf-.
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.
make ARCH=arm CROSS_COMPILE=[cross compiler] [defconfig]
make ARCH=arm CROSS_COMPILE=[cross compiler] zImage modules
Newest kernels can require build the dtbs too as:
The result will be an make ARCH=arm CROSS_COMPILE=[cross compiler] zImage file in arch/arm/boot directory. You can install the kernel modules to your target rootfs dtbs
make ARCH=The result will be a zImage file in <code>${KERNEL_SOURCES}/arch/arm CROSS_COMPILE=[cross compiler] modules_install INSTALL_MOD_PATH=[path to your target rootfs]/boot</code>
== Stable kernels ==And dabs will be in <code>${KERNEL_SOURCES}/arch/arm/boot/dts</code>
=== Linux OMAP v2.6.37 series ===At last you can install the kernel modules to your target rootfs using this command
See the make ARCH=arm CROSS_COMPILE=[[Linux Kernel 2.6.37.ycross compiler]] article == Unstable kernels =modules_install INSTALL_MOD_PATHSee the [[Linux Kernel Mainlinepath to your target rootfs]] article == Legacy kernels ==Example:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- omap2plus_defconfig<br>make ARCH= Linux OMAP v2.6.35 series arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs<br>make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules_install INSTALL_MOD_PATH=/media/user/rootfs
See the ==Linux kernels=====IGEP Boards based on Texas Instruments  Processors===* [[Linux Kernel 2.6.3537.y]] (OMAP35xx and DM3730) processor board based.* [[Linux Kernel 4.9.y]] article(OMAP35xx, DM3730, AM335x) processor board based.* [[Linux Kernel 3.8.y]] (OMAP5432) processor board based.
=== IGEP Boards based on NXP-Freescale Processors===* [[Linux mainline tree Kernel 3.14.28.y]] (developmentiMX6) ===processor board based.* [[Linux Kernel 4.9.y]] (iMX6) processor board based.
= See also =
*[[How to setup a cross compiler]]
[[Category:Linux Kernel]]