taskTransport Sample Protocol - Tasks: task #8734, Make the VxWorks port of TSP...

 
 

You are not allowed to post comments on this tracker with your current authentification level.

task #8734: Make the VxWorks port of TSP compile with CMake build system

Submitted by:  Eric NOULARD <erk>
Submitted on:  Mon 06 Oct 2008 11:18:27 AM UTC  
 
Category: tsp coreShould Start On: Sun 05 Oct 2008 10:00:00 PM UTC
Should be Finished on: Sun 05 Oct 2008 10:00:00 PM UTCPriority: 5 - Normal
Status: NonePrivacy: Public
Percent Complete: 0%Assigned to: None
Open/Closed: OpenEffort: 0.00

(Jump to the original submission Jump to the original submission)

Tue 13 Jan 2009 08:43:15 AM UTC, comment #7:

So here is my diff, I've made it against the source "tsp-0.8.4cvs-Source-eric-10nov2008-19h31.tar.gz" (the tarball you made for me to test the patch #6667) , I think it's related to CVS head.

My sources are maybe a little confused, because I started with 0-8-3 version but works with the last version of libbb.

I hope it will be OK.

(file #17252)

MARTINSONS <martinsons>
Mon 12 Jan 2009 11:57:00 AM UTC, comment #6:

Hi Fred,

Concerning jTSP I've just answered on the ML,
latest source tarball is there:
http://download.savannah.gnu.org/releases-noredirect/tsp/testing/jTSP-src-12janvier2009-12h41-enoulard.zip

latest version is there:
http://download.savannah.gnu.org/releases-noredirect/tsp/tsp-0.8.x/tsp-0.8.0/sources/jTSP-src-0.8.0.zip

I did not check for diff between those 2 but I guess
there shouldn't bve much.

Concerning your proposal of change for VxWorks support,
the easiest way to submit this is to build a proper
[unified] diff.

Since you do not have CVS access you may do it with 2 directory

tsp.orig/
tsp.modified/

then
diff -urN tsp.orig tsp.modified > task8734_vxworks.patch

should build a nice patch.
You should then attach the patch to the tracker.
If the file is too big then send it directly to me
I will make it available in:
http://download.nongnu.org/releases/tsp/testing

Thank you for your contribution.

Eric NOULARD <erk>
Project Administrator
Fri 09 Jan 2009 03:07:50 PM UTC, comment #5:

Hello team !

Before saying anything about TSP : happy new year to all of you !

Well,

Everything works fine with the BlackBoard on VxWorks, I've taken some time to notify you because I made a lot of test with TSP (with some consumer already used here).Now I can commit my change.There is not so many change in the code but I think,for cmake build system,there is a better way to write it (especially for object generation).

By the way, forget all what I say in the previous post (stuff about splitting some files because of the vxworks dynamic linker), it was stupid.Static linking before loading object is enough.

Regarding the commit, I can't use CVS in anonymous access.So how can I show you my change ?

Just a last question (which have nothing to do with this task),I try to use the TSP plugin for JSynoptic but I can't have the source, the java tsp was moved in the high level module "jtsp" and doesn't belong to tsp-0.8.3-Source.tar.gz, and ,as I say above, I can't use CVS to download the module.

Thanks,
Fred.

MARTINSONS <martinsons>
Fri 07 Nov 2008 08:32:41 PM UTC, comment #4:

The favorite way to commit your modification is
to provide a clean patch using unified diff format (diff -u).

Ideally and if possible the patch should be done
against CVS HEAD using cvs diff -u.

You should attach your patch file to the current tracker item.

Any volunteer TSP developer will review your patch
and eventually commit after review and/or modification.

Another way to go is to apply to be TSP developper with commit
right access, however we usually wait to see some patches
before granting commit right access.

Eric NOULARD <erk>
Project Administrator
Fri 07 Nov 2008 12:53:09 PM UTC, comment #3:

Hi TSP team,

I finally do the port on vxworks and it works =).At least the stub server with all kind of consumers.

There was various problems, but mostly it was the dependencies between the modules.I had to split in two tsp_datapool and tsp_server.Firstly,it was the push_commit function which uses some tsp_session functions (which, itself, uses datapool functions ...).Secondly it was the definition of the rpc entry point in tsp_server (tsp_rpc_1) which is in generated file tsp_rpc_svc.So I moved all the xxx_1_svc function in another file.

All of that is due do the dynamic linker in vxworks, each object are loaded one after another.

I added some definitions in the CMakeLists and changed some Cmake macros (like FindONCRPC).I've changed also some functions and types (e.g gethostbyname and alloca are macro now).

I'va noticed a mistake in TSPCmakeTools.cmake during the check for the presence of .h files.The regular expression ".h" uses MATCHES doesn't work,double escape character is needed "//.h" (like what is done in FindONCRPC.cmake) otherwise a file with an "h" in his name is not recognized.

I think it's all.

I don't know how it works to commit my change...but as soon as my code is clean (commentaries and removal of old modifications plus port of the blackboard stub example, hardly done by Cesare), i'll do it.

Bye.

MARTINSONS <martinsons>
Mon 13 Oct 2008 11:36:49 AM UTC, comment #2:

Comme indiqué dans
http://www.itk.org/Wiki/CMake_Cross_Compiling

seul le fichier
Platform/VxWorks.cmake est nécessaire.
après il faut s'assurer que celà suffit à CMake pour
trouver le bon gcc.

Pour le rpcgen tu as raisons et normalement
le tsp/external/RpcGen/ contenu dans les sources
devrait fonctionner pour VxWorks.
(peut-être faut-il modifier un peu les CMakeLists.txt
afin qu'il soit compilé si CMAKE_SYSTEM_NAME est VxWorks)

Pour ce qui est de FindONCRPC.cmake
il est possible que tu doives le modifier afin qu'il utilise
la commande "rpcgen" adaptée pour VxWorks.

Tu peux par exemple simplement rajouter un cas
IF (CMAKE_SYSTEM_NAME STREQUAL "VxWorks")
SET(PATH_DIR /path/to/vxrpcgen)
ENDIF (CMAKE_SYSTEM_NAME STREQUAL "VxWorks")

de cette façon la suite devrait être ok
(à vérifier tout de même ...)

Dans le FindONCRPC.cmake il y a des cas particuliers
RTEMS et win32 pour lesquels les fichiers
ne sont PAS générés par une commande rpcgen mais
"recopiés" à partir des fichier tsp_rpc_xxx.rtems ou tsp_rpc_xxx.win32
contenus dans "tsp/src/core/rpc"
c'était une manière peu élégante mais rapide de résoudre
le problème qui était:
pas de rpcgen qui fonctionne correctement pour ces cibles.

Donc on part des version linux (généré par un rpcgen linux "natif") puis on touille les fichiers à la main pour qu'ils
compilent pour (win32 ou rtems) et on les mets en conf
avec l'extension appropriée.

Joli non :=)

Donc il ne FAUT PAS que tu écrives les fichiers
tsp_rpc_XXX.c.vxworks mais c'est une possibilité
si tu n'as pas de commande rpcgen qui fonctionne pour
ton VxWorks.

Eric NOULARD <erk>
Project Administrator
Mon 13 Oct 2008 11:06:18 AM UTC, comment #1:

Bonjour TSP,

Alors voilà, après une semaine de recherche à droite et à gauche sur la cross compil avec TSP, j'ai plusieurs questions :

Cmake n'a pas de définition de VxWorks dans son directory Platform/ ,j'ai donc écrit un fichier VxWorks.cmake qui définit les flags du compilo ainsi que les suffixes pour les librairies (rien de sorcier donc).Est ce que c'est nécessaire et si oui, y a-t-il d'autres paramètres à spécifier ?

En ce moment lors de la compilation de tsp_rpc_svc il ne reconnait pas certains headers.J'imagine que ça vient de la génération de ce fichier par un mauvais rpcgen.J'ai vu dans les différentes conversations que parfois ça ne fonctionnait pas.Je dispose ici d'un rpcgen fait pour vxworks (j'ai vu aussi qu'il y en avait un fournit avec les sources), comment je peux spécifier à Cmake qu'il doit utiliser tel rpcgen et pas un autre (en définissant les bonne options dans le module FindONCRPC.cmake ?).

J'ai vu justement dans ce module des changements efféctués pour rtems et notamment le renommage de certains fichiers comme par exemple tsp_rpc_svc.c, faut-il que j'écrive des fichiers tsp_rpc_XXX.c.vxworks ?

Merci d'avance pour votre aide.

MARTINSONS <martinsons>
Mon 06 Oct 2008 11:18:27 AM UTC, original submission:

see:
http://lists.gnu.org/archive/html/tsp-devel/2008-10/msg00004.html

Eric NOULARD <erk>
Project Administrator

 

Attached Files
file #17252:  task8734_vxworks.patch added by martinsons (493kB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by martinsons (Posted a comment)
  • -unavailable- added by erk (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 13 Jan 2009 08:43:15 AM UTCmartinsonsAttached File-=>Added task8734_vxworks.patch, #17252

    Back to the top


    Powered by Savane 3.1-cleanup