-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
95 lines (87 loc) · 3.1 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
FROM ubuntu
LABEL version="1.0"
LABEL description="JOS"
RUN mkdir /root/work
WORKDIR /root/work
RUN apt-get -y update &&\
apt-get -y install curl\
build-essential\
gdb\
gcc-multilib\
m4\
m4-doc\
libncurses5-dev\
git\
python\
pkg-config\
libpixman-1-dev\
zlib1g-dev\
libglib2.0-dev\
libtool-bin\
libsdl1.2-dev
#make gmp
ARG GMP_VERSION="5.0.5"
RUN curl -SL ftp://ftp.gmplib.org/pub/gmp-${GMP_VERSION}/gmp-${GMP_VERSION}.tar.bz2 | tar xj -C ./
RUN cd ./gmp-${GMP_VERSION} &&\
./configure --prefix=/usr/local &&\
make -s -j8 &&\
make check -s -j8 &&\
make install &&\
rm -rf ../gmp-${GMP_VERSION} &&\
ldconfig
#make mpfr
ARG MPFR_VIRSION="3.1.3"
RUN curl -SL http://www.mpfr.org/mpfr-${MPFR_VIRSION}/mpfr-${MPFR_VIRSION}.tar.bz2 | tar xj -C ./
RUN cd ./mpfr-${MPFR_VIRSION} &&\
./configure --prefix=/usr/local &&\
make -s -j8 &&\
make check -s -j8 &&\
make install &&\
rm -rf ../mpfr-${MPFR_VIRSION} &&\
ldconfig
#make mpc
ARG MPC_VIRSION="0.9"
RUN curl -SL http://www.multiprecision.org/downloads/mpc-${MPC_VIRSION}.tar.gz | tar zx -C ./
RUN cd ./mpc-${MPC_VIRSION} &&\
./configure -target=i386-jos-elf --disable-nls --prefix=/usr/local &&\
make -s -j8 &&\
make check -s -j8 &&\
make install &&\
rm -rf ../mpc-${MPC_VIRSION} &&\
ldconfig
#make binutils
ARG BINUTILS_VERSION="2.21.1"
RUN curl -SL https://ftp.gnu.org/gnu/binutils/binutils-${BINUTILS_VERSION}.tar.bz2 | tar xj -C ./
RUN cd ./binutils-${BINUTILS_VERSION} &&\
./configure --prefix=/usr/local --target=i386-jos-elf --disable-werror &&\
make -s -j8 &&\
make install &&\
rm -rf ../binutils-${BINUTILS_VERSION}
#make gcc
ARG GCC_VERSION="4.6.4"
RUN curl -SL http://ftpmirror.gnu.org/gcc/gcc-${GCC_VERSION}/gcc-core-${GCC_VERSION}.tar.bz2 | tar xj -C ./
RUN cd ./gcc-${GCC_VERSION} &&\
mkdir gcc-build &&\
cd gcc-build &&\
../configure --prefix=/usr/local --target=i386-jos-elf --disable-werror \
--disable-libssp --disable-libmudflap --with-newlib --without-headers --enable-languages=c &&\
make -s -j8 all-gcc &&\
make install-gcc &&\
make -s -j8 all-target-libgcc &&\
make install-target-libgcc &&\
rm -rf ../../gcc-${GCC_VERSION}
#make gdb
ARG GDB_VERSION="7.3.1"
RUN curl -SL http://ftpmirror.gnu.org/gdb/gdb-${GDB_VERSION}.tar.bz2 | tar xj -C ./
RUN cd ./gdb-${GDB_VERSION} &&\
./configure --prefix=/usr/local --target=i386-jos-elf --program-prefix=i386-jos-elf- --disable-werror &&\
make -s -j8 all &&\
make install &&\
rm -rf ../gdb-${GDB_VERSION}
#make qemu
RUN git clone http://web.mit.edu/ccutler/www/qemu.git -b 6.828-2.3.0
RUN cd qemu &&\
./configure --disable-kvm --disable-werror --target-list="i386-softmmu x86_64-softmmu" &&\
make &&\
make install &&\
rm -rf qemu