Some commenting and cleanup
This commit is contained in:
parent
64af272ef1
commit
bbd88e8567
@ -1,19 +1,27 @@
|
|||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
# Tools and libraries required to build binutils and gcc
|
||||||
apk --update add build-base
|
apk --update add build-base
|
||||||
apk add gmp-dev mpfr-dev mpc1-dev
|
apk add gmp-dev mpfr-dev mpc1-dev
|
||||||
|
|
||||||
|
# For making a bootable iso
|
||||||
apk add grub-bios xorriso
|
apk add grub-bios xorriso
|
||||||
|
# For debugging
|
||||||
apk add gdb valgrind
|
apk add gdb valgrind
|
||||||
|
# We need a later version of qemu than included in the default repo
|
||||||
|
# due to a bug in the qemu gdb server
|
||||||
apk --update add qemu-system-x86_64 --repository http://dl-cdn.alpinelinux.org/alpine/v3.7/main
|
apk --update add qemu-system-x86_64 --repository http://dl-cdn.alpinelinux.org/alpine/v3.7/main
|
||||||
|
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
|
# For now we'll use the default x86_64-elf target
|
||||||
target=x86_64-elf
|
target=x86_64-elf
|
||||||
binutils=binutils-2.29
|
binutils=binutils-2.29
|
||||||
gcc=gcc-7.2.0
|
gcc=gcc-7.2.0
|
||||||
|
|
||||||
|
|
||||||
|
# Configure, make and install binutils
|
||||||
|
# configured for our target
|
||||||
cd /opt
|
cd /opt
|
||||||
wget http://ftp.gnu.org/gnu/binutils/${binutils}.tar.gz
|
wget http://ftp.gnu.org/gnu/binutils/${binutils}.tar.gz
|
||||||
tar -xf ${binutils}.tar.gz
|
tar -xf ${binutils}.tar.gz
|
||||||
@ -27,6 +35,7 @@ mkdir binutils-build && cd binutils-build
|
|||||||
make -j 4
|
make -j 4
|
||||||
make install
|
make install
|
||||||
|
|
||||||
|
# Configure, make and install gcc and libgcc
|
||||||
cd /opt
|
cd /opt
|
||||||
wget http://ftp.gnu.org/gnu/gcc/${gcc}/${gcc}.tar.gz
|
wget http://ftp.gnu.org/gnu/gcc/${gcc}/${gcc}.tar.gz
|
||||||
tar -xf ${gcc}.tar.gz
|
tar -xf ${gcc}.tar.gz
|
||||||
@ -41,4 +50,5 @@ make all-gcc all-target-libgcc -j 4
|
|||||||
make install-gcc install-target-libgcc
|
make install-gcc install-target-libgcc
|
||||||
|
|
||||||
cd /
|
cd /
|
||||||
|
# Remove apk cache
|
||||||
rm -rf /opt
|
rm -rf /opt
|
||||||
|
@ -6,4 +6,4 @@ iso=${BUILDROOT}mittos64.iso
|
|||||||
|
|
||||||
${BUILDROOT}toolchain/mkiso
|
${BUILDROOT}toolchain/mkiso
|
||||||
|
|
||||||
qemu-system-x86_64 -s -S -cdrom ${iso} -curses
|
qemu-system-x86_64 -s -S -cdrom ${iso} $@
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
if [ -z ${MITTOS64+x} ]; then >&2 echo "Unsupported environment! See README"; exit 1; fi
|
if [ -z ${MITTOS64+x} ]; then >&2 echo "Unsupported environment! See README"; exit 1; fi
|
||||||
|
|
||||||
/usr/bin/gdb -q -x ${BUILDROOT}toolchain/gdbinit -se ${BUILDROOT}sysroot/kernel
|
/usr/bin/gdb -q -x ${BUILDROOT}toolchain/gdbinit -se ${BUILDROOT}sysroot/kernel $@
|
||||||
|
Loading…
x
Reference in New Issue
Block a user