Last active
June 25, 2018 08:20
-
-
Save chertov/506fcc4eb31ebb355d2837fb525d93ea to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:stretch | |
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get -y install \ | |
build-essential gawk git ncurses-dev python gcc-arm-linux-gnueabi u-boot-tools \ | |
subversion unzip zlib1g-dev libssl-dev wget cpio bc time | |
WORKDIR /src/ | |
RUN wget https://mirrors.edge.kernel.org/pub/linux/kernel/v3.x/linux-3.0.8.tar.xz \ | |
&& wget https://mirrors.edge.kernel.org/pub/linux/kernel/v3.x/linux-3.18.20.tar.xz \ | |
&& wget https://mirrors.edge.kernel.org/pub/linux/kernel/v3.x/linux-3.4.35.tar.xz | |
RUN mkdir -p linux-3.0.y \ | |
&& tar -xf linux-3.0.8.tar.xz -C ./linux-3.0.y --strip-components=1 \ | |
\ | |
&& mkdir -p linux-3.18.y \ | |
&& tar -xf linux-3.18.20.tar.xz -C ./linux-3.18.y --strip-components=1 \ | |
\ | |
&& mkdir -p linux-3.4.y \ | |
&& tar -xf linux-3.4.35.tar.xz -C ./linux-3.4.y --strip-components=1 \ | |
\ | |
&& rm linux-*.tar.xz | |
COPY ./ ./ | |
RUN for i in ./zft_patches/patches-3.4.35/*.patch; do patch -s -p0 < $i; done | |
WORKDIR /src/linux-3.4.y/ | |
RUN cp arch/arm/configs/hi3518ev200_full_defconfig .config | |
RUN make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- oldconfig | |
RUN make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -j7 uImage modules dtbs | |
RUN ls ./arch/arm/boot/ | |
RUN echo "#!/bin/bash\n \ | |
set -e\n \ | |
rm -rf /output/*\n \ | |
cp arch/arm/boot/uImage /output\n \ | |
" >> copy.sh && chmod 777 copy.sh | |
ENTRYPOINT ["./copy.sh"] | |
CMD [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment