giovedì 29 ottobre 2009

lunedì 15 giugno 2009

USB Host support!

Dear all,
today I've reached USB host support for OTG and USB Host2 port too!
This was done adapting and correcting the Daniel Mack RFC for MX3 EHCI support.
Wait some more for a deep description on changes :p

Bye!
Alberto!

lunedì 25 maggio 2009

Updates, NOR and NAND flash support.

Modifications on mx3fb driver are not to be accepted because of the maintainer won't add machine specific code in that file.. Nevermind, I keep the patch in my hand waiting for another solution :)

In those days I worked on NOR & NAND flash support:
NOR flash device is mounted on the CPU credit card and it works well with physmap mapping driver.
NAND flash device is mounted on the motherboard and supporting it was a bit harder:
In tree there is a NAND flash driver for MXC architecture mxc_nand.c derived from original freescale driver and corrected over coding style and kernel way of doing by Sascha Hauer . Unfortunately this driver do not support flash devices with large page size (2kB wide, over 512 B of small page size devices) and upgrading it was over my capability..
The solution came from a graceful guy called Vladimir Barinov from linux-mtd list where I posted the problem. He gave me the right patch that merged with my work make the NAND flash device working!

So now I can store data in all memory devices mounted on the board! Great!

Alberto!

giovedì 14 maggio 2009

Framebuffer OK!! explanation

OOK what was the problem and what I've understood:
First of all I built with success the OSELAS.BSP-Phytec-phyCORE-10 following the great guide OSELAS.BSP-Phytec-phyCORE-i.MX31-Quickstart.pdf, remember, I had already built the OSELAS toolchain optimized for arm-1136jfs-linux-gnueabi.

Booting with the new filesystem (after some adjustment to /etc/network/interfaces to have eth0 statically assigned ip and /etc/modules to do not try to load unwanted modules) was fine, but fbset was still not working!
From the logo printed on the screen the problem with mx3fb driver was for sure not only in timings parameters of the video mode but also some other timings settings.

Fortunately the driver mx3fb is derived from the Freescale mxcfb making comparison simpler :)
With a deep debugging and comparison between the two drivers: mx3fb and mxcfb (from Atmark version of 2.6.26 kernel) I've found this:
in ipu_sdc.c:ipu_sdc_init_panel

#ifdef CONFIG_MACH_ARMADILLO5X0
old_conf = (div |
((div >> 4) - 1) << 24 | /* DISP3_IF_CLK_DOWN_WR */
((div >> 4) - 2) << 14); /* DISP3_IF_CLK_UP_WR */
mx3fb_write_reg(mx3fb, old_conf, DI_DISP3_TIME_CONF);
#else
/*
* DISP3_IF_CLK_DOWN_WR is half the divider value and 2 fraction bits
* fewer. Subtract 1 extra from DISP3_IF_CLK_DOWN_WR based on timing
* debug. DISP3_IF_CLK_UP_WR is 0
*/
mx3fb_write_reg(mx3fb, (((div / 8) - 1) << 22) | div, DI_DISP3_TIME_CONF);
#endif

The DI_DISP3_TIME_CONF sdc register contain timing configuration for the pixel writing process (from lower bit):
  • DISP3_IF_CLK_PER_WR: 12 bit (8 bit for integer part and 4 bit for fractional) sets the divider for HSP_CLOCK (ipu_clk) to obtain the right pixel period.
  • DISP3_IF_CLK_UP_WR: 10 bit (6 bit for integer part and 4 bit for fractional) sets the rising edge position for display write access.
  • DISP3_IF_CLK_DOWN_WR: 10 bit (6 bit for integer part and 4 bit for fractional) sets the falling edge position for display write access.
The Atmark armadillo 500 board have a Video DAC (ADV7125) that transforms digital synchronous display signals in analog signals to drive a standard VGA connector for standard display devices. Those different timing configurations was due Video DAC timing specifications and so this piece of code must be ported to mx3fb driver in sdc_init_panel function!

Yes! first timing misconfiguration solved!

But the screen was still over margins, not well proportioned and last but not least there was a shadowed band of a few pixels in width on the entire height of the screen!
All those misconfiguration was solved calibrating the timings mode parameters moving the image on right over the shadowed band. This maintaining the timings constraints of the VGA displays.

How work the VGA standard display:
Horizontal sync signal:
__ ______________________________ ___________
|_| |_|
|A|
|---------------B----------------|

Data:
______________________ ________
________| VIDEO |________| VIDEO (next line)
|-C-|----------D-----------|-E-|

A: Horizontal sync pulse.
B: Scanline period made of:
C: Left border (Back porch) waiting for current stability.
D: Valid Video data.
E: Right border (Front porch) cutting off current instability.

Vertical timings definition are similar.
Now for a resolution of 640x480 at 60Hz refresh rate (VGA standard) are defined those frequencies:
Clock frequency 25.175 MHz (Pixel frequency)
Line frequency 31469 Hz -> 800 pixel per line.
Field frequency 59.94 Hz -> 525 lines.
Timing mode parameters must meet those constraints but we can decide amounts of left and upper margins panning the valid image onto a well displayed position!

After many tests, the better result was achieved with this configuration:
{    /* 640x480 @ 60 Hz */
.name = "CRT-VGA",
.refresh = 60,
.xres = 640,
.yres = 480,
.pixclock = 39721, //Period in picos
.left_margin = 35,
.right_margin = 115,
.upper_margin = 43,
.lower_margin = 1,
.hsync_len = 10,
.vsync_len = 1,
.sync = FB_SYNC_OE_ACT_HIGH,
.vmode = FB_VMODE_NONINTERLACED,
.flag = 0,
},
Same process for the resolution 800x600 with 56Hz of refresh rate results in this video mode:
{    /* 800x600 @ 56 Hz */
.name = "CRT-SVGA",
.refresh = 56,
.xres = 800,
.yres = 600,
.pixclock = 30000,
.left_margin = 30,
.right_margin = 108,
.upper_margin = 13,
.lower_margin = 10,
.hsync_len = 10,
.vsync_len = 1,
.sync = FB_SYNC_OE_ACT_HIGH | FB_SYNC_HOR_HIGH_ACT |
FB_SYNC_VERT_HIGH_ACT,
.vmode = FB_VMODE_NONINTERLACED,
.flag = 0,
},

Here a well formed information repository on how VGA work.

Next, USB!

mercoledì 13 maggio 2009

Framebuffer OK!!

Five days spent solving framebuffers problems, but damn! I've got it! :)
Next post will be the full explanation..
Bye!

venerdì 8 maggio 2009

Framebuffer calibration!

I'm trying to calibrate the frame buffer modes.
Basically I tried to apply the same modes from the old Atmark implementation for CRT-VGA and CRT-SVGA in drivers/video/mxc/mxcfb.c to the new mx3fb.c driver in 2.6.30 kernel but the screen look out of borders in left and up. Also words printed have soft yellow shadows and the logo seems to be printed in 16 colours not 16 bpp :)

fbset is the utility made for me now (here the man page) it give me the ability to change geometry and timings of the screen but seems not work!
I've tried for so much time, but no results and every time recompiling the kernel to see changes of adjusting parameters is not a praticable way.

Now I'm trying to build the OSELAS BSP for their i.MX31 board. Thanks to Pengutronix!
Hoping this will help me :)

Bye!

giovedì 7 maggio 2009

Nice Day Today! :)

Guys, I am proud to announce that the console-image from openembedded is working!
I've got full serial login and VGA login prompt!

Next work:
  • RTC not found? maybe shoud be only enabled from kernel config.
  • Adjust VGA output: It print over screen and seems to have only 16 colours not 16bpp!
  • Add USB support: Mouse! Keyboard!
After that i will focus on Android!

Openembedded and a sutable distro

Here all the steps to build a valid root filesystem where I can deal with all my work since here!

I choose Openembedded as build system to build the linux distribution, first for curiosity (in so many place it is mentioned an so many people tell me about), last for no other known choices! (Sorry at anyone that fight to open the way for your own embedded distribuition build system)

Openembedded main page is here and following the Getting Started guide i had been able to create a valid Openembedded enviroment in my workstation:
Base dir
$ mkdir -p /media/dati/oe/stuff/build/conf
$ cd /media/dati/oe/stuff/

For BitBake
$ svn co svn://svn.berlios.de/bitbake/branches/bitbake-1.8/ bitbake

For Openembedded
$ git clone git://git.openembedded.net/openembedded
Next I created the BitBake configuration file locale.conf:
$ cd /media/dati/oe/stuff/
$ cp openembedded/conf/local.conf.sample build/conf/local.conf

Editing it for me it result: (without comments..):

TOPDIR = "/media/dati/oe"
DL_DIR = "${TOPDIR}/sources"

BBFILES = "${TOPDIR}/stuff/openembedded/recipes/*/*.bb"

BBMASK = ""

PREFERRED_PROVIDERS = "virtual/qte:qte virtual/libqpe:libqpe-opie"
PREFERRED_PROVIDERS += " virtual/libsdl:libsdl-x11"
PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial"
PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc-intermediate:gcc-cross-intermediate"
PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc:gcc-cross"
PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}g++:gcc-cross"

MACHINE = "armadillo500"

TARGET_OS = "linux"

DISTRO = "angstrom-2008.1"

GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 it_DE.UTF-8"

IMAGE_FSTYPES = "ext2"

CACHE = "${TOPDIR}/cache"

BBINCLUDELOGS = "yes"
And next the patch to openembedded: 0001-Initial-Armadillo-500-support-for-OpenEmbedded.patch

Applying this the command:
$ cd /media/dati/oe/stuff/
$ bitbake helloworld-image
Produce at /media/dati/oe/tmp/deploy/glibc/images/armadillo500 the file Angstrom-helloworld-image-glibc-ipk-2009.X-test-20090506-armadillo500.rootfs.ext2
that mounted as loopback filesystem on /nfsarmadilloroot:
$ sudo mount Angstrom-helloworld-image-glibc-ipk-2009.X-test-20090506-armadillo500.rootfs.ext2 /nfsarmadilloroot -t ext2 -o loop
Work great as rootfilesystem!

That's all folks :)

Next is a console-image..
Openembedded take so much time building! Sure.. it build also so much software not needed.. nevermind I'm not here to penetrate in that build process. :P

Angsrom Login!!!

Yes YES YESSSSS!
I've got the Angstrom Login prompt on the VGA screen! Yes the problem suggested was true, new kernel, wrong version of glibc.
Next the entire process to have a working Angstrom helloworld-image :)

mercoledì 6 maggio 2009

Revision Point.

Last post in this blog was weeks ago!
I've been far from internet for a while but also not far from my thesis!
What I worked out:
  1. Ethernet support (SMSC 9118) with nfs root capability.
  2. MMC/SD card device support (SDHC).
Since now I worked on Frame buffer support with discrete success (Logo displayed on the screen), but THE problem is not solved! THE problem is that with the latest kernel, the distro given from Atmark crashes in early init process! with no chances of debugging!
The only things that I know are the lists of files that the init process try to load from the nfs root before it crash without outputs.

I think it is a conflict between the new kernel and the precompiled C libraries stored in the root directory.
So now I'm working for building a compatible distro from Openembedded hoping this process is painless :p

Bye!

venerdì 17 aprile 2009

Early Armadillo 500 support (the last?)

Ok, after reviewing mechanism this is the patch that give early support to the Atmark Armadillo 500 dev board.
The patch apply to the latests kernel source obtained by
git pull
in the root local git repository.

0001-Initial-support-for-Atmark-Armadillo-500-developing.patch

mercoledì 15 aprile 2009

Author and name on Git configuration

From: http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html

$ git config --global user.name "Alberto Panizzo"
$ git config --global user.email maramaopercheseimorto@gmail.com

Early Armadillo 500 support

Ok! Now I am ready to post the first official Early Atmark Armadillo 500 developing board support patch!

This patch add the Armadillo 500 initial support. Enabling the mxc uart console via make gconfig (by default using make armadillo500_defconfig) we can see the console output through Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0).

To see debug strings on the console you have to apply the patch "Clock ipg_clk/ipg_per_clk synchronization" due to resolve clock the synchronization issue.

Patches attached because of changes made by this blog to the code style. (Indentation, ...)

0001-Initial-support-for-Atmark-Armadillo-500-developing.patch
0002-Add-armadillo500_defconfig-file-in-the-tree.patch
0003-Clock-ipg_clk-ipg_per_clk-synchronization.patch

Clock syncronization issue!

Time spent to analyse the imx console driver to found where is the bug that produce scrambling chars on the serial debug and the problem was not there!

The problem is ipg_clk/ipg_per_clk synchronization!
ipg_per_clk clock signal has two possible clock source decided by bit 24 (PERCS) of CCMR register.
On my armadillo 500 board the clock source was set to usb_pll instead of ipg_clk resulting on not synchronized clocks signals on the UART device! producing wired characters on the output.

This patch correct the issue, for me and also for all iMX31 boards (if misconfigured)

diff --git a/arch/arm/mach-mx3/clock.c b/arch/arm/mach-mx3/clock.c
index ca46f48..f1a581d 100644
--- a/arch/arm/mach-mx3/clock.c
+++ b/arch/arm/mach-mx3/clock.c
@@ -581,6 +581,11 @@ int __init mx31_clocks_init(unsigned long fref)
MX32, but still required to be set */
MXC_CCM_CGR2);

+ /* Ensure ipg_per_clk clock is generated by ipg_clk and not by
+ usb_pll (CCMR:24 = 1) to do not turn off UART after disabling
+ usb_pll and mantain ipg_clk and ipg_per_clk syncronization */
+ __raw_writel(__raw_readl(MXC_CCM_CCMR) | (1 << 24), MXC_CCM_CCMR);
+
usb_pll_disable(&usb_pll_clk);

pr_info("Clock input source is %ld\n", clk_get_rate(&ckih_clk));

giovedì 9 aprile 2009

Very Early Support!

Ook some time working and first code work fine.
This is the first debugging patch to the kernel vanilla 2.6.29 and the result is very early debug strings from /arch/arm/boot/compressed/head.S and /arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S printed on the serial port. And an Alive message that state all is gone ok before call start_kernel().
Ehm..! no debug output is shown after start_kernel call..
Next is porting ttymcx console driver to support printk() message printing.

The patch:
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index b371fba..5d08227 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -17,6 +17,9 @@
* 100% relocatable. Any attempt to do so will result in a crash.
* Please select one of the following when turning on debugging.
*/
+
+#define DEBUG 1
+
#ifdef DEBUG

#if defined(CONFIG_DEBUG_ICEDCC)
diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S
index 991952c..5d43cfa 100644
--- a/arch/arm/kernel/head-common.S
+++ b/arch/arm/kernel/head-common.S
@@ -50,7 +50,9 @@ __mmap_switched:
1: cmp r6, r7
strcc fp, [r6],#4
bcc 1b
-
+
+ bl __alive
+
ldmia r3, {r4, r5, r6, r7, sp}
str r9, [r4] @ Save processor ID
str r1, [r5] @ Save machine type
@@ -69,6 +71,16 @@ ENDPROC(__mmap_switched)
* and hope for the best (useful if bootloader fails to pass a proper
* machine ID for example).
*/
+__alive:
+ mov r10,r0
+ adr r0, str_a
+ bl printascii
+ mov r0,r10
+ mov pc, lr
+str_a: .asciz "\n Alive!\n"
+ .align
+ENDPROC(__alive)
+
__error_p:
#ifdef CONFIG_DEBUG_LL
adr r0, str_p1
diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig
index d623558..4ac4337 100644
--- a/arch/arm/mach-mx3/Kconfig
+++ b/arch/arm/mach-mx3/Kconfig
@@ -64,4 +64,12 @@ config MACH_QONG
Include support for Dave/DENX QongEVB-LITE platform. This includes
specific configurations for the board and its peripherals.

+config MACH_ARMADILLO500
+ bool "Support Atmark Armadillo-500 Development Base Board"
+ select ARCH_MX31
+ default n
+ help
+ Include support for Atmark Armadillo-500 platform. This includes
+ specific configurations for the board and its peripherals.
+
endif
diff --git a/arch/arm/mach-mx3/Makefile b/arch/arm/mach-mx3/Makefile
index 272c8a9..4659598 100644
--- a/arch/arm/mach-mx3/Makefile
+++ b/arch/arm/mach-mx3/Makefile
@@ -14,3 +14,4 @@ obj-$(CONFIG_MACH_MX31_3DS) += mx31pdk.o
obj-$(CONFIG_MACH_MX31MOBOARD) += mx31moboard.o mx31moboard-devboard.o \
mx31moboard-marxbot.o
obj-$(CONFIG_MACH_QONG) += qong.o
+obj-$(CONFIG_MACH_ARMADILLO500) += armadillo5x0.o
diff --git a/arch/arm/mach-mx3/armadillo5x0.c b/arch/arm/mach-mx3/armadillo5x0.c
new file mode 100644
index 0000000..ae4e35e
--- /dev/null
+++ b/arch/arm/mach-mx3/armadillo5x0.c
@@ -0,0 +1,117 @@
+/*
+ * armadillo500.c
+ *
+ * Copyright 2009 Alberto Panizzo
+ * updates in http://alberdroid.blogspot.com/
+ *
+ * Based on Atmark Techno, Inc. armadillo 500 BSP 2008 All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+
+#include
+#include
+#include
+
+/* Define Machine specific Memory regions */
+#include
+/* All machine types definitions */
+#include
+/* Machine descriptor definition */
+#include
+/* Time keepeing definitions */
+#include
+/* Memory mapping functions */
+#include
+/* Define map_desc */
+#include
+
+/* Platform functions */
+#include
+#include
+
+
+
+static void __init armadillo5x0_init(void)
+{
+}
+
+/*!
+ * This structure defines static mappings for the i.MX31ADS board.
+ */
+static struct map_desc armadillo5x0_io_desc[] __initdata = {
+ /*{//Internal RAM
+ .virtual = MX31_IRAM_BASE_ADDR_VIRT,
+ .pfn = __phys_to_pfn(IRAM_BASE_ADDR),
+ .length = IRAM_SIZE,
+ .type = MT_NONSHARED_DEVICE},
+ },*//* {//ROM PATCH
+ .virtual = ROMP_BASE_ADDR_VIRT,
+ .pfn = __phys_to_pfn(ROMP_BASE_ADDR),
+ .length = ROMP_SIZE,
+ .type = MT_DEVICE_NONSHARED
+ },*/ {//Shared Perpheral Bus Arbiter
+ .virtual = SPBA0_BASE_ADDR_VIRT,
+ .pfn = __phys_to_pfn(SPBA0_BASE_ADDR),
+ .length = SPBA0_SIZE,
+ .type = MT_DEVICE_NONSHARED
+ }, {//NOR Flash memory (32 M)
+ .virtual = CS0_BASE_ADDR_VIRT,
+ .pfn = __phys_to_pfn(CS0_BASE_ADDR),
+ .length = CS0_SIZE,
+ .type = MT_DEVICE
+ }, {//Extended Bus Region
+ .virtual = CS4_BASE_ADDR_VIRT,
+ .pfn = __phys_to_pfn(CS4_BASE_ADDR),
+ .length = CS4_SIZE,
+ .type = MT_DEVICE
+ },
+};
+
+/*!
+ * Set up static virtual mappings.
+ */
+static void __init armadillo5x0_map_io(void)
+{
+ /*
+ * Maps:
+ * - NAND, SDRAM, WEIM, M3IF, EMI controllers
+ * - AVIC (Vectored Interrupt controller)
+ * - AIPS1 and AIPS2
+ **/
+ mxc_map_io();
+ iotable_init(armadillo5x0_io_desc, ARRAY_SIZE(armadillo5x0_io_desc));
+}
+
+static void __init armadillo5x0_timer_init(void)
+{
+ mx31_clocks_init(26000000);
+}
+
+static struct sys_timer armadillo5x0_timer = {
+ .init = armadillo5x0_timer_init,
+};
+
+MACHINE_START(ARMADILLO5X0, "Armadillo-500")
+ /* Maintainer: Atmark Techno, Inc. */
+ .phys_io = AIPS1_BASE_ADDR,
+ .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
+ .boot_params = PHYS_OFFSET + 0x00000100,
+ //.map_io = armadillo5x0_map_io,
+ //.init_irq = mxc_init_irq,
+ //.timer = &armadillo5x0_timer,
+ //.init_machine = armadillo5x0_init,
+MACHINE_END
diff --git a/arch/arm/plat-mxc/include/mach/board-armadillo5x0.h b/arch/arm/plat-mxc/include/mach/board-armadillo5x0.h
new file mode 100644
index 0000000..b16897b
--- /dev/null
+++ b/arch/arm/plat-mxc/include/mach/board-armadillo5x0.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2005-2007 Alberto Panizzo .
+ * All Rights Reserved.
+ */
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __ASM_ARCH_MXC_BOARD_ARMADILLO5X0_H__
+#define __ASM_ARCH_MXC_BOARD_ARMADILLO5X0_H__
+
+#include
+
+/*
+ * Other memory mapping regions
+ */
+
+#define CS0_BASE_ADDR_VIRT 0xE0000000
+#define CS0_SIZE SZ_128M
+
+/* mandatory for CONFIG_LL_DEBUG */
+
+#define MXC_LL_UART_PADDR UART1_BASE_ADDR
+#define MXC_LL_UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR)
+
+#endif
diff --git a/arch/arm/plat-mxc/include/mach/debug-macro.S b/arch/arm/plat-mxc/include/mach/debug-macro.S
index 4f77314..d3440ab 100644
--- a/arch/arm/plat-mxc/include/mach/debug-macro.S
+++ b/arch/arm/plat-mxc/include/mach/debug-macro.S
@@ -34,6 +34,9 @@
#ifdef CONFIG_MACH_QONG
#include
#endif
+#ifdef CONFIG_MACH_ARMADILLO500
+#include
+#endif
.macro addruart,rx
mrc p15, 0, \rx, c1, c0
tst \rx, #1 @ MMU enabled?

Compiling:
apply the patch...
$ export ARCH=arm
$ export CROSS_COMPILE=/media/dati/android/cupcake/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-
$ make allnoconfig
$ make gconfig
->System Type>ARMSystemType>Freescale MXC/iMX based=y
->Freescale MXC Implementation > Support Atmark Armadillo-500 Development Board=y
$ make
-> download to the board and boot!

venerdì 3 aprile 2009

iMX Linux Boot Process description online

Within my links on right side now there is the pdf document that describe the entire Linux boot process adapted for arm i.MX31: after the bootloader work through the execution of /sbin/init!

Taste it! Bye!

giovedì 2 aprile 2009

Very deep focus on ARM Boot process

Here Peter Pearse make a very deep and up-to-date focus analysis of SMP ARM Boot process:
http://www.linux-arm.org/LinuxBootLoader/SMPBoot
Thanks a lot to him :)

With little adjusting Voilà! the single core ARM Boot process!
The context where I have to work and without I will not understand nothing :p

Kernel XIP

What is XIP?? Only for memo.. eXecute In Place.
Ref: http://elinux.org/Kernel_XIP

What Run First

Form Arm-Linux Mailing list, posted by Russell King
http://lists.arm.linux.org.uk/lurker/message/20011005.154003.5d698445.html

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().

mercoledì 1 aprile 2009

All begin by main.c

All the time I spent since now was for looking to understand the real order in booting/init procedure (not counting time spent for diffs over different kernel source and bsp's)

Here I found an effective utile documentation: http://www.linux-arm.org/LinuxKernel/LinuxNewPlatformPort

In Kernel Boot section we can find that the function init/main.c:start_kernel() starts the kernel over all architecture, and give the real order of the initialization sequence.

Sorry it it was obvious I am a sort of Davide that fight with Golia in this work :)

Anyway every tutorial/docs I've found is related to old kernel version..