You are visiting this site as:
WikiGuest
Users
Home
Boot Loader
Development Tools
File Systems
Kernels
Platforms
Reference
You are here:
LinuxReference Web
>
RunningOnModel
(revision 9) (raw view)
---++ Running Linux on a software model Software models do not usually have all the features of a hardware platform like Ethernet, persistent Flash memory, boot monitor. This page describes a way to build an ELF image from kernel, filesystem and simple boot code to initialise the registers and UART0. The example files are to be used with the ARM Ltd. models that emulate a !RealView/EB platform.Includes running SMP kernels. ---+++ Kernel configuration and filesystem requirements The kernel needs the following configuration options set: <verbatim> CONFIG_BLK_DEV_INITRD=y </verbatim> The kernel command line options and initramfs address/size is set by the boot code and passed to the kernel via the ATAG list. The boot code expects a kernel image with 64 bytes U-Boot header ( =uImage=). The filesystem needs to be in a =.cpio.gz= format and have a =/init= link pointing to =/sbin/init= (or the preferred init application). A compressed cpio archive can be created as below (as root or under a fakeroot environment): <verbatim> cd <filesystem-root> find . | cpio --quiet -H newc -o | gzip -9 -n > ../filesystem.cpio.gz </verbatim> ---+++ Building the ELF model image Copy the following files (attached) to a local directory: * =Makefile= - builds the ELF model image * =boot.S= - simple code to initialise registers and UART0 before branching into the ARM Linux kernel * =model.lds= - linker script used to generate the ELF model image Copy the =uImage= kernel and =filesystem.cpio.gz= files into the directory created above and the =make= command will build a =linux-image.axf= file that can be loaded into the model and executed. ---+++ Example for a !RealView/EB model The following steps generate a =linux-system.axf= file that can be loaded into the model as a normal application: 1 Download the =Makefile=, =boot.S= and =model.lds= files attached to this page 1 Download the [[http://www.linux-arm.org/git?p=ael.git;a=blob_plain;f=kernel/bin/2.6.28-arm2/uImage-2.6.28-arm2-realview-v7;hb=2009q1][pre-built kernel image]] and rename it =uImage= 1 Download the [[http://www.linux-arm.org/git?p=ael.git;a=blob_plain;f=filesystem/bin/armv6vfp_min.cpio.gz;hb=2009q1][filesystem in cpio format]] and rename it =filesystem.cpio.gz= 1 Type =make= The sources and configuration files for the above images are available from the ARM Ltd. [[http://www.linux-arm.org/git?p=ael.git;a=tree;h=refs/heads/2009q1;hb=2009q1][Linux repository]] or the main ARM Ltd. [[http://www.arm.com/products/os/linux.html][Linux page]]. -- Main.CatalinMarinas - 03 Dec 2009
? Attachments
? Attachments
Topic attachments
I
Attachment
Action
Size
Date
Who
Comment
EXT
Makefile
manage
0.4 K
02 Dec 2009 - 17:57
CatalinMarinas
S
boot.S
manage
2.0 K
03 Dec 2009 - 16:43
CatalinMarinas
lds
model.lds
manage
1.2 K
03 Dec 2009 - 16:42
CatalinMarinas
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r9
<
r8
<
r7
<
r6
<
r5
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Toolbox
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki?
Send feedback
zenweb1 : 0.10 secs
More Info