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
Solved! Go to Solution.
Activating earlyprintk support can help pointing out the error.
Please check if your bootloader is passing the correct machine id for your new board.
Thank for the help,
my error was that i have created a new number in:
linux-2.6.35.3/arch/arm/tools/mach-types
but didn't have create the same board code in u-boot
Fabio, I a have get the latest Ltib from the freescale/imx.28 page and this version of Ltib doesn't came with
kernel 3.8, reading the reply from Leonardo, he says to use the Yocto and do not use Ltib, because I'm new
to the i.MX processor I need a little help, I should use Yocto or Ltib? Where a Can get Yocto with support for
the i.MX28 processor, I could not find it at freescale, than I search at the Yocto project page and didn't find
Yocto for the i.MX28 to.
Is there one introduction of Yocto with i.MX28?
Thank's
Guilherme,
Adding support to a board in the kernel is a task that does not depend on the build tool mechanism (Ltib or Yocto).
So you need to work on this first, then after your board can boot a kernel you need a rootfs for it.
Then you can select Ltib, Yocto, Buildroot, etc.
It is difficult to say which build system or kernel version you should use, as it really depends on your particular application.
Regards,
Fabio Estevam
Hi guilherme.mazzela, send me an email and we can talk about it.
I can tell you the complete history :smileywink:
But you have successfully added your code into the kernel, right? What else do you need to do with LTIB/YOCTO?
YOCTO is a big framework a it take some time to understand it but it is worth taking a look, it is much scalable than LTIB and there is an active community around it. There are many links regarding Yocto (did you search on the community.freescale.com page?), as a starter you can try this https://community.freescale.com/docs/DOC-94023
Leo
I have added a new board to the kernel(just a copy of the i.mx28evk), it show up at the menuconfig, I can build the kernel with support to my board. The problem is that when I boot this kernel image the system stop just after uncompressing the kernel. But when I boot the system with the MX28EVK selected in the menuconfig the system works fine.
Activating earlyprintk support can help pointing out the error.
Please check if your bootloader is passing the correct machine id for your new board.
As Fabio commented before, forget about BSP builders for the moment. That error is actually quite common when changing u-boot code :smileyhappy: There is an excellent book titled 'Embedded Linux Primer' by Christopher Hallinan, I think there is a pdf on the web. Check 14.5 Section, that is a good introduction to early debugging.
Leo
It is much easier to add support for a new board on a more recent kernel, like 3.8.
In a modern kernel you need to provide a device tree file, that describes the hardware. Take a look at mx28evk device tree file:
Regards,
Fabio Estevam
Were you able to add your board? AFAIK, What you did is the only way to add your board to the menuconfig.
Future BSP will be base on Yocto (in other words, LTIB wont be supported in the near future), so you may try using the Yocto infrastructure to add your machine into the meta-fsl-arm-extra layer. If you are not familiar with the framework, search inside the fsl community AND subscribe to the meta-freescale mailing list for more info.
Leo