@@ -44,7 +44,9 @@ RUN apt-get -y update && \
4444 sudo \
4545 texinfo \
4646 udev \
47- wget
47+ wget \
48+ unzip
49+
4850
4951# Use ToT alsa utils for the latest topology patches.
5052RUN mkdir -p /root/alsa-build && cd /root/alsa-build && \
@@ -66,27 +68,30 @@ ENV HOME /home/sof
6668
6769# build cross compiler
6870USER sof
69-
70- RUN cd /home/sof && git clone https://github.com/01org/osadsp-crosstool-ng.git /home/sof/ct-ng.git && \
71+ RUN cd /home/sof && git clone https://github.com/thesofproject/xtensa-overlay.git && \
72+ cd xtensa-overlay && git checkout sof-gcc8.1 && cd ../ && \
73+ git clone https://github.com/thesofproject/crosstool-ng.git && \
7174 mkdir -p /home/sof/work/ && \
72- cd ct-ng.git && ./bootstrap && ./configure --prefix=`pwd` && \
73- make && make install && \
74- for arch in byt hsw bxt cnl; do \
75- ./ct-ng xtensa-${arch}-elf && \
75+ cd crosstool-ng && git checkout sof-gcc8.1 && \
76+ ./bootstrap && ./configure --prefix=`pwd` && make && make install && \
77+ for arch in byt hsw apl cnl; do \
78+ cp config-${arch}-gcc8.1-gdb8.1 .config && \
79+ # replace the build dist to save space
7680 sed -i 's#${CT_TOP_DIR}\/ builds#\/ home\/ sof\/ work#g' .config && \
77- ./ct-ng build && \
81+ # gl_cv_func_getcwd_path_max=yes is used to avoid too-long confdir3/confdir3/...
82+ gl_cv_func_getcwd_path_max=yes ./ct-ng build && \
7883 ./ct-ng distclean ; \
7984 done && \
80- cd /home/sof/ && rm -rf ct-ng.git
85+ cd /home/sof/ && rm -rf xtensa-overlay && rm -rf crosstool-ng
8186
8287ENV PATH="/home/sof/work/xtensa-byt-elf/bin:${PATH}"
8388ENV PATH="/home/sof/work/xtensa-hsw-elf/bin:${PATH}"
84- ENV PATH="/home/sof/work/xtensa-bxt -elf/bin:${PATH}"
89+ ENV PATH="/home/sof/work/xtensa-apl -elf/bin:${PATH}"
8590ENV PATH="/home/sof/work/xtensa-cnl-elf/bin:${PATH}"
8691
8792RUN cd /home/sof && git clone https://github.com/jcmvbkbc/newlib-xtensa.git newlib-xtensa.git && \
8893 cd newlib-xtensa.git && git checkout -b xtensa origin/xtensa && \
89- for arch in byt hsw bxt cnl; do \
94+ for arch in byt hsw apl cnl; do \
9095 ./configure --target=xtensa-${arch}-elf \
9196 --prefix=/home/sof/work/xtensa-root && \
9297 make && \
0 commit comments