AnsweredAssumed Answered

How to add a new board with i.mx28 to the kernel

Question asked by guilherme mazzela on Apr 16, 2013
Latest reply on Apr 19, 2013 by guilherme mazzela

Hi

 

I'm working with a new board based at the i.mx28EVK board, i'm tring to create a

new platform in the kernel for my board. I'm using linux-2.5.35.3 form ltib, I

have modified the follow files to create my board.

 

===================================================================

--- rpm/BUILD/linux-2.6.35.3/arch/arm/tools/mach-types  (revision 3)

+++ rpm/BUILD/linux-2.6.35.3/arch/arm/tools/mach-types  (working copy)

@@ -3077,3 +3077,4 @@

torbreck               MACH_TORBRECK           TORBRECK                3090

saarb_mg1              MACH_SAARB_MG1          SAARB_MG1               3091

callisto               MACH_CALLISTO           CALLISTO                3092

+mx28_new_board         MACH_MX28_NEW_BOARD     MX28_NEW_BOARD          3093

Index: rpm/BUILD/linux-2.6.35.3/arch/arm/mach-mx28/Kconfig

===================================================================

--- rpm/BUILD/linux-2.6.35.3/arch/arm/mach-mx28/Kconfig (revision 3)

+++ rpm/BUILD/linux-2.6.35.3/arch/arm/mach-mx28/Kconfig (working copy)

@@ -6,6 +6,11 @@

        depends on ARCH_MX28

        select USB_ARCH_HAS_EHCI

 

+config MACH_MX28_NEW_BOARD

+       bool "MX28 new board"

+       depends on ARCH_MX28

+       select USB_ARCH_HAS_EHCI

+

endchoice

 

config VECTORS_PHY_ADDR

Index: rpm/BUILD/linux-2.6.35.3/arch/arm/mach-mx28/device.c

===================================================================

--- rpm/BUILD/linux-2.6.35.3/arch/arm/mach-mx28/device.c        (revision 5)

+++ rpm/BUILD/linux-2.6.35.3/arch/arm/mach-mx28/device.c        (working copy)

@@ -421,7 +421,7 @@

#endif

 

#if defined(CONFIG_MMC_MXS) || defined(CONFIG_MMC_MXS_MODULE)

-#if defined(CONFIG_MACH_MX28EVK)

+#if defined(CONFIG_MACH_MX28EVK) || defined(CONFIG_MACH_MX28_NEW_BOARD)

#define MMC0_POWER     MXS_PIN_TO_GPIO(PINID_PWM3)

#define MMC1_POWER     MXS_PIN_TO_GPIO(PINID_PWM4)

#define MMC0_WP                MXS_PIN_TO_GPIO(PINID_SSP1_SCK)

Index: rpm/BUILD/linux-2.6.35.3/arch/arm/mach-mx28/Makefile

===================================================================

--- rpm/BUILD/linux-2.6.35.3/arch/arm/mach-mx28/Makefile        (revision 3)

+++ rpm/BUILD/linux-2.6.35.3/arch/arm/mach-mx28/Makefile        (working copy)

@@ -5,6 +5,7 @@

 

# Board select

obj-$(CONFIG_MACH_MX28EVK) += mx28evk.o mx28evk_pins.o

+obj-$(CONFIG_MACH_MX28_NEW_BOARD) += mx28_new_board.o mx28evk_pins.o

obj-$(CONFIG_GENERIC_GPIO) += gpio.o

obj-$(CONFIG_MXS_RAM_FREQ_SCALING) +=emi.o emi_settings.o

 

And have created a new file for my board that is a copy form mx28evk.c only changing the machine type

 

diff linux-2.6.35.3/arch/arm/mach-mx28/mx28evk.c linux-2.6.35.3/arch/arm/mach-mx28/mx28_new_board.c

190c190

< MACHINE_START(MX28EVK, "Freescale MX28EVK board")

---

> MACHINE_START(MX28_NEW_BOARD, "MX28 new board")

 

My problem is that when a build de rootfs and the kernel using my new board the kernel hangs just after

be uncompressed

 

Loading: FEC: Link is down 7809

T T T T T T T #################################################################

         #################################################################

         ############################################

done

Bytes transferred = 2546548 (26db74 hex)

## Booting kernel from Legacy Image at 42000000 ...

   Image Name:   Linux-2.6.35.3-670-g914558e-svn3

   Image Type:   ARM Linux Kernel Image (uncompressed)

   Data Size:    2546484 Bytes =  2.4 MB

   Load Address: 40008000

   Entry Point:  40008000

   Verifying Checksum ... OK

   Loading Kernel Image ... OK

OK

 

Starting kernel ...

 

Uncompressing Linux... done, booting the kernel.

 

 

I'm missing something?

There are any better option to add suport for a new board to the kernel?

 

Thank's

 

Guilherme

 


Outcomes