# General builder for common buildroots, kernels and dtbs
FROM ubuntu:18.04
ENV TZ=Europe/Moscow


WORKDIR /BR


RUN apt update --fix-missing
RUN apt install --reinstall -y file wget cpio python unzip rsync bc gawk
RUN apt install build-essential -y --no-install-recommends
RUN apt install --reinstall -y file bison flex libssl-dev git
RUN apt install device-tree-compiler -y
RUN apt install linux-source -y

ENV FORCE_UNSAFE_CONFIGURE=1
ENV PATCHDIR=/BR
ENV GCCPATH=/BR/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin
ENV UBOOTPATH=/BR/board-support/u-boot-2019.01+gitAUTOINC+333c3e72d3-g333c3e72d3
ENV KERNELPATH=/BR/board-support/linux-4.19.94+gitAUTOINC+be5389fd85-gbe5389fd85
ENV PATH="${GCCPATH}:${PATH}"
WORKDIR /BR