forked from AgricoZA/ghactions-mplabx-old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
59 lines (51 loc) · 2.75 KB
/
Dockerfile
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
FROM ubuntu:bionic
#Latest ubuntu with i386 supported
ENV XC32VER v2.41
ENV MPLABXVER v6.00
ENV DFP PIC32MX_DFP
ENV DFP_VER 1.5.259
RUN apt-get update && \
apt-get install -y --no-install-recommends apt-utils && \
dpkg --add-architecture i386 \
&& apt-get update -yq \
&& apt-get install -yq --no-install-recommends ca-certificates wget unzip libc6:i386 git \
libx11-6:i386 libxext6:i386 libstdc++6:i386 libexpat1:i386 \
libxext6 libxrender1 libxtst6 libgtk2.0-0 make \
&& rm -rf /var/lib/apt/lists/*
# Install MPLAB ${MPLABXVER}, discarding all device support packs
RUN wget https://ww1.microchip.com/downloads/en/DeviceDoc/MPLABX-${MPLABXVER}-linux-installer.tar -q --show-progress --progress=bar:force:noscroll -O MPLABX-${MPLABXVER}-linux-installer.tar \
&& tar xf MPLABX-${MPLABXVER}-linux-installer.tar && rm -f MPLABX-${MPLABXVER}-linux-installer.tar \
&& USER=root ./*-installer.sh --nox11 \
-- --unattendedmodeui none --mode unattended \
&& rm -f MPLABX-${MPLABXVER}-linux-installer.sh && \
#Remove Packs that are not relevant to current changes
cd /opt/microchip/mplabx/${MPLABXVER}/ && \
rm -rf docs && \
rm Uninstall_MPLAB_X_IDE_${MPLABXVER} && \
rm Uninstall_MPLAB_X_IDE_${MPLABXVER}.desktop && \
rm -f Uninstall_MPLAB_X_IDE_*.dat && \
cd mplab_platform && rm -rf mplab_ipe && \
cd ../packs && rm -rf arm && \
rm -rf Microchip && \
mkdir Microchip
# Download the exact DFP we want
RUN wget https://packs.download.microchip.com/Microchip.${DFP}.${DFP_VER}.atpack \
&& mkdir -p /opt/microchip/mplabx/${MPLABXVER}/packs/Microchip/${DFP}/ \
&& USER=root unzip -o Microchip.${DFP}.${DFP_VER}.atpack -d /opt/microchip/mplabx/${MPLABXVER}/packs/Microchip/${DFP}/${DFP_VER} \
&& rm Microchip.${DFP}.${DFP_VER}.atpack
# Install XC32 ${XC32VER}
RUN wget https://ww1.microchip.com/downloads/en/DeviceDoc/xc32-${XC32VER}-full-install-linux-installer.run -q --show-progress --progress=bar:force:noscroll -O xc32-${XC32VER}-full-install-linux-installer.run\
&& chmod a+x xc32-${XC32VER}-full-install-linux-installer.run \
&& ./xc32-${XC32VER}-full-install-linux-installer.run \
--mode unattended --unattendedmodeui none \
--netservername localhost \
&& rm -f xc32-${XC32VER}-full-install-linux-installer.run && \
wget -nv -O /tmp/pic32Plib "https://ww1.microchip.com/downloads/en//softwarelibrary/pic32%20peripheral%20library/pic32%20legacy%20peripheral%20libraries%20linux%20(2).tar" && \
cd /tmp && \
tar -xf pic32Plib && \
./'PIC32 Legacy Peripheral Libraries.run' --unattendedmodeui none --mode unattended --prefix /opt/microchip/xc32/${XC32VER} && \
rm pic32Plib
ENV PATH $PATH:/opt/microchip/xc32/${XC32VER}/bin
ENV PATH $PATH:/opt/microchip/mplabx/${MPLABXVER}/mplab_platform/bin
COPY build.sh /build.sh
ENTRYPOINT [ "/build.sh" ]