Alberto Embedded & Open experience

Notes on my experience on Open Source Embedded Systems

Posts Tagged ‘zImage

What Run First

leave a comment »

Form Arm-Linux Mailing list, posted by Russell King

What runs first depends on what type of kernel you start running.

Compressed kernel (aka zImage):

  1. the startup code in arch/arm/boot/compressed/head.S (start label)
    (and maybe some other architecture specific code in other head-*.S files in that directory).
  2. Decompressor proper (via decompress_kernel) in arch/arm/boot/compressed/misc.c which gunzips the kernel.
  3. We then relocate the kernel if required, and call it.

Uncompressed kernel (aka Image):
This is where we join the uncompressed kernel startup.

  1. arch/arm/kernel/head-armv.S (Edit head.S and head-*.S ) describes this, and includes such things as:
    page table initialization and processor cache initialization
    (via support stuff in arch/arm/mm/proc-*.S).
  2. We then proceed to start_kernel in init/main.c, and everything follows from that point on.
  3. The only other thing to note is that the various drivers are initialized via a table built by the linker from the __initcall() and module_init() statements scattered throughout the kernel source. The code which calls them can be found in init/main.c: do_initcalls().

Written by Alberto!

02/04/2009 at 12:55 pm

Il nostro nuovo Android sull’emulatore!!

leave a comment »

Bene bene, compilato il Kernel 2.6.27 per la macchina goldfish eseguiamo il tutto sull’emulatore!
Raccimoliamo tutti i file di output dei processi di build necessari che sono:

  • Kernel, l’immagine compressa:
  • Android, i file immagine per ramdisk userdata e system nella cartella:

Io ho copiato la zImage nella cartella di output di android:

$ cd PATH_GIUSTO/alberdroid/master/out/target/product/generic/
$ cp PATH_GIUSTO/alberdroid/kernel-goldfish/.repo/manifests/arch/arm/boot/zImage .

e via all’emulatore!

$ emulator -system . -kernel zImage -show-kernel

Così l’emulatore cercherà i file ramdisk.img userdata.img e system.img nella cartella corrente (-system .), utilizzerà zImage come immagine del kernel (..non utilizzare l’immagine Image ma quella compressa zImage) e nella shell corrente mostrerà l’output del kernel!

Written by Alberto!

07/03/2009 at 10:57 am