Commit Graph

2268 Commits

Author SHA1 Message Date
Joel Sherrill
ae2ddb8103 Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
The patch below fixes a nasty bug in acpolish, which has broken many
    Makefile.ins below c/src/tests/

    APPLYING THE PATCH:
        patch -p1 < rtems-rc-19990709-5.diff

    The essential part of this patch is the diff-fragment for acpolish
    contained in this patch. Ie. if any of the other diffs do not apply,
    make sure that the acpolish diff was applied correctly and then run
        cd <srcdir>
        tools/update/rtems-polish.sh -ac
1999-08-02 15:40:27 +00:00
Joel Sherrill
ac384b98f5 Added more sections to pick up all of the new C++ sections. 1999-08-02 15:25:24 +00:00
Joel Sherrill
bd5278665f Now correctly does deep copy. 1999-08-02 15:24:57 +00:00
Joel Sherrill
1896a650fc Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
The main topic is replacing the hard-coded values for HAS_MP and
  HAS_RDBG in custom/*.cfg with per-bsp configuration-time autoconf checks
  (This is the patch I had mentioned before earlier this week).

  CHANGES

  * HAS_MP removed from custom/*.cfg, replaced with configuration time
    autoconf check
  * HAS_RDBG removed from custom/*.cfg, replaced with configuration-time
    autoconf check
  * NEW: c/src/make/bsp.cfg.in, takes configuration-time checked per-bsp
    values (i.e. HAS_MP, HAS_RDBG), gets installed as
    $(prefix)/<bsp>/make/bsp.cfg
  * NEW: default.cfg includes bsp.cfg - this change is backward
    compatible.
  * IMPORT_SRC: apply VPATH instead for ts_386ex/i386ex subdirectory
    Makefile.ins
  * HACK: a bug in acpolish mis-handles addtions to makefile variables
    which are enclosed in gmake conditionals:
    c/src/lib/libbsp/m68k/ods68302/start302/Makefile.in
  * Apply inline_dir, HAS_MP and HAS_RDBG for avoiding configuration of
    unneeded subdirectories in various configure.in files.
  * Several minor changes in Makefile.ins and configure.ins, wrt. to the
    order of including *.cfg and defining Makefile variables

  APPLYING THE PATCH:

      patch -p1 < rtems-rc-19990709-4.diff
      ./autogen
1999-07-30 17:52:50 +00:00
Joel Sherrill
aa9eb94058 Fixed typos. 1999-07-30 17:28:11 +00:00
Joel Sherrill
a2cc7b7fb4 Corrected typo and added correct conditional compilation on RTEMS_POSIX_API. 1999-07-30 17:18:39 +00:00
Joel Sherrill
6805640ec7 Patch from Charles-Antoine Gauthier <charles.gauthier@iit.nrc.ca>
to correct a typo CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES was actually
typed in as CPU_CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES.
1999-07-29 23:01:15 +00:00
Joel Sherrill
f94e76ba02 Fix after this report from Peter Pointner <pr@schenk.isar.de>:
Problem: a posix thread which is created by

      pthread_attr_init(&tattr);
      pthread_attr_setinheritsched(&tattr, PTHREAD_EXPLICIT_SCHED);
      pthread_attr_setschedpolicy(&tattr, SCHED_RR);
      pthread_create(&th, &tattr, func, arg);

    has a first timeslice of 2^32 ticks (changing a running thread to
    SCHED_RR id ok).

    I use RTEMS-4.0.0. I am not sure if the problem exists in the current CVS
    head revision. If it's not fixed, the patch at the end should do it.

Peter


--- pthreadcreate.c.orig        Wed Jul 28 14:45:58 1999
+++ pthreadcreate.c     Wed Jul 28 15:06:09 1999
@@ -199,6 +199,10 @@
   api->schedpolicy = schedpolicy;
   api->schedparam  = schedparam;

+  if ( schedpolicy == SCHED_RR ) {
+    the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
+  }
+
   /*
    *  This insures we evaluate the process-wide signals pending when we
    *  first run.
1999-07-28 18:03:20 +00:00
Joel Sherrill
f82c98bbb5 Missed adding file from Eric Valette <valette@crf.canon.fr>.
This file is necessary because the bootloader is compiled with different
options than the basic C library.
1999-07-28 16:14:57 +00:00
Joel Sherrill
54f440d311 Patch from Charles-Antoine Gauthier <charles.gauthier@iit.nrc.ca>.
to address m68k-rtemself for the MVME167.

    Here is the rtems patch I promissed you a long time ago to enable ELF
    with m68k. The target name I selected is m68k-rtemself. It preserves the
    m68k-rtems COFF target, and is parterned after the other ELF/COFF dual
    targets.

    The mvme167.cfg file causes the -qelf flag to be used during compilation
    if the name of the compiler contains rtemself. This flag is used in the
    bsp_specs file to select the elflinkcmds file rather than the linkcmds
    file. The former is for ELF, the latter for COFF.

    Some patches are required to the mc68040 FPSP code. Some of the
    assembler files contain instructions that were rejected by the
    m68k-rtemself-as assembler.  This is a minor bug in the m68k ELF
    assembler, I think.
1999-07-26 22:11:02 +00:00
Joel Sherrill
220ad7de67 Patch fixing typo from Eric Valette <valette@crf.canon.fr> on bug report
from Jay Kulpinski <jskulpin@eng01.gdds.com>.
1999-07-26 21:38:08 +00:00
Joel Sherrill
38bfb0db72 Patch from Eric Valette <valette@crf.canon.fr> based on a tremendous
bug report from David Decotigny <David.Decotigny@irisa.fr>:

  During the last few days, I've been back working on RTEMS. Let me
  remind you that RTEMS didn't boot on our (old) Dell P90 machines (ref:
  PC 590) : we could only get a reboot out of them.

  1/ The symptoms
  ---------------

  Hopefully, the problem was rather deterministic. The stack couldn't be
  written correctly : issueing one or more "push" would always push '0'
  onto the stack. The way to solve this was to issue a "pop", such as
  "pushl eax ; popl eax". After this "pop", the stack would be writeable
  again.

  BUT, it will be writable for 8 consecutive "push"s. After these 8
  "push"s, the other "push"s are wrong again, and a blank push/pop is
  needed.

  Considering that the L1 cache lines of this pentium are 32 bytes long,
  and that 8 long int are 32 bytes long too, it came to us that there
  was a problem with the cache.

  Actually, the bug of the push could be shown through memory accesses
  directly : writing on an not-in-cache mem location would put 0 until
  this mem location is accessed through a single "read". Then, the whole
  cache line would be right again.

  2/ The consequences
  -------------------

  Of course, that was the first thing that we've been able to observe ;)
  RTEMS could not boot. Actually, when a "call" pushed 0 onto the stack,
  the ret could only lead to raise an exception a bit later. Since, in
  the early stage, the Interrupt vector points to 0, averything couldn't
  get worse : triple fault + reboot.

  3/ Explanation
  --------------

  This cache mechanism corruption only appeared after load_segment()
  returned (through a jump). Investigating a bit further shows that this
  appears /sometimes/ during the PICs initialization.

  "Sometimes" proved to be "When writing something with the 4th bit of
  %al set". That is "when writing 0x28 or 0xff" for example. Clearing
  this bit would just make the things work right.

  Actually, this isn't a bug in the proper PIC initialization (which is
  quite academic). It came from the "delay" routine, which theoretically
  does nothing but writing to an "inexistant" port (0xed), in order to
  lose some time.

  BUT, in the special case of our Dell P90, it appears that this 0xed
  port does something cruel with the cache mechanism when its 4th bit
  (aka bit 3 or 0x8) is set.

  I didn't investigate this non-standard behaviour of the P90 any
  further : I don't know if this is documented, or if it is just another
  (known ?) bug of the early Pentiums. Just notice that we have 5 such
  machines, and it has the same effect on the cache mechanism.

----------------------------------------------------------------------
1999-07-26 21:35:15 +00:00
Joel Sherrill
29e68b7584 Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
This patch is an addition to "The big-patch"

  CHANGES:
  * FIX: c/Makefile.am: bogus comment which changed the behavior of
    c/Makefile.am removed
  * FIX: make/custom/ts_i386ex.cfg did not set HAS_NETWORKING correctly
    (Me thinks it might have been me who added this bogus setting :-).

  * NEW: removing make targets get, protos, debug_install, profile_install

  * NEW: replacing clobber with distclean
  * NEW: Reimplement distclean and clean as reverse depth first make
    targets (adaptation to automake's behavior)
  * NEW: removing RCS_CLEAN from make distclean (tools/build/rcs_clean is
    still in - remove it?)
  * NEW: "$(RM) Makefile" added to make distclean (adaptation to
    automake's behavior)
  * NEW: "$(RM) config.cache config.log" to CLOBBER_ADDITIONS in
    [lib|exec|tests]/Makefile.in (adaptation to automake's behavior)
  * NEW: "$(CLEAN_PROTOS)" removed (Not used anywhere)
  * NEW: binpatch.c moved from i386 bsp tools to tools/build (AFAIS,
    binpatch is not specific to the pc386 BSP at all)
  * NEW: AC_EXEEXT added to all configure scripts which contain AC_PROG_CC
    (Cygwin support)

  * NEW/Experimental: An experimental implementation of temporary
    installation tree support in libbsp/i386/pc386/tools/Makefile.am, based
    on dependency tracking with make, instead of applying INSTALL_CHANGE.


  REMARK:
  * This patch is small in size, but changes the behavior of "make
    clean|distclean|clobber" basically.
  * This patch does not alter building/compiling RTEMS, ie. there should
    be no need to rerun all "make all" building tests.

  KNOWN BUGS:
  * make RTEMS_BSP="..." distclean in c/ runs "make distclean" in BSPs
    subdirectories passed through RTEMS_BSP and in "c/." only, but does not
    descend into other BSP subdirectories previously configured with
    different settings of make RTEMS_BSP="...".
    => Workaround: always use the same setting of RTEMS_BSP when working
    inside the build-tree.

  * "make [distclean|clean]" do not clean subdirectories, which have been
    configured at configuration time, but  which are not used due to
    make-time configuration (e.g. macros/networking/rdgb subdirectories).
    This will problem will vanish by itself when migrating from make-time to
    configuration-time configuration

  APPLYING THE PATCH

      mv c/src/lib/libbsp/i386/pc386/tools/binpatch.c tools/build
      patch -p1 < rtems-rc-19990709-2.diff
      autogen
1999-07-26 21:26:44 +00:00
Joel Sherrill
08b5f55b6f Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
A bug in acpolish made it into rtems-rc-19990709-0.diff, which
    unfortunately affects all Makefile.ins:

    * The maintainer mode conditional was erroniously applied to the
      dependencies of "Makefile".

    In case you already checked in rtems-rc-19990709-0.diff to CVS you have
    to check in all Makefile.ins again after applying the patch below :).

    Please apply the patch below as follows:

        patch -p1 < rtems-rc-19990709-1.diff
        tools/update/rtems-polish.sh -ac

    Note: There is no need to rerun your tests if you have used
    --enable-maintainer-mode to configure RTEMS, because this patch converts
    all Makefile.ins to the same settings as used for
    --enable-maintainer-mode.
1999-07-26 20:31:49 +00:00
Joel Sherrill
eb299afca2 This is part of a major patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
to move RTEMS more to automake/autoconf and GNU compliance.

    Finally, here they are: the "big-patch" patches - merged into one big
    patch (~1.5MB).

    Sorry for the delay, but testing took much more time than I had expected
    - esp. reworking the acpolish script triggered many more tiny issues
    than I had expected (cf. below).

    At least, now you've got something to spend your weekend with :-.


    WARNINGS:
    * I've gone a little (??) further than I had announced before.
    * Several directories have been moved.
    * Several files have been added and removed
    * I have tested it with many BSPs/CPUs and a variety of permutiations of
    configuration flags, but not with all.
    * Most parts of the patch are automatically generated, however there are
    many tiny manual modifications.

    APPLYING THE PATCH:

    ./autogen -c
    mkdir tools
    mv c/src/exec/score/tools tools/cpu
    mv c/build-tools tools/build
    mv c/update-tools tools/update
    patch -p1 -E < rtems-rc-19990709-0.diff
    ./autogen

    If the patch doesn't apply to rtems-cvs, I would suggest that you should
    try to apply it brute-force and then to run tools/update/rtems-polish.sh
    -ac -am afterwards. A recursive diff between rtems-19990709 + patch and
    rtems-cvs + patch then should report only a few dozen significant
    changes to configuration files which need to be merged manually (IIRC, I
    did not change any source files).

    *** Attention: There are files to be removed, moved, copied and added
    in/to CVS!

    NEWS/CHANGES:
    1. Configuration takes place in 3 stages: 1. per host (toplevel
    configure script), 2. per target (c/configure), 3. per bsp
    c/src/configure automatically triggered from ./configure and
    c/Makefile.am.
    2. Building of subdirectory c/ takes place in c/$(target_alias) for
    cross-targets in c/ for native targets
    3. Building of subdirectory c/src takes place in c/${target_alias}/<bsp>
    for cross-targets, c/<bsp> for native targets
    4. c/build-tools moved to tools/build
    5. c/src/exec/score/cpu/tools moved to tools/cpu (=cpu-tools split out)
    6. c/update-tools moved to tools/update
    7. New subdirectory c/src/make, handles files from make/ on a per BSP
    basis
    8. Maintainer mode support: Ie. if configuring with
    --enable-maintainer-mode disabled (the default), then tracking of many
    dependencies will be disabled in Makefiles. Esp. many dependencies for
    auto* generated files will be switched off in Makefiles. Ie. if not
    using "--enable-maintainer-mode" many auto* generated files will not be
    updated automatically, i.e. normal users should not be required to have
    auto* tools anymore (untested).
    9. Independent configuration scripts for / (toplevel), tools/build,
    tools/cpu, tools/update, c/, c/src/, c/src/exec, c/src/lib, c/src/tests,
    c/src/make
    10. Automake support for all directories above and besides c/src
    11. "preinstall" now is implemented as depth-first recursive make target

    12. host compiled tools (exception bsp-tools) are accessed in location
    in the build tree instead of inside the build-tree when building RTEMS.
    13. RTEMS_ROOT and PROJECT_ROOT now point to directories inside the
    build-tree - many tiny changes as consequence from this.
    14. --with-cross-host support removed (offically announced obsolete by
    cygnus)
    15. Changing the order of building libraries below c/src/lib/
    16. Former toplevel configure script broken into aclocal/*.m4 macros
    17. Newlib now detected by configure macros, RTEMS_HAS_NEWLIB removed
    from *cfg.
    18. sptables.h now generated by autoconf
    19. Rules for "mkinstalldirs temporary installation tree" moved from
    c/Makefile to subdirectories.
    20. Cpu-tools do not get installed.
    21. FIX: Use ACLOCAL_AMFLAGS instead of ACLOCAL = -I ... in Makefile.ams
    which are in directories with own configure scripts.
    22. Hardcoding BSP names into libbsp/.../tools to avoid RTEMS_BSP get
    overridden from the environment.
    22. FIX: Handling of MP_PIECES in various Makefiles
    23. FIX: Removing "::" rules from some Makefile.ins
    24. FIX: File permission chaos: (-m 444 and -m 555 vs. -m 644 and -m
    755) - Now all include files use -m 644.
    25. Removed many gnumake-conditionals in Makefile.ins - Partially
    replaced with automake-conditional, partially replaced with
    conditionalized Makefile variables (... _yes_V)
    26. Massively reworked acpolish: acpolish now parses Makefile.ins and
    interprets parts of the Makefile.ins.
    27. FIX: Some $(wildcard $(srcdir)/*.h) macros removed / replaced with
    explicit lists of files in Makefile.ins.
    28. FIX: Replacing MKLIB with RANLIB in Makefile.ins
    29. HACK: Add preinstallation for pc386 specific
    $(PROJECT_RELEASE)/BootImgs directory

    ... many more details, I can't recall


    KNOWN BUGS:
    1. make [debug|profile]_install do not do what they are promissing.
    "make [debug|profile] install" does what "make [debug|profile]_install"
    has been doing. Proposal: remove [debug|profile]_install
    2. Dependencies between temporary installation tree and source tree are
    not yet handled correctly.
    3. Dependencies between temporary installation tree and source tree are
    handled ineffencently (Using INSTALL_CHANGE instead of make
    dependencies)
    4. RTEMS_ROOT, PROJECT_ROOT, top_builddir, RTEMS_TOPdir now are
    redundant.
    5. The new configure scripts still are in their infancy. They contain
    redundant checks and might still contain bugs, too.
    6. RTEMS autoconf Makefile.ins use a mixture of configuration
    information gathered in c/$(target_alias)/<bsp>/make and of information
    collected from their configure scripts.
    7. make dist is not fully functional
    8. Subdirectory host-/build-/target- configure options (--target,
    --host, --build) do not conform to Cygnus/GNU conventions.
    9. Some RTEMS autoconf Makefile.in's makefile targets are not supported
    in automake Makefile.ams/ins (e.g. get, clobber).
    10. Some automake standard targets are not propagated from toplevel and
    c/Makefile.am to autoconf subdirectories (eg. make dist).
    11. rpcgen generated files are not part of the source-tree (Automake
    conventions favor supplying generated files inside the source-tree,
    however there is no support for rpcgen generated files in automake, cf.
    yacc/lex support in automake).
    12. RTEMS_HAS_RDBG handling is flaky. make/*.cfg use RTEMS_HAS_RDBG per
    CPU, while librdb's sources can only be built per BSP. Raises the more
    general question whether librdbg located correctly in the source-tree.
    13. All make/*cfg files are configured per cpu, currently there is no
    location to store per-bsp configuration information --> bsp.cfg, per
    aconfig.h?
    14. "make install" without having run "make all" beforehand does not
    work.
    15. handling of --enable-multiprocessing seems to be broken in
    make/custom/*
    16. Makefile.ins still exploit many gmake features.
    17. File permisson chaos on libraries (no explict -m for
    libraries/rels/etc).
    18. mcp750 Makefiles are broken (Note: I *do* mean buggy - I am not
    talking about "not-conforming to  conventions", here :-).
    19. Dependencies between configure scripts are not handled, eg. aborting
    "make RTEMS_BSP=<bsp>" can leave the build-tree in an unusable state.
    20. "make clean" does not delete <build-tree>/<bsp>. This is intentional
    for now, because rerunning "make" after "make clean" requires an
    explicit "make preinstall" afterwards now. This should be done
    automatically, but doesn't work in this case for now. To work around
    this problem <build-tree>/<bsp> is kept during "make clean" for now
    (HACK).

    TODO:
    1. split out host-compiled bsp-tools
    2. Use Cygnus/GNU standards for cross-compiling target-subdir
    (CC=CC_FOR_TARGET .. configure --host=${target_alias}
    --build=`config.guess'}), to be added to toplevel configure script after
    splitting out bsp-tools.
    3. Exploit per cpu support directory (c/src/<cpu>)- Splitting out
    per-cpu libraries - Are there any?
    4. Further automake support
    5. Converting subdirectories into standalone / self-contained
    subdirectories (Esp. moving their headers to the same common root as
    their sources, eg. mv lib/include/rtems++
    lib/librtems++/include/rtems++) - This is the main obstacle which
    prevents moving further towards automake.
    6. Propagating values from *.cfg into Makefiles instead of propagating
    them at make time via Makefile-fragments (i.e. try to avoid using
    *.cfg).
    7. Testing on cygwin host (I *do* expect cygwin specific problems).
    8. The ARCH in o-$(ARCH)-$(VARIANT) build-subdirectories is not needed
    anymore.

    GENERAL ISSUES:
    1. Temporary installation tree -- Ian and I seem to disagree basically.
    Though I think that I understand his argumentation, I do not share it.
    IMO, his way of using the buildtree is mis-using the build-tree, relying
    on an inofficial feature of RTEMS's current implementation, which
    doesn't even work correctly in the current build-tree, though it
    attempts hard to do so. From my very POV, it unnecessarily complicates
    the structures of the source- and build-trees. It is not supported by
    automake (No automatic generation for the necessary rules) and
    complicates the transition to automake significantly (Generating the
    rules with an enhanced version of acpolish could be possible).
    As Ian correctly pointed out, here a management decision is needed -
    though I don't see the need to draw this decision in short terms.

    2. preinstallation generally is a sure means to spoil the structure of
    the source tree, IMHO (No ranting intended, I am completly serious about
    this one). eg. through tree dependencies. The worst problem related to
    this I have found in the meantime is bsp_specs. bsp_specs is part of
    libbsp, ie. there is *no* way to build *any* part of the source tree
    *without* having a BSP *preinstalled*.
    Note: This issue is related to issue 1., but is not identical - The
    difference is the change of the order make rules have to be triggered.
    While preinstallation triggers rules spread all over the source tree
    before a "make all" can be run, a temporary installation tree could also
    be installed by post "make all" hooks (all-local:, to be run after make
    all in a directory is completed) if the directories' dependencies would
    be a tree,

    3. Stuctural dependencies between subdirectories.
    4. Depth of the source tree (Prevents multilibbing and introduces many
    unnecessary configure scripts).
    5. per cpu vs. per bsp configuration (There are no real per-cpu parts
    yets :-).
    6. automake does not support $makefiles in AC_OUTPUT. Unlike before, we
    now should try to avoid RTEMS_CHECK_MAKEFILE and to hard-code as much
    paths to Makefiles as possible.
    7. General redesign of the source tree
    8. Main installation point - Changing it to ${prefix}/${target_alias}. ?

    Besides item 8. (which is a must, IMHO), as far as I see most of them
    can not be solved soon and will remain issues in the mid- to long-term
    :-.

    REMARKS:

    * You (as the maintainer) should always use --enable-maintainer-mode
    when building RTEMS to ensure that maintainer mode generated files (esp.
    those in c/src/make) will be updated when make/* files have changed.
    * Use @RTEMS_BSP@ in Makefile.ins and Makefile.ams below c/src/,
    $(RTEMS_BSP) or ${RTEMS_BSP} will be overridden from environment
    variables when using make RTEMS_BSP="....".
    * c/src/make is a temporary cludge until configuration issues are
    solved. At the moment it is configured per bsp, but contains
    per-target/cpu info only. Its main purpose now is to circumvent
    modifying make/*.cfg files, because I consider make/* to be frozen for
    backward compatibilty.
    * This patch should only affect configuration files. At least I do not
    remember having touched any source files.

    * To build the bare bsp you now need to mention it in --enable-rtemsbsp.

    Example: building gensh1 and sh1/bare simultaneously:
    ../rtems-rc-19990709-1/configure --target=sh-rtems \
    --enable-rtemsbsp="bare gensh1" \
    --prefix=/tmp/rtems \
    --enable-bare-cpu-cflags='-DMHZ=20 -m1
    -DCPU_CONSOLE_DEVNAME=\"/dev/null\"' \
    --enable-bare-cpu-model=sh7032 \
    --enable-maintainer-mode \
    --enable-cxx
    make
    make install

    * The next steps in development would be to split out bsp-tools and then
    to change to Cygnus/GNU canonicalization conventions for building the c/
    subdirectory afterwards (i.e. many standard AC_*.m4 macros could be used
    instead of customized versions)

    FINAL REMARK:
    The issues mentioned in the lists above sound much worser than the
    situation actually is. Most of them are not specific to this patch, but
    are also valid for the snapshot. I just wrote down what I came across
    when working on the patch over the last few weeks.

    I wouldn't be too surprised if you don't like the patch at the current
    point in development. I am willing to discuss details and problems, I
    also have no problem if you would post-pone applying this patch to times
    after 4.1, but rejecting it as a whole for all times would be a false
    management decision, IMHO.

    Therefore I would suggest that you, if your time constaints allow it,
    should at least play a little while with this patch to understand what
    is going on and  before drawing a decision on how to handle this
    proposal. I know this patch is neither perfect nor complete, but I
    consider it to be a major breakthrough.  Don't be anxious because of the
    size of the patch, the core of the patch is rather small, the size is
    mainly the side effect of some systematic cleanups inside the Makefiles
    (result of acpolish).

    Feel free to ask if you encounter problems, if you don't understand
    something or if you meet bugs - I am far from being perfect and am
    prepared to answer them.

    Ralf.

    --
    Ralf Corsepius
    Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung (FAW)
    Helmholtzstr. 16, 89081 Ulm, Germany     Tel: +49/731/501-8690
    mailto:corsepiu@faw.uni-ulm.de           FAX: +49/731/501-999
    http://www.faw.uni-ulm.de
1999-07-26 20:20:22 +00:00
Joel Sherrill
6693a68ffa This is part of a major patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
to move RTEMS more to automake/autoconf and GNU compliance.

    Finally, here they are: the "big-patch" patches - merged into one big
    patch (~1.5MB).

    Sorry for the delay, but testing took much more time than I had expected
    - esp. reworking the acpolish script triggered many more tiny issues
    than I had expected (cf. below).

    At least, now you've got something to spend your weekend with :-.


    WARNINGS:
    * I've gone a little (??) further than I had announced before.
    * Several directories have been moved.
    * Several files have been added and removed
    * I have tested it with many BSPs/CPUs and a variety of permutiations of
    configuration flags, but not with all.
    * Most parts of the patch are automatically generated, however there are
    many tiny manual modifications.

    APPLYING THE PATCH:

    ./autogen -c
    mkdir tools
    mv c/src/exec/score/tools tools/cpu
    mv c/build-tools tools/build
    mv c/update-tools tools/update
    patch -p1 -E < rtems-rc-19990709-0.diff
    ./autogen

    If the patch doesn't apply to rtems-cvs, I would suggest that you should
    try to apply it brute-force and then to run tools/update/rtems-polish.sh
    -ac -am afterwards. A recursive diff between rtems-19990709 + patch and
    rtems-cvs + patch then should report only a few dozen significant
    changes to configuration files which need to be merged manually (IIRC, I
    did not change any source files).

    *** Attention: There are files to be removed, moved, copied and added
    in/to CVS!

    NEWS/CHANGES:
    1. Configuration takes place in 3 stages: 1. per host (toplevel
    configure script), 2. per target (c/configure), 3. per bsp
    c/src/configure automatically triggered from ./configure and
    c/Makefile.am.
    2. Building of subdirectory c/ takes place in c/$(target_alias) for
    cross-targets in c/ for native targets
    3. Building of subdirectory c/src takes place in c/${target_alias}/<bsp>
    for cross-targets, c/<bsp> for native targets
    4. c/build-tools moved to tools/build
    5. c/src/exec/score/cpu/tools moved to tools/cpu (=cpu-tools split out)
    6. c/update-tools moved to tools/update
    7. New subdirectory c/src/make, handles files from make/ on a per BSP
    basis
    8. Maintainer mode support: Ie. if configuring with
    --enable-maintainer-mode disabled (the default), then tracking of many
    dependencies will be disabled in Makefiles. Esp. many dependencies for
    auto* generated files will be switched off in Makefiles. Ie. if not
    using "--enable-maintainer-mode" many auto* generated files will not be
    updated automatically, i.e. normal users should not be required to have
    auto* tools anymore (untested).
    9. Independent configuration scripts for / (toplevel), tools/build,
    tools/cpu, tools/update, c/, c/src/, c/src/exec, c/src/lib, c/src/tests,
    c/src/make
    10. Automake support for all directories above and besides c/src
    11. "preinstall" now is implemented as depth-first recursive make target

    12. host compiled tools (exception bsp-tools) are accessed in location
    in the build tree instead of inside the build-tree when building RTEMS.
    13. RTEMS_ROOT and PROJECT_ROOT now point to directories inside the
    build-tree - many tiny changes as consequence from this.
    14. --with-cross-host support removed (offically announced obsolete by
    cygnus)
    15. Changing the order of building libraries below c/src/lib/
    16. Former toplevel configure script broken into aclocal/*.m4 macros
    17. Newlib now detected by configure macros, RTEMS_HAS_NEWLIB removed
    from *cfg.
    18. sptables.h now generated by autoconf
    19. Rules for "mkinstalldirs temporary installation tree" moved from
    c/Makefile to subdirectories.
    20. Cpu-tools do not get installed.
    21. FIX: Use ACLOCAL_AMFLAGS instead of ACLOCAL = -I ... in Makefile.ams
    which are in directories with own configure scripts.
    22. Hardcoding BSP names into libbsp/.../tools to avoid RTEMS_BSP get
    overridden from the environment.
    22. FIX: Handling of MP_PIECES in various Makefiles
    23. FIX: Removing "::" rules from some Makefile.ins
    24. FIX: File permission chaos: (-m 444 and -m 555 vs. -m 644 and -m
    755) - Now all include files use -m 644.
    25. Removed many gnumake-conditionals in Makefile.ins - Partially
    replaced with automake-conditional, partially replaced with
    conditionalized Makefile variables (... _yes_V)
    26. Massively reworked acpolish: acpolish now parses Makefile.ins and
    interprets parts of the Makefile.ins.
    27. FIX: Some $(wildcard $(srcdir)/*.h) macros removed / replaced with
    explicit lists of files in Makefile.ins.
    28. FIX: Replacing MKLIB with RANLIB in Makefile.ins
    29. HACK: Add preinstallation for pc386 specific
    $(PROJECT_RELEASE)/BootImgs directory

    ... many more details, I can't recall


    KNOWN BUGS:
    1. make [debug|profile]_install do not do what they are promissing.
    "make [debug|profile] install" does what "make [debug|profile]_install"
    has been doing. Proposal: remove [debug|profile]_install
    2. Dependencies between temporary installation tree and source tree are
    not yet handled correctly.
    3. Dependencies between temporary installation tree and source tree are
    handled ineffencently (Using INSTALL_CHANGE instead of make
    dependencies)
    4. RTEMS_ROOT, PROJECT_ROOT, top_builddir, RTEMS_TOPdir now are
    redundant.
    5. The new configure scripts still are in their infancy. They contain
    redundant checks and might still contain bugs, too.
    6. RTEMS autoconf Makefile.ins use a mixture of configuration
    information gathered in c/$(target_alias)/<bsp>/make and of information
    collected from their configure scripts.
    7. make dist is not fully functional
    8. Subdirectory host-/build-/target- configure options (--target,
    --host, --build) do not conform to Cygnus/GNU conventions.
    9. Some RTEMS autoconf Makefile.in's makefile targets are not supported
    in automake Makefile.ams/ins (e.g. get, clobber).
    10. Some automake standard targets are not propagated from toplevel and
    c/Makefile.am to autoconf subdirectories (eg. make dist).
    11. rpcgen generated files are not part of the source-tree (Automake
    conventions favor supplying generated files inside the source-tree,
    however there is no support for rpcgen generated files in automake, cf.
    yacc/lex support in automake).
    12. RTEMS_HAS_RDBG handling is flaky. make/*.cfg use RTEMS_HAS_RDBG per
    CPU, while librdb's sources can only be built per BSP. Raises the more
    general question whether librdbg located correctly in the source-tree.
    13. All make/*cfg files are configured per cpu, currently there is no
    location to store per-bsp configuration information --> bsp.cfg, per
    aconfig.h?
    14. "make install" without having run "make all" beforehand does not
    work.
    15. handling of --enable-multiprocessing seems to be broken in
    make/custom/*
    16. Makefile.ins still exploit many gmake features.
    17. File permisson chaos on libraries (no explict -m for
    libraries/rels/etc).
    18. mcp750 Makefiles are broken (Note: I *do* mean buggy - I am not
    talking about "not-conforming to  conventions", here :-).
    19. Dependencies between configure scripts are not handled, eg. aborting
    "make RTEMS_BSP=<bsp>" can leave the build-tree in an unusable state.
    20. "make clean" does not delete <build-tree>/<bsp>. This is intentional
    for now, because rerunning "make" after "make clean" requires an
    explicit "make preinstall" afterwards now. This should be done
    automatically, but doesn't work in this case for now. To work around
    this problem <build-tree>/<bsp> is kept during "make clean" for now
    (HACK).

    TODO:
    1. split out host-compiled bsp-tools
    2. Use Cygnus/GNU standards for cross-compiling target-subdir
    (CC=CC_FOR_TARGET .. configure --host=${target_alias}
    --build=`config.guess'}), to be added to toplevel configure script after
    splitting out bsp-tools.
    3. Exploit per cpu support directory (c/src/<cpu>)- Splitting out
    per-cpu libraries - Are there any?
    4. Further automake support
    5. Converting subdirectories into standalone / self-contained
    subdirectories (Esp. moving their headers to the same common root as
    their sources, eg. mv lib/include/rtems++
    lib/librtems++/include/rtems++) - This is the main obstacle which
    prevents moving further towards automake.
    6. Propagating values from *.cfg into Makefiles instead of propagating
    them at make time via Makefile-fragments (i.e. try to avoid using
    *.cfg).
    7. Testing on cygwin host (I *do* expect cygwin specific problems).
    8. The ARCH in o-$(ARCH)-$(VARIANT) build-subdirectories is not needed
    anymore.

    GENERAL ISSUES:
    1. Temporary installation tree -- Ian and I seem to disagree basically.
    Though I think that I understand his argumentation, I do not share it.
    IMO, his way of using the buildtree is mis-using the build-tree, relying
    on an inofficial feature of RTEMS's current implementation, which
    doesn't even work correctly in the current build-tree, though it
    attempts hard to do so. From my very POV, it unnecessarily complicates
    the structures of the source- and build-trees. It is not supported by
    automake (No automatic generation for the necessary rules) and
    complicates the transition to automake significantly (Generating the
    rules with an enhanced version of acpolish could be possible).
    As Ian correctly pointed out, here a management decision is needed -
    though I don't see the need to draw this decision in short terms.

    2. preinstallation generally is a sure means to spoil the structure of
    the source tree, IMHO (No ranting intended, I am completly serious about
    this one). eg. through tree dependencies. The worst problem related to
    this I have found in the meantime is bsp_specs. bsp_specs is part of
    libbsp, ie. there is *no* way to build *any* part of the source tree
    *without* having a BSP *preinstalled*.
    Note: This issue is related to issue 1., but is not identical - The
    difference is the change of the order make rules have to be triggered.
    While preinstallation triggers rules spread all over the source tree
    before a "make all" can be run, a temporary installation tree could also
    be installed by post "make all" hooks (all-local:, to be run after make
    all in a directory is completed) if the directories' dependencies would
    be a tree,

    3. Stuctural dependencies between subdirectories.
    4. Depth of the source tree (Prevents multilibbing and introduces many
    unnecessary configure scripts).
    5. per cpu vs. per bsp configuration (There are no real per-cpu parts
    yets :-).
    6. automake does not support $makefiles in AC_OUTPUT. Unlike before, we
    now should try to avoid RTEMS_CHECK_MAKEFILE and to hard-code as much
    paths to Makefiles as possible.
    7. General redesign of the source tree
    8. Main installation point - Changing it to ${prefix}/${target_alias}. ?

    Besides item 8. (which is a must, IMHO), as far as I see most of them
    can not be solved soon and will remain issues in the mid- to long-term
    :-.

    REMARKS:

    * You (as the maintainer) should always use --enable-maintainer-mode
    when building RTEMS to ensure that maintainer mode generated files (esp.
    those in c/src/make) will be updated when make/* files have changed.
    * Use @RTEMS_BSP@ in Makefile.ins and Makefile.ams below c/src/,
    $(RTEMS_BSP) or ${RTEMS_BSP} will be overridden from environment
    variables when using make RTEMS_BSP="....".
    * c/src/make is a temporary cludge until configuration issues are
    solved. At the moment it is configured per bsp, but contains
    per-target/cpu info only. Its main purpose now is to circumvent
    modifying make/*.cfg files, because I consider make/* to be frozen for
    backward compatibilty.
    * This patch should only affect configuration files. At least I do not
    remember having touched any source files.

    * To build the bare bsp you now need to mention it in --enable-rtemsbsp.

    Example: building gensh1 and sh1/bare simultaneously:
    ../rtems-rc-19990709-1/configure --target=sh-rtems \
    --enable-rtemsbsp="bare gensh1" \
    --prefix=/tmp/rtems \
    --enable-bare-cpu-cflags='-DMHZ=20 -m1
    -DCPU_CONSOLE_DEVNAME=\"/dev/null\"' \
    --enable-bare-cpu-model=sh7032 \
    --enable-maintainer-mode \
    --enable-cxx
    make
    make install

    * The next steps in development would be to split out bsp-tools and then
    to change to Cygnus/GNU canonicalization conventions for building the c/
    subdirectory afterwards (i.e. many standard AC_*.m4 macros could be used
    instead of customized versions)

    FINAL REMARK:
    The issues mentioned in the lists above sound much worser than the
    situation actually is. Most of them are not specific to this patch, but
    are also valid for the snapshot. I just wrote down what I came across
    when working on the patch over the last few weeks.

    I wouldn't be too surprised if you don't like the patch at the current
    point in development. I am willing to discuss details and problems, I
    also have no problem if you would post-pone applying this patch to times
    after 4.1, but rejecting it as a whole for all times would be a false
    management decision, IMHO.

    Therefore I would suggest that you, if your time constaints allow it,
    should at least play a little while with this patch to understand what
    is going on and  before drawing a decision on how to handle this
    proposal. I know this patch is neither perfect nor complete, but I
    consider it to be a major breakthrough.  Don't be anxious because of the
    size of the patch, the core of the patch is rather small, the size is
    mainly the side effect of some systematic cleanups inside the Makefiles
    (result of acpolish).

    Feel free to ask if you encounter problems, if you don't understand
    something or if you meet bugs - I am far from being perfect and am
    prepared to answer them.

    Ralf.

    --
    Ralf Corsepius
    Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung (FAW)
    Helmholtzstr. 16, 89081 Ulm, Germany     Tel: +49/731/501-8690
    mailto:corsepiu@faw.uni-ulm.de           FAX: +49/731/501-999
    http://www.faw.uni-ulm.de
1999-07-26 20:00:37 +00:00
Joel Sherrill
b0ac03f4dd Moved to top level directory per patch rtems-rc-19990709-0.diff.gz
from Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
1999-07-23 20:01:41 +00:00
Joel Sherrill
e5dafccb09 Tools moved to top-level directory per patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>. 1999-07-23 19:59:26 +00:00
Joel Sherrill
1f42090624 Patch to ease building MCP750 BSP. 1999-07-23 19:33:28 +00:00
Joel Sherrill
38e4a9169a Patch from Rosimildo DaSilva <rdasilva@connecttel.com> to readd calls to
init() and fini() routines.
1999-07-13 14:54:16 +00:00
Joel Sherrill
09ea257c58 Patch from Eric Norum <eric@cls.usask.ca>:
I get the following warning when compiling the latest snapshot.  I had
a quick look at the source -- it certainly looks to me like this is a
real bug.

../../../../src/rtems-19990709/c/src/lib/libc/mount.c:97: warning:
`options' might be used uninitialized in this function

Also, I changed the TFTP test program and TFTP driver to reflect the
changes in the way paths are passed to the TFTP driver.  The TFTP driver
now needs a proper `dotted-decimal' hostname as the second component of
the path name.
1999-07-12 15:52:35 +00:00
Joel Sherrill
1377bb1455 changed version to 19990709 1999-07-09 19:27:43 +00:00
Joel Sherrill
f4211327a4 New files from Jiri Gaisler <jgais@ws.estec.esa.nl>. 1999-07-09 18:23:59 +00:00
Joel Sherrill
2728b0749d New file from Jake Janovetz <janovetz@tempest.ece.uiuc.edu>. 1999-07-09 17:23:15 +00:00
Joel Sherrill
93180ea26a Patch from Eric Valette <valette@crf.canon.fr>:
- The same bug fix that was done on pc386 to prevent interrupt
   from occuring (never experienced it but who knows as I have 8259
   emulation :()
   - Removed every compiler warning (except wrong ones and ones I can't do
   anything).
   - Removed any libc available code in code linked with mcp750 rtems
   executbale. Unfortunately  using newlib functions for linking the
   bootloader does not work as the compilation options in bootloader
   (-mrelocatable -fixed-r13) are not compatible with newlib options.
   => I have put any libc external reference in one single new file (lib.c)
   that is linked only with the boot loader. Removing the file from
   ${OBJ} and  using -lc crash the bootloader. Added big warning...
1999-07-09 17:16:10 +00:00
Joel Sherrill
b73e57bffe Patch from Jiri Gaisler <jgais@ws.estec.esa.nl>:
+ interrupt masking correction
  + FPU rev.B workaround
  + minor erc32 related fixes
1999-07-09 17:08:48 +00:00
Joel Sherrill
cc17eba0cb Make sure pthread init stack size is always set. 1999-07-09 16:56:34 +00:00
Joel Sherrill
adbb578abb Moved definitions to a more logical place. 1999-07-08 22:45:07 +00:00
Joel Sherrill
1cf469f3df New file. 1999-07-03 16:08:21 +00:00
Joel Sherrill
771c1479be New files missed in previous addition. 1999-07-03 15:38:38 +00:00
Joel Sherrill
a381e6e43e Added some C++/GNU sections. 1999-07-03 15:33:08 +00:00
Joel Sherrill
c8d91839ff Patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de> that splits
boot_card() and main() into separate files to ease configuration
of other packages.  This was a big step in the way to build TCL,
ncurses, and zlib for RTEMS.
1999-07-02 18:57:11 +00:00
Joel Sherrill
a0a225f4aa Added code to initialize the /etc/group and /etc/passwd files. 1999-07-02 18:50:40 +00:00
Joel Sherrill
c51917f304 Fixed format strings and warnings. 1999-07-02 18:09:03 +00:00
Joel Sherrill
c3d20eba96 Reentrant versions added by Joel. Signficant formatting cleanup. 1999-07-02 18:03:43 +00:00
Joel Sherrill
258fd794fd Password and group routines added by Ralf Corsepius <corsepiu@faw.uni-ulm.de>. 1999-07-02 17:13:27 +00:00
Joel Sherrill
fcee56c0b1 Patch from Eric Valette <valette@crf.canon.fr> to clean up the
previous submission.
1999-07-01 23:39:13 +00:00
Joel Sherrill
ed1a0e51b3 Honor 0 as PID of caller. 1999-07-01 22:57:23 +00:00
Joel Sherrill
78b78e2383 Another attempt at getting everything to build with the new powerpc
libcpu.
1999-07-01 22:43:09 +00:00
Joel Sherrill
2a85368d24 Fixed typo. 1999-07-01 22:42:33 +00:00
Joel Sherrill
bb224a9706 Added signal_2 file to contain signal(2). 1999-07-01 22:42:11 +00:00
Joel Sherrill
51e04a2c7f New file to implement signal(2). 1999-07-01 22:28:30 +00:00
Joel Sherrill
10794a735a Modified to reflect change in calling sequence of mount(). 1999-07-01 22:08:33 +00:00
Joel Sherrill
dbf969e1d5 Test modified to reflect change in calling sequence of mount(). 1999-07-01 22:08:13 +00:00
Joel Sherrill
e7792b2585 Cleaned up to behave properly -- does not make a directory in the
install tree and does not "cd wrapup."
1999-07-01 22:07:32 +00:00
Joel Sherrill
6be1238ee0 Now preinstalls header files. 1999-07-01 22:06:49 +00:00
Joel Sherrill
9519bf49aa Removed mkdir of libcpu. This should have been at the top of the tree. 1999-07-01 22:05:36 +00:00
Joel Sherrill
28861e8df6 Remove mkdir command. It should be at the top level of the tree. 1999-07-01 22:05:10 +00:00
Joel Sherrill
7782f9fca0 Modified to provide symbols with and without leading underscore in order
to support a.out and ELF.
1999-07-01 21:53:17 +00:00
Joel Sherrill
e2ba0af670 Modified to support ELF. Before SYM() macro was not used consistently. 1999-07-01 21:52:33 +00:00