Skip to contentSkip to conversation

freescale lite 5200 board and kernel 2.6

DISCUSSION Domenico Andreoli 5 participants 12 messages Apr 5, 2006 – Apr 16, 2006

lore
Share & tools
lore
#0 lore raw

hi all,

i've got a freescale lite 5200 evaluation board (1 pci slot), i need
it to develop the driver for a industrial labeler machine. i was given also some old evaluation version of metrowerks PCS and BSP stuff.

guess it.. i want to throw that software away and start from scratch using kernel 2.6, maybe 2.6.16.

i made a cross-compiler, i built a vanilla 2.6.16 and put it on the board's flash. i'd like to use rootfs from nfs. everything looks promising, but vanilla 2.6.16 is not enough.

i've got some patches from patchwork.ozlabs.org (don't ask me which, i'm not finding them any more.. one is named bcomm-to-split.diff), re-compiled the kernel and now the board has also a network interface.

but i suspect the nic does not work correctly. sometimes kernel mounts the rootfs, some (more) times it does not. when it does, i'm also able to ping it from the network. conversely, i'm not.

i'm pretty confident that kernel network configuration is always right, it is saved in the u-boot environment. network is a private one, two hosts only.

i played a couple of days on this but i've to take a decision, time is against me. start to develop for the old kernel 2.4 in the PCS & BSP stuff or start with a shiny 2.6 (i've also a brand new rubini's 3rd edition "linux device drivers"!)

is there any patchset i can use for kernel 2.6? is it production-ready? why isn't already in vanilla 2.6? has any sense to stay with kernel 2.4?

any help or hint is appreciated. thank you.

cheers
domenico

-----[ Domenico Andreoli, aka cavok
--[ http://people.debian.org/~cavok/gpgkey.asc
---[ 3A0F 2F80 F79C 678A 8936 4FEE 0677 9033 A20E BC50

#1 lore raw

Hello Domenico,

Quoted 2 lines · Domenico Andreoli

is there any patchset i can use for kernel 2.6? is it production-ready? why isn't already in vanilla 2.6? has any sense to stay with kernel 2.4?

I'm not sure if this helps, but I was successfully in getting a kernel 2.6 running with the icecube board. I have written a short docu in my wiki (booting with tftp and rootnfs over NFS):
http://wiki.idefix.fechner.net/index.php/IceCube#Writing_kernel_modules_for_2.6

Maybe this will help.
Please give me some feedback.

Best regards,
Matthias

#2 lore raw

Thanks Matthias now I don't have to say "we discussed this last week, search the list" everytime this question comes up.

Quoted 5 lines · Matthias Fechner

Hello Domenico,

Quoted 2 lines · Domenico Andreoli

is there any patchset i can use for kernel 2.6? is it production-ready? why isn't already in vanilla 2.6? has any sense to stay with kernel 2.4=

?

Quoted 5 lines

I'm not sure if this helps, but I was successfully in getting a kernel 2.6 running with the icecube board. I have written a short docu in my wiki (booting with tftp and rootnfs over NFS):
http://wiki.idefix.fechner.net/index.php/IceCube#Writing_kernel_modules_f=

or_2.6

Quoted 11 lines

Maybe this will help.
Please give me some feedback.

Best regards,
Matthias
_______________________________________________
Linuxppc-embedded mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

#3 lore raw
In reply to Matthias Fechner
Quoted 8 lines · Matthias Fechner

Hello Domenico,

Quoted 3 lines · Domenico Andreoli

is there any patchset i can use for kernel 2.6? is it production-ready? why isn't already in vanilla 2.6? has any sense to stay with kernel 2.4?

Quoted 8 lines

I'm not sure if this helps, but I was successfully in getting a kernel 2.6 running with the icecube board. I have written a short docu in my wiki (booting with tftp and rootnfs over NFS):
http://wiki.idefix.fechner.net/index.php/IceCube#Writing_kernel_modules_for_2.6

Maybe this will help.
Please give me some feedback.

Nice !

It made me realize the git commands I gave on my website were kinda wrong, I messed
up git fetch and git pull among other things ...

Sylvain

#4 lore raw

Hello Sylvain,

Quoted 3 lines · Sylvain Munaut

It made me realize the git commands I gave on my website were kinda wrong, I messed
up git fetch and git pull among other things ...

ah that explains why I have some problems with git.
It seems that on the actual kernel-git-repository something has changed (kernel.org).
The patch:
git pull http://gitbits.246tNt.com/gitbits/linux-2.6-mpc52xx.git master:mpc52xx

failed last week, so I used the complete repository from your side. Maybe you can fix this problem, I will adapt then my wiki. :)

Matthias

Signature · 3 lines
"Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the universe trying to produce
bigger and better idiots. So far, the universe is winning." -- Rich Cook
#5 lore raw
In reply to Matthias Fechner
Quoted 1 line · Matthias Fechner

Hello Domenico,

hi Matthias,

Quoted 8 lines · Domenico Andreoli
Quoted 2 lines

is there any patchset i can use for kernel 2.6? is it production-ready? why isn't already in vanilla 2.6? has any sense to stay with kernel 2.4?

I'm not sure if this helps, but I was successfully in getting a kernel 2.6 running with the icecube board. I have written a short docu in my wiki (booting with tftp and rootnfs over NFS):
http://wiki.idefix.fechner.net/index.php/IceCube#Writing_kernel_modules_for_2.6

this is a very nice page, it is now my reference :)

anyway i cannot say i made it, my icecube is still not under control.

every time i boot the 2.6 kernel after the original 2.4 one, the nic seems to work. on subsequent boots, even after board resets, it does not. i still need to check what happens removing the power cord.

kernel is built following the instructions on your wiki, i attached the config file. please have a look, let me know if any check/test may be advised.

cheers
domenico

-----[ Domenico Andreoli, aka cavok
--[ http://people.debian.org/~cavok/gpgkey.asc
---[ 3A0F 2F80 F79C 678A 8936 4FEE 0677 9033 A20E BC50

#6 lore raw

Hello Domenico,

Quoted 3 lines · Domenico Andreoli

kernel is built following the instructions on your wiki, i attached the config file. please have a look, let me know if any check/test may be advised.

sry, but I have now time to try your kernel config, but I attached mine which is working fine for me.
Maybe this helps you.

Best regards,
Matthias

#7 lore raw
Quoted 1 line · Matthias Fechner

Hello Domenico,

Hello Matthias,

Quoted 8 lines · Domenico Andreoli
Quoted 3 lines

kernel is built following the instructions on your wiki, i attached the config file. please have a look, let me know if any check/test may be advised.

sry, but I have now time to try your kernel config, but I attached mine which is working fine for me.
Maybe this helps you.

unfortunately it does not :/

sometimes kernel prints "eth0: config: auto-negotiation on, 100HDX, 10HDX.", the eth0 is up and everything works.

most of the times "eth0: config: auto-negotiation off, No speed/duplex selected?." is instead printed and eth0 seems to not exist.

i tend to exclude hw problems, older kernel 2.4.x always succeed in using eth0.

is there any way to force eth0 auto-negotiation?

thank you
domenico

-----[ Domenico Andreoli, aka cavok
--[ http://people.debian.org/~cavok/gpgkey.asc
---[ 3A0F 2F80 F79C 678A 8936 4FEE 0677 9033 A20E BC50

#8 lore raw

Hello Domenico,

Quoted 1 line · Domenico Andreoli

unfortunately it does not :/

im sorry about it, but I'm a newbie too.
The only think I did is documenting how i got the kernel running. :(

Quoted 1 line

is there any way to force eth0 auto-negotiation?

maybe giving a parameter to the bootargs?
Maybe you found something in the description of the driver in the kernelconfiguration.

Best regards,
Matthias

#9 lore raw
In reply to Domenico Andreoli
Quoted 24 lines · Domenico Andreoli
Quoted 2 lines · Matthias Fechner

Hello Domenico,

Hello Matthias,

Quoted 10 lines · Domenico Andreoli
Quoted 5 lines

kernel is built following the instructions on your wiki, i attached the config file. please have a look, let me know if any check/test may be advised.

sry, but I have now time to try your kernel config, but I attached mine which is working fine for me.
Maybe this helps you.

unfortunately it does not :/

sometimes kernel prints "eth0: config: auto-negotiation on, 100HDX, 10HDX.", the eth0 is up and everything works.

Quoted 8 lines

most of the times "eth0: config: auto-negotiation off, No speed/duplex selected?." is instead printed and eth0 seems to not exist.

i tend to exclude hw problems, older kernel 2.4.x always succeed in using eth0.

is there any way to force eth0 auto-negotiation?

When it doesn't work, did it detect the phy correctly ? Somewhere in the boot sequence it should print something about a LXT971 being found at some address.

Sylvain

#10 lore raw
Quoted 8 lines · Sylvain Munaut
Quoted 7 lines · Domenico Andreoli

sometimes kernel prints "eth0: config: auto-negotiation on, 100HDX, 10HDX.", the eth0 is up and everything works.

most of the times "eth0: config: auto-negotiation off, No speed/duplex selected?." is instead printed and eth0 seems to not exist.

Quoted 8 lines
Quoted 5 lines

i tend to exclude hw problems, older kernel 2.4.x always succeed in using eth0.

is there any way to force eth0 auto-negotiation?

When it doesn't work, did it detect the phy correctly ? Somewhere in the boot sequence it should print something about a LXT971 being found at some address.

no, it does not, it uses GENERIC. when PHY is detected as LXT971, network works.

actually this is unrelated with previous runs of kernel 2.4 (as i stated in some previous post). sometimes PHY is detected correctly, sometimes is not.

thank you
domenico

-----[ Domenico Andreoli, aka cavok
--[ http://people.debian.org/~cavok/gpgkey.asc
---[ 3A0F 2F80 F79C 678A 8936 4FEE 0677 9033 A20E BC50

#11 lore raw
Quoted 7 lines · Domenico Andreoli

no, it does not, it uses GENERIC. when PHY is detected as LXT971, network works.

actually this is unrelated with previous runs of kernel 2.4 (as i stated in some previous post). sometimes PHY is detected correctly, sometimes is not.

Is the PHY address something other than 0?

If there is no pullup on MDIO (?) and the PHY address isn't 0 sometimes a PHY will be detected on the wrong address. Well that's the problem I had with a 5200 on a custom board. I worked around something like this with the following (edited) patch / hack. The correct answer was to add a pullup on the board, but this is fairly safe as it won't misdetect any of the phys supported in fec.c.

ppc/5xxx_io/fec.c 22 Apr 2005 05:28:12 -0000 renamed from ppc/5xxx_io/fec.c 15 Feb 2005 00:19:13 -0000 1.10 +1 -1
@@ -732,7 +825,7 @@ mii_discover_phy(uint mii_reg, struct ne
        printk("mii_discover_phy\n");
 #endif
 
-       if ((phytype =3D (mii_reg & 0xffff)) !=3D 0xffff) {
+       if ((phytype =3D (mii_reg & 0x3ff)) !=3D 0x3ff) { /* hack - was 0xf=

fff */

                /* Got first part of ID, now get remainder.
                */
                priv->phy_id =3D phytype << 16;