mirror of
https://github.com/subhobhai943/SUB-OS.git
synced 2026-10-26 00:52:50 +00:00
Initial commit: SUB-OS 64-Bit Production Monolithic Operating System with LazyBox userland suite
This commit is contained in:
commit
cd9c786d14
88 files changed
+7132
No files matched your search
Executable
+40
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Setting up SUB-OS build environment..."
|
||||
|
||||
if [ -f /etc/os-release ]; then
|
||||
. /etc/os-release
|
||||
OS=$ID
|
||||
else
|
||||
echo "Cannot detect OS. Please manually install dependencies."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $OS in
|
||||
ubuntu|debian)
|
||||
echo "Detected Debian/Ubuntu-based OS."
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y nasm gcc binutils make qemu-system-x86
|
||||
;;
|
||||
fedora)
|
||||
echo "Detected Fedora."
|
||||
sudo dnf install -y nasm gcc binutils make qemu-system-x86
|
||||
;;
|
||||
arch)
|
||||
echo "Detected Arch Linux."
|
||||
sudo pacman -Sy --noconfirm nasm gcc binutils make qemu-system-x86
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported OS: $OS. Please install: nasm, gcc, binutils, make, qemu-system-x86."
|
||||
;;
|
||||
esac
|
||||
|
||||
if ! command -v x86_64-elf-gcc &> /dev/null; then
|
||||
echo ""
|
||||
echo "WARNING: x86_64-elf-gcc (cross-compiler) not found in PATH."
|
||||
echo "The Makefile will fallback to the default gcc."
|
||||
echo "For the best results, it is highly recommended to build an x86_64-elf GCC cross-compiler."
|
||||
echo "Instructions to build a cross-compiler: https://wiki.osdev.org/GCC_Cross-Compiler"
|
||||
fi
|
||||
|
||||
echo "Setup script finished!"
|
||||
Reference in new issue
Block a user