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

#3302 assigned project

Build System conversion of BSP Config (.cfg) files to pkg-config (.pc) files

Reported by: Chris Johns Owned by: Chris Johns
Priority: normal Milestone:
Component: unspecified Version:
Severity: normal Keywords: SoC, ecosystem, large, retired
Cc: Blocked By:
Blocking:

Description (last modified by Chris Johns)

Build System conversion of BSP Config (.cfg) files to Package Config (.pc)

Contents

  1. Build System conversion of BSP Config (.cfg) files to Package Config (.pc)
    1. Mentors
    2. Students
    3. Status
    4. Introduction
    5. Goal
    6. Prerequisite
    7. Tasks

Mentors

Chris Johns

Students

Past, Present, and Potential Students

Status

See Project Tasks.

Introduction

RTEMS BSP's use the make syntax in configuration files (.cfg) to specialize how a BSP is to be built and linked as well as defining any extra BSP specific details a user of the BSP may need. This can range from nothing through to target specific addresses and formats used to inter-operate with a BSP's hardware.

The configuration files currently form part of the user ecosystem via the Makefile.inc build system. This build system is flawed because it only supports make as a build system and there are a number of really good build systems available to users. The free form nature of the make syntax in the configuration files means automatically parsing and converting these files into another format would require a parser as complex as make and that is not practical. As a result the ability to support the Makefile.inc user application build system as it is as RTEMS moves forward is limited.

Makefile.inc and the supporting files export internal build details. Users may be depending on things that could change and at the same time RTEMS is limited in the changes it can do to avoid breaking applications. The interface needs to formally specified, invariant and documented.

Flags and settings in Makefile.inc are for building RTEMS while only the options related to ABI compatibility need to be exported to a user. A common issue is warning flags that break building 3rd packages. RTEMS Tools and RTEMS Waf both support the filtering of the CFLAGS however this should be handled in a formal sense in the exporting of flags from RTEMS for a BSP.

RTEMS users require a way to query and get the BSP build configuration for a BSP. The build configuration is the flags needed to compile and link code into an application. There is also a need to express BSP specific details that define some of the target specific features implemented by the BSP developer.

The pkg-config tool provides a way to query .pc format files and is used by a large number of packages to define how a package is build.

Goal

  • Convert RTEMS's current BSP configuration from the make format to the widely used and support pkg-config format.
  • Convert the RTEMS build system to use the .pc files.
  • Update examples-v2 to use the updated pkg-config files.
  • Update the User Manual.

Prerequisite

  • Knowledge of Unix shell
  • Knowledge of M4 and autoconf
  • Knowledge of compiler and linker flags
  • Knowledge of make
  • Knowledge of Python. This is not as important and is used to update rtems-wag.git which is used by examples-v2.

Tasks

  1. Review all BSP configurations and collect all the details and specifics. This lets us review and define how the elements are mapped to pkg-config.
  2. Write the pkg-config files an architecture at a time. Write a test to check all files.
  3. Update the RTEMS build system to use pkg-config.
  4. Update rtems-waf.git and test using examples-v2.

Change History (4)

comment:1 Changed on 02/15/18 at 05:14:33 by Chris Johns

Owner: set to Chris Johns
Status: newassigned

comment:2 Changed on 05/10/19 at 22:24:25 by Chris Johns

Description: modified (diff)

comment:3 Changed on 02/03/22 at 20:06:49 by Gedare Bloom

Keywords: large added

comment:4 Changed on 02/17/24 at 02:18:04 by Gedare Bloom

Keywords: retired added
Note: See TracTickets for help on using tickets.