diff --git a/CMakeLists.txt b/CMakeLists.txt index 03e70844..b97f62a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,6 +92,6 @@ ADD_CUSTOM_TARGET(qemu ) ADD_CUSTOM_TARGET(tests - COMMAND ${CMAKE_SOURCE_DIR}/scripts/qemu.sh kernel-tests=true + COMMAND ${CMAKE_COMMAND} -E env "KERNEL_NAME=${KERNEL_EXECUTABLE_NAME}" "ARCH=${CMAKE_SYSTEM_PROCESSOR}" ${CMAKE_SOURCE_DIR}/scripts/qemu.sh kernel-tests=true USES_TERMINAL ) diff --git a/INSTRUCTIONS.md b/INSTRUCTIONS.md index 6b686fec..cd410b21 100644 --- a/INSTRUCTIONS.md +++ b/INSTRUCTIONS.md @@ -53,13 +53,14 @@ To build something from the `edit` directory, pass the `edited-[thing]` to the ` ## Building and running duckOS 1. In the `build/[arch]` directory, run `make install` to build the kernel & programs. 2. Run `make image` to make the disk image. + - If you'd like to add extra files to the image, create a folder named `user` at the root of the repository. These files will be copied to the root of the built image. 4. Run `make qemu` to run qemu with the image you just made. 5. Enjoy! ## Running kernel unit tests To run kernel unit tests, run `make install` and `make image` as usual, and then use `make tests` to run tests. Instead of running init, the kernel will run unit tests after booting. -Alternatively, supply the `kernel-tests` kernel argument to run tests. +Alternatively, supply the `kernel-tests=true` kernel argument to run tests. ## Raspberry Pi *Note: aarch64 support is WIP, and even less likely to work properly on real hardware than in qemu. duckOS currently supports the Raspberry Pi 3B.* diff --git a/README.md b/README.md index d2d34156..f5756163 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,7 @@ Ports can be installed by running [ports.sh](ports/ports.sh) supplied with the d Some of the more exciting ports are: - [DOOM](ports/doom) + - You'll need to provide your own DOOM wadfile and put it in the /apps/doom.app/ directory. (See [the build instructions](INSTRUCTIONS.md#building-and-running-duckos) for more details.) - [binutils](ports/binutils) - [gcc](ports/gcc) - [sdl2](ports/sdl2) diff --git a/ports/ports.sh b/ports/ports.sh index 29ad8f2e..3cbe66d8 100755 --- a/ports/ports.sh +++ b/ports/ports.sh @@ -3,9 +3,9 @@ PORTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" SOURCE_DIR="$PORTS_DIR/.." -ROOT_DIR="$SOURCE_DIR/cmake-build/root" +ROOT_DIR="$SOURCE_DIR/build/i686/root" PORTS_D_DIR="$ROOT_DIR/usr/ports.d" -PATH="$PATH:$SOURCE_DIR/toolchain/tools/bin" +PATH="$PATH:$SOURCE_DIR/toolchain/tools/i686/bin" NUM_JOBS=$(( $(nproc) / 2 )) SED_BIN="sed"