How to delete temporary build files

Hi,

Could someone please clarify which files/folders can be safely deleted after successfully building and installing an RTEMS BSP and tools etc? Also is there a build target or script to do it?

Thanks.

How did you run the build?

Here are the commands I used to build:

export RTEMS_BASE=/opt/rtems6
cd /usr/src && \
    git clone --depth 1 https://gitlab.rtems.org/rtems/tools/rtems-source-builder.git rsb && \
    cd /usr/src/rsb && \
    git fetch --all --tags && \
    git checkout tags/6.1 -b 6 && \
    ./source-builder/sb-check && \
    cd /usr/src/rsb/rtems && \
    ../source-builder/sb-set-builder --list-bsets && \
    ../source-builder/sb-set-builder --prefix=${RTEMS_BASE} 6/rtems-powerpc

    git clone --depth 1 https://gitlab.rtems.org/rtems/rtos/rtems.git rtems && \
    cd rtems && \
    git fetch --all --tags && \
    git checkout tags/6.1 -b 6  && \
    mv /config.ini . && \
    ./waf configure \
    --prefix=/opt/rtems6 && \
    ./waf && \
    ./waf install

That seem reasonable when deploying RTEMS. The /opt/rtems6 path will contain all the pieces you need. I then avoid installing anything further into that path.

The RSB stages the build in a private directory that is not the prefix, ie /opt/rtems6 until the build complete without error then it does the install. If you build the kernel and tools as a single buildset the prefix ends up with a completed build. No temporary files are placed there. The rtems-deployment tool does this but it leaves you with a tar file you can install. If you wipe the tree under the prefix path you can untar the build tar file and be back with a clean copy.

Thanks @kiwichris for your response.

So, is there any temporary build staging area (ie the one setup by RSB) that we should delete / cleanup after the install? Or is this staging area automatically cleared by RSB after the install?

Moreover, are there any files/folders inside the RSB source tree to be deleted after the build and install process?

Regards.

You should not need to clean up the staging area. It should be cleaned once the install has been completed. The RSB should start from a clean base and if this is not the case it would be a bug.

1 Like