Welcome, Guest

Author Topic: Linux 3.8.1 pin output inversed, cannot boot  (Read 18088 times)

guanx

  • Newbie
  • *
  • Posts: 35
  • Karma: +0/-0
Linux 3.8.1 pin output inversed, cannot boot
« on: March 02, 2013, 04:40:31 PM »
Hello,

I just tried Linux 3.8.1 on iMX233 OLinuXino Micro and could not boot. Because I don't have a console I am using the LED as debug output. Until now I found two problems:

The LED output is inversed;
microSD not detected.

There is no mmcblk* device in the devtmpfs. If I manually mknod them the mmcblk* devices are still not usable. I suspect this problem is related to the inversed output. So what should I do next?

Thanks in advance!



Niii

  • Newbie
  • *
  • Posts: 40
  • Karma: +1/-0
Re: Linux 3.8.1 pin output inversed, cannot boot
« Reply #1 on: March 02, 2013, 08:14:29 PM »
Hi,

No problem for me.
I've built kernel and dtb file, put them on sdcard and boot with uboot.
Led is green as expected.

Fabio Estevam

  • Newbie
  • *
  • Posts: 31
  • Karma: +0/-0
Re: Linux 3.8.1 pin output inversed, cannot boot
« Reply #2 on: March 02, 2013, 08:29:52 PM »
For the first issue:
can you try reverting https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/arch/arm/boot/dts/imx23-olinuxino.dts?id=b34aa18502446379494529b863eb0743856b1a25 ?

For the second one, I need to check Are you using both dts and kernel from 3.8.1?

It would be nice if you could have a serial console to extract some logs to help debugging.

guanx

  • Newbie
  • *
  • Posts: 35
  • Karma: +0/-0
Re: Linux 3.8.1 pin output inversed, cannot boot
« Reply #3 on: March 02, 2013, 10:32:02 PM »
Thank you both!

I reverted the commit and everything worked again as before (like in 3.7.x), both LED and mmcblk.

BTW, I also added a line in my initrd to pipe messages through ethernet. I think this is easier than going out to find a level converter during this weekend :)  (I do have a serial cable but it is 5V instead of 3.3V.)

Fabio Estevam

  • Newbie
  • *
  • Posts: 31
  • Karma: +0/-0
Re: Linux 3.8.1 pin output inversed, cannot boot
« Reply #4 on: March 02, 2013, 11:07:31 PM »
Interesting, I do not understand why reverting my original commit fixed the mmc problem.

Any idea? Are you sure you are using both the dts and kernel from 3.8.1?

Also, Nill reported that he has no issues, so I am a bit confused here (I don't have my board handy).

By the way, can't we just start a thread at the Olimex yahoo groups? I found easier to reply to emails than forum.
 

Niii

  • Newbie
  • *
  • Posts: 40
  • Karma: +1/-0
Re: Linux 3.8.1 pin output inversed, cannot boot
« Reply #5 on: March 02, 2013, 11:31:43 PM »
Same question as Fabio.
Are you sure you use imx23-olinuxino.dtb from 3.8.1 for build your raw file ?

guanx

  • Newbie
  • *
  • Posts: 35
  • Karma: +0/-0
Re: Linux 3.8.1 pin output inversed, cannot boot
« Reply #6 on: March 03, 2013, 12:14:45 AM »
Interesting, I do not understand why reverting my original commit fixed the mmc problem.

Any idea? Are you sure you are using both the dts and kernel from 3.8.1?

Also, Nill reported that he has no issues, so I am a bit confused here (I don't have my board handy).

By the way, can't we just start a thread at the Olimex yahoo groups? I found easier to reply to emails than forum.

Yes both dts and kernel from the same version. It seems the LED is on the card detect pin. Am I mistaken? I will make more tests if you doubt it. Am now compiling the kernel because I want to apply every patch again to make sure of what I have done.

If the yahoo group the official olinuxino group? If so I will try to join that. Can I use that group without a yahoo account? I have only a google account.

guanx

  • Newbie
  • *
  • Posts: 35
  • Karma: +0/-0
Re: Linux 3.8.1 pin output inversed, cannot boot
« Reply #7 on: March 03, 2013, 12:18:10 AM »
Same question as Fabio.
Are you sure you use imx23-olinuxino.dtb from 3.8.1 for build your raw file ?

I think so. I have been following every kernel update since 3.7 and when compiling a new kernel I always copy the old config but not the dts/dtb.

Niii

  • Newbie
  • *
  • Posts: 40
  • Karma: +1/-0
Re: Linux 3.8.1 pin output inversed, cannot boot
« Reply #8 on: March 03, 2013, 12:57:56 AM »
Quote
but not the dts/dtb.
That's the problem.
On each version, dts file might have an update.
You need to apply your modifications on recent dts file and build dtb file to avoid issue like this.

guanx

  • Newbie
  • *
  • Posts: 35
  • Karma: +0/-0
Re: Linux 3.8.1 pin output inversed, cannot boot
« Reply #9 on: March 03, 2013, 01:14:42 AM »
Quote
but not the dts/dtb.
That's the problem.
On each version, dts file might have an update.
You need to apply your modifications on recent dts file and build dtb file to avoid issue like this.

What modifications specifically? I made no change before.

To make the kernel work properly no mod was necessary for the 3.7.x official dts, and the only mod needed for the 3.8.x dts is to revert the LED init lines to the same as that in 3.7.x, as Fabio suggested.

Fabio Estevam

  • Newbie
  • *
  • Posts: 31
  • Karma: +0/-0
Re: Linux 3.8.1 pin output inversed, cannot boot
« Reply #10 on: March 03, 2013, 01:23:24 AM »
In your 3.8.1 kernel tree:

make imx23-olinuxino.dtb

Then take this generated dtb and use it with the kernel from 3.8.1.

This way you should have everything working without any patch.

guanx

  • Newbie
  • *
  • Posts: 35
  • Karma: +0/-0
Re: Linux 3.8.1 pin output inversed, cannot boot
« Reply #11 on: March 03, 2013, 01:31:48 AM »
Sorry, I am totally confused.

Niii says I should always use the old dts/dtb. I never did and it always worked.

Fabio says I should always use the new dts/dtb. I always did and it stopped working when I moved from Linux 3.7.10 to 3.8, until I reverted the change to the LED init code.

Can we sum up a little bit? Too many ends in this tangled thread ...

Niii

  • Newbie
  • *
  • Posts: 40
  • Karma: +1/-0
Re: Linux 3.8.1 pin output inversed, cannot boot
« Reply #12 on: March 03, 2013, 02:11:41 AM »
Quote
Niii says I should always use the old dts/dtb. I never did and it always worked.
What ? I don't say this, maybe I misspoke.

Like Fabio says, you should use dts file from your current archive kernel.
Apply your modifications like i2c/spi, but if you don't have modifications you can leave that part, the default file is ok.

Quote
and when compiling a new kernel I always copy the old config but not the dts/dtb.
Quote
Fabio says I should always use the new dts/dtb. I always did and it stopped working when I moved from Linux 3.7.10 to 3.8

You never or you always use dts/dtb file from current kernel archive ? :)

guanx

  • Newbie
  • *
  • Posts: 35
  • Karma: +0/-0
Re: Linux 3.8.1 pin output inversed, cannot boot
« Reply #13 on: March 03, 2013, 02:17:53 AM »
Quote
Niii says I should always use the old dts/dtb. I never did and it always worked.
What ? I don't say this, maybe I misspoke.
No you did not misspoke. I misunderstood.

Quote
and when compiling a new kernel I always copy the old config but not the dts/dtb.
Quote
Fabio says I should always use the new dts/dtb. I always did and it stopped working when I moved from Linux 3.7.10 to 3.8

You never or you always use dts/dtb file from current kernel archive ? :)
"I always copy the old config but not the (old) dts/dtb" -- from the old kernel.
i.e. Always use the dts coming from the same new kernel.
« Last Edit: March 03, 2013, 03:02:26 AM by guanx »

Kean

  • Jr. Member
  • **
  • Posts: 91
  • Karma: +3/-0
Re: Linux 3.8.1 pin output inversed, cannot boot
« Reply #14 on: March 03, 2013, 08:28:00 AM »
Guanx, FYI you can still use your 5V debug cable to capture the console output - just don't connect all the wires - just the GND and TxD out of the iMX233 to the RxD of the cable.  Leave RxD on the iMX233 (TxD of the cable) unconnected.  The logic voltage thresholds may be out of spec, but it generally works.  Kean