PR469 IDE problem, was: Re: Any New 4.6.4 Issues

Ralf Corsepius ralf.corsepius at
Fri Sep 16 07:46:28 UTC 2005

On Fri, 2005-09-16 at 08:42 +0200, Thomas Doerfler (nt) wrote:
> Hash: SHA1
> Hello Ralf, and good morning,
> Ralf Corsepius schrieb:
> > On Fri, 2005-09-16 at 07:12 +0200, Thomas Doerfler (nt) wrote:
> >>Ralf, I would assume that there is a better way to set these options,
> >>e.g. when "configure" is given. I added definitions for these options in
> >>the bsp's "" file, so I assume there is a predefined way to
> >>modify these options....
> > 
> > I don't understand.
>   ^^^^^^^^^^^^^^^^^^
> That's what I have feared... It is still early morning here
Same here.

>  (at least
> for me)
Not for me ;)

>  and therefore I think I should go more into details.
> Preface: I still have only a slight clue what autoconf/automake is
> doing. 
In a nutshell:
* autoconf isn't much more than an extended "sed" that processes user
provided configuration options into sed substitutions.
* automake isn't much more than a scheme to write Makefiles, which
autoconf fills sed substitutions.

I.e. from a very high level perspective, all autoconf does is to edit
Makefiles and other files from input originating from several sources,
such as user provided input (configure arguments), hard-coded knowledge
(configure script) and the result of processing both.

> Although my inpression is, whatever it is doing it does perfectly
> well and configuring/building RTEMS without it would be VERY diffcult.
> When I added the two configuration options yesterday for the PC386 BSP,
> I have done the following:
> 1. I added two "#if IDE_USE_PRIMARY/SECONDARY_INTERFACE" sections to
> "c/src/lib/libbsp/i386/pc386/ide/idecfg.c"
> so now optionally the configuration structure(s) for a primary and/or
> secondary IDE interface can be enabled and disabled.
> 2. I have added some lines to "c/src/lib/libbsp/i386/pc386/"
> - -------snip
> [Determines, whether RTEMS will try to use the primary IDE interface.
>  Disable it, if:
>  - you have no primary IDE interface
>  - or you have no disk attached to this interface
>  - or you do not want to access disks attached to this interface])
> [Determines, whether RTEMS will try to use the primary IDE interface.
>  Enable it, if:
>  - you have a secondary IDE interface
>  - and you have at least one disk attached to this interface
>  - and you do want to access disks attached to this interface])
> - -------snip
Without having checked all details, this seems to be the way how things
currently are supposed to work.

> 3. Now I assume, that a "bootstrap" will generated/update the
> i386/pc386/include/ and adds two "#undefs" for the new
> options (I could very this)

> 4. Now the foggy stuff starts for me: The next steps for using RTEMS
> with this BSP are to configure a build tree and to perform a make there.
>  I do it with something like:
> $> mkdir build-rtems-
> $> cd build-rtems-
> $> ../rtems- --enable-rtemsbsp=pc386 \
> - --target=i386-rtems4.7 --prefix=/opt/rtems/    \
> - --exec-prefix=/opt/rtems/
> $> make all
> During these steps, the file
> build-rtems-
> is created, and it will contain the defaut setting for the new options,
> as defined in the pc386/ file:
Note what you wrote: ".. will contain the default setting .."

> My assumption is, that somewhere on the _command_lines_ for configure or
> make I could specify, that these options should be set differently, e.g.
> that configure and/or make will generate a different bspopts.h with
> settings other than the default settings specified in "". If
> this is not possible, what would be the reason to put these options into
> "" and not directly into ""?
> E.g. Angelo's hardware will require these settings:

=> he wants "non-default settings".

This means he will want to explicitly override them.

As things currently are implemented, he should be able to so by
overriding them from the environment:

../configure --enable-rtemsbsp=pc386 \
--target=i386-rtems4.7 \
--prefix=<whatever> \

If his BSP was part of the official sources, we could even hard code
this into the configure script:
[Some explanation])

BTW: Shouldn't these options be mutually exclusive or be integer values.
(IDE_INTERFACE={0,1,2} or similar).

> Ralf, I hope I could clarify my question to you. If I am still totally
> on the wrong track,
You ain't ;)


More information about the users mailing list