-
Notifications
You must be signed in to change notification settings - Fork 113
/
Dockerfile-musl
33 lines (29 loc) · 1.37 KB
/
Dockerfile-musl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM ubuntu:22.04
LABEL description="Build environment for Miyoo Custom Firmware"
COPY arm-miyoo-linux-musleabi_sdk-buildroot /opt/miyoo
# set up some env properties (these are based on Arcnor's image)
ENV CROSS_ROOT=/opt/miyoo
ENV CROSS_TRIPLE=arm-miyoo-linux-musleabi
ENV SYSROOT="${CROSS_ROOT}/${CROSS_TRIPLE}/sysroot"
ENV PATH="${PATH}:${CROSS_ROOT}/bin:${SYSROOT}/usr/bin"
ENV ARCH=arm
ENV CROSS_COMPILE="${CROSS_TRIPLE}-"
# install build dependencies
# first two lines are needed just to build the toolchain
# dosfstools & u-boot-tools are for mainboot generation scripts
# python-dev & swig are needed to build uboot
# finally, run some cleanup
# todo: 1) slim these down since we're not running buildroot in this image anymore
# todo: 2) consider splitting into a "slim" image with only the toolchain (and maybe git?) and a "full" image with more dev tools
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y libncurses-dev file make cmake gcc g++ \
file wget cpio zip unzip bzip2 rsync bc git \
dosfstools u-boot-tools \
python3-dev python3-pip swig \
vim-tiny && \
apt-get -y autoremove && apt-get -y clean && \
python3 -m pip install meson ninja && \
python3 -m pip cache purge
RUN cd /opt/miyoo && ./relocate-sdk.sh
# add safe directory to prevent dubious ownership error
RUN git config --system safe.directory '/__w/MiyooCFW/MiyooCFW'