[uClinux-dev] Starting the kernel on CM3
frank.moelendoerp at ewetel.net
Mon May 24 05:13:17 EDT 2010
in the last week I wrote my own little bootloader, to make it easier to
load and setup the kernel.
Now I'm able flash(/copy) the kernel to the right position, setting up
the bootparameters, initialize
the hardware and jump to the kernel. This works fine, even with other
The first thing I got was an errormessage:
Error: unrecognized/unsupported machine ID (r1 = 0x00000827).
Available machine support:
ID (hex) NAME
Please check your kernel config and/or bootloader.
So I set the register r1 to 0x2710. The 0x827 comes from a employee of
ARM Ltd, who send me
I setup script for setting up the right bootparameter.
It's Cortex M4 in a MPS using the ARM example system. I'm using the
And the Makefile.boot contains the following:
zreladdr-y := 0x10008000
params_phys-y := 0x10000100
initrd_phys-y := 0x10800000
Before I jump to the kernel, I do this:
memset((unsigned char *)0x10000000, 0, 0x1000);
*((unsigned long *) 0x10000100) = 2;
*((unsigned long *) 0x10000104) = 0x54410001;
*((unsigned long *) 0x10000108) = 258;
*((unsigned long *) 0x1000010c) = 0x54410009;
sprintf((char *) 0x10000110, "init=/bin/sh console=ttyAMA3 mem=4M
MOV R4, R0 // Moves entrypoint to r4
LDR R0, = 0 // Unknown option
LDR R1, = 0x2710 // Machine ID
LDR R2, = 0 // Unknown option
LDR R3, = 0 // Unknown option
BX R4 // Jump to the
entrypoint of the kernel
I know, that the string, which is set to 0x10000110, is ignored by the
kernel. This is because, even when
I use another tty like ttyAMA1, the output still comes from ttyAMA3,
which is defined in the .config of the kernel.
I searched for the documentation for the registercontent and also
parametersection at 0x10000100, but I find only
the description of parameter-string. What does the other things mean? Is
there somewhere a good documentation?
Could someone say that 0x2710 is also right btw. it's wrong? Is there
something else, that should be initialized before
the kernel will started?
The last thing I can say is, that the start ends with a hard fault. When
someone needs any further information,
I'll give them as fast as possible.
More information about the uClinux-dev