Last active
August 29, 2015 14:12
-
-
Save takahashim/fb639b2644b8317daa70 to your computer and use it in GitHub Desktop.
Dockerfile for 『BareMetalで遊ぶ Raspberry Pi』 http://tatsu-zine.com/books/raspi-bm
This file contains 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:wheezy | |
MAINTAINER takahashim | |
# mirror | |
RUN echo "deb http://cdn.debian.net/debian/ wheezy main contrib non-free" > /etc/apt/sources.list.d/mirror.jp.list | |
RUN echo "deb http://cdn.debian.net/debian/ wheezy-updates main contrib" >> /etc/apt/sources.list.d/mirror.jp.list | |
RUN /bin/rm /etc/apt/sources.list | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get update | |
# set locale | |
RUN apt-get install -y --no-install-recommends apt-utils locales | |
RUN echo en_US.UTF-8 UTF-8 > /etc/locale.gen | |
RUN locale-gen | |
RUN update-locale LANG=en_US.UTF-8 | |
# apt package | |
RUN apt-get install -y --no-install-recommends git ca-certificates openssl | |
RUN apt-get install -y --no-install-recommends \ | |
build-essential vim emacs git \ | |
mercurial python3 python2.7 python-dev libzip-dev \ | |
automake libncurses5-dev gperf bison flex gawk \ | |
libtool libexpat-dev expat | |
RUN apt-get install -y --no-install-recommends wget texinfo adduser | |
# clean up | |
RUN apt-get upgrade -y && apt-get clean && rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/* | |
# create user ctng | |
RUN adduser ctng | |
USER ctng | |
# install crosstool-ng | |
RUN mkdir -p /home/ctng/cross/rpi | |
RUN mkdir -p /home/ctng/cross/src | |
WORKDIR /home/ctng/cross/src | |
RUN wget -O - http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.19.0.tar.bz2 | tar jxvf - | |
RUN cd crosstool-ng-1.19.0 && ./configure --prefix=/home/ctng/cross && make && make install | |
# build | |
RUN mkdir -p /home/ctng/cross/src/ct-ng_rpi | |
WORKDIR /home/ctng/cross/src/ct-ng_rpi | |
RUN wget -O - https://raw.githubusercontent.com/jitomesky/RPi_Micon_C85book/master/crosstool-ng/dot_sf_config > ".config" | |
RUN /home/ctng/cross/bin/ct-ng build | |
RUN echo 'export PATH=$PATH:~/cross/rpi/arm-unknown-eabi/bin' >> ~/.bashrc | |
RUN git clone https://github.com/jitomesky/RPi_Micon_C85book.git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment