Paul

I move this to leaf users as I believe it is of general interest.

Paul Rogers wrote:
> On Mon, 12 Oct 2009 10:10:24 +0200, "Erich Titl"
> <erich.t...@think.ch> said:
> 
> Quite so.  That's esentially what I found out from a message reply by
> Charles re Dachstein in searching the message base.  Thing is, I've been
> running Linux for over 5 years.  In the versions of modutils I use,
> derived from LFS, such things can be assigned by "alias eth1 3c59x" for
> example.  I never ran across the "default case" before and didn't know
> it.  If one HASN'T run across this before, then one needs to know it,
> since Bering doesn't seem to use aliases in its /etc/modules file. (MY
> firewall uses a modem, and Bering-1.2, because dialup is all I can
> afford.)  I'm just suggesting that a few sentences like you wrote in the
> documentation would have been a big help, because I was stuck!

Oh I see, well I suppose you could look into the way the network gets
initialized. Basically the loading of the network drivers automagically
creates devices. MOdprobe does the aliasing for you, but it is not
implemented in LEAF.

I found this interesting snippet

>>>>>>>>>>>>>
The first thing you need in your modules.conf file is something to tell
modprobe what driver to use for the eth0 (and eth1 and...) network
interface. You use the alias command for this. For example, if you have
an ISA SMC EtherEZ card which uses the smc-ultra.o driver module, you
need to alias this driver to eth0 by adding the line:

        alias eth0 smc-ultra

Important Note: The alias above is only used by the module utilities to
translate a generic device name (e.g.eth0) into a hardware specific
driver module name. When the driver loads, it never even sees this
alias; instead it will simply choose the first free ethN (N=0,1,2,...)
device name available. Thus, if more than one ethernet module is being
loaded, the ethN assigned to the driver by the kernel may or may not be
the same as the one given on the alias line,
>>>>>>>>>>>>>>>

So you may never have seen this, because you never had multiple
instances of the same card in your other *x systems.

Actually it might not be that difficult to mimic the alias in Bering
uClibc. We have the ip link command which allows us to assign whaever
name we want to a specific NIC

[r...@tristan]# ip link set dev eth0 name inside
[r...@tristan]# ip link show dev inside
2: inside: <BROADCAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:80:c8:f8:4a:51 brd ff:ff:ff:ff:ff:ff

All that is left now is to determine which NIC will get which name,
which is not that obvious when you take the above snippet into
consideration.

What you can do is read the /etc/modules file for alias ethx lines, sort
them and then load the drivers in that order, preferrably after all
dependencies have been resolved :-)

cheers

Erich

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
------------------------------------------------------------------------
leaf-user mailing list: leaf-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user
Support Request -- http://leaf-project.org/

Reply via email to