Porting L4-embedded kernel

Porting L4-embedded kernel

Carl van_Schaik

2006-09-16 13:23 UTC
Hi all,

I just got my 770 and am starting to setup using it as a development board.

My goal is to port the NICTA::L4-embedded kernel to the 770 and run
virtualized Linux instead of the native kernel.
Firstly I'll need serial console to start development, secondly, I don't
want to trash the builtin Linux image.

I guess I need to make some sort of adapter to plug onto the serial pins in
the battery compartment. Is there anything commercial one can buy, or do I
just make my own with spring contacts?

A quick look around, I noticed /dev/mtdblock2 it where is seems the vmlinux
image lives, starting at offset 0x800
/dev/mtdblock0 is the nolo 'Nokia Loader' code and /dev/mtdblock1 is the
config partition?
/dev/mtdblock3 is the initfs?

It would be nice to have a standard bootloader. Unfortunately nokia seem to
have a propriatary one.
I'm thinking about a couple of options:

1. Port u-boot and flash it into /dev/mtdblock2 in place of Linux. I'll then
need to place Linux after u-boot. Hope it will fit on the image, otherwise I
might have to put it on another partition or MMC flash.
At the same time, I'll need to flash the L4 kernel somewhere as well.
Although initially, serial download could work.

2. Modifiy the initfs such that very early on, before flash is mounted rw,
have a bootmenu, much like the existing bootmenu program. This could on
selection of L4, load a kernel module which contains the L4 kernel image,
and then "take over" Linux and boot the L4 kernel.

Has anyone got experience hacking at the low level on the N770?

thoughts?

thanks
--
Carl van Schaik

_________________________________________________________________
See their smiles, hear their laughter with Windows Live Messenger!
http://messenger.live.com
  •  Reply

Re: [maemo-developers] Porting L4-embedded kernel

Frantisek Dufka
Karma: 642
2006-09-16 21:26 UTC
Carl van_Schaik wrote:

> A quick look around, I noticed /dev/mtdblock2 it where is seems the
> vmlinux image lives, starting at offset 0x800
> /dev/mtdblock0 is the nolo 'Nokia Loader' code and /dev/mtdblock1 is the
> config partition?
> /dev/mtdblock3 is the initfs?

Yst this is correct. Kernel lives in /dev/mtdblock2 but there appears to
be header "NOLO img" + kernel image size an kernel stats at 0x800.

>
> 2. Modifiy the initfs such that very early on, before flash is mounted
> rw, have a bootmenu, much like the existing bootmenu program. This could
> on selection of L4, load a kernel module which contains the L4 kernel
> image, and then "take over" Linux and boot the L4 kernel.

Just a thought, can this module with L4 kernel take over already running
linux kernel but leave it running i.e. just hook into interrupt vectors,
MMU or whatever? This is how colinux hooks into running NT/XP kernel and
runs side by side with it. When done this way you won't need any boot or
linux kernel loader.

Frantisek
  •  Reply

Re: [maemo-developers] Porting L4-embedded kernel

Carl van_Schaik

2006-09-18 08:13 UTC
I've now got my serial port connected with three spring-contacts - the type
used on a bead-of-mails test station. This connected to a FTDI TF232BM
usb-serial converter chip.

>>A quick look around, I noticed /dev/mtdblock2 it where is seems the
>>vmlinux image lives, starting at offset 0x800
>>/dev/mtdblock0 is the nolo 'Nokia Loader' code and /dev/mtdblock1 is the
>>config partition?
>>/dev/mtdblock3 is the initfs?
>
>Yst this is correct. Kernel lives in /dev/mtdblock2 but there appears to be
>header "NOLO img" + kernel image size an kernel stats at 0x800.
>
>>
>>2. Modifiy the initfs such that very early on, before flash is mounted rw,
>>have a bootmenu, much like the existing bootmenu program. This could on
>>selection of L4, load a kernel module which contains the L4 kernel image,
>>and then "take over" Linux and boot the L4 kernel.
>
>Just a thought, can this module with L4 kernel take over already running
>linux kernel but leave it running i.e. just hook into interrupt vectors,
>MMU or whatever? This is how colinux hooks into running NT/XP kernel and
>runs side by side with it. When done this way you won't need any boot or
>linux kernel loader.

I don't want to keep Linux around in kernel mode. It is insecure and should
not be priviledged when running on a kernel like L4. I'll run a copy of the
Linux kernel para-virtualized as an L4 application.

I think I'll take the kernel module option for now.. .its easier to
implement for now and I can use my laptop to flash images onto the MMC card.

--
Carl

_________________________________________________________________
See their smiles, hear their laughter with Windows Live Messenger!
http://messenger.live.com
  •  Reply