You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 11, 2024. It is now read-only.
Now, the toolchain is located in a subdirectory according to architecture (toolchain/tools/[arch]), as are the builds (build/[arch]). The instructions have been updated accordingly.
Copy file name to clipboardExpand all lines: INSTRUCTIONS.md
+8-5
Original file line number
Diff line number
Diff line change
@@ -28,13 +28,16 @@
28
28
- You must also install [macFUSE](https://osxfuse.github.io) and `fuse-ext2`
29
29
- The latest version of FUSE-ext2 can be built by running `toolchain/build-ext2-fuse.sh`. Alternatively, an older binary version is available [here](https://github.com/gpz500/fuse-ext2/releases)
30
30
- If you are on an Apple Silicon Mac, you may need to set the `CPATH=/opt/homebrew/include` and `LIBRARY_PATH=/opt/homebrew/lib` environment variables to get the toolchain to build.
31
+
31
32
## Building the toolchain
32
33
1. Open the `toolchain` directory in your terminal and run `build-toolchain.sh`. (You will need an internet connection as it downloads the needed binutils/gcc releases from the GNU ftp site.)
34
+
- This will default to i386. If you'd like to build for a different architecture, specify it with the `ARCH` environment variable.
35
+
- Supported targets are `i386` and `aarch64`.
33
36
2. Make a cup of coffee or tea and wait. It will take a while to compile.
34
-
3. Once it's done, the toolchain will be in `toolchain/tools`, and the sysroot in `cmake-build/root`.
37
+
3. Once it's done, the toolchain will be in `toolchain/tools`, and the sysroot in `build/[arch]/root`.
35
38
36
39
### Editing the toolchain
37
-
If you'd like to edit the c library, you can run `build-toolchain.sh libc` to recompile libc and libstdc++. If you just want to compile libc and not libstdc++, you can run `make libc` in the `cmake-build` folder.
40
+
If you'd like to edit the c library, you can run `build-toolchain.sh libc` to recompile libc and libstdc++. If you just want to compile libc and not libstdc++, you can run `make libc` in the `build/[arch]` folder.
38
41
39
42
If you'd like to edit gcc or binutils, you can run the `edit-toolchain.sh` script to download patch binutils and gcc and setup a git repository for each one. Then, use the `gen-patches.sh` script to generate patch files for each one.
40
43
@@ -44,11 +47,11 @@ To build something from the `edit` directory, pass the `edited-[thing]` to the `
44
47
45
48
## Configuring cmake
46
49
1. Make sure you've built the toolchain first.
47
-
2. Go to the `cmake-build` directory.
48
-
3. From that directory, run `cmake .. -DCMAKE_TOOLCHAIN_FILE=cmake-build/CMakeToolchain.txt`.
50
+
2. Go to the `build/[arch]` directory.
51
+
3. From that directory, run `cmake ../.. -DCMAKE_TOOLCHAIN_FILE=build/[arch]/CMakeToolchain.txt`.
49
52
50
53
## Building and running duckOS
51
-
1. In the `cmake-build` directory, run `make install` to build the kernel & programs.
54
+
1. In the `build/[arch]` directory, run `make install` to build the kernel & programs.
52
55
2. Run `make image` to make the disk image.
53
56
4. Run `make qemu` to run qemu with the image you just made.
0 commit comments