On Thu, Sep 24, 2020 at 1:33 PM Chris Johns <chr...@rtems.org> wrote: > > On 25/9/20 2:48 am, Joel Sherrill wrote: > > I can't find any documentation which guides translating a > > RTEMS configure command into the appropriate set of > > options in a config.ini file for waf. The only example I could > > find has BUILD_TESTS which implies it builds all tests > > rather than just samples. > > > > Guidance on translating configure options to config.ini > > statements would be appreciated by me and I am sure > > by others who will have to update their build procedures. > > > > Guidance on the variables used to override configure.ac > > <http://configure.ac> > > values is also needed but that isn't quite as critical as > > just translating the various enable/disable settings. > > > > I have not done this yet so I do not have a 1:1 translation for configure > options. Having this documented would be good. > > I discussed with Sebastian earlier in the week how this is to work and this is > what I learnt ... > > 1. The `--rtems-bsps` option only seems to effect the `bsp_defaults` target. > The > configure process uses the .ini file you provide via the `--rtems-config` > option. The default is `config.ini` if that option is not supplied. > > 2. The .ini file is only referenced by the configure phase of waf. It defines > all the BSPs to built and any overriding option. You normally only have > options > in a .ini that are _not_ defaults. If you enter: > > ./waf bsp_defaults > config.ini > > all BSPs will be built and with default options. This is not what you > normally want. > > 3. You can have a `[DEFAULTS]` (all caps) section and any option in that > section > applies to all BSP that support it. For example: > > [DEFAULTS] No 'S'
> BUILD_TESTS = True > > will build the testsuite for all defined BSPs. > > 4. To build a BSP using its defaults simply add the BSP name as a section > header. Note, BSP names use the RTEMS standard `arch/bsp` format. For example: > > [DEFAULT] Like this > BUILD_TESTS = True > > [arm/beagleboneblack] > > [arm/xilinx_zynq_a9_qemu] > > [i386/pc686] > > [sparc/erc32] > > Will build 4 BSPs with tests. > > 5. To change a default option you first need to see what is supported for your > BSP. Currently the only option available is with ./waf and the `bsp_defaults` > target with the BSP name of interest. For example: > > $ ./waf bsp_defaults --rtems-bsp=sparc/erc32 > > Examine the list and add the one you want to change to your .ini file. For > example to change the optimisation level: > > [sparc/erc32] > OPTIMIZATION_FLAGS = -O -g -fdata-sections -ffunction-sections > > Remember to run the waf configure command again so the build picks up the > changed option. In the case waf will see the compiler command has changed and > it > will rebuild all effected object files. > > 6. The .ini can be located any where. It does not need to reside in the source > tree. The `--rtems-config` option can be used to point to any you have located > outside the source tree. You can keep them in a separate repo or tool you > maintain to build RTEMS. > > Chris > _______________________________________________ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel