Skip to content

Commit

Permalink
Merge pull request #1 from nokia/v23.12.1
Browse files Browse the repository at this point in the history
add corteca toolchain v23.12.1
  • Loading branch information
tsopokis authored Mar 26, 2024
2 parents 3e69c51 + 8bcbc67 commit 60e7cef
Show file tree
Hide file tree
Showing 9 changed files with 7,789 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vscode/
80 changes: 80 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Copyright 2024 Nokia
# Licensed under the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause

FROM debian:bookworm-slim
LABEL maintainer="Nokia"

ARG BUILDROOT_VERSION=2023.02.1
ARG PARALLEL_PROCS=4
ARG DEVICE_CONFIG
ARG REBUILD_BUILDROOT=yes
ARG DOCKER_USER=user

ENV DEBIAN_FRONTEND=noninteractive
ENV BUILDROOT_VERSION=${BUILDROOT_VERSION}
ENV PARALLEL_PROCS=${PARALLEL_PROCS}
ENV DEVICE_CONFIG=${DEVICE_CONFIG}
ENV PATH="${PATH}:/buildroot/output/host/bin"

COPY --chmod=0755 scripts/nokia_toolchain.sh /usr/bin/nokia_toolchain
COPY --chmod=0755 config/${DEVICE_CONFIG}.config /etc/buildroot.config
COPY --chmod=0644 environments/${DEVICE_CONFIG}.env /etc/target.env

RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
bc \
ca-certificates \
cpio \
curl \
file \
gcc-aarch64-linux-gnu \
gcc-arm-linux-gnueabi \
git \
jq \
rsync \
xz-utils \
wget \
unzip \
dirmngr \
fakeroot \
less \
pkg-config \
pkgconf && \
apt-get install --no-install-recommends -y \
golang-go \
binutils \
binutils-x86-64-linux-gnu \
cpp \
g++ \
gcc \
golang-go \
golang-src \
libgcc-12-dev \
libstdc++-12-dev \
rpcsvc-proto && \
apt-get install -y \
build-essential \
libncurses5-dev && \
apt-get -y autoremove && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
mkdir -p /buildroot /app && \
addgroup ${DOCKER_USER} && adduser ${DOCKER_USER} --ingroup ${DOCKER_USER} && \
echo 'export PATH=${PATH}:/buildroot/output/host/bin' >> /etc/bash.bashrc && \
echo "PS1='"'${debian_chroot:+($debian_chroot)}\u@${DEVICE_CONFIG}:\w\$ '"'" >> /etc/bash.bashrc && \
echo "source /etc/target.env" >> /etc/bash.bashrc && \
chown ${DOCKER_USER}:${DOCKER_USER} /buildroot && \
chown ${DOCKER_USER}:${DOCKER_USER} /app

USER $DOCKER_USER

RUN curl https://buildroot.org/downloads/buildroot-${BUILDROOT_VERSION}.tar.xz | \
tar -C /buildroot -xvJ --strip-components=1 && \
cp /etc/buildroot.config /buildroot/.config && \
nokia_toolchain

WORKDIR /buildroot
ENTRYPOINT ["/bin/bash"]
CMD ["/usr/bin/nokia_toolchain", "build_app"]
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: Corteca Toolchain v23.12.1
---

## Repo layout

```text
├── context -> Toolchain image context (files to be included in the images)
│   ├── config -> Buildroot configuration files for each toolchain
│   ├── environments -> Environment variables for each toolchain
│   └── scripts
│   └── nokia_toolchain.sh -> Script for invoking toolchain actions inside the container
├── images -> Image resources for this file
├── Dockerfile -> Toolchain image Dockerfile
└── README.md -> this file
```

## Introduction

This guide contains step-by-step instructions on how to generate a containerized application package for the Corteca ecosystem.

## Prerequisites

In order to be able to build your application you need to create a directory structure to hold the source code and all the other files that are need for the container package creation.

### Docker

The toolchains for compiling and building the containers require docker or a compatible container engine. This document assumes that you use docker. Make sure you have docker installed.

```bash
docker --version
```

If this fails, please follow the installation procedure for your OS.

### Corteca Toolchains

You need to have the Corteca Toolchain images. This are published in Docker Hub.

```shell
docker pull nokia/corteca-toolchain-arv7:23.12.1
docker pull nokia/corteca-toolchain-arv8:23.12.1
```

### Containerized Application Workflow

![Workflow](images/workflow.png)
Loading

0 comments on commit 60e7cef

Please sign in to comment.