building bsp w/o examples

stanley jobson stanley.jobson at
Sat Sep 24 21:54:12 UTC 2005

> >>>will this include something like: libnetworking/* (e.g. pppd,
> >>>webserver, telnetd ...)
> >>>
> >>>when doing objdump -d image i see a lot of ppp functions which i
> >>>really do not need ... but bloats my image :(
> >>
> >>How are you linking the application? It looks like something is
> >wrong  >there.  RTEMS is a big library and carefully constructed so
> >you do not >link in functionality you do not reference directly or by
> >implication. >
> >>I saw a "LD" in a previous email.  Are you using the GNU tools
> >>provided with 4.6 or some other toolset?
> >>
> >>How are you linking?  It appears to be wrong.
> >>
> > 
> > 
> > here is my LD command:
> > 
> > LD ../obj/i386/PING/node.img
> > i386-rtems-gcc  -qnolinkcmds -qrtems  -L../src/contrib/embunit/lib
> > -B/usr/local/share/i386-rtems/pc386/lib  -specs
> > /usr/local/share/i386-rtems/pc386/lib/bsp_specs -T
> > ../src/sys/i386/sim/startup/linkcmds -o ../obj/i386/PING/node.img 
> > <all the c object files>
> > 
> > so i use the gnu toolchain compiled for rtems i guess ...
> > i use the bsp_specs provided by rtems for my bsp 
> > 
> > so maybe this is not correct but it looks like a correct linker
> > command to me. i should mention too, that i do not use the
> > buildsystem (configure, Makefiles) provided or suggested by rtems
> > ...
> > 
> > i use f.e. no ppp stuff in my app but the rtems examples/tests use
> > it (which are also included in the rtems libs) - so maybe this
> > causes the linker to include all the ppp stuff (incl
> > libnetworking/ppp) into my final binary ?
> If you are not using the RTEMS build infrastructure then you are
> likely not building a library for RTEMS but a relocatable file (-r).
> I would highly recommend using the RTEMS build infrastructure to build
>  RTEMS and then using whatever technique you want to build your 
> application.  Stick to the known good make structure for RTEMS itself
> and you will get two libraries -- one for RTEMS itself and one for the
>  BSP.
> You have introduced problems by not using the known good build
> procedure.

hhmm - maybe i was not that clear i thought to be ...

i built the rtems tool chain (gcc, etc) via freebsd ports

i built rtems (so pc386 bsp) via the buildsystem included into the tar
file downloaded from the rtems homepage (version 4.6.2)

then i built my app on top of the rtems bsp using my own buildsystem
(gnu make files) linking the two rtems bsp libraries ...

what i meant was: i saw some samples how to build apps using rtems with
automake, autoconf and make files provided/suggested by rtems ... and
this is what i not do ...

so: the two libs of the rtems bsp include lots of ppp stuff which is
somehow finally linked into my final image ...

any chances to exclude this code ?

second: how to prevent rtems ppp code from complaining about missing
rtems_bsdnet_config when in fact it is there (passed to the linker throu
one of the object files of my app)?


More information about the users mailing list