Page 1 of 1

Using a Kernel newer than 2.6.32

Posted: Wed Oct 05, 2011 2:16 pm
by liquitt
So, today we tried building 2.6.39 and 3.0.4 Kernels ... without success.
It seems that not all parts of the mikep5-patch-2.6.32-gc.bz2 are included in the new Kernels

When trying to apply the patch for a newer Kernel, 2.6.39 in this case you get the following messages:

Code: Select all

root@s666otrs001:/home/gclinux/linux-2.6.39# bzip2 -cd <../mikep5-patch-2.6.32-gc.bz2 | patch -p1
patching file Documentation/exi.txt
patching file Documentation/powerpc/dts-bindings/gpio/i2c.txt
patching file arch/powerpc/Kconfig
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Would be nice to see some work or information on this.

Re: Using a Kernel newer than 2.6.32

Posted: Wed Oct 05, 2011 5:04 pm
by arcticfox
Last update
Sad news... But according to gc-linux.org, not all features/drivers currently implemented into mainline kernels:
gc-linux.org wrote: "Note though that most driver support is still missing in mainline"
So, if you want to use most features, you still need to use 2.6.32 with mikep5 patch.
liquitt wrote:So, today we tried building 2.6.39 and 3.0.4 Kernels ... without success.
Not very informative, what errors you get? What cross compiler you used?
root@s666otrs001:/home/gclinux/linux-2.6.39# bzip2 -cd <../mikep5-patch-2.6.32-gc.bz2 | patch -p1
Not so good idea ;) Btw, if im not wrong - Linux kernels with odd number versions (39, in this case) are historically means to be "unstable". (even number version - "stable") It may nothing to do with your unsuccessfull compile, of course.
Would be nice to see some work or information on this.
Will right now try to compile 2.6.38, with compiler from my guide :) Will update this post with results.

update
Successfull compile :) Used cross compiler from my guide. 2.6.38 with default config, no patches.

Code: Select all

$ tar xjf linux-2.6.38.tar.bz2
$ cp linux-2.6.38/arch/powerpc/configs/gamecube_defconfig linux-2.6.38/.config
$ make -C linux-2.6.38 ARCH=powerpc CROSS32_COMPILE=powerpc-linux-gnu- CROSS_COMPILE=powerpc-linux-gnu- menuconfig
(just take a look, nothing changed, then exit)
$ make -C linux-2.6.38 ARCH=powerpc CROSS32_COMPILE=powerpc-linux-gnu- CROSS_COMPILE=powerpc-linux-gnu- zImage
...skip....
  BOOTCC  arch/powerpc/boot/cuboot-sam440ep.o
  BOOTCC  arch/powerpc/boot/cuboot-acadia.o
  BOOTCC  arch/powerpc/boot/cuboot-amigaone.o
  BOOTCC  arch/powerpc/boot/cuboot-kilauea.o
  BOOTAS  arch/powerpc/boot/gamecube-head.o
  BOOTCC  arch/powerpc/boot/gamecube.o
  BOOTAS  arch/powerpc/boot/wii-head.o
  BOOTCC  arch/powerpc/boot/wii.o
  BOOTCC  arch/powerpc/boot/treeboot-iss4xx.o
  BOOTCC  arch/powerpc/boot/empty.o
  HOSTCC  arch/powerpc/boot/addnote
  HOSTCC  arch/powerpc/boot/hack-coff
  HOSTCC  arch/powerpc/boot/mktree
  DTC     arch/powerpc/boot/gamecube.dtb
DTC: dts->dtb  on file "arch/powerpc/boot/dts/gamecube.dts"
  WRAP    arch/powerpc/boot/dtbImage.gamecube
rm arch/powerpc/boot/gamecube.dtb
make: Leaving directory `/tmp/ramdisk/linux-2.6.38'

$ file linux-2.6.38/arch/powerpc/boot/zImage
linux-2.6.38/arch/powerpc/boot/zImage: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), statically linked, with unknown capability 0x41000000 = 0xf676e75, not stripped

$ powerpc-linux-gnu-gcc -v
Using built-in specs.
Target: powerpc-linux-gnu
Configured with: ../gcc-4.3.2/configure --target=powerpc-linux-gnu --prefix=/tmp/ramdisk/gc-cross --enable-languages=c --disable-nls --without-headers
Thread model: posix
gcc version 4.3.2 (GCC)

$ powerpc-linux-gnu-as -V
GNU assembler version 2.18 (powerpc-linux-gnu) using BFD version (GNU Binutils) 2.18
I didnt tried to boot it on gc, because it need to be configured, as default config even didnt use framebuffer console. It was just a compilation check.

Did you used crosstools from my guide? Are you sure that compilation of tools itself went ok?
About this sed command in my guide - i used it specifically for my linux system, because configure script of binutils-2.18 conflicts with some newer version tools i use on my linux-box. Maybe you catch some problem like this - and didnt get tools compiled at all?

update 2 :D
Downloaded 2.6.39 kernel. Same cross tools, default config, no changes , no patches - same result, no errors and freshly builded zImage.

update 3
Not a good news. Tried to boot 2.6.39 on gc. But at the first, i wanted to recompile kernel to enable framebuffer console - when i get in config, i didnt find wii/gc videointerface. I search entire sourcetree, and there is no such device :( Checked gc-linux.org and the bad things come true - yes, they started to implement gamecube support into mainline kernel, but not all features currently implemented. So seems, that video part is one of them.

So, if you want to have most features you need to use 2.6.32 with mikep5 patch.

Re: Using a Kernel newer than 2.6.32

Posted: Wed Oct 05, 2011 7:12 pm
by liquitt
yeah i forgot to give more information...i was able to build it too but it doesn't boot but infact built one closer to 2.6.32 ...i think it was 33 and that one booted!

i'm on this :P

Re: Using a Kernel newer than 2.6.32

Posted: Wed Oct 05, 2011 7:43 pm
by infact
Yes it booted. I hacked in the framebuffer driver from 2.6.32. But it didnt get further.

btw. it is possible to use newer versions of binutils and gcc. I used binutils 2.21.1 and gcc 4.4.6. I will also try gcc 4.6.1 soon.

Re: Using a Kernel newer than 2.6.32

Posted: Wed Oct 05, 2011 7:56 pm
by arcticfox
infact wrote:Yes it booted. I hacked in the framebuffer driver from 2.6.32. But it didnt get further.
It's sad... But, if you dont need specific features of the newer kernels, i think, 2.6.32 is not a such bad variant. I hope you have bba, becuase, it will come very handy when you will make friendship between kernel and rootfs :D
If you want to continue experiments - i will glad to help :)

Re: Using a Kernel newer than 2.6.32

Posted: Wed Oct 05, 2011 8:08 pm
by infact
No, i dont have a bba (anymore :( ). I use a sd card with the root file system and a viper usb adapter as usbgecko for debugging purposes.

You may want to join us on irc for further discussion, if you have got some time ;-) http://chat.efnet.org:9090/?channels=%23gc-forever

Re: Using a Kernel newer than 2.6.32

Posted: Wed Nov 23, 2011 7:54 pm
by liquitt
i also suggested this to the mailing list and just got a response:
>Hey all,
>i was wondering if anybody would be interested in developing a new
>kernel patch a la mikep5, e.g. for the 3.x kernel.

I have created a Makefileset to apply the mikep5 code against a recent
debian stable kernel. See here:
http://gitorious.org/dockstar/emdebian- ... -35+mikep5
I also tried to backport the changes in mainline, but mikep5 has more
features and works better.