Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
ci: Add a script to create a tarball from RTEMS obj files
Browse files Browse the repository at this point in the history
Add a mechanism for creating a tarball with RTEMS object files to export
it to an external repository. This tarball will be unpacked into
rtems_os and used in the process of building the application without
rebuilding the RTEMS image. This will reduce the build time.

Signed-off-by: Maxim Polyakov <[email protected]>
  • Loading branch information
maxpoliak committed Oct 29, 2021
1 parent aaadf80 commit 73dc9e0
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions ci/ci-create-rtems-export-tarball.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash -eu

RTEMS_ARCH="i386"
RTEMS_BSP="pc386"

CI_DIR="$(dirname $(realpath ${BASH_SOURCE[0]}))"
ROOT_DIR="${CI_DIR}/.."
RTEMS_DIR="${ROOT_DIR}/rtems_rtos"
EXPORT_DIR="${ROOT_DIR}/rtems_export"

function get_version_lable_rtems_os
{
base=$(git -C ${RTEMS_DIR}/rtems describe --tags --dirty)
branch=$(git -C ${RTEMS_DIR}/rtems branch | grep \* | cut -d ' ' -f2-)
echo ${RTEMS_ARCH}"-"${RTEMS_BSP}"-"$branch"-"$base
}

mkdir -p ${EXPORT_DIR}
echo "Export cross-tools and RTEMS object files to "
echo "${EXPORT_DIR}/rtems-export-$(get_version_lable_rtems_os).tar.gz"
ls ${RTEMS_DIR}/build-$(get_version_lable_rtems_os)
tar -C ${RTEMS_DIR} -zcvf \
${ROOT_DIR}/rtems_export/rtems-export-$(get_version_lable_rtems_os).tar.gz \
./build-$(get_version_lable_rtems_os) \
./rtems-exe

0 comments on commit 73dc9e0

Please sign in to comment.