advice on using ddelinux

Björn Döbel doebel at os.inf.tu-dresden.de
Tue Aug 26 14:09:26 CEST 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 26.08.2014 13:54, Korbinian Ederer wrote:
> Hello together, I just started to play with ddelinux... My Goal is
> to build an d_can driver for l4re.

Do you want to implement your own driver from scratch? In that case,
I'd recommend not using any Linux functionality and instead build the
driver on top of the respective L4Re services or using libddekit,
which provides convenience wrappers for this functionality.

If you are reusing a Linux driver, DDE might be the right way to go.
Note, that pkg/dde/linux26 is still at Linux version 2.6.29 and you
will have to use the respective driver from this version to fit with
DDE. Otherwise you'll likely run into interface mismatches.

> I tried to collect the important parts from the Makefiles of
> pkg/anghk and the ddelinux examples to write my own for d_can.
> 
> when i Try to build my "puzzle" ;) i get following error: 
> fiasco/src/l4/pkg/d_can/d_can/d_can.c:42:27: fatal error: 
> linux/can/dev.h: No such file or directory this leads me to the
> fear that there's no can/dev.h in ddelinux...

If there's no linux/can/dev.h in ddelinux, you will probably have to
add it either to l4/pkg/dde/linux26 or to your own pkg directory.

In any case, you put the missing header files into some place and then
use L4Re's build system to install the headers properly and to find
them while compiling your applications.

* An example for installing headers can be found in
pkg/dde/linux26/include/Makefile

* All DDE drivers are supposed to include pkg/dde/linux26/Makeconf
  in their Makefile. This file sets up a Linux-specific compile
  environment. For the case of your additional headers you would
  include this file and then add your newly created private header
  dir to the PRIVATE_INC_DIR make variable.

> PS: Sorry for the large appendix, but I think it's important for
> the problem.
> 
> 
> 
> my pkg folder structure looks like this:
> 
> l4/pkg/d_can: -./Control -./Makefile -d_can/: -./d_can.c 
> -./d_dcan.h -./d_can_platform.c -./Kconfig -./Makefile

What would you need the Kconfig file for?


> 
> The contents of the files:
> 
> l4/pkg/d_can/Control:
> 
> /provides: d_can// //requires: dde-linux26 dde-linux26_net/ / /
> 
> 
> 
> 
> l4/pkg/d_can/Makefile:/ // //PKGDIR ?= .// //L4DIR  ?=
> $(PKGDIR)/../..// // //include $(L4DIR)/mk/Makeconf// //-include
> $(PKGDIR_OBJ)/Makeconf// // //#ifeq ($(CONFIG_DDE26),y)// //TARGET
> = d_can// //#endif// // //include $(L4DIR)/mk/subdir.mk/

I think there's no need for the CONFIG_DDE26 check?


Bjoern

- -- 
Dipl.-Inf. Bjoern Doebel    Mail:  doebel at tudos.org
TU Dresden, OS Chair        Phone: +49 351 463 38 799
Noethnitzer Str. 46         Fax:   +49 351 463 38 284
01187 Dresden, Germany      WWW:   http://www.tudos.org/~doebel
- --
"When the seagulls follow the trawler, it's because they think
 sardines will be thrown into the sea." (Eric Cantona)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlP8ePMACgkQP5ijxgQLUNnsJwCglKDQZqjNNlQ+LBdGP1J66QaE
Y0oAn1KoejkjDIr5jF17oKMwqvBW0bWA
=joNi
-----END PGP SIGNATURE-----




More information about the l4-hackers mailing list