diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml new file mode 100644 index 00000000..d25fed65 --- /dev/null +++ b/.github/workflows/build-docker.yml @@ -0,0 +1,23 @@ +name: Build Docker Image + +on: + push: + branches: [ master ] # можно заменить на нужные ветки + pull_request: + branches: [ master ] # опционально + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Change to build directory and build Docker image + run: | + cd build + docker build -t neptune-builder . + + - name: Optional - Show built images + run: docker images | grep neptune-builder diff --git a/build.sh b/build.sh index ec048388..33ceb346 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,7 @@ +#!/bin/bash + # Default architecture and build type + ARCH=i386 DEFAULT_PLATFORM=pc99 BUILD_TYPE=Debug diff --git a/build/Dockerfile b/build/Dockerfile new file mode 100644 index 00000000..945cf1bd --- /dev/null +++ b/build/Dockerfile @@ -0,0 +1,68 @@ +FROM ubuntu:latest + +# Аргументы сборки с значениями по умолчанию +ARG ARCH=amd64 +ARG BUILD_TYPE=release + +# Предотвращаем интерактивные запросы при установке пакетов +ENV DEBIAN_FRONTEND=noninteractive + +# Устанавливаем необходимые пакеты +RUN apt-get update && apt-get install -y \ + mingw-w64 \ + mingw-w64-tools \ + python3 \ + python3-pip \ + python3-venv \ + git \ + bash \ + cpio \ + wget \ + curl \ + # Инструменты сборки + cmake \ + ninja-build \ + build-essential \ + gcc \ + g++ \ + make \ + pkg-config \ + # LLVM/Clang (нужен для seL4) + clang \ + llvm \ + lld \ + # Дополнительные утилиты + libxml2-utils \ + && rm -rf /var/lib/apt/lists/* + +# Настройка Python +RUN ln -s /usr/bin/python3 /usr/bin/python + +# Устанавливаем Python-пакеты +RUN pip3 install --no-cache-dir \ + --break-system-packages \ + jinja2 \ + future \ + ply \ + setuptools \ + six \ + lxml + +WORKDIR /workspace + +# Клонируем репозиторий +RUN git clone https://github.com/Endlad2/NeptuneOS.git + +WORKDIR /workspace/NeptuneOS + +# Инициализируем сабмодули +RUN git submodule update --init --recursive + +# Делаем build.sh исполняемым +RUN bash build.sh [${ARCH}] [${BUILD_TYPE}] +RUN mkiso.sh [${ARCH}] [${BUILD_TYPE}] + +# Запускаем сборку с переданными аргументами + + +CMD ["/bin/bash"] diff --git a/private/rtl/inc/services.h b/private/rtl/inc/services.h index a0ca9165..fd3cdb09 100644 --- a/private/rtl/inc/services.h +++ b/private/rtl/inc/services.h @@ -441,9 +441,6 @@ typedef struct _IO_PNP_CONTROL_QUERY_IDS_DATA { IN OUT CHAR DeviceInstance[]; /* Output buffer follows device instance */ } IO_PNP_CONTROL_QUERY_IDS_DATA, *PIO_PNP_CONTROL_QUERY_IDS_DATA; -/* - * Server-side data structure for PLUGPLAY_EVENT_BLOCK - */ typedef struct _IO_PNP_EVENT_BLOCK { GUID EventGuid; PLUGPLAY_EVENT_CATEGORY EventCategory; @@ -454,12 +451,15 @@ typedef struct _IO_PNP_EVENT_BLOCK { CHAR SymbolicLinkName[]; } DeviceClass; struct { + ULONG Dummy; // Добавлено фиктивное поле CHAR DeviceIds[]; } TargetDevice; struct { + ULONG Dummy; // Добавлено фиктивное поле CHAR DeviceId[]; } InstallDevice; struct { + ULONG Dummy; // Добавлено фиктивное поле CHAR DeviceIds[]; } CustomNotification; /* Used for IoReportTargetDeviceChange */ struct { diff --git a/readme.md b/readme.md index 9f1af373..ba6adae4 100644 --- a/readme.md +++ b/readme.md @@ -1,3 +1,4 @@ + # Neptune OS: a Windows NT personality for the seL4 microkernel Neptune OS is a Windows NT personality for the seL4 microkernel. It implements what @@ -118,6 +119,26 @@ server. The `build.sh` script will generate the `compile_commands.json` file for `clangd`. You will need to install [jq](https://jqlang.github.io/jq/) for this purpose. +### Docker Build + +For a containerized build environment, it is recommended to use Docker. First, navigate to the build directory and build the Docker image: + +```bash +cd build +docker build -t neptune-builder . +``` + +To build with specific architecture and build type parameters: + +```bash +docker build \ + --build-arg ARCH=arm64 \ + --build-arg BUILD_TYPE=debug \ + -t neptune-builder . +``` + +### Local Build + Clone the project first (make sure you use `git clone --recurse-submodules` since we include the seL4 kernel as a submodule) and then run ```