Hi,
I want to enable l4linux to use the Ankh server. But I dont know how to start l4linux so that it can bind to Ankh server.
I enabled the l4ankh driver in l4linux. And Following is how I start the Ankh server and l4linux
--Ankh-----------
-- start ankh loader:startv( {caps = {ankh_service = ankh_clnt:svr(); -- session server vbus = ankh_vbus, -- the virtual bus shm = ankh_shm:m("rws")}, -- shm namespace read/writable log = {"ankh", "g"}, l4re_dbg = L4.Dbg.Warn }, "rom/ankh" );
--L4linux-------------------
loader:start( { caps = { log = L4.Env.log:m("rws"), vbus = vbus_l4linux; rtc = rtc_caps.rtc;
shm = ankh_shm:m("rws"); ankh = ankh_clnt:create(0,"debug,phys_mac,shm=shm,bufsize=16384"); }, l4re_dbg = L4.Dbg.Warn, log = { "l4linux", "yellow" }, }, "rom/vmlinuz mem=128M earlyprintk=yes showpfexc=1 console=ttyLv0 tcp,nolock ip=192.168.0.200:192.168.0.115:192.168.0.1:255.255.255.0::eth0: l4x_rd=rom/drops-rd.rd root=1:0 ramdisk_size=20000 init=/bin/sh");
Thanks, Shashi
Hi,
On Mon Mar 12, 2012 at 17:09:49 -0700, Shashi Sharma wrote:
I want to enable l4linux to use the Ankh server. But I dont know how to start l4linux so that it can bind to Ankh server.
I enabled the l4ankh driver in l4linux. And Following is how I start the Ankh server and l4linux
Is Linux saying anything useful regarding the network driver?
Adam
On Thu, 2012-03-15 at 21:19 +0100, Adam Lackorzynski wrote:
Hi,
On Mon Mar 12, 2012 at 17:09:49 -0700, Shashi Sharma wrote:
I want to enable l4linux to use the Ankh server. But I dont know how to start l4linux so that it can bind to Ankh server.
I enabled the l4ankh driver in l4linux. And Following is how I start the Ankh server and l4linux
Is Linux saying anything useful regarding the network driver?
I figured it out.
In the kernel boot command I have to pass the ankh_shm param to the l4ankh driver/module (like this: l4ankh.ankh_shm=shm). Following is my kernel boot command.
----------------------- loader:start( { caps = { log = L4.Env.log:m("rws"), vbus = vbus_l4linux; rtc = rtc_caps.rtc;
shm = ankh_shm:m("rws"); ankh = ankh_clnt:create(0, "debug,promisc,device=eth0,shm=shm,bufsize=16384,phys_mac"); }, l4re_dbg = L4.Dbg.Warn, log = { "l4linux", "yellow" }, }, "rom/vmlinuz mem=128M earlyprintk=yes showpfexc=1 console=ttyLv0 l4ankh.ankh_shm=shm tcp,nolock ip=192.168.0.200:192.168.0.115:192.168.0.1:255.255.255.0::eth0: l4x_rd=rom/drops-rd.rd root=1:0 ramdisk_size=20000 init=/bin/sh");
---------------------------------
I have another question. I am trying to incorporate "Tigon3 driver" (Broadcom ethernet driver) into Ankh. Has anybody done that successfully before?
This is how I am approaching it. - I took tg3.c & tg3.h from linux-2.6.29/drivers/net and put it under l4/pkg/ankh/server/netlib - I am trying to add "PHY" device support to "dde-linux26_net" so that tigon3 can be build.
I am still getting some link-time errors which I am trying to solve. My question is, does this look like a right approach to you?
Regards, Shashi
Hi,
I figured it out.
Cool!
[..]
I have another question. I am trying to incorporate "Tigon3 driver" (Broadcom ethernet driver) into Ankh. Has anybody done that successfully before?
Yes. I think we had TG3 running in Ankh's predecessor.
This is how I am approaching it.
- I took tg3.c & tg3.h from linux-2.6.29/drivers/net and put it under
l4/pkg/ankh/server/netlib
- I am trying to add "PHY" device support to "dde-linux26_net" so that
tigon3 can be build.
I am still getting some link-time errors which I am trying to solve. My question is, does this look like a right approach to you?
The approach looks perfect. If you need help with the link time errors, just let us know. We'll also happily accept patches. ;)
Cheers, Bjoern
On Thu, 2012-03-15 at 21:50 +0100, Björn Döbel wrote:
Hi,
I figured it out.
Cool!
[..]
I have another question. I am trying to incorporate "Tigon3 driver" (Broadcom ethernet driver) into Ankh. Has anybody done that successfully before?
Yes. I think we had TG3 running in Ankh's predecessor.
This is how I am approaching it.
- I took tg3.c & tg3.h from linux-2.6.29/drivers/net and put it under
l4/pkg/ankh/server/netlib
- I am trying to add "PHY" device support to "dde-linux26_net" so that
tigon3 can be build.
I am still getting some link-time errors which I am trying to solve. My question is, does this look like a right approach to you?
The approach looks perfect. If you need help with the link time errors, just let us know. We'll also happily accept patches. ;)
Thanks Bjoern for quick reply.
Since you offered to help with link errors, here they are. Lets focus on two errors first, solving them might give me some ideas about solving other link errors.
1. l4/pkg/ankh/server/netlib/tg3.c:11644: undefined reference to `pci_get_device'
This method is defined in "l4/pkg/dde/linux26/contrib/drivers/pci/search.c". This file is getting built into "dde-linux26".
And "Ankh" links to "dde-linux26", so it should find the reference.
2. l4/pkg/ankh/server/netlib/tg3.c:11659: undefined reference to `pci_dev_put'
This method is present in "l4/pkg/dde/linux26/lib/src/drivers/pci/pci-driver.c". And is getting built into "dde-linux26" also.
Thanks, Shashi
Cheers, Bjoern
l4-hackers mailing list l4-hackers@os.inf.tu-dresden.de http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
Hi,
Since you offered to help with link errors, here they are. Lets focus on two errors first, solving them might give me some ideas about solving other link errors.
- l4/pkg/ankh/server/netlib/tg3.c:11644: undefined reference to
`pci_get_device'
This method is defined in "l4/pkg/dde/linux26/contrib/drivers/pci/search.c". This file is getting built into "dde-linux26".
And "Ankh" links to "dde-linux26", so it should find the reference.
- l4/pkg/ankh/server/netlib/tg3.c:11659: undefined reference to
`pci_dev_put'
This method is present in "l4/pkg/dde/linux26/lib/src/drivers/pci/pci-driver.c". And is getting built into "dde-linux26" also.
Please go to your L4 build directory and find libdde_linux26.a. Run 'nm' on it and find out what type and visibility these symbols have in the library.
Bjoern
On Thu, 2012-03-15 at 22:20 +0100, Björn Döbel wrote:
Hi,
Since you offered to help with link errors, here they are. Lets focus on two errors first, solving them might give me some ideas about solving other link errors.
- l4/pkg/ankh/server/netlib/tg3.c:11644: undefined reference to
`pci_get_device'
This method is defined in "l4/pkg/dde/linux26/contrib/drivers/pci/search.c". This file is getting built into "dde-linux26".
And "Ankh" links to "dde-linux26", so it should find the reference.
- l4/pkg/ankh/server/netlib/tg3.c:11659: undefined reference to
`pci_dev_put'
This method is present in "l4/pkg/dde/linux26/lib/src/drivers/pci/pci-driver.c". And is getting built into "dde-linux26" also.
Please go to your L4 build directory and find libdde_linux26.a. Run 'nm' on it and find out what type and visibility these symbols have in the library.
Here is the output of nm for above two methods.
00000000 t pci_dev_put 00000000 t pci_get_device
It seems like their visibility is "local". I looked at the declaration and the definition of the methods and they are not defined as "static"
Here is the declaration for "pci_get_device" -------- struct pci_dev *pci_get_device(unsigned int vendor, unsigned int device, struct pci_dev *from); --------
And here is the implementation -------- struct pci_dev * pci_get_device(unsigned int vendor, unsigned int device, struct pci_dev *from) { return pci_get_subsys(vendor, device, PCI_ANY_ID, PCI_ANY_ID, from); } ---------
I might not have the clear understanding of the problem here. I would appreciate your help here.
Thanks, Shashi
Bjoern
Hey,
Here is the output of nm for above two methods.
00000000 t pci_dev_put 00000000 t pci_get_device
It seems like their visibility is "local". I looked at the declaration and the definition of the methods and they are not defined as "static"
that's what I was thinking.
Short explanation: Go to l4/pkg/dde/linux26/lib/src and add these symbols to global-symbols.all. Recompile DDE and the Ankh link errors should disappear.
Long explanation: We are using Linux device drivers within L4 applications and these apps may be linked against things like a libC etc., which may lead to name clashes between functions provided by the libC and functions coming from the Linux kernel. Therefore, we compile DDE in a way that all functions are marked local by default and thus will not be used when linking an application. Only those functions explicitly marked as used (by adding them to global-symbols.all or the architecture-dependent equivalents) will be made available for linking.
Hth, Bjoern
l4-hackers@os.inf.tu-dresden.de