test
This commit is contained in:
35
Dockerfile
35
Dockerfile
@@ -1,31 +1,16 @@
|
|||||||
FROM ubuntu:20.04
|
FROM alpine:3.15
|
||||||
LABEL maintainer="Ben V. Brown <ralim@ralimtek.com>"
|
LABEL maintainer="Ben V. Brown <ralim@ralimtek.com>"
|
||||||
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
# Add extra mirrors for options
|
# Installing the two compilers, python3, python3 pip, clang format
|
||||||
RUN echo "deb mirror://mirrors.ubuntu.com/mirrors.txt focal main restricted universe multiverse" > /etc/apt/sources.list && \
|
# Compilders ->gcc-* newlib-*
|
||||||
echo "deb mirror://mirrors.ubuntu.com/mirrors.txt focal-updates main restricted universe multiverse" >> /etc/apt/sources.list && \
|
# Python3 -> py*
|
||||||
echo "deb mirror://mirrors.ubuntu.com/mirrors.txt focal-security main restricted universe multiverse" >> /etc/apt/sources.list && \
|
# Misc -> findutils make git clang (for clang-format)
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y ca-certificates
|
RUN apk add --no-cache gcc-riscv-none-elf gcc-arm-none-eabi python3 py3-pip make git clang newlib-riscv-none-elf newlib-arm-none-eabi findutils
|
||||||
# Install dependencies to build the firmware
|
|
||||||
RUN apt-get install -y \
|
# Install Python3 packages
|
||||||
make \
|
|
||||||
bzip2 \
|
RUN python3 -m pip install bdflib black
|
||||||
git \
|
|
||||||
python3 \
|
|
||||||
python3-pip \
|
|
||||||
clang-format \
|
|
||||||
dfu-util \
|
|
||||||
wget --no-install-recommends && \
|
|
||||||
apt-get clean
|
|
||||||
RUN python3 -m pip install bdflib
|
|
||||||
# Download the two compilers
|
|
||||||
RUN wget -qO- "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2" | tar -xj
|
|
||||||
# This is the same as the one from Nuclei, just mirrored on Github as their download server is horrifically slow
|
|
||||||
RUN wget -qO- "https://github.com/Ralim/nuclei-compiler/releases/download/2020.08/nuclei_riscv_newlibc_prebuilt_linux64_2020.08.tar.bz2" | tar -xj
|
|
||||||
|
|
||||||
# Add compiler to the path
|
|
||||||
ENV PATH "/build/gcc-arm-none-eabi-10-2020-q4-major/bin:$PATH"
|
|
||||||
ENV PATH "/build/gcc/bin/:$PATH"
|
|
||||||
COPY . /build/source
|
COPY . /build/source
|
||||||
COPY ./ci /build/ci
|
COPY ./ci /build/ci
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ services:
|
|||||||
tty: true
|
tty: true
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
command: /bin/bash
|
command: /bin/sh
|
||||||
volumes:
|
volumes:
|
||||||
- ./ci:/build/ci:Z
|
- ./ci:/build/ci:Z
|
||||||
- ./:/build/source:Z
|
- ./:/build/source:Z
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ CPUFLAGS= -march=rv32imac \
|
|||||||
-mcmodel=medany -fsigned-char -fno-builtin -fsingle-precision-constant \
|
-mcmodel=medany -fsigned-char -fno-builtin -fsingle-precision-constant \
|
||||||
-DRTOS_FREERTOS -DDOWNLOAD_MODE=DOWNLOAD_MODE_FLASHXIP
|
-DRTOS_FREERTOS -DDOWNLOAD_MODE=DOWNLOAD_MODE_FLASHXIP
|
||||||
|
|
||||||
DEV_LDFLAGS= -lstdc++ -nostartfiles -Xlinker --gc-sections --specs=nosys.specs -u _isatty -u _write -u _sbrk -u _read -u _close -u _fstat -u _lseek
|
DEV_LDFLAGS= -lstdc++ -nostartfiles -Xlinker --gc-sections -u _isatty -u _write -u _sbrk -u _read -u _close -u _fstat -u _lseek
|
||||||
DEV_AFLAGS= -nostartfiles -ffreestanding -fno-common -Os -flto
|
DEV_AFLAGS= -nostartfiles -ffreestanding -fno-common -Os -flto
|
||||||
DEV_GLOBAL_DEFS=
|
DEV_GLOBAL_DEFS=
|
||||||
DEV_CFLAGS= -MMD -MP -MF "$(@:%.o=%.d)" -MT "$@"
|
DEV_CFLAGS= -MMD -MP -MF "$(@:%.o=%.d)" -MT "$@"
|
||||||
@@ -221,7 +221,7 @@ ifeq ($(model),$(filter $(model),$(ALL_MINIWARE_MODELS) $(ALL_MHP30_MODELS)))
|
|||||||
COMPILER_PREFIX=arm-none-eabi
|
COMPILER_PREFIX=arm-none-eabi
|
||||||
endif
|
endif
|
||||||
ifeq ($(model),$(ALL_PINE_MODELS))
|
ifeq ($(model),$(ALL_PINE_MODELS))
|
||||||
COMPILER_PREFIX=riscv-nuclei-elf
|
COMPILER_PREFIX=riscv-none-elf
|
||||||
endif
|
endif
|
||||||
# programs ---------------------------------------------------------------------
|
# programs ---------------------------------------------------------------------
|
||||||
CC=$(COMPILER_PREFIX)-gcc
|
CC=$(COMPILER_PREFIX)-gcc
|
||||||
|
|||||||
Reference in New Issue
Block a user