i.MX25PDK in mainline

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX25PDK in mainline

3,491 Views
gonfer
Contributor V

Hi all,

what is the support of the iMX25PDK in mainline kernel??

I'm just starting a project with the iMX25 and would like to use something more newer than the Freescale L2.6.31_09_12_00 BSP.

I've taken a look at different mainline kernels (2.6.38, 2.9.39, 3.0.4 & 3.0.8) and in non of them I'm able to find an arch/arm/mx25_defconfig file. I'm missing something?

Anyway, I've tried to compile these kernels, usign the "mx27_defconfig" file, and then selecting the iMX25PDK board. I've been able to compile and boot all of them but in any of them I have found support for the touch screen. Is this because I've used the mx27_defconfig file? How can I get support for the touch screen?

Thanks in advance for your advice.

Gonzalo.

Labels (1)
25 Replies

1,928 Views
jlu
Contributor II

I want to update all of you that have given suggestions and replies.

After many attemps using the sources from linux grit, freescale grit to freescale BSP and from version 2.6.35 to 3.0, using LTIB environment or not using the environment, I failed to make a combined rootfs.jffs2 and uImage that can work on my imx25 board. I think the problem is the rootfs.jffs2, but there is no prove. The system always hangs on "no init found", sometimes with obvious reason that VFS cannot mount (other times VFS mounts successfully).

Now I have given up my idea to upgrade the kernel, but would be happy if I can find some information about how to create the root file system tree.

Freescale later told me their 2.6.35 kernel BSP does not work with the mx25pdk, but never explained why.

The reason I started to upgrade the kernel is that the CAN driver does not work properly, and Freescale sent me a patch that is based on 2.6.35. I reworked the 2.6.35 driver to down grade it to 2.6.31. My problem is solved. The old driver seems not sending out some frames while all flags indicating a successful transmitting. Therefor be aware if anybody uses the CAN device driver in 2.6.31.

Thank all of you. I appreciate your help.

Jill

0 Kudos

1,928 Views
jlu
Contributor II

Hello Peter,

I read from another post that you have projects that use mx25 and you have used a kernel above 2.6.31. Is that 2.6.35 or 2.6.39? How do you build your file system? My board copies mx25pdk for NAND, UART, CAN0, RAM and have nothing else. I need a rootfs.jffs2 that is proven to work on mx25pdk with version 2.6.35 or above.

I've built uImage in 2.6.35 and 3.2.0. While they may have problems unknown yet, they all hang on not finding /sbin/init (and other init files). I use jffs2 system.

 

appreciate any advice,

Jill

Peter Kardos said:

I guess you've probably sorted this already out, but i would try taking a look at the freescale repository (opensource.freescale.com). The "latest" kernel seems to be a 2.6.38 kernel, but i don't know how "feature rich" it is...

As far as i know, the mainline kernel (2.6.3x) does not support the A/D converter, thus the TS controller...

0 Kudos

1,928 Views
jlu
Contributor II

A little progress: I finished "make modules_install ARCH=arm" . do not understand why ARCH export does not take effect. I can see it by "env".

 

However all I got after this in the "rootfs" is an empty folder: rootfs/lib/modules/3.2.0-08812-gc2bc3a3-dirty/kernel. How do I build the whole file system tree include rootfs/bin, rootfs/sbin, etc?

0 Kudos

1,928 Views
jlu
Contributor II

Hello Roberto, I got a wrong file. the .config for 2.6.35 is here.

0 Kudos

1,928 Views
jlu
Contributor II

Hello Gonzalo and Roberto,

sudo does help to get "make modules_install" going but then it shows messages for" Restarting config .... Linux/i386 3.2.0 kernel configuration" and asks whole bunch of question for i386. Why? I do have ARCH=arm exported. also the uImage is excutable - even though it hangs at unable to mount VFS and "no init found".

I've attached .config for this 3.2, and a version 2.6.35 built through LTIB.

thank you,

Jill

0 Kudos

1,928 Views
RobertoNibali
Contributor I

Yes, or Jill is trying to generate the kernel either over cross-boundary filesystem that do not support symlinks or is using a base filesystem that does not support symlinks. In case the 'sudo make modules_install' does not work, I would like to know the filesystem layout you use to compile and deploy your kernel and RFS (root file system).

Also, I am not sure what exactly is failing, since Jill's differing feedbacks indicate that the RFS is working fine. It's just a matter of the kernel, and most probably a specific set of options that do not bode well with the current device layout. It would be advisable to use the existing mechanisms of the kernel source (and not some 3.2.0 git tree) to build a kernel. Also, you don't really need any kernel modules to get a working proof of kernel for the mx25 PDK. Jill, why don't you attach your current .config kernel configuration, so we have a quick look at it? I also strongly advise to only use the ltib generated cross-compiling environment for compiling the kernel and not using ltib. At this point, this focuses on minimizing external root causes of your failure.

And consider getting some sleep ...



Gonzalo Fernandez said:

This could be a privilegies problem.

Try:     sudo make modules_install


Jill said:

Hello Gonzalo,

I followed your steps to build the kernel, and successfully pass 'make imv_v4_v5_defconfig', 'make menuconfig', 'make uImage', 'make modules'.

At step 'make modules_install' I got this message:

ln: creating symbolic link '/base_folder/rootfs/ltib/modules/3.2.0-08812-gc2bc3a3-dirty/source': Operation not supported

make: *** [ modinst ] Error 1

what could be the reason?

Thanks,

Jill

0 Kudos

1,928 Views
gonfer
Contributor V

This could be a privilegies problem.

Try:     sudo make modules_install


Jill said:

Hello Gonzalo,

I followed your steps to build the kernel, and successfully pass 'make imv_v4_v5_defconfig', 'make menuconfig', 'make uImage', 'make modules'.

At step 'make modules_install' I got this message:

ln: creating symbolic link '/base_folder/rootfs/ltib/modules/3.2.0-08812-gc2bc3a3-dirty/source': Operation not supported

make: *** [ modinst ] Error 1

what could be the reason?

Thanks,

Jill

0 Kudos

1,928 Views
jlu
Contributor II

I'm very much convinced that my problem comes from the root file system. My board is very simple - no network, no usb, nothing except RAM, NAND, CAN, LCD that copy the mx25pdk. So I have to use jffs2 system, and use UART to load the file to the target.

The 2.6.31 file system rootfs.jffs2 has over 25M, the new one looks much smaller, which is good to me. However I cannot get it work.

Could you please post how you create your file system? When I follow Gonzalo's procedure, I cannot see where the file system is created - I mean the rootfs folder that LTIB will generate.

0 Kudos

1,928 Views
jlu
Contributor II

Hello Gonzalo,

I followed your steps to build the kernel, and successfully pass 'make imv_v4_v5_defconfig', 'make menuconfig', 'make uImage', 'make modules'.

At step 'make modules_install' I got this message:

ln: creating symbolic link '/base_folder/rootfs/ltib/modules/3.2.0-08812-gc2bc3a3-dirty/source': Operation not supported

make: *** [ modinst ] Error 1

what could be the reason?

Thanks,

Jill

0 Kudos

1,928 Views
jlu
Contributor II

Gonzalo,

I have a rootfs.jffs2, generated by LTIB. I browsed through the rootfs folder and it appeared completely fine to me. Following the advice from init.txt I printed out the return of kernel_execve(). Running "/sbin/init" "/etc/init" "/bin/init" and "/bin/sh" all return (-2), apparently no files were found. However I can see under rootfs that /sbin/init points to /bin/busybox. So I thought it might be mkfs.jffs2 had used wrong parameters. But then I printed out the erase block size and page size and they were all correct. And you can see from the log out that NAND driver has detectedt the NAND correctly, the 5 partitions also look all right. I'm totally lost.

Is there a way that I can directly check what are in my rootfs.jffs2?

 

thank you for the reply,

Jill

0 Kudos

1,928 Views
jlu
Contributor II

Hello Roberto,

May I ask you how do you generate your root file system? What file system you are using? I'm using jffs2. Now I'm wondering that my problem may not be in the kernel. From the printouts the system hangs after mounting the file system.

Could anybody please commnet on my boot output below:


Starting kernel ...

 

Uncompressing Linux... done, booting the kernel.

console [ttymxc0] enabled, bootconsole disabled

console [ttymxc0] enabled, bootconsole disabled

mxcintuart.1: ttymxc1 at MMIO 0x43f94000 (irq = 32) is a Freescale i.MX

brd: module loaded

loop: module loaded

MXC MTD nand Driver 3.0

NAND device: Manufacturer ID: 0xec, Chip ID: 0xd7 (Samsung NAND 4GiB 3,3V 8-bit)

Searching for RedBoot partition table in NAND 4GiB 3,3V 8-bit at offset 0xffd80000

No RedBoot partition table detected in NAND 4GiB 3,3V 8-bit

Creating 5 MTD partitions on "NAND 4GiB 3,3V 8-bit":

0x000000000000-0x000000300000 : "nand.bootloader"

0x000000300000-0x000000800000 : "nand.kernel"

0x000000800000-0x000010800000 : "nand.rootfs"

0x000010800000-0x000011000000 : "nand.configure"

0x000011000000-0x000100000000 : "nand.userfs"

Freescale FlexCAN Driver

ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver

fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller

fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1

fsl-ehci fsl-ehci.0: irq 35, io base 0x53ff4400

fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00

usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

usb usb1: Product: Freescale On-Chip EHCI Host Controller

usb usb1: Manufacturer: Linux 2.6.35.3-1129-g691c08a ehci_hcd

usb usb1: SerialNumber: fsl-ehci.0

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

fsl-ehci fsl-ehci.1: Freescale On-Chip EHCI Host Controller

fsl-ehci fsl-ehci.1: new USB bus registered, assigned bus number 2

fsl-ehci fsl-ehci.1: irq 37, io base 0x53ff4000

fsl-ehci fsl-ehci.1: USB 2.0 started, EHCI 1.00

usb usb2: New USB device found, idVendor=1d6b, idProduct=0002

usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1

usb usb2: Product: Freescale On-Chip EHCI Host Controller

usb usb2: Manufacturer: Linux 2.6.35.3-1129-g691c08a ehci_hcd

usb usb2: SerialNumber: fsl-ehci.1

hub 2-0:1.0: USB hub found

hub 2-0:1.0: 1 port detected

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

ARC USBOTG Device Controller driver (1 August 2005)

udc: request mem region for fsl-usb2-udc failed

fsl-usb2-udc: probe of fsl-usb2-udc failed with error -16

MXC keypad loaded

input: mxckpd as /class/input/input0

IMXDI Realtime Clock Driver (RTC)

imxdi_rtc imxdi_rtc.0: rtc core: registered imxdi_rtc as rtc0

IR NEC protocol handler initialized

IR RC5(x) protocol handler initialized

IR RC6 protocol handler initialized

IR JVC protocol handler initialized

IR Sony protocol handler initialized

Linux video capture interface: v2.00

PMIC Character device: successfully loaded

i.MX ADC at 0x50030000 irq 46

mxsdhci: MXC Secure Digital Host Controller Interface driver

mxsdhci: MXC SDHCI Controller Driver.

mmc0: SDHCI detect irq 97 irq 9 INTERNAL DMA

mmc0: Card removed and resetting controller.

usbcore: registered new interface driver usbhid

usbhid: USB HID core driver

No device for DAI imx-ssi-1-0

No device for DAI imx-ssi-1-1

No device for DAI imx-ssi-2-0

No device for DAI imx-ssi-2-1

ALSA device list:

  No soundcards found.

oprofile: hardware counters not available

oprofile: using timer interrupt.

TCP cubic registered

NET: Registered protocol family 17

can: controller area network core (rev 20090105 abi 8)

NET: Registered protocol family 29

can: raw protocol (rev 20090105)

smsc911x: Driver version 2008-10-21.

Static Power Management for Freescale i.MX25

on-off key pressed

input: imx_adc_ts as /class/input/input1

i.MX ADC input touchscreen loaded.

imxdi_rtc imxdi_rtc.0: setting system clock to 1970-01-01 00:00:00 UTC (0)

JFFS2 doesn't use OOB.

VFS: Mounted root (jffs2 filesystem) on device 31:2.

Freeing init memory: 116K

Kernel panic - not syncing: No init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.

[<c002a32c>] (unwind_backtrace+0x0/0xf0) from [<c02f74b0>] (panic+0x6c/0xe8)

[<c02f74b0>] (panic+0x6c/0xe8) from [<c00255b4>] (init_post+0xac/0xd4)

[<c00255b4>] (init_post+0xac/0xd4) from [<c0008480>] (kernel_init+0x124/0x168)

[<c0008480>] (kernel_init+0x124/0x168) from [<c002690c>] (kernel_thread_exit+0x0/0x8)

 

Thanks,

Jill

0 Kudos

1,928 Views
gonfer
Contributor V

Roberto, thanks a lot for the patch !!! 

Jill, Roberto's advice is very good. About your "kernel panic - not syncing: no init found" problem, do you have a rootfs?

I'm using mainline kernel and borrowing the toolchain and rootfs from a Freescale BSP (FSL2.6.35_x.y.z). Once Ltib is installed and a kernel compiled, you can use the toolchain and rootfs.

Now, to compile a mainline kernel, you need the following variables in your host machine:

export PATH=/opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/:$PATH
export ARCH=arm
export CROSS_COMPILE=arm-none-linux-gnueabi-
export INSTALL_MOD_PATH=~/L3.4-rc3/rootfs

Take a look at "make arch=ARM help" output; you will find good stuff there.

Now you can compile the kernel:

make imx_V4_V5_defconfig

make menuconfig    (and customize the settings. Select _ONLY_ one board: iMX25PDK)

make uImage     (if everything goes fine you will get an image of your kernel ready for U-Boot)

make modules

make modules_install

make headers_install

Now, you have to setup properly your tftp and nfs server (take  look at www.imxdev.org) and also setup the U-Boot environment (specially ip addresses and nfsroot variable!!). Now, you should be ready to go !!

Let me know if any step is not clear.

Gonzalo.

0 Kudos

1,928 Views
jlu
Contributor II

Hello Roberto,

thank you for the reply. I'm digesting it - I'm a newbie in linux. Yesterday i clone the freescale opensource 2.6-imx, but after getting the whole repository, I could not check they out - git complained it was not a git repos. I will try the linux site today.

 

May be asking too much but I do hope somebody could tell me an easy way.

 

Appreciate very much,

0 Kudos

1,927 Views
RobertoNibali
Contributor I

Hi Jill

First off: I have no experience with the mx25 3stack PDK board, however I am working on a custom designed mx25 device that has similar features to the mx25 3stack PDK board.

Having said that, you can download any recent kernel to start getting support for your customized board. I suggest kernel 3.3.4 as a start, since quite a few fundamental things (GPIO setting, initialization code) have changed between 2.6.x and 3.3.x, which I now consider quite stable. Newer kernels than 3.3, in my opinion might be a wee bit too recent to get your board working, since again a bunch of new fundamental changes are being put into code at this moment.

Depending on your changes, you might need to add a new device code into arch/arm/mach-imx/. Start by copying arch/arm/mach-imx/mach-mx25_3ds.c, and subsequently adjusting the different platform device descriptions to your device needs. The imx_v4_v5_defconfig Makefile target should preselect most of the needed functionality for your device. In case of creating a new device, you also need to add a line to arch/arm/mach-imx/{Makefile,Kconfig} to insert support for compilation of your platform driver.

I don't know how close to the mx25_3ds your device is, however try it first with the in-kernel mx25 3-stack support. You might need to adapt mxc_nand_platform_data information and other peripheral device structures, however it should work for you out of the box. If you have your own platform data, try posting it here, for further comments. It's hard to offer help without knowing more about your setup.

Also, for your first run, disable anything inside mx25pdk_init(void) that you don't need, for example USB, FB, maybe SDHC, KEYBOARD, FLEXCAN. You can add those at a later stage. It's really hard to get any kind of helpful support from Freescale in my experience, so you're mostly on your own, with the exception of a couple of good souls trying to help out with their knowledge from time to time. Other than that, it's reading a lot of kernel source code and trial and error.

Lastly, there are various companies out there providing excellent paid support for custom designed boards; Pengutronix for example is one that left a very good impression of high professionality.

Good luck

Roberto


Jill said:

Hello all,

Seems lots of people have success building 2.6.35 or above for i.mx25 3stack board. could you please tell me where you get the source?

I'm trying to use 2.6.35. the building goes sucessfully. however the kernel cannot boot. It stops at "kernel panic - not syncing: no init found".

The board I'm using is a customized one but almost identical to mx25 3stack pdk. It works fine with kernel 2.6.31. Can somebody share your experience? I need 2.6.35 for a reason (to try fixing CAN problem) but if you get a higher version work right out of box, I would like to give it a try. I'm desperate in need of fixing the problem. I would appreciate a step by step description of getting a source package, or a binary. I've tried to "grit clone" from opensource.freescale.com with no success. Freescale's support comes so slow.

 

thanks alot,

Jill

0 Kudos

1,928 Views
jlu
Contributor II

Hello all,

Seems lots of people have success building 2.6.35 or above for i.mx25 3stack board. could you please tell me where you get the source?

I'm trying to use 2.6.35. the building goes sucessfully. however the kernel cannot boot. It stops at "kernel panic - not syncing: no init found".

The board I'm using is a customized one but almost identical to mx25 3stack pdk. It works fine with kernel 2.6.31. Can somebody share your experience? I need 2.6.35 for a reason (to try fixing CAN problem) but if you get a higher version work right out of box, I would like to give it a try. I'm desperate in need of fixing the problem. I would appreciate a step by step description of getting a source package, or a binary. I've tried to "grit clone" from opensource.freescale.com with no success. Freescale's support comes so slow.

 

thanks alot,

Jill

0 Kudos

1,928 Views
RobertoNibali
Contributor I

Hi Gonzalo

I have uploaded the patch here and to pastebin.com (http://pastebin.com/F3zbPR2r). Feel free to cherry-pick the bits and pieces you need from there. Also, you can send me an email if you need the patch directly.

Cheers

Roberto



Gonzalo Fernandez said:

Roberto, thanks for the info.

Please, could you point me where I can find that patch?

Gonzalo.

0 Kudos

1,928 Views
gonfer
Contributor V

Roberto, thanks for the info.

Please, could you point me where I can find that patch?

Gonzalo.

0 Kudos

1,928 Views
RobertoNibali
Contributor I

There is a patch originating from the Pengutronix folks that features a completely stable and wonderful TS controller driver. So this part should not be an issue anymore. It also applies to 2.6.3x kernels, however I strongly advice using a newer kernel, preferably 3.3.

Peter Kardos said:

I guess you've probably sorted this already out, but i would try taking a look at the freescale repository (opensource.freescale.com). The "latest" kernel seems to be a 2.6.38 kernel, but i don't know how "feature rich" it is...

As far as i know, the mainline kernel (2.6.3x) does not support the A/D converter, thus the TS controller...

0 Kudos

1,928 Views
gonfer
Contributor V

OK, I'll try there.

Regards,

Gonzalo.

0 Kudos

1,928 Views
fabio_estevam
NXP Employee
NXP Employee

mx2_camera.c was developed to support both mx27 and mx25, but I haven't seen any mx25 based board using it yet.

Maybe you could ask at linux-media mailing list if there is anyone working on it.

Regards,

Fabio Estevam

0 Kudos