DCEmulation

dreamcast development • homebrew software • hardware hacking • indie games • emulators • and more!
Back to main site
It is currently Sat Nov 22, 2014 9:30 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 44 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: KOS In Unix systems
PostPosted: Mon Jan 02, 2012 5:22 pm 
Offline
DC Developer
DC Developer

Joined: Thu Aug 20, 2009 9:00 am
Posts: 322
Stryfe wrote:
root670 wrote:
I'm having similar problems trying to get the toolchain to build. I'm running Ubuntu 11.10 x64. I grabbed the latest revision with SVN and ran the download.sh script, followed by the unpack.sh script. Before running make, I changed the prefixes to this:
Code:
sh_prefix  := $(HOME)/Dreamcast/dc/toolchain/$(sh_target)
arm_prefix := $(HOME)/Dreamcast/dc/toolchain/$(arm_target)

Have you tried the full path instead of the '$(HOME)' variable, or even just '$HOME' without brackets?


This whole issue with $HOME is why I switched to what OSX made "standard" - using /opt. It's now very common for toolchains to go into /opt/toolchains/<platform>, which is what I use. Of course, that doesn't help KOS_BASE any. My environ.sh uses

Code:
export KOS_BASE="/home/jlfenton/Projects/Dreamcast/kos"

export KOS_CC_BASE="/opt/toolchains/dc/sh-elf"      # DC

export DC_ARM_BASE="/opt/toolchains/dc/arm-elf"

export PATH="${PATH}:${KOS_CC_BASE}/bin:/opt/toolchains/dc/bin"


That last bit with a bin directory in the dc directory instead of one of the sh or arm directories is where I keep scramble and all the other x86 tools used for building things.

In the makefile for the toolchain, I just have the prefixes set like this:

Code:
sh_prefix  := /opt/toolchains/dc/$(sh_target)
arm_prefix := /opt/toolchains/dc/$(arm_target)


Assuming you have all the crazy dependencies gcc needs to build, it then goes through without a hitch on Xubuntu.


Top
 Profile  
 
 Post subject: Re: KOS In Unix systems
PostPosted: Mon Jan 02, 2012 6:27 pm 
Offline
DCEmu Newbie
DCEmu Newbie

Joined: Mon Jan 02, 2012 1:17 pm
Posts: 4
I deleted build-gdb- and the target folder (/home/wes/Dreamcast) from /home/wes. I also noticed two broken symbolic links in that folder (arch and dc were their names). I then deleted the whole kos folder that had all of the files from the SVN. I ran "sudo svn co https://cadcdev.svn.sourceforge.net/svnroot/cadcdev kos"

Ran the two scripts in the dc-chain folder, then changed the makefile like i did before, instead using my actual home directory in place of $(HOME). Also changed kos_root to /home/wes/kos for good measure. The prefixes were changed to what Chilly WIlly suggested.

The environ.sh script has been modified with Chilly Willy's suggestions. I ran "sudo make" and it took about 1 hour to complete. Finally got the toolchain built! :)

Now on to building KOS and making sure environ.sh is working. Thanks everyone!

Edit: kos and kos-ports built successfully!


Top
 Profile  
 
 Post subject: Re: KOS In Unix systems
PostPosted: Mon Jan 02, 2012 8:20 pm 
Offline
DC Developer
DC Developer

Joined: Thu Aug 20, 2009 9:00 am
Posts: 322
Great news! By the way, if you change the permission on /opt, you should be able to build everything without sudo. /opt is supposed to be accessible to any user, and you should be able to access your own home. If you don't want to change all of /opt, you could just change /opt/toolchains instead. Just do "sudo chmod -R 777 /opt/toolchains" to allow any user access to toolchains. You can stick with sudo if you want, I just like not having to sudo any time I update the toolchain or associated libraries/tools.


Top
 Profile  
 
 Post subject: Re: KOS In Unix systems
PostPosted: Thu Jan 05, 2012 6:59 am 
Offline
DCEmu Freak
DCEmu Freak

Joined: Sun Apr 10, 2011 10:05 am
Posts: 65
I've finally gotten the KOS to compile, well it was a few days ago but I've had internet problems.

Anywhoo, Everything has compiled fine, the kos-ports and even dcload has compiled and is working just fine.
However, I think something has gone wrong behind the scenes.

For example, if I compile the pvrmark example, and send it to my DC then it runs just fine. No compile or runtime errors.

However, if I create a directory in the examples folder and call it "custom", compile it, I get this:
Code:
make: *** No rule to make target `pvrmark.o', needed by `pvrmark.elf'. Stop.


I've literally copied the contents from one directory, to another, so this should mean there is no reason to fail.

When I change the makefile to directly look for the source files, it just gives me a link error saying undefined reference to "_start". (Entry point I believe?)

EDIT:
It seems the issue getting DC load only exists when I compile a C++ program, C programs work fine.
Now I'm really puzzledd :?:

For all the test programs I've written, when it does compile, I send it to my Dreamcast and dcload just says "executing" and hangs there. It's definitely not a problem with dcload as it sends the examples just fine though.

Am completely puzzled, any suggestions? :?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 44 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group