Difference between revisions of "Loading Linux Kernels Onto a Board"

From wiki.emacinc.com
Jump to: navigation, search
m (Added guiding info on what to write.)
(Background Information)
Line 2: Line 2:
 
=== Background Information ===
 
=== Background Information ===
  
Kernels are loaded onto boards separately from filesystems, but need to be loaded with a matching filesystem.  The kernel image itself only contains the statically linked kernel drivers. The loadable module kernel drivers are stored on the filesystem, and are flavor matched to the kernel with which they were built.  blah blah...
+
The Linux kernel is at the core of EMAC's OE operating system. The kernel provides essential I/O interfaces, task management, and memory management to the user simplifying the development environment. Each embedded target has a Linux kernel image that is tailored to it's specific hardware needs.
  
Kernels can be loaded into and run from RAM, which is good for testing... blah
+
For more information about the Linux kernel see the links in the [[About Linux]] page.
  
Kernels can also be programmed onto the flash, where they'll be loaded by default when they run. You want to make sure to do this for the final... blah
+
For EMAC's ARM Linux builds, the kernel is loaded onto boards separately from file systems though it should be noted that many of the kernel's drivers can be compiled as modules. These kernel modules have to be included in the file system in the <code>/lib/modules</code> directory.
 +
 
 +
[[Building the Linux Kernel]] explains how to compile the Linux kernel and how to load the kernel modules onto an existing file system.
 +
 
 +
The Linux kernel is actually present in the file system for X86 systems. See the [[LILO Overview]] for more information on updating the kernel with X86 targets.
  
 
=== General Information ===
 
=== General Information ===

Revision as of 09:14, 12 December 2013

TODO: {{#todo:Add some text (11.06.13-08:47->MW+); (11.06.13-18:05->MD+)|Michael Welling|oe 4,oe 5,mw,md,InProgress}}

Background Information

The Linux kernel is at the core of EMAC's OE operating system. The kernel provides essential I/O interfaces, task management, and memory management to the user simplifying the development environment. Each embedded target has a Linux kernel image that is tailored to it's specific hardware needs.

For more information about the Linux kernel see the links in the About Linux page.

For EMAC's ARM Linux builds, the kernel is loaded onto boards separately from file systems though it should be noted that many of the kernel's drivers can be compiled as modules. These kernel modules have to be included in the file system in the /lib/modules directory.

Building the Linux Kernel explains how to compile the Linux kernel and how to load the kernel modules onto an existing file system.

The Linux kernel is actually present in the file system for X86 systems. See the LILO Overview for more information on updating the kernel with X86 targets.

General Information

Here's how you load and boot from RAM: ...

Here's how you load and boot from Flash...

Here are some pitfalls to watch out for....

The long 0x70000000 number is a hexadecimal offset from the top of memory, and .... (remember, they're usually C/C++ programmers reading this, so they should understand details about memory layout if you explain it to them)

Either put this in the uBoot doc, or explain it here:

The erase step on some uBoot boards is because...

The cp.b command is used to...

The set kernelsize line is actually a script step, and it...

The $filesize variable is automatically set ...

The protect off all is for...

^^^This is the kind of info programmers should take to like fish to water, if you explain it for them^^^

Quick Reference by SoM

SoM-9260M

U-Boot> tftp 0x20000000 uImage-som-9260m
U-Boot> protect off all
U-Boot> erase 0x10100000 0x103fffff
U-Boot> cp.b 0x20000000 0x10100000 ${filesize}
U-Boot> set kernelsize $filesize

SoM-9G20M

U-Boot> tftp 0x20000000 uImage-som-9g20m
U-Boot> cp.b 0x20000000 0xD0042000 ${filesize}

SoM-9G45M

U-Boot> tftp 0x74000000 uImage-som-9g45m
U-Boot> cp.b 0x74000000 0xC0042000 ${filesize}

SoM-9M10M

U-Boot> tftp 0x74000000 uImage-som-9m10m
U-Boot> cp.b 0x74000000 0xC0042000 ${filesize}

SoM-9307M

Redboot> fis unlock -f 0x60000000 -l 0x1fdffff
Redboot> load -r -v -b 0x80000 -h 10.0.2.60 zImage-som-9307m
Redboot> fis create -b 0x80000 -l 0x200000 zImage

IPAC-9302

Redboot> fis unlock -f 0x60000000 -l 0x1fdffff
Redboot> load -r -v -b 0x80000 -h 10.0.2.60 zImage-ipac-9302
Redboot> fis create -b 0x80000 -l 0x200000 zImage