You are here: TWiki > Main Web > RunningOnModel r2 - 23 Jul 2007 - 16:31 - CatalinMarinas


Start of topic | Skip to actions

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 RealView? models that emulate an Integrator/CP platform.

Kernel configuration requirements

The kernel needs the following configuration options set:

  • CONFIG_BLK_DEV_RAM=y
  • CONFIG_BLK_DEV_RAM_COUNT=16 (any number higher than 0)
  • CONFIG_BLK_DEV_RAM_SIZE=16384 (should be at least the size of the filesystem image in KB)
  • CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 (this is the default value)
  • CONFIG_BLK_DEV_INITRD=y
  • CONFIG_CMDLINE="root=/dev/ram0 initrd=0x00800000,10M ..." (initrd=... should specify the location and the size of the filesystem image)

Building the ELF model image

Copy the following files (attached) to a local directory:

  • Makefile - builds the ELF model image
  • boot.S (or boot-t2.S) - simple code to initialise some registers and UART0 before branching into the ARM (or Thumb-2) kernel
  • model.lds - linker script used to generate the ELF model image

Copy the "uImage" kernel file and filesystem into the directory above and the "make" command will build a "linux-image.axf" file that can be loaded into the model and executed.

-- CatalinMarinas - 23 Jul 2007

toggleopenShow attachmentstogglecloseHide attachments
Topic attachments
I Attachment Action Size Date Who Comment
elselds model.lds manage 0.4 K 23 Jul 2007 - 15:17 CatalinMarinas  
elseS boot-t2.S manage 1.1 K 23 Jul 2007 - 15:17 CatalinMarinas  
elseEXT Makefile manage 0.5 K 23 Jul 2007 - 15:17 CatalinMarinas  
elseS boot.S manage 1.0 K 23 Jul 2007 - 15:17 CatalinMarinas  
Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r2 < r1 | More topic actions
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Use of this site is governed by these TermsAndConditions
Ideas, requests, problems regarding TWiki? Send feedback