lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Re: [lwip] lwip under Linux 2.4


From: Adam Dunkels
Subject: [lwip-users] Re: [lwip] lwip under Linux 2.4
Date: Wed, 08 Jan 2003 22:43:29 -0000

Hi Jose!

On Friday 04 January 2002 21:49, you wrote:
> The latest CVS snapshot seems to run fine under Linux. I'm
> using kernel 2.4.16. I built it using my Jambase. The stock
> Makefile needs to be changed to add a -DLINUX24 to enable
> the proper handling of the tap device.
>
> This brings up the issue of customizing lwip for particular
> environments and how should it be handled. For now things
> are simple enough but I can see some complications as
> development continues.

Customization of lwIP is done either on a per-project basis (proj/ directory) 
or on a per-architecture basis (src/arch directory). The configuration of 
Makefiles and lwipopts.h options are project dependant and thing such as CPU 
endianess and C compiler characteristics are kept in the architecture 
specific configuration.

This case is a bit tricky in that most of the code between a FreeBSD port and 
a Linux port is the same - only the tapif.c needs to be changed. So it 
doesn't really make any sense to make two architecture specific trees 
(src/arch/bsd and src/arch/linux) since most of the code would be the same 
anyway. 

It wouldn't be good to make to two project configurations (proj/bsd, 
proj/linux) either since most of the stuff in those would be the same as 
well. 

Isn't there any "automatic" way to determine what version of Linux you are 
compiling for? A quick grep through the include/linux directory in the Linux 
2.4.6 source code shows a #define called LINUX_VERSION_CODE that perhaps 
might be used for this purpose?

/adam
-- 
Adam Dunkels <address@hidden>
http://www.sics.se/~adam
[This message was sent through the lwip discussion list.]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]