Skip to content

Instantly share code, notes, and snippets.

@klavs
Created June 19, 2013 21:42
Show Gist options
  • Save klavs/5818384 to your computer and use it in GitHub Desktop.
Save klavs/5818384 to your computer and use it in GitHub Desktop.
#!/bin/sh
echo "Cloning git repositories"
git clone https://github.com/ReturnInfinity/BMFS.git
git clone https://github.com/ReturnInfinity/Pure64.git
git clone https://github.com/ReturnInfinity/BareMetal-OS.git
echo "Copying sources into build directory"
mkdir build
cd build
cp -r ../BareMetal-OS ./
cp -r ../BMFS ./
cp -r ../Pure64 ./
mkdir target
echo "Building Pure64"
cd Pure64
./build.sh
mv bmfs_mbr.sys ../target/
mv pxestart.sys ../target/
mv pure64.sys ../target/
cd ..
echo "Building BMFS"
cd BMFS
make
mv bmfs ../target/
cd ..
echo "Building BareMetal-OS"
cd BareMetal-OS
./build.sh
mv kernel64.sys ../target/
cd ..
echo "Creating bmfs image"
cd target
dd if=/dev/zero of=bmfs.image bs=1M count=128
./bmfs bmfs.image format
cp ../BareMetal-OS/install.sh ./
echo "Installing BareMetal OS into BMFS image"
./install.sh bmfs.image
echo "Convering image to vmdk"
qemu-img convert -O vmdk bmfs.image baremetal_os.vmdk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment