Some AM/AC changes for PPC bare builds

Stephen Holford SHolford at WESCAM.com
Thu Nov 14 17:50:43 UTC 2002


Hi

We have three simple patches we use to create bare PPC builds with
recent RTEMS snapshots. I think these might be useful to others creating
completely custom bsp and support drivers to use with RTEMS. I currently
use these RTEMS bare builds with in-house 860 and 8260A boards.

Patch1:
This creates a new variable for testing the presence of a "bare" build.

===============================================================================

--- /home/rtems/archive/rtems-ss-20021111/c/src/lib/libcpu/powerpc/configure.ac
Sun Sep  8 03:14:45 2002
+++ configure.ac    Thu Nov 14 11:37:08 2002
@@ -27,6 +27,8 @@
  RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
  RTEMS_CHECK_BSP_CACHE(RTEMS_BSP)

+AM_CONDITIONAL(bare_bsp, test "$RTEMS_BSP" = "bare" )

+
  AM_CONDITIONAL(shared, test "$RTEMS_CPU_MODEL" = "mpc750" \
  || test "$RTEMS_CPU_MODEL" = "mpc7400" \
  || test "$RTEMS_CPU_MODEL" = "ppc603e" \

===============================================================================

Patch 2:
This tests the new bare_bsp conditional and prevents compilation in the chip
specific portion of libcpu/powerpc so that the resulting build is truly bare...

===============================================================================

--- /home/rtems/archive/rtems-ss-20021111/c/src/lib/libcpu/powerpc/Makefile.am
Tue May 14 14:32:20 2002
+++ Makefile.am Thu Nov 14 11:37:08 2002
@@ -29,6 +29,10 @@
  SHARED_LIB = shared
  endif

+if bare_bsp
+CPU_SUBDIR=
+else
+
  if mpc505
  CPU_SUBDIR = mpc505
  endif
@@ -47,6 +51,8 @@
  if ppc405
  ## 403 and 405 chips use the same CPU sources...
  CPU_SUBDIR = ppc403
+endif
+
  endif

  SUBDIRS = $(SHARED_LIB) $(CPU_SUBDIR) wrapup

===============================================================================

Patch 3:

This prevents the attempt to build samples if tests have been disabled. With a
bare build you cannot build any of the samples or tests until you create your
own bsp and support routines to link to rtems.

===============================================================================

--- /home/rtems/archive/rtems-ss-20021111/c/src/tests/configure.ac  Tue Apr 16 09:53:17 2002
+++ configure.ac    Thu Nov 14 11:37:08 2002
@@ -33,9 +33,9 @@

  AC_CONFIG_SUBDIRS(tools)
  AC_CONFIG_SUBDIRS(support)
-AC_CONFIG_SUBDIRS(samples)

  if test "$tests_enabled" = "yes"; then
+  AC_CONFIG_SUBDIRS(samples)
    # do functionality tests first, then performance tests
    AC_CONFIG_SUBDIRS(libtests sptests)
    if test "$HAS_MP" = "yes"; then

===============================================================================

Regards,

Steve Holford
Wescam



More information about the users mailing list