gc-linux kernel build

Discussion for GC-Linux on Gamecube & Wii
User avatar
liquitt
Posts: 1810
Joined: Thu Apr 01, 2010 5:43 am
Location: neverland

gc-linux kernel build

Post by liquitt » Wed Mar 15, 2017 2:49 pm

Hey,
has anybody ever tried to build a newer linux kernel? Since all the new kernel still bring a arch/powerpc/gamecube_defconfig file with them...
Just curious and i don't have a build machine atm - but might set one up for that.
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
novenary
Posts: 1754
Joined: Mon Dec 30, 2013 7:50 am

Re: gc-linux kernel build

Post by novenary » Wed Mar 15, 2017 4:37 pm

Just tried it with the latest devkitppc. Two problems so far. It's most likely fixable but I don't really feel like looking into it right now.

Code: Select all

arch/powerpc/perf/bhrb.S: Assembler messages:
arch/powerpc/perf/bhrb.S:26: Error: unrecognized opcode: `cmpldi'
arch/powerpc/perf/bhrb.S:28: Error: unrecognized opcode: `ld'
arch/powerpc/perf/bhrb.S:29: Error: unrecognized opcode: `sldi'

Code: Select all

arch/powerpc/kernel/idle_6xx.S: Assembler messages:
arch/powerpc/kernel/idle_6xx.S:135: Error: unrecognized opcode: `dssall'
I'm using the 4.10.3 tarball from kernel.org, and this is all I've tried:

Code: Select all

export ARCH=powerpc
export CROSS_COMPILE=powerpc-eabi-
make gamecube_defconfig
make -j8
User avatar
liquitt
Posts: 1810
Joined: Thu Apr 01, 2010 5:43 am
Location: neverland

Re: gc-linux kernel build

Post by liquitt » Wed Mar 15, 2017 4:40 pm

i just realised - we don't have any patches for version > 2.6.32 :)
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
novenary
Posts: 1754
Joined: Mon Dec 30, 2013 7:50 am

Re: gc-linux kernel build

Post by novenary » Wed Mar 15, 2017 4:44 pm

If a defconfig is included you should still be able to get a basic kernel built. That is indeed pretty ancient though. :P

Welcome back, by the way. :)
tueidj
Posts: 564
Joined: Fri May 03, 2013 6:57 am

Re: gc-linux kernel build

Post by tueidj » Wed Mar 15, 2017 5:23 pm

Streetwalker wrote:

Code: Select all

arch/powerpc/perf/bhrb.S: Assembler messages:
arch/powerpc/perf/bhrb.S:26: Error: unrecognized opcode: `cmpldi'
arch/powerpc/perf/bhrb.S:28: Error: unrecognized opcode: `ld'
arch/powerpc/perf/bhrb.S:29: Error: unrecognized opcode: `sldi'
That file shouldn't be getting built... try adding CONFIG_PPC_PERF_CTRS=n to gamecube_defconfig.

Code: Select all

arch/powerpc/kernel/idle_6xx.S: Assembler messages:
arch/powerpc/kernel/idle_6xx.S:135: Error: unrecognized opcode: `dssall'
The BEGIN_FTR_SECTION/END_FTR_SECTION block surrounding that instruction should be guarded with #ifdef CONFIG_ALTIVEC/#endif as per https://github.com/01org/kvm-sgx/blob/4 ... es.txt#L37
User avatar
liquitt
Posts: 1810
Joined: Thu Apr 01, 2010 5:43 am
Location: neverland

Re: gc-linux kernel build

Post by liquitt » Wed Mar 15, 2017 6:22 pm

which kernel did you try btw? 4.10.3?
and thanks - i instantly feel home again!
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
novenary
Posts: 1754
Joined: Mon Dec 30, 2013 7:50 am

Re: gc-linux kernel build

Post by novenary » Wed Mar 15, 2017 7:54 pm

Well, I guess this is something? Video output is garbled but this is what I get over USB Gecko after applying tueidj's workarounds and hacking a DOL together.
Image

Next step would be to stick a userspace in there but I'm lazy right now.
User avatar
liquitt
Posts: 1810
Joined: Thu Apr 01, 2010 5:43 am
Location: neverland

Re: gc-linux kernel build

Post by liquitt » Wed Mar 15, 2017 8:59 pm

yay! that looks good indeed. c'mon - you can do it ;)
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
novenary
Posts: 1754
Joined: Mon Dec 30, 2013 7:50 am

Re: gc-linux kernel build

Post by novenary » Wed Mar 15, 2017 10:11 pm

So as discussed on IRC, besides the USB Gecko console and the PIC, pretty much all of the drivers are missing and will need to be forward-ported from gc-linux. This is definitely not a showstopper, but it's still quite a bit of work and I have other priorities right now so I'll pass, but I might come back to it later.
User avatar
liquitt
Posts: 1810
Joined: Thu Apr 01, 2010 5:43 am
Location: neverland

Re: gc-linux kernel build

Post by liquitt » Wed Mar 15, 2017 11:18 pm

Streetwalker wrote:So as discussed on IRC, besides the USB Gecko console and the PIC, pretty much all of the drivers are missing and will need to be forward-ported from gc-linux. This is definitely not a showstopper, but it's still quite a bit of work and I have other priorities right now so I'll pass, but I might come back to it later.
once i have a 2.6.32 system up and running i'll see what's in there ;)
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
novenary
Posts: 1754
Joined: Mon Dec 30, 2013 7:50 am

Re: gc-linux kernel build

Post by novenary » Mon Mar 20, 2017 2:23 pm

Here's what I've got so far. Patch and dol included, you will need to modify elf2dol for now if you want to build it (remove the exit at line 225). The kernel binary will be at arch/powerpc/boot/dtbImage.gamecube.
Attachments
gc-linux.zip
(2.81 MiB) Downloaded 829 times
User avatar
emu_kidid
Site Admin
Posts: 4927
Joined: Mon Mar 29, 2010 10:06 am
Location: Australia
Contact:

Re: gc-linux kernel build

Post by emu_kidid » Tue Mar 21, 2017 8:09 pm

I'm gone for a week and liquitt and gc-Linux come back to life!
Image
User avatar
megalomaniac
Posts: 2480
Joined: Sun Aug 21, 2011 5:33 am
Location: Drunk in Texas
Contact:

Re: gc-linux kernel build

Post by megalomaniac » Tue Mar 21, 2017 8:22 pm

emu_kidid wrote:I'm gone for a week and liquitt and gc-Linux come back to life!
maybe you should leave more often, things seem to always happen when "you're" not around
emu_kidid wrote: beer is like WD40 for megalomaniac's brain, gets the gears moving
>>> BadAssConsoles.com <<<

Image Image Image
User avatar
liquitt
Posts: 1810
Joined: Thu Apr 01, 2010 5:43 am
Location: neverland

Re: gc-linux kernel build

Post by liquitt » Wed Mar 22, 2017 10:35 am

haha :D
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
User avatar
Sierron
Posts: 160
Joined: Mon Apr 18, 2016 11:33 pm
Location: Germany

Re: gc-linux kernel build

Post by Sierron » Wed Mar 22, 2017 4:15 pm

Now we just need proper video output. That fruit salat output isn't helping.

But nice to see some further work on this :)
Own a couple PAL and JPN cubes. And three BBAs. Homeland and PSO I/II.
jn____
Posts: 2
Joined: Mon Jul 24, 2017 5:27 pm

Re: gc-linux kernel build

Post by jn____ » Tue Jul 25, 2017 2:00 am

I've written a few buildroot patches automatically generate a .DOL file from a mainline kernel for gamecube.
I haven't tested it yet, because I currently don't have a USBGecko, but it should make userspace generation a lot more convenient.

Code: Select all

$ git clone -b gc https://github.com/neuschaefer/buildroot && cd buildroot
$ make gamecube_defconfig
$ make menuconfig #or nconfig
$ make linux-menuconfig #or linux-nconfig
$ make -j4
... wait while it compiles everything ...
And then you'll have a kernel.dol in images/, if everything went well.

Expect the gc branch to move nonlinearly as I tweak and refine things.
novenary
Posts: 1754
Joined: Mon Dec 30, 2013 7:50 am

Re: gc-linux kernel build

Post by novenary » Tue Jul 25, 2017 11:19 am

Nice. Does it generate a kernel with appended initrd? Since there's no SD driver at the moment it would be convenient to have.
User avatar
liquitt
Posts: 1810
Joined: Thu Apr 01, 2010 5:43 am
Location: neverland

Re: gc-linux kernel build

Post by liquitt » Wed Jul 26, 2017 11:41 am

Nice! Progress!
...my GC got out of the basement already, it's getting closer, haha
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
User avatar
emu_kidid
Site Admin
Posts: 4927
Joined: Mon Mar 29, 2010 10:06 am
Location: Australia
Contact:

Re: gc-linux kernel build

Post by emu_kidid » Sat Jul 29, 2017 2:15 am

liquitt wrote:Nice! Progress!
...my GC got out of the basement already, it's getting closer, haha
It must have the GC legs attachment, be careful it doesn't run away.

Seriously though, I'd love to see this up & running, can we get a repo up somewhere where we can all contribute and add support for ide-exi, sdhc, wkf, etc.
Image
jn____
Posts: 2
Joined: Mon Jul 24, 2017 5:27 pm

Re: gc-linux kernel build

Post by jn____ » Thu Aug 03, 2017 12:13 am

Streetwalker wrote:Nice. Does it generate a kernel with appended initrd? Since there's no SD driver at the moment it would be convenient to have.
Yes, the gamecube/wii_defconfig uses a baked-in initrd.

So far, I've tested on the Wii, and got a shell over usbgecko (kernel patches with the forward-ported drivers coming soon-ish, maybe). GC didn't work, but the buildroot part of it should be fine.

You can also tell buildroot to use a kernel from a custom git repo, if you need that.
novenary
Posts: 1754
Joined: Mon Dec 30, 2013 7:50 am

Re: gc-linux kernel build

Post by novenary » Thu Aug 03, 2017 8:02 am

Here's my source tree in case you're interested. https://github.com/Streetwalrus/gc-linux
I've only tested it on GC. The elf2dol patch has been merged into devkitppc tools but you still need to compile the latest version from git.
User avatar
Sierron
Posts: 160
Joined: Mon Apr 18, 2016 11:33 pm
Location: Germany

Re: gc-linux kernel build

Post by Sierron » Thu Aug 17, 2017 4:23 pm

Any update on this?
Own a couple PAL and JPN cubes. And three BBAs. Homeland and PSO I/II.
novenary
Posts: 1754
Joined: Mon Dec 30, 2013 7:50 am

Re: gc-linux kernel build

Post by novenary » Fri Aug 18, 2017 12:01 am

Not really. I'm personally busy with other projects and Linux on the GameCube is pretty boring imo, not much you can do with 24MB RAM (that another device can't do better anyway).
Of course having something that works is really cool, but having no real purpose for it doesn't motivate me at all.
SyproLives
Posts: 15
Joined: Fri Aug 04, 2017 1:51 pm

Re: gc-linux kernel build

Post by SyproLives » Wed Sep 06, 2017 2:11 pm

Are you talking about managing the filter tables of a Linux kernel? If so, this will be useful, as there's some info on iptables that should help.
novenary
Posts: 1754
Joined: Mon Dec 30, 2013 7:50 am

Re: gc-linux kernel build

Post by novenary » Wed Sep 06, 2017 7:40 pm

What do you mean? The point is to get modern kernels to boot on the GC.
Post Reply