toaruos/build.sh

40 lines
1.5 KiB
Bash
Raw Normal View History

2012-08-16 04:47:34 +04:00
#!/bin/bash
2013-04-21 02:02:48 +04:00
if [ -f /etc/debian_version ]; then
2013-06-07 08:59:20 +04:00
sudo apt-get install yasm genext2fs build-essential wget libmpfr-dev libmpc-dev libgmp3-dev qemu autoconf automake texinfo pkg-config
2012-08-16 08:56:53 +04:00
elif [ -f /etc/fedora-release ]; then
sudo yum groupinstall 'Development Tools'
sudo yum groupinstall 'Development Libraries'
2013-06-07 08:59:20 +04:00
sudo yum install yasm mpfr-devel libmpc-devel gmp-devel
2012-08-16 08:56:53 +04:00
echo "Warning: Fedora is unsupported in this script. Be careful!"
echo "For best results, follow the steps in the script manually."
2013-04-21 02:02:48 +04:00
echo "(Script will continue in 5 seconds)"
sleep 5
else
echo "You are on an entirely unsupported system, please ensure you have the following packages:"
echo " - essential development packages for your platform (C headers, etc.)"
echo " - development headers for mpfr, mpc, and gmp"
echo " - clang / LLVM"
echo " - YASM"
echo " - genext2fs"
echo " - autoconf/automake"
echo " - wget"
echo " - qemu"
echo " - texinfo"
echo " - pkg-config"
echo "(If you are on Arch, install: clang yasm genext2fs base-devel wget mpfr mpc gmp qemu autoconf automake texinfo pkg-config)"
echo ""
echo "... then comment out the 'exit' below this block of echos in 'build.sh'."
exit 1
2012-08-16 08:56:53 +04:00
fi
2012-08-16 04:47:34 +04:00
# Build the toolchain:
unset PKG_CONFIG_LIBDIR
2012-08-16 04:47:34 +04:00
pushd toolchain
./prepare.sh
./install.sh
. activate.sh
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...