Skip to content

Commit 298ba88

Browse files
xacrimonphil-opp
authored andcommitted
Added the workaround for building on Mac OS to the readme (rust-osdev#12)
1 parent 41e1a29 commit 298ba88

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@ The idea is to build the kernel as a `no_std` longmode executable and then build
1111
## Build and Run
1212
You need a nightly [Rust](https://www.rust-lang.org) compiler, [xargo](https://github.com/japaric/xargo), [objcopy](https://sourceware.org/binutils/docs/binutils/objcopy.html) (or a similar tool), and [QEMU](https://www.qemu.org/) (for running it).
1313

14+
### Mac OS
15+
16+
If you are building on Mac OS and get a error saying `ld.bfd not found` you first need to [cross compile binutils](https://os.phil-opp.com/cross-compile-binutils) and then adjust
17+
the linker name in the `x86_64-bootloader.json` file. The reason for this is the default rust LLVM linker doesn't support some features this project needs.
18+
19+
After doing that continue with the instructions for Linux.
20+
21+
### Linux
22+
1423
```
1524
> RUST_TARGET_PATH=$(pwd) xargo build --target x86_64-bootloader --release
1625
> objcopy -O binary -S target/x86_64-bootloader/release/bootloader bootimage.bin

0 commit comments

Comments
 (0)