diff --git a/docs/BUILD.md b/docs/BUILD.md index 1e1afd3..b17f77c 100644 --- a/docs/BUILD.md +++ b/docs/BUILD.md @@ -13,7 +13,7 @@ sudo apt install unzip ## Ubuntu 18.04+ ```bash -sudo apt install clang-format python3 git qemu-system-x86 qemu-system-gui gdisk dos2unix xorriso libc6 gcc make curl +sudo apt install clang-format python3 git qemu-system-x86 qemu-system-gui gdisk dos2unix xorriso libc6 gcc make curl mtools git clone https://git.synapseos.ru/Aren/BMOSP.git cd BMOSP/ chmod +x build.sh @@ -26,23 +26,12 @@ chmod +x build.sh В qemu недоступен флаг `-cpu max`, просто уберите его при запуске ```bash -sudo apt install clang-format python3.7 git qemu-system-x86 gdisk dos2unix xorriso libc6 gcc make curl +sudo apt install clang-format python3.7 git qemu-system-x86 gdisk dos2unix xorriso libc6 gcc make curl mtools git clone https://git.synapseos.ru/Aren/BMOSP.git cd BMOSP/ python3.7 pbuild.py ``` -## ArchLinux - -```bash -yay -S clang-format -sudo pacman -S python3 git qemu-system-x86 qemu-system-gui xorriso libc6 gcc make curl -git clone https://git.synapseos.ru/Aren/BMOSP.git -cd BMOSP/ -chmod +x build.sh -./build.sh -``` - ## Запуск ## Qemu diff --git a/scripts/pbuild.py b/scripts/pbuild.py index f422d1e..54c64a6 100644 --- a/scripts/pbuild.py +++ b/scripts/pbuild.py @@ -100,42 +100,6 @@ def check_limine(): subprocess.run(["make"]) os.chdir("..") - - -def check_os(): - import platform - using_distro = False - try: - import distro - using_distro = True - except ImportError: - pass - if using_distro: - linux_distro = distro.like() - else: - try: - linux_distro = platform.linux_distribution()[0] - except Exception as E: - return 1 - if linux_distro.lower() in ['debian', 'ubuntu', 'astra']: - return 1 - return 0 - -def check_tools(): - required_tools = ["gcc", "g++", "xorriso", "make", "mtools", "curl"] - missing_tools = [] - - for tool in required_tools: - if shutil.which(tool) is None: - missing_tools.append(tool) - - if len(missing_tools) > 0: - if check_os(): - subprocess.run(["sudo", "apt", "install"] + missing_tools) - return - subprocess.run(["sudo", "pacman", "-S"] + missing_tools) - - def create_hdd(IMAGE_NAME): os.system(f"rm -f {IMAGE_NAME}.hdd".format()) os.system(f"dd if=/dev/zero bs=1M count=0 seek=4 of={IMAGE_NAME}.hdd") @@ -191,10 +155,6 @@ if __name__ == "__main__": print("Установка Limine") check_limine() - print("Проверка зависимостей") - - check_tools() - major, minor, build = version_build() print("Сборка модульного ядра")