Trouble initiating BSP

Ralf Corsepius corsepiu at faw.uni-ulm.de
Wed Sep 3 14:32:13 UTC 2003


On Wed, 2003-09-03 at 16:07, Bill Gatliff wrote:
> Guys:
> 
> 
> I'm starting on a MIPS-based BSP.  Per some off-list suggestions, I'm 
> using the mongoosev CPU and genmongoosev BSP as a starting point.  I'm 
> working with rtems-ss-20030703, and things aren't going well.  I'm stuck 
> on the basic infrastructure changes needed to get the configure scripts 
> to recognize a new BSP and/or CPU, apparently.
> 
> My first step is to "clone" the genmongoosev BSP:
> 
>    $ cd rtems-ss-20030703/c/src/lib/libbsp/mips
>    $ cp -R genmongoosev csb250
> 
> Now I create a config file:
> 
>    $ cd rtems-ss-20030703/make/custom
>    $ cp genmongoosev.cfg csb250.cfg
> 
> ... and change RTEMS_BSP_FAMILY:
> 
>    RTEMS_BSP_FAMILY=csb250
> 
> For now, I'm leaving RTEMS_CPU_MODEL at mongoosev, even though my board 
> uses the Au1500.  My strategy is to get all the build procedure changes 
> right using the mongoosev system before I start adapting it to the 
> Au1500.  (I've confirmed that the genmongoosev BSP builds cleanly).
> 
> With these changes--- and these changes only---  I get the following result:
> 
>    $ mkdir ~/build && cd ~/build
>    $ ../rtems-ss-20030703/configure --target=mips-rtems 
> --enable-rtemsbsp=csb250 \
>       --enable-maintainer-mode 2>&1 | tee configure-log
>    ...
>     config.status: creating Makefile
>    target architecture: mips.
>    available BSPs: csb250.
>    'make all' will build the following BSPs: csb250.
>    other BSPs can be built with 'make RTEMS_BSP="bsp1 bsp2 ..."'
>    config.status: creating Makefile
>    config.status: creating make/Makefile
>    config.status: creating make/custom/Makefile
> 
>   $ make all install 2>&1 | tee make-log
>    ...
>    checking for RTEMS_BSP... csb250
>    checking for make/custom/csb250.cfg... yes
>    configure: error: Invalid BSP

>    configure: error: /bin/sh 
> '../../../../../../../rtems-ss-20030703/c/src/lib/libbsp/mips/configure' 
> failed for mips
>    configure: error: /bin/sh 
> '../../../../../../rtems-ss-20030703/c/src/lib/libbsp/configure' failed 
> for lib/libbsp
>    make[2]: *** [csb250] Error 1
>    make[2]: Leaving directory `/home/bgat/bsp250-rtems/build/mips-rtems/c'
>    make[1]: *** [all-recursive] Error 1
>    make[1]: Leaving directory `/home/bgat/bsp250-rtems/build/mips-rtems/c'
>    make: *** [all-recursive] Error 1
> 
> 
> As best I can, I've been following the BSP guide for this snapshot.  I'm 
> clearly missing some required changes in the autoconf/automake stuff 
> (and perhaps elsewhere), and I'm thinking that part of the problem is 
> that I haven't edited any acinclude.m4 files. 
If you want to do it manually, you'd have to add your BSP to
c/src/lib/libbsp/mips/acinclude.m4
and run autoreconf afterwards.

Alternatively, after having added your BSP to c/src/lib/libbsp/mips you
could do this
cd c/src/lib/libbsp/mips
../../../../../bootstrap

... which should have added your BSP to the configure-script



>  But when I do so and run 
> the bootstrap script, I get a ton of errors and then even the configure 
> script won't work anymore:
> 
> Add these lines to libbsp/mips/acinclude.m4:
> 
>    ...
>      case "$bspdir" in
> *     csb250 )
>        AC_CONFIG_SUBDIRS([csb250]);;
> *     genmongoosev )
>    ...
> 
> Run bootstrap (which, as far as I can tell, regenerates configure 
> scripts and Makefile.ins):
> 
>    $ cd rtems-ss-20030303
>    $ ./bootstrap
>    .
>    cp: cannot create regular file `[$1]/install-sh': No such file or 
> directory
>    automake: configure.ac: installing `[$1]/install-sh'
>        error while copying
>    ...
>    cp: cannot create regular file `[$1]/mkinstalldirs': No such file or 
> directory
>    automake: configure.ac: installing `[$1]/mkinstalldirs'
>        error while copying
>    cp: cannot create regular file `[$1]/missing': No such file or directory
>    automake: configure.ac: installing `[$1]/missing'
>        error while copying
>    cp: cannot create regular file `[$1]/config.guess': No such file or 
> directory
>    automake: configure.ac: installing `[$1]/config.guess'
>        error while copying
>    cp: cannot create regular file `[$1]/config.sub': No such file or 
> directory
>    automake: configure.ac: installing `[$1]/config.sub'
>        error while copying
>    automake: Makefile.am: required file `./NEWS' not found
>    automake: Makefile.am: required file `./AUTHORS' not found
>    ...

> So, I've obviously unglued something!  :^)
I am seeing a lot of m4 quoting bugs.

> Suggestions?  I'll be happy to revise the BSP manual as necessary, once 
> I get over this hurdle and get my BSP up!
As you mentioned to be using Debian, I would not be surprized to if you
were using Debian's hacked-up autotools instead of RTEMS's autoconf and
automake (These are *vanilla* autoconf-2.57 and *vanilla* automake >
1.7.2 or 1.7.6)?

Also, a common mistake is to append the path to the RTEMS tools to
$PATH. Make sure these are picked up before any system tools (before
/usr/bin and /usr/local/bin).

i.e. with a standard RTEMS toolchain you'd have to 
export PATH=/opt/rtems/bin:$PATH

Ralf








More information about the users mailing list