Setting up Gamecube Linux help
Setting up Gamecube Linux help
Just wondering if anyone has recently setup GC-Linux to run from an SDGecko w/ ARAM as Swap (Basically without the need for sharing storage over the BBA).
I haven't been following gc-linux since 2006 or so, so I was wondering if someone here had done it recently and could post a short guide.
Any help is much appreciated
I haven't been following gc-linux since 2006 or so, so I was wondering if someone here had done it recently and could post a short guide.
Any help is much appreciated
Re: Setting up Gamecube Linux help
There´s a way to run it from sd, but you have to make fat partition with an aditional ext partition with a file system, you know, all of those complicated things. That´s why I´m excited with neogeo cd update that infact is doing, because we can only run advance mame from gc linux and I could not install it.
Re: Setting up Gamecube Linux help
the latest patch that the team released is for the 2.6.32 kernel. i'll try to build it once i have everything set up correctly
please search before you ask - a lot has been discussed already!
(or use google with "site:gc-forever.com *term*")
http://is.gd/MDmZcr
we also have a wiki filled with knowledge
http://is.gd/dX58Rm
(or use google with "site:gc-forever.com *term*")
http://is.gd/MDmZcr
we also have a wiki filled with knowledge
http://is.gd/dX58Rm
Re: Setting up Gamecube Linux help
Hi.
I played with gc-linux about half a year ago. I have bba, so i build kernel (2.6.32 with mikep5 gc patch, newer kernels have gc support already) with nfs root support. I tried whiite-linux (debian-lenny adopted for Wii), debootstraped debian6.0 (you may debootstrap it on gc itself, or use qemu-linux-ppc-static trick on your x86 linux-box) and also tried buildroot-uclibc rootfs. All 3 worked ok. ARAM swap worked too. It was nice to see blackbox with x11 mpd client running on gc Also HoMM3 linux-ppc works too (somesort of, because cube xorg driver is 640x480, but homm3 uses 800x600, and cube driver dont support virtual display and xrandr scaling), but need additional swap on sd. And its very slow.
Some things, that may need attention - you need to compile cube xorg driver, if you want to use xorg on gc. And if you want to use gamepad as ponter device in xorg, you may be need to recompile joystick_drv. I aslo tried distcc compilation on gc-linux (on other side was x86-linux powerpc-gcc) - and it works, too.
Also, tried to set swap on sd card (in addition to ARAM) - but it was very slow (maybe bad sd?).
So, if you have any specific questions - i will glad to help But, remember, i played with it half a year ago, so, i may forget some details
I played with gc-linux about half a year ago. I have bba, so i build kernel (2.6.32 with mikep5 gc patch, newer kernels have gc support already) with nfs root support. I tried whiite-linux (debian-lenny adopted for Wii), debootstraped debian6.0 (you may debootstrap it on gc itself, or use qemu-linux-ppc-static trick on your x86 linux-box) and also tried buildroot-uclibc rootfs. All 3 worked ok. ARAM swap worked too. It was nice to see blackbox with x11 mpd client running on gc Also HoMM3 linux-ppc works too (somesort of, because cube xorg driver is 640x480, but homm3 uses 800x600, and cube driver dont support virtual display and xrandr scaling), but need additional swap on sd. And its very slow.
Some things, that may need attention - you need to compile cube xorg driver, if you want to use xorg on gc. And if you want to use gamepad as ponter device in xorg, you may be need to recompile joystick_drv. I aslo tried distcc compilation on gc-linux (on other side was x86-linux powerpc-gcc) - and it works, too.
Also, tried to set swap on sd card (in addition to ARAM) - but it was very slow (maybe bad sd?).
So, if you have any specific questions - i will glad to help But, remember, i played with it half a year ago, so, i may forget some details
Re: Setting up Gamecube Linux help
swap on SD card is so slow because it's PIO and not DMA
Re: Setting up Gamecube Linux help
you don't have to patch them anymore? wow!arcticfox wrote:(2.6.32 with mikep5 gc patch, newer kernels have gc support already)
what crosscompiler are you using btw. ?
please search before you ask - a lot has been discussed already!
(or use google with "site:gc-forever.com *term*")
http://is.gd/MDmZcr
we also have a wiki filled with knowledge
http://is.gd/dX58Rm
(or use google with "site:gc-forever.com *term*")
http://is.gd/MDmZcr
we also have a wiki filled with knowledge
http://is.gd/dX58Rm
Re: Setting up Gamecube Linux help
Right now, i take a look at vanilla 2.6.38 source (just have it on local storage) - yes, its true, seems that it have all you need to build it for gc.liquitt wrote:you don't have to patch them anymore? wow!arcticfox wrote:(2.6.32 with mikep5 gc patch, newer kernels have gc support already)
For building a kernel, i used this cross toolchain http://downloads.sourceforge.net/gc-lin ... pc.tar.bz2liquitt wrote:what crosscompiler are you using btw. ?
When i compiled on gc-linux itself, to make this process much faster, i builded distcc crosstoolchain on my x86 linux-box. You need to build same versions of binutils/gcc that you have on your gc-linux. When building, you must point "--with-sysroot=" to your gc-linux rootfs / then it will work without any problem. With usage of distcc, i recompiled entire Xorg subsystem (experimented with KDrive) It takes less than a hour, if i remember correctly.
Re: Setting up Gamecube Linux help
A ready to go package would be nice
Re: Setting up Gamecube Linux help
i second thatemu_kidid wrote:A ready to go package would be nice
i can't get that buildcross to run ffs so i might try the other one as well
please search before you ask - a lot has been discussed already!
(or use google with "site:gc-forever.com *term*")
http://is.gd/MDmZcr
we also have a wiki filled with knowledge
http://is.gd/dX58Rm
(or use google with "site:gc-forever.com *term*")
http://is.gd/MDmZcr
we also have a wiki filled with knowledge
http://is.gd/dX58Rm
Re: Setting up Gamecube Linux help
Not really a package, but... I tried right now to build gc-linux kernel from scratch, and it was successfull - right now i see gc-linux kernel panic on my gc, because it cant find root (it's ok, because there is no any rootfs as of now)
Btw, i compiled 2.6.32 kernel with mikep5 patch and not the newer kernel (like 2.6.38), because i want to be sure that cross building works. I know that 2.6.32 builds ok, and i never tried to build newer kernels. I will try to build newer kernel later today, or you may do it yourself, and report your results
So, i write this quick tutorial on cross building gc-linux kernel. Please, report your results and any questions if you have
How to build gc-linux kernel from scratch v0.1
Prerequisites: any working linux system with current general devtools (make, gcc, binutils, etc.)
0) I would recommend to do all work in your home subdir or in tmp subdir, so, you cant mess with your working system.
1) Create working subdir and get all needed sources there (for example, i will do everything in /home/arcticfox/gclinux/):
2) Build stage1 crosstoolchain, sufficient only for building kernel.
3) We have stage1 crosscompiler ready. Now we may build the kernel. We will patch it with mikep5 patch, and then will use default gamecube config:
If you want to make a changes in default config:
also, if you want to modify kernel command line, edit this file (search for bootargs) linux-2.6.32/arch/powerpc/boot/dts/gamecube.dts
Now building the kenrel itself!
4) If you get to this step without errors, you already have freshly builded kernel in linux-2.6.32/arch/powerpc/boot/zImage But you may want to "convert" it to dol file:
(Now paste following code in build-dol.sh with your favorite file editor):
then continue:
You will have then zImage.dol file in current dir!
I tried all of this, right now - and it works. And thanks to all gc-linux team, becuase this guide is mostly based on their works.
Please, if you have any questions - i will glad to help!
Btw, i compiled 2.6.32 kernel with mikep5 patch and not the newer kernel (like 2.6.38), because i want to be sure that cross building works. I know that 2.6.32 builds ok, and i never tried to build newer kernels. I will try to build newer kernel later today, or you may do it yourself, and report your results
So, i write this quick tutorial on cross building gc-linux kernel. Please, report your results and any questions if you have
How to build gc-linux kernel from scratch v0.1
Prerequisites: any working linux system with current general devtools (make, gcc, binutils, etc.)
0) I would recommend to do all work in your home subdir or in tmp subdir, so, you cant mess with your working system.
1) Create working subdir and get all needed sources there (for example, i will do everything in /home/arcticfox/gclinux/):
Code: Select all
$ mkdir ~/gclinux && cd ~/gclinux
$ wget http://ftp.gnu.org/gnu/binutils/binutils-2.18.tar.bz2
$ wget http://ftp.gnu.org/gnu/gcc/gcc-4.3.2/gcc-core-4.3.2.tar.bz2
$ wget http://slackware.sukkology.net/packages/devkitpro-gc/doltool.0.3.2.linux-TenOfTen.tgz
$ wget http://mirror.transact.net.au/sourceforge/g/project/gc/gc-linux/kernel/2.6.32/mikep5-patch-2.6.32-gc.bz2
$ wget http://ftp.halifax.rwth-aachen.de/kernel/linux/kernel/v2.6/linux-2.6.32.tar.bz2
Code: Select all
$ tar xjf binutils-2.18.tar.bz2
$ tar xjf gcc-core-4.3.2.tar.bz2
$ mkdir build-binutils && mkdir build-gcc && mkdir gccross && cd build-binutils
$ export PREFIX=/home/arcticfox/gclinux/gccross
$ export TARGET=powerpc-linux-gnu
$ sed -i "s/\[4-9\]|\[5-9\]/([4-9]|[1-9][0-9])|[5-9]/" ../binutils-2.18/configure
$ ../binutils-2.18/configure --target=$TARGET --prefix=$PREFIX --disable-nls --enable-werror=no
$ make all
$ make install
$ export PATH=$PATH:/home/arcticfox/gclinux/gccross/bin
$ cd .. && cd build-gcc
$ ../gcc-4.3.2/configure --target=$TARGET --prefix=$PREFIX --enable-languages=c --disable-nls --without-headers
$ make all-gcc
$ make install-gcc
Code: Select all
$ cd /home/arcticfox/gclinux/
$ tar xjf linux-2.6.32.tar.bz2
$ cd linux-2.6.32
$ bzip2 -cd <../mikep5-patch-2.6.32-gc.bz2 | patch -p1
$ cd ..
$ cp linux-2.6.32/arch/powerpc/configs/gamecube_defconfig linux-2.6.32/.config
Code: Select all
$ make -C linux-2.6.32 ARCH=powerpc CROSS32_COMPILE=powerpc-linux-gnu- CROSS_COMPILE=powerpc-linux-gnu- menuconfig
Now building the kenrel itself!
Code: Select all
$ make -C linux-2.6.32 ARCH=powerpc CROSS32_COMPILE=powerpc-linux-gnu- CROSS_COMPILE=powerpc-linux-gnu- zImage
Code: Select all
$ cd /home/arcticfox/gclinux
$ tar xzf doltool.0.3.2.linux-TenOfTen.tgz
$ cd doltool.0.3.2.linux-TenOfTen
$ g++ -o doltool *cpp
$ cp doltool /home/arcticfox/gclinux/gccross/bin/
$ cd ..
$ touch build-dol.sh
Code: Select all
#!/bin/bash
target=${1:-zImage}
ofile=zImage1
[ -r ${KSRC}/arch/powerpc/boot/${target} ] || {
echo "Can't find target image ${KSRC}/arch/powerpc/boot/${target}"
exit 1
}
cp ${KSRC}/arch/powerpc/boot/${target} ${ofile}
CROSS=powerpc-linux-gnu-
echo "+ building DOL"
load=$(${CROSS}readelf -l "$ofile" | \
perl -lane'printf"%08x\n",hex($F[3])+0x80000000 if /LOAD/;')
echo " LOAD: $load"
entry=$(${CROSS}readelf -l "$ofile" | \
perl -lane'printf"%08x\n",hex($F[2])+0x80000000 if /Entry point/;')
echo " EP : $entry"
${CROSS}objcopy -O binary \
-R .comment -R .shstrtab -R .symtab -R .strtab \
-R .gnu.attributes \
${ofile} ${ofile}.bin
doltool -c ${ofile}.bin $load $entry
doltool -i ${ofile}.dol
echo ""
Code: Select all
$ chmod u+x build-dol.sh
$ KSRC=linux-2.6.32/ ./build-dol.sh
I tried all of this, right now - and it works. And thanks to all gc-linux team, becuase this guide is mostly based on their works.
Please, if you have any questions - i will glad to help!
Last edited by arcticfox on Wed Oct 05, 2011 4:45 pm, edited 1 time in total.
Re: Setting up Gamecube Linux help
if you do it like that, sed will tell you, that there is no such file ("configure") because you're entering an empty directory ("build-binutils")tar xjf binutils-2.18.tar.bz2
tar xjf gcc-core-4.3.2.tar.bz2
mkdir build-binutils && mkdir build-gcc && mkdir gccross && cd build-binutils
export PREFIX=/home/gclinux/gccross
export TARGET=powerpc-linux-gnu
sed -i "s/\[4-9\]|\[5-9\]/([4-9]|[1-9][0-9])|[5-9]/" configure
of course you meant the just tarred directory binutils-2.18/
please search before you ask - a lot has been discussed already!
(or use google with "site:gc-forever.com *term*")
http://is.gd/MDmZcr
we also have a wiki filled with knowledge
http://is.gd/dX58Rm
(or use google with "site:gc-forever.com *term*")
http://is.gd/MDmZcr
we also have a wiki filled with knowledge
http://is.gd/dX58Rm
Re: Setting up Gamecube Linux help
sure, will fix my postliquitt wrote:if you do it like that, sed will tell you, that there is no such file ("configure") because you're entering an empty directory ("build-binutils")sed -i "s/\[4-9\]|\[5-9\]/([4-9]|[1-9][0-9])|[5-9]/" configure
of course you meant the just tarred directory binutils-2.18/
Re: Setting up Gamecube Linux help
Just wanted to let you guys know, that it also worked with updated versions of the tools.
I used binutils-2.21.1 and gcc-4.4.6. The sed line was not necessary.
I used binutils-2.21.1 and gcc-4.4.6. The sed line was not necessary.
Re: Setting up Gamecube Linux help
I have a question - can you share your zImage.dol? I'm sure a lot of people don't have time/don't want to setup a cross-compiler, so it would be awesome if you supported our laziness.arcticfox wrote: You will have then zImage.dol file in current dir!
I tried all of this, right now - and it works. And thanks to all gc-linux team, becuase this guide is mostly based on their works.
Please, if you have any questions - i will glad to help!
Re: Setting up Gamecube Linux help
damn i just wanted to upload one for you but when i tried to compile linux told me to update my binutils, wtf - this worked before
please search before you ask - a lot has been discussed already!
(or use google with "site:gc-forever.com *term*")
http://is.gd/MDmZcr
we also have a wiki filled with knowledge
http://is.gd/dX58Rm
(or use google with "site:gc-forever.com *term*")
http://is.gd/MDmZcr
we also have a wiki filled with knowledge
http://is.gd/dX58Rm
- Kalifornia Jani
- Posts: 8
- Joined: Sun Sep 05, 2010 5:20 pm
- Location: Finland
Re: Setting up Gamecube Linux help
I used GNU bintutils 2.19.1 on that toolchain tutorial, so now I can upload some linux kernels in dol-format !!! First up is NFS-kernel and then NBD(I need to know what specific command parameters you have to use in 2.6.32-NBD Kernel bootargs) Then Also one that could boot base-systems (rootfs) from SD card just tell me if you need some simple modifications on the kernel like squashfs or something
Re: Setting up Gamecube Linux help
hey cool that you're joining in
tomorrow i'm testing my VM again. dunno whats wrong but i wasn't able to compile a kernel lately.
the default one was NFS iirc....i wanted to try one that has its FS on the SDcard too
if you like you can upload one of them
tomorrow i'm testing my VM again. dunno whats wrong but i wasn't able to compile a kernel lately.
the default one was NFS iirc....i wanted to try one that has its FS on the SDcard too
if you like you can upload one of them
please search before you ask - a lot has been discussed already!
(or use google with "site:gc-forever.com *term*")
http://is.gd/MDmZcr
we also have a wiki filled with knowledge
http://is.gd/dX58Rm
(or use google with "site:gc-forever.com *term*")
http://is.gd/MDmZcr
we also have a wiki filled with knowledge
http://is.gd/dX58Rm
- Kalifornia Jani
- Posts: 8
- Joined: Sun Sep 05, 2010 5:20 pm
- Location: Finland
Re: Setting up Gamecube Linux help
Well you have to export the toolchain everytime when you want to use it so, if you dont do it at the beginning when starting the compiling process it fails and says that you need newer binutils, but im sure you know guys know this stuff already
Here is my NFS-version of the kernel, remember to hex-edit the right IP address on it!! I dont know if you can use other than NFS-with this when I had ticked the *rootfs on NFS -option
Here is my NFS-version of the kernel, remember to hex-edit the right IP address on it!! I dont know if you can use other than NFS-with this when I had ticked the *rootfs on NFS -option
- Attachments
-
- zImage1.dol.zip
- NFS
- (1.94 MiB) Downloaded 1019 times
- Kalifornia Jani
- Posts: 8
- Joined: Sun Sep 05, 2010 5:20 pm
- Location: Finland
Re: Setting up Gamecube Linux help
bump. Here is the one made for loading from sd card!! BUT I dunno if I have to do other partition on the sd card to get rootfs to boot up!! It mounted my sd card vfat as a read only and then it fails, and says try to pass init= option to the kernel!! Well I did that init=/bin/bash or init=/linuxrc just incase and it didnt help . I guess fat-filesystems arent supported to read/write, someone enlighten me! Or give me better mini debian-base system ....I share this one anyways
- Attachments
-
- zImage1SD.zip
- (1.78 MiB) Downloaded 992 times
Re: Setting up Gamecube Linux help
Have you succeeded using this method to load gc-linux? http://www.elotrolado.net/wiki/Ejecutar ... tarjeta_SD