Skip to content

Commit 60e7cef

Browse files
authored
Merge pull request #1 from nokia/v23.12.1
add corteca toolchain v23.12.1
2 parents 3e69c51 + 8bcbc67 commit 60e7cef

File tree

9 files changed

+7789
-0
lines changed

9 files changed

+7789
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.vscode/

Dockerfile

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Copyright 2024 Nokia
2+
# Licensed under the BSD 3-Clause License.
3+
# SPDX-License-Identifier: BSD-3-Clause
4+
5+
FROM debian:bookworm-slim
6+
LABEL maintainer="Nokia"
7+
8+
ARG BUILDROOT_VERSION=2023.02.1
9+
ARG PARALLEL_PROCS=4
10+
ARG DEVICE_CONFIG
11+
ARG REBUILD_BUILDROOT=yes
12+
ARG DOCKER_USER=user
13+
14+
ENV DEBIAN_FRONTEND=noninteractive
15+
ENV BUILDROOT_VERSION=${BUILDROOT_VERSION}
16+
ENV PARALLEL_PROCS=${PARALLEL_PROCS}
17+
ENV DEVICE_CONFIG=${DEVICE_CONFIG}
18+
ENV PATH="${PATH}:/buildroot/output/host/bin"
19+
20+
COPY --chmod=0755 scripts/nokia_toolchain.sh /usr/bin/nokia_toolchain
21+
COPY --chmod=0755 config/${DEVICE_CONFIG}.config /etc/buildroot.config
22+
COPY --chmod=0644 environments/${DEVICE_CONFIG}.env /etc/target.env
23+
24+
RUN apt-get update && \
25+
apt-get upgrade -y && \
26+
apt-get install -y \
27+
bc \
28+
ca-certificates \
29+
cpio \
30+
curl \
31+
file \
32+
gcc-aarch64-linux-gnu \
33+
gcc-arm-linux-gnueabi \
34+
git \
35+
jq \
36+
rsync \
37+
xz-utils \
38+
wget \
39+
unzip \
40+
dirmngr \
41+
fakeroot \
42+
less \
43+
pkg-config \
44+
pkgconf && \
45+
apt-get install --no-install-recommends -y \
46+
golang-go \
47+
binutils \
48+
binutils-x86-64-linux-gnu \
49+
cpp \
50+
g++ \
51+
gcc \
52+
golang-go \
53+
golang-src \
54+
libgcc-12-dev \
55+
libstdc++-12-dev \
56+
rpcsvc-proto && \
57+
apt-get install -y \
58+
build-essential \
59+
libncurses5-dev && \
60+
apt-get -y autoremove && \
61+
apt-get clean && \
62+
rm -rf /var/lib/apt/lists/* && \
63+
mkdir -p /buildroot /app && \
64+
addgroup ${DOCKER_USER} && adduser ${DOCKER_USER} --ingroup ${DOCKER_USER} && \
65+
echo 'export PATH=${PATH}:/buildroot/output/host/bin' >> /etc/bash.bashrc && \
66+
echo "PS1='"'${debian_chroot:+($debian_chroot)}\u@${DEVICE_CONFIG}:\w\$ '"'" >> /etc/bash.bashrc && \
67+
echo "source /etc/target.env" >> /etc/bash.bashrc && \
68+
chown ${DOCKER_USER}:${DOCKER_USER} /buildroot && \
69+
chown ${DOCKER_USER}:${DOCKER_USER} /app
70+
71+
USER $DOCKER_USER
72+
73+
RUN curl https://buildroot.org/downloads/buildroot-${BUILDROOT_VERSION}.tar.xz | \
74+
tar -C /buildroot -xvJ --strip-components=1 && \
75+
cp /etc/buildroot.config /buildroot/.config && \
76+
nokia_toolchain
77+
78+
WORKDIR /buildroot
79+
ENTRYPOINT ["/bin/bash"]
80+
CMD ["/usr/bin/nokia_toolchain", "build_app"]

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: Corteca Toolchain v23.12.1
3+
---
4+
5+
## Repo layout
6+
7+
```text
8+
├── context -> Toolchain image context (files to be included in the images)
9+
│   ├── config -> Buildroot configuration files for each toolchain
10+
│   ├── environments -> Environment variables for each toolchain
11+
│   └── scripts
12+
│   └── nokia_toolchain.sh -> Script for invoking toolchain actions inside the container
13+
├── images -> Image resources for this file
14+
├── Dockerfile -> Toolchain image Dockerfile
15+
└── README.md -> this file
16+
```
17+
18+
## Introduction
19+
20+
This guide contains step-by-step instructions on how to generate a containerized application package for the Corteca ecosystem.
21+
22+
## Prerequisites
23+
24+
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.
25+
26+
### Docker
27+
28+
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.
29+
30+
```bash
31+
docker --version
32+
```
33+
34+
If this fails, please follow the installation procedure for your OS.
35+
36+
### Corteca Toolchains
37+
38+
You need to have the Corteca Toolchain images. This are published in Docker Hub.
39+
40+
```shell
41+
docker pull nokia/corteca-toolchain-arv7:23.12.1
42+
docker pull nokia/corteca-toolchain-arv8:23.12.1
43+
```
44+
45+
### Containerized Application Workflow
46+
47+
![Workflow](images/workflow.png)

0 commit comments

Comments
 (0)