Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#4468 closed defect (fixed)

waf build system does not generate the same bspopts.h

Reported by: Chris Johns Owned by: Chris Johns <chrisj@…>
Priority: high Milestone: 6.1
Component: build Version: 6
Severity: normal Keywords: wafblocker
Cc: Blocked By:
Blocking: #4081

Description

Building with autoconf and the command line of:

$ ../rtems.git/configure --target=powerpc-rtems6 --enable-rtemsbsp=mvme2307

gives:

$ grep BSP_CONSOLE_BAUD `find . -name bspopts.h`
#define BSP_CONSOLE_BAUD 9600

Building with waf and a config of ...

[DEFAULT]
BUILD_TESTS = True
RTEMS_POSIX_API = True

[powerpc/mvme2307]

gives:

$ grep BSP_CONSOLE_BAUD `find . -name bspopts.h`
#define BSP_CONSOLE_BAUD 115200

The default should be 9600 and the motorola_powerpc BSP is listed in the options under 9600. Something is broken in the waf BSP opts handling.

Change History (9)

comment:1 Changed on 07/14/21 at 04:44:57 by Chris Johns

The options code is not being passed the variant, it is passed the BSP ....

    def default_value(self, variant):
        value = self.data["default"]
        for default in self.data["default-by-variant"]:
            print(']] %s %r' % (variant, default), OptionItem._is_variant(default["variants"], variant))
            if OptionItem._is_variant(default["variants"], variant):

gives:

]] powerpc/mvme2307 {'value': 9600, 'variants': ['m68k/m5484FireEngine', 'powerpc/hsc_cm01', 'powerpc/beatnik', 'powerpc/haleakala', 'powerpc/motorola_powerpc', 'powerpc/mvme3100', 'powerpc/mvme5500']} False

comment:2 Changed on 07/14/21 at 05:01:02 by Chris Johns

The optconsolebaud.yml file lists powerpc/motorola_powerpc as a variant and it is a family. The ability to specify a family for default is something I think is needed. I do not like needing to list all BSPs is something we should require we do?

Are BSPs that INHERIT supported?

I wonder how you take a family given the variant?

comment:3 Changed on 07/14/21 at 06:38:28 by Chris Johns

Hmmm it seems the options are all required to have a default-by-variant. I am not sure if this is by design and for a reason, a hang over from the path to these spec files or it could be optional?

I will make it optional and I will make default-by-family optional.

comment:4 Changed on 07/15/21 at 00:03:15 by Chris Johns <chrisj@…>

Owner: set to Chris Johns <chrisj@…>
Resolution: fixed
Status: newclosed

In [changeset:"6f2aa8ad36e3aaffc9fa2cb8c744b04da7339ee2/rtems" 6f2aa8ad/rtems]:

build: Use BSP family for options

  • Optionally add support for 'default-by-family' to allow option to be set by a family and so all related BSPs

Close #4468

comment:5 Changed on 07/15/21 at 06:07:50 by Sebastian Huber <sebastian.huber@…>

In [changeset:"61071489ff37df682be89a56f29d2941fcc7cc28/rtems" 6107148/rtems]:

build: Add missing default-by-family

Update #4468.

comment:6 Changed on 07/15/21 at 06:07:54 by Sebastian Huber <sebastian.huber@…>

In [changeset:"b6092cb82c530c309bc0c48003453f53be830e02/rtems" b6092cb/rtems]:

build: Fix bsp_defaults command

Update #4468.

comment:7 Changed on 07/15/21 at 06:10:06 by Sebastian Huber <sebastian.huber@…>

In [changeset:"6c1928caed28183c2abe405963602a2d4a3116d0/rtems" 6c1928c/rtems]:

build: Prefer variant default value over family

Update #4468.

comment:8 Changed on 08/18/21 at 09:26:43 by Sebastian Huber <sebastian.huber@…>

In [changeset:"ebdfa24bff814134b8f42efc7ed386afcfa90eff/rtems" ebdfa24b/rtems]:

build: Merge default-by-family into by-variant

Prefix the BSP family name with "bsps/" to make it distinct to the BSP
variant names.

Update #4468.

comment:9 Changed on 08/30/21 at 09:03:04 by Sebastian Huber <sebastian.huber@…>

In [changeset:"d223ec99ae7f84f49844e9421d831f3690b2b93a/rtems-docs" d223ec9/rtems-docs]:

eng: Document use of BSP family for defaults

Update #4468.

Note: See TracTickets for help on using tickets.