Closed einsteinx2 closed 6 years ago
If there's any other info that can help diagnose this, please let me know. Before attempting this, I successfully compiled the KOS toolchain following these instructions: http://dcemulation.org/?title=Compiling_KOS_on_OS_X
Then I moved on to trying to compile DreamShell, but saw that it required it's own toolchain and modified KOS.
Actually, is the sdk/toolchain folder necessary at all other than the patches to KOS? Since I couldn't get it building, I went ahead and just ran make on KOS again with the patches applied, then ran make on Dreamshell and boom it compiled.
Hello. Don't use GCC 7.1 as toolchain for KOS/DS it's not working properly. Use GCC 5.2 or lower. You can build and with GCC 4.x. Newest compillers need only for iso loader firmware.
Your problem has been resolved?
Hey sorry for the late response. Yep I was able to compile DreamShell without a problem using the default GCC 4 based KOS toolchain. I only needed to first apply the included KOS patches (one of them manually because it fails for some reason) and rebuild KOS.
It took a bit more work to get the cdi image building, so here are all of my build notes for anyone else that might want them (feel free to add as a readme to the repo, I think it would be helpful):
DreamShell macOS High Sierra notes:
1. First install KOS using the standard instructions from http://dcemulation.org/?title=Compiling_KOS_on_OS_X
2. Clone DreamShell into /opt/toolchain/dc/kos/ds from here: https://github.com/DC-SWAT/DreamShell
a. Note: must use that path or you need to edit makefiles
3. In the DreamShell sdk/toolchain directory, run "make patch-kos"
a. Note that one of the patches will fail (cdefs.h), but you can manually apply it.
To do so, read the diff to find the changes using this command:
cat patches/kos-a0ba3f8780.diff | colordiff | less -RS
4. Rebuild KOS with the patches applied: cd /opt/toolchains/dc/kos && make
5. Build DreamShell: cd /opt/toolchains/dc/kos/ds && make
6. To build a cdi image of DreamShell, you'll need to rebuild /opt/toolchains/dc/kos/ds/sdk/bin/scramble.exe and /opt/toolchains/dc/kos/ds/sdk/bin/cdi4dc.exe for macOS
a. Rebuild scramble: cd /opt/toolchains/dc/kos/ds/sdk/bin/src/scramble && make && cp scramble ../../
b. Rebuild cdi4dc (we can't use the included source so we need to clone a fork and build it):
1) cd /opt/toolchains/dc/kos/ds/sdk/bin/src && mv img4dc img4dc.orig
2) git clone git@github.com:einsteinx2/img4dc.git
3) cd img4dc && cmake . && make
4) cp cdi4dc/cdi4dc ../../
c. Make the cdi image: cd /opt/toolchains/dc/kos/ds && make cdi
For anyone stumbling across this, I'm pretty sure the instructions above no longer work with the latest code from the KOS and Dreamshell repos.
However, even better, I've made a Docker container that contains everything you need to build a Dreamshell cdi image on any machine with Docker installed.
First, install Docker then clone the Dreamshell repo. Pull the docker image with docker pull einsteinx2/dcdev-dreamshell
. Then from the Dreamshell repo's root directory, launch the container with docker run -it --rm -v "$PWD:/src" einsteinx2/dcdev-dreamshell
and run the build preparation script with prep_build
(only needs to be done the first time). After that you can build a cdi image with make && make cdi
. The image will be in the root directory of the Dreamshell repo on your system.
You can edit the code on the host system, then use the container to build new images for testing.
More info is in the GitHub repo here: https://github.com/einsteinx2/docker-dcdev-dreamshell
I followed all of the instructions in the toolchain Makefile (installed gcc 8.1.0 and exported path correctly).
Patching fails on one file for some reason, one of the KOS headers but I was able to easily make the patch changes manually.
Then running
make build
compiles for a while then I hit this error:Any ideas? I see that the macOS toolchain build instructions were literally added days ago by @yevgeniy-logachev, so I assume it should work.