Can't Build New Device Driver

Robert S. Grimes rsg at alum.mit.edu
Fri Feb 29 22:06:39 UTC 2008


Ralf Corsepius wrote:
> On Fri, 2008-02-29 at 13:44 -0500, Robert S. Grimes wrote:
>   
>> What can I do to fix it?
>>     
> I just checked the tarball, it seems to be OK.
>   
Sorry, I should have emphasized that I started with a working build, 
which meant the tarball was okay - unless a change I made was to somehow 
trigger something...
> So, ... what actually is your problem?
>   
I am trying to port Thomas' low-level SPI driver from the 
powerpc/gen83xx BSP to the powerpc/virtex BSP.  In doing so, I have 
added a new subdirectory to the virtex BSP directory, with the source in 
it.  I am now trying to tell the RTEMS build system about these new files.

So far, it may well sound like I know what I'm doing, but this is about 
where the limits of my working knowledge lie.  I believe the next step 
is to modify the Makefile.am source to get the new stuff to compile, but 
what I've done has broken the build process, somehow.

The changes to Makefile.am are easy to spot - just search for "spi" and 
you will see the entire set of changes.  I added this section:
    noinst_PROGRAMS += spi.rel
    spi_rel_SOURCES = spi/spi_init.c spi/spidrv.c spi/spidrv.h
    spi_rel_CPPFLAGS = $(AM_CPPFLAGS)
    spi_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)

and added spi.rel here:
    libbsp_a_LIBADD = startup.rel dlentry.rel bspconsole.rel 
opbintctrl.rel \
        vectors.rel irq.rel spi.rel

Isn't Makefile.am used to generate Makefile.in, during bootstrap?
> Could you provide step-by-step details?
>
>   
Here is what I did:

I started by configuring, building, installing, and testing rtems-4.8.0,
using the usual procedure.  Then, I copied and modified the source code
from Thomas' SPI driver in libbsp/powerpc/gen83xx/spi into libbsp/powerpc/virtex/spi.  Now I am trying to
build it.  I've tried to modify the virtex/Makefile.am file, but I'm not
sure what to do next.  I tried the following:

1. From source tree, in libbsp/powerpc/virtex, I ran bootstrap, like this

   ../../../../../../bootstrap

2. Then, from the build directory, I configured with this command:

   ../rtems-4.8.0/configure --enable-rtems-debug --target=powerpc-rtems \
   --enable-posix --prefix=/usr/rtems/4.8 --enable-networking --enable-cxx \
   --enable-rtemsbsp="virtex" --enable-maintainer-mode

3. Now, I try to build it, but it breaks.  Here is the relevant (I
think) output from make:

make[7]: Entering directory
`/cygdrive/c/Home/ll/etill/rtems/rtems-4.8.0/tools/b-rtems/powerpc-rtems/c/virtex/lib/libbsp
/powerpc'
Making preinstall in virtex
make[8]: Entering directory
`/cygdrive/c/Home/ll/etill/rtems/rtems-4.8.0/tools/b-rtems/powerpc-rtems/c/virtex/lib/libbsp
/powerpc/virtex'
make[8]: *** No rule to make target `preinstall'.  Stop.
make[8]: Leaving directory
`/cygdrive/c/Home/ll/etill/rtems/rtems-4.8.0/tools/b-rtems/powerpc-rtems/c/virtex/lib/libbsp/
powerpc/virtex'
make[7]: *** [preinstall-recursive] Error 1
make[7]: Leaving directory
`/cygdrive/c/Home/ll/etill/rtems/rtems-4.8.0/tools/b-rtems/powerpc-rtems/c/virtex/lib/libbsp/
powerpc'


I'm very confused...

Thanks, Ralf,
-Bob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile.virtex.broken.tar.bz2
Type: application/octet-stream
Size: 10066 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20080229/702b2661/attachment.obj>


More information about the users mailing list