This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: changing ethernet driver
- To: ecos-discuss at sources dot redhat dot com
- Subject: RE: [ECOS] changing ethernet driver
- From: Arif dot Abbas at combitechsystems dot com
- Date: Thu, 13 Sep 2001 09:54:44 +0200
Thanks, Jifl...BUT:
I am still having problems with merging a new "pseudo" driver...
What I did was to add following package in ecos.db:
package CYGPKG_DEVS_ETH_PPP {
alias { "PPP ethernet driver" ppp0 }
hardware
directory devs/eth/ppp
script ppp_eth_driver.cdl
description "Ethernet driver for PPP"
}
After this, I created the CDL:
cdl_package CYGPKG_DEVS_ETH_PPP {
display "PPP ethernet drivers"
parent CYGPKG_IO_ETH_DRIVERS
active_if CYGPKG_IO_ETH_DRIVERS
implements CYGHWR_NET_DRIVERS
implements CYGHWR_NET_DRIVER_ETH0
include_dir .
include_files ; # none _exported_ whatsoever
description "Ethernet driver for PPP ."
compile -library=libextras.a if_ppp.c
cdl_component CYGPKG_DEVS_ETH_PPP_OPTIONS {
display "PPP ethernet driver build options"
flavor none
no_define
}
}
Finally I created a nano-template with networking in CT, and then
manaully removed the
package -hardware CYGPKG_DEVS_ETH_ARM_NANO current ;
package -hardware CYGPKG_DEVS_ETH_INTEL_I82559 current ;
and added
package CYGPKG_DEVS_ETH_PPP current ;
in the .ecc file.
But it seems like the build option does not compile the if_ppp.c file,
because when I add lines like "testing" I don't get parse errors...
I don't know if this is because of the activeif statement...
Or if I have failed to actually connect the PPP to upper layers..
You see, in the if_ppp.c file, I never use the ETH_DRV_SC macro.
Instead, I just use the NETDEVTAB_ENTRY macro, and connect the ppp_sc
structure
directly to the ifnet structure (instead of connecting it to eth_drv_sc and
then
letting it connect to ifnet). this should be enough...right?
Maybe this means that I can't use the CYGPKG_IO_ETH_DRIVERS as parent?
I am confused...Can anyone out there give me some hints/help/suggestions?
THANKS!
Best regards,
Arif