Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Fix ports build, clarify instructions and README
Browse files Browse the repository at this point in the history
  • Loading branch information
byteduck committed Sep 9, 2024
1 parent 6f9f442 commit 3634e41
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
3 changes: 2 additions & 1 deletion INSTRUCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.*
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions ports/ports.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 3634e41

Please sign in to comment.