Linux Genesis Dev Setup

Talk about development tools here

Moderator: BigEvilCorporation

kubilus1
Very interested
Posts: 237
Joined: Thu Aug 16, 2012 2:25 am
Contact:

Post by kubilus1 » Tue Dec 02, 2014 4:20 am

Okay, I've setup the Makefile to test for writeability of /opt before asking for sudo for the directory creation. If sudo is used, the /opt/toolchains/gen directory will be chown'd back to the user. This should cover the bases I would think.

LocalH
Very interested
Posts: 152
Joined: Tue Dec 19, 2006 5:04 pm

Post by LocalH » Tue Dec 02, 2014 6:55 am

I'm interested in exploring whether this toolchain can be ported to jailbroken iOS - I already have several non-standard (in iOS land) tools installed (gcc, etc) but I'm not sure if I have the full complement. I would love to be able to take my iPad around and code for the Genesis when I have some downtime.

Unfortunately, I have little skill with modern development so I fear I might be in over my head. Anyone willing to work with me to help me attempt to get this type of stuff set up? Alternately, all I really need is an assembler for basic stuff (and eventually an art editor/converter). I don't need much other than the bare minimum necessary to port a crossassembler and some other basic tools. I don't want them to have a fancy iOS interface, I'd be running them from a terminal on the device.

kubilus1
Very interested
Posts: 237
Joined: Thu Aug 16, 2012 2:25 am
Contact:

Post by kubilus1 » Tue Dec 02, 2014 3:06 pm

It ought to be pretty straightforward getting this toolchain to work mac OSX since I've already done some work for this on FreeBSD in the past. Unfortunately, I know absolutely nothing about iOS, so can't say if this is feasible or not.

From doing a bit of work on Android, I would expect this would not be an easy task to get to work natively.

If iOS can run virtual machines, you could use the Vagrantfile I posted previously and perhaps convert that VM into something iOS can use.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Tue Dec 02, 2014 6:23 pm

kubilus1 wrote:Okay, I've setup the Makefile to test for writeability of /opt before asking for sudo for the directory creation. If sudo is used, the /opt/toolchains/gen directory will be chown'd back to the user. This should cover the bases I would think.
I'll erase the gen directory and try again from scratch and see what happens. :)

kubilus1
Very interested
Posts: 237
Joined: Thu Aug 16, 2012 2:25 am
Contact:

Post by kubilus1 » Tue Dec 02, 2014 8:20 pm

Thanks for testing!

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Tue Dec 02, 2014 8:31 pm

kubilus1 wrote:Thanks for testing!
No problem. What I'd really like to do is work in better 32X support so I can use sgdk for both Genesis and 32X stuff.

nitrinho
Newbie
Posts: 5
Joined: Wed Nov 26, 2014 10:07 am
Location: Barcelona
Contact:

Post by nitrinho » Wed Dec 03, 2014 6:43 pm

After installing Xubuntu 14.04.1 (32bits), i'm blocked in the first make:

Code: Select all

megadrive@centrino:~$ svn checkout http://gendev.googlecode.com/svn/trunk/ gendev-read-only
Checked out revision 101.
megadrive@centrino:~$ cd gendev-read-only/
megadrive@centrino:~/gendev-read-only$ make
echo "Build"
Build
cd work && \
	patch -u < ../files/makefile-gen.diff || true && \
	MAKE=make make -f makefile-gen
patching file makefile-gen
Reversed (or previously applied) patch detected!  Assume -R? [n] 
If I say 'y', I get the following message:

Code: Select all

make[1]: Entering directory `/home/megadrive/gendev-read-only/work'
to_log = 2>&1 | tee -a /home/megadrive/gendev-read-only/work/logs/build-binutils-sh-elf-2.21.log
/bin/sh: 1: to_log: not found
+++ Building binutils-2.21 to build-binutils-sh-elf-2.21...
mkdir -p build-binutils-sh-elf-2.21
> /home/megadrive/gendev-read-only/work/logs/build-binutils-sh-elf-2.21.log
cd build-binutils-sh-elf-2.21; ../binutils-2.21/configure --target=sh-elf --prefix=/opt/toolchains/gen/sh-elf --enable-install-libbfd 
/bin/sh: 1: ../binutils-2.21/configure: not found
make[1]: *** [build-sh2-binutils] Error 127
make[1]: Leaving directory `/home/megadrive/gendev-read-only/work'
make: *** [build] Error 2
I think the error is that binutils-2.21 package is missing, so I try to install it:

Code: Select all

megadrive@centrino:~/gendev-read-only$ sudo apt-get install binutils
S'està llegint la llista de paquets… Fet 
S'està construint l'arbre de dependències       
S'està llegint la informació de l'estat… Fet
binutils ja es troba en la versió més recent.
0 actualitzats, 0 nous a instaŀlar, 0 a suprimir i 1 no actualitzats.
But it's already installed... :? Let's try again the make:

Code: Select all

megadrive@centrino:~/gendev-read-only$ make
echo "Build"
Build
cd work && \
	patch -u < ../files/makefile-gen.diff || true && \
	MAKE=make make -f makefile-gen
patching file makefile-gen
Reversed (or previously applied) patch detected!  Assume -R? [n] 
Apply anyway? [n] 
Skipping patch.
5 out of 5 hunks ignored -- saving rejects to file makefile-gen.rej
make[1]: Entering directory `/home/megadrive/gendev-read-only/work'
to_log = 2>&1 | tee -a /home/megadrive/gendev-read-only/work/logs/build-binutils-sh-elf-2.24.log
/bin/sh: 1: to_log: not found
+++ Building binutils-2.24 to build-binutils-sh-elf-2.24...
mkdir -p build-binutils-sh-elf-2.24
> /home/megadrive/gendev-read-only/work/logs/build-binutils-sh-elf-2.24.log
cd build-binutils-sh-elf-2.24; ../binutils-2.24/configure --target=sh-elf --prefix=/opt/toolchains/gen/sh-elf --enable-install-libbfd 
(after lots of checkings...)

Code: Select all

configure: creating ./config.status
config.status: creating Makefile
make -C build-binutils-sh-elf-2.24 all install DESTDIR= 
make[2]: Entering directory `/home/megadrive/gendev-read-only/work/build-binutils-sh-elf-2.24'
make[3]: Entering directory `/home/megadrive/gendev-read-only/work/build-binutils-sh-elf-2.24'
Configuring in ./intl
configure: loading cache ./config.cache
configure: error: `LDFLAGS' has changed since the previous run:
configure:   former value:  ` '
configure:   current value: `-static-libstdc++ -static-libgcc '
configure: error: in `/home/megadrive/gendev-read-only/work/build-binutils-sh-elf-2.24/intl':
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make[3]: *** [configure-intl] Error 1
make[3]: Leaving directory `/home/megadrive/gendev-read-only/work/build-binutils-sh-elf-2.24'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/megadrive/gendev-read-only/work/build-binutils-sh-elf-2.24'
make[1]: *** [build-sh2-binutils] Error 2
make[1]: Leaving directory `/home/megadrive/gendev-read-only/work'
make: *** [build] Error 2
What I'm doing wrong? I've ran `make distclean' and `rm ./config.cache' and started the process but no luck.

Thanks in advance and sorry for the long post.

kubilus1
Very interested
Posts: 237
Joined: Thu Aug 16, 2012 2:25 am
Contact:

Post by kubilus1 » Wed Dec 03, 2014 6:47 pm

You will need to do a 'make clean' and then a 'make'. I think it is attempting to rebuild already built stuff.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Mon Dec 08, 2014 3:19 am

The toolchain built fine, but when I went to build sgdk, it doesn't build. The reason is this:

Code: Select all

sgdk-read-only/libmd.a:
	cd sgdk-read-only && ln -sf ../files/Makefile.sgdk_lib .
	cd sgdk-read-only && $(MAKE) -f Makefile.sgdk_lib
It's making a link to a file that doesn't exist, so nothing gets built.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Tue Dec 09, 2014 3:27 am

Okay, did a svn up and it added the missing file. Compiled just fine. :)

Now I can work on the SMS Phazer support.

nitrinho
Newbie
Posts: 5
Joined: Wed Nov 26, 2014 10:07 am
Location: Barcelona
Contact:

Post by nitrinho » Wed Dec 10, 2014 4:07 pm

Another question, how long does it take the first make?
I started the process about 5 hours ago and it is still compiling in my old Pentium M (a 2005 laptop) :?

kubilus1
Very interested
Posts: 237
Joined: Thu Aug 16, 2012 2:25 am
Contact:

Post by kubilus1 » Wed Dec 10, 2014 4:58 pm

On that old laptop, hours and hours for the first make. However, you should rarely ever have to run that again once you get this set up.

Almost all my other updates will be in the sgdk directory and that compiles quickly.

(Note: I did include a .deb of the build environment awhile back but it is pretty darn old now. Building a .deb could be done and hosted by a user with the online space, the process is run from the Makefile.)

nitrinho
Newbie
Posts: 5
Joined: Wed Nov 26, 2014 10:07 am
Location: Barcelona
Contact:

Post by nitrinho » Thu Dec 11, 2014 10:40 am

Yes, I finally have my environment compiled. Thanks for your help kubilus1!
I'd make a package/dev-only distro, but I think everybody uses 64bits processors for developing. not recycled computers (as me :oops: :lol: )

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Thu Dec 11, 2014 7:27 pm

nitrinho wrote:Yes, I finally have my environment compiled. Thanks for your help kubilus1!
I'd make a package/dev-only distro, but I think everybody uses 64bits processors for developing. not recycled computers (as me :oops: :lol: )
64-bit people can use 32-bit executables. I used to use a 32-bit SBC the year before, but then got an AMD A6 based 64-bit system - for less than $200. It's sick how cheap these things are getting. I spent far more than that on my first 8-bit system, which was chosen for being one of the least expensive 8-bitters on the market.

doragasu
Very interested
Posts: 125
Joined: Tue Oct 09, 2012 8:15 am

Post by doragasu » Sun Jan 11, 2015 7:11 pm

I'm now using m68k-elf-gcc, sdcc, zasm and sjasm built using ArchLinux recipes, but I still find this project very useful for building SGDK and the remaining tools.

Keep up the good work!

Post Reply