2012-08-16 04:47:34 +04:00
|
|
|
#!/bin/bash
|
|
|
|
|
2012-08-16 08:56:53 +04:00
|
|
|
if [ -f /etc/lsb-release ]; then
|
|
|
|
sudo apt-get install clang yasm genext2fs build-essential wget libmpfr-dev libmpc-dev libgmp-dev qemu autoconf automake texinfo
|
|
|
|
elif [ -f /etc/fedora-release ]; then
|
|
|
|
sudo yum groupinstall 'Development Tools'
|
|
|
|
sudo yum groupinstall 'Development Libraries'
|
|
|
|
sudo yum install clang yasm mpfr-devel libmpc-devel gmp-devel
|
|
|
|
echo "Warning: Fedora is unsupported in this script. Be careful!"
|
|
|
|
echo "For best results, follow the steps in the script manually."
|
|
|
|
fi
|
2012-08-16 04:47:34 +04:00
|
|
|
# Build the toolchain:
|
|
|
|
pushd toolchain
|
|
|
|
./prepare.sh
|
|
|
|
./install.sh
|
|
|
|
. activate.sh
|
|
|
|
popd
|
|
|
|
# Build the userspace tools:
|
|
|
|
pushd userspace
|
|
|
|
make
|
|
|
|
popd
|
|
|
|
# Build the kernel
|
|
|
|
make system # to build the kernel
|
2012-08-29 02:33:36 +04:00
|
|
|
# XXX: Attempt to boot the kernel with qemu automatically...
|