Bug 94263 - ppc64 sungem patch to support imacG5
Bug#: 94263 Product:  Gentoo Linux Version: 2004.3 Platform: PPC64
OS/Version: Linux Status: RESOLVED Severity: major Priority: P2
Resolution: FIXED Assigned To: dsd@gentoo.org Reported By: lu_zero@gentoo.org
Component: Core system
URL:  http://ozlabs.org/pipermail/linuxppc64-dev/2005-May/004135.html
Summary: ppc64 sungem patch to support imacG5
Keywords:  InCVS
Status Whiteboard: 
Opened: 2005-05-28 02:48 0000
Description:   Opened: 2005-05-28 02:48 0000
From the forum item http://forums.gentoo.org/viewtopic-t-341963.html

"We recently acquired a new Dual G5 2.3 GHz desktop system from Apple (PowerPC 7,3), and tried to install Gentoo on it using the install-ppc64-g5-minimal-2005.0.iso install. After entering the default response at the first prompt [G5], the system starts booting then produces a kernel panic of the form (I have a literal screen shot if you are interested in all the details):

=======
i2c /dev entries driver
Oops: kernel access of bad area, sig: 11 [#1]
SMP NR_CPUS=2 POWERMAC
Modules linked in:
<snip>
NIP [ ] .create_iface+0x154/0x550
LR [ ] .create_iface+0x128/0x550
Call Trace:
.create_iface
.of_device_probe
.driver_probe_device
.driver_attach
.bus_add_driver
.driver_register
.of_register_driver
.i2c_keywest_init
.init
.kernel_thread
Instruction dump:
=======
"

------- Comment #1 From Josh Hursey 2005-06-01 13:13:30 0000 -------
As an update. We have been able to compile the kernel with the patch from here:
http://ozlabs.org/pipermail/linuxppc64-dev/2005-May/004140.html

After rebuilding the iso, it allows for progress in the startup. So that patch
seems to work to fix this problem. So it should just be a matter of adding it to
the list of patches for the linux kernel.

------- Comment #2 From Yuta SATOH (RETIRED) 2005-06-01 16:00:33 0000 -------
It seems that the patch that boots latest PowerMac G5 was merged in kernel 
2.6.12-rc5.
But, version 2.6.12-rc5 of gentoo-sources is not provided.
Please choose not geotoo-sources but vanilla-sources by selection of a kernel.

BTW, I made new LiveCD which contains kernel 2.6.12-rc5. 
However, since I don't have latest PowerMac G5, I tested only by old it.
Would you try this image and tell me results ?

ISO image (bziped)
http://dev.gentoo.org/~nigoro/ppc64/install-ppc64-newg5-minimal-2005.0.iso.bz2

MD5
http://dev.gentoo.org/~nigoro/ppc64/install-ppc64-newg5-minimal-
2005.0.iso.bz2.md5

Thanks.

------- Comment #3 From Chris Eagan 2005-06-03 08:38:36 0000 -------
We tried the build with a brand new ppc64 imacg5 and it booted properly.
Then we had some crazyness with the ethernet device. The system finds the
device and the driver is loaded. ifconfig knows all about it. We cannot
get the device to connect to the network. dhcp doesn't work and setting 
a manual ip still doesn't function. The output from dmesg is not helpful
either. Once ifconfig shows the device as up and active, attempts to ping
anything are denied.

Is there a workaround for this issue? or is the network device we are using
too new to work with the driver from nigoro's build?

------- Comment #4 From Yuta SATOH (RETIRED) 2005-06-04 10:18:29 0000 -------
Chris,
Thank you for your report.
First, I'm sorry about almost not knowing the information on new iMacG5 at present. 

Would you unplug ethernet cable and try once again, when booting?
Reference: http://perso.magic.fr/l_indien/linux-ImacG5/index.htm

In addition, would you write the information about Ethernet device ?
Information can be obtained in the following procedures.

1. find /proc/device-tree -type d -name ethernet-phy
2. move to the found directory.
3. cat compatible	(example: K2-5421)
4. od -x phy-id		(example: 0000000 0000 62e0)

And, I uploaded a new LiveCD image. 
This CD contains kernel 2.6.12-rc5-mm2 including the patch to more ppc64. 
If you have enough time, please test it.

http://dev.gentoo.org/~nigoro/ppc64/install-ppc64-newg5-minimal-2005.0-r1.iso.bz2

Thank you.

------- Comment #5 From Josh Hursey 2005-06-06 09:07:20 0000 -------
(In reply to comment #4)
> And, I uploaded a new LiveCD image. 
> This CD contains kernel 2.6.12-rc5-mm2 including the patch to more ppc64. 
> If you have enough time, please test it.
> http://dev.gentoo.org/~nigoro/ppc64/install-ppc64-newg5-minimal-2005.0-r1.iso.bz2


I just tested this iso on the new dual G5 box that I have access to. It boots
and gets all the way through to the shell prompt. Looks like the patches are
working.

Thanks,
Josh

------- Comment #6 From Gary Collins 2005-06-07 05:14:58 0000 -------
The fix seems to have address my issue with my Dual G5 2.7ghz box...  I am 
able to get to the shell prompt to slice and dice and install the os just fine..

Thanks for the fix.

------- Comment #7 From Chris Eagan 2005-06-08 07:14:31 0000 -------
Yuta,

Unfortunately the new build is having the same problem with the network card. We
have some information for you based on the commands you gave us though.

1. find /proc/device-tree -type d -name ethernet-phy
-> /proc/device-tree/ht@0,f2000000/pci@1/ethernet@f/ethernet-phy

2. move to the found directory.

3. cat compatible	(example: K2-5421)
-> B5461

4. od -x phy-id		(example: 0000000 0000 62e0)
-> 0000000 0000 60d3
   0000004

Thanks for your help,
-Chris

------- Comment #8 From Yuta SATOH (RETIRED) 2005-06-10 10:13:15 0000 -------
Chris,
Thank you for your information.

It seems to your network device that the driver is not supporting.
Probably, if the code for it is added to sungem_phy.c etc, it will operate.

Would you contribute this problem to the linuxppc64-dev mailing list [1] ?

Probably information will be further needed.
I think that it will be further solved early by them if you can do a direct reply. 

Thanks in advance.

[1]
https://ozlabs.org/cgi-bin/mailman/listinfo/linuxppc64-dev

------- Comment #9 From Yuta SATOH (RETIRED) 2005-06-10 10:25:27 0000 -------
Created an attachment (id=61003) [details]
FYI, kernel config of LiveCD 

------- Comment #10 From Yuta SATOH (RETIRED) 2005-06-18 11:38:18 0000 -------
Features
* Kernel 2.6.12-rc6 base.
* The patch for the network device of a brand new iMacG5 is included. 

ISO image (bzip2ed)
http://dev.gentoo.org/~nigoro/ppc64/install-ppc64-newg5-minimal-2005.0-r3.iso.bz2

MD5
http://dev.gentoo.org/~nigoro/ppc64/install-ppc64-newg5-minimal-2005.0-r3.iso.bz2.md5

------- Comment #11 From Ramon Rey Vicente 2005-06-21 07:25:23 0000 -------
i tried the 2005.0-r3 iso in my imac g5. Boots fine, but, links is not working,
and print the message that is 
trying to find the libstdc++.so.6 library. And, there is no portage or stages
files in the cd...

------- Comment #12 From Yuta SATOH (RETIRED) 2005-06-23 08:38:55 0000 -------
Thanks for your infomation.
The problem of links reproduced also in my environment. 
Would you try LiveCD of new revision ?

Portage and stage files are not contained in LiveCD of PPC64. 
Please get them from Gentoo mirror sites.

------- Comment #13 From Yuta SATOH (RETIRED) 2005-06-23 08:39:16 0000 -------
Revision update

Features
* gentoo-sources 2.6.12 base.
* The patch for the network device of a brand new iMacG5 is included. 
* The problem of links was fixed. (from Comment #11)
* Added ADSL connection support. (added the package rp-pppoe)

ISO image (bzip2ed)
http://dev.gentoo.org/~nigoro/ppc64/install-ppc64-newg5-minimal-2005.0-r4.iso.bz2

MD5
http://dev.gentoo.org/~nigoro/ppc64/install-ppc64-newg5-minimal-2005.0-r4.iso.bz2.md5

------- Comment #14 From Ramon Rey Vicente 2005-06-24 03:06:16 0000 -------
(In reply to comment #13)
> Revision update
> 
> Features
> * gentoo-sources 2.6.12 base.
> * The patch for the network device of a brand new iMacG5 is included. 
> * The problem of links was fixed. (from Comment #11)

Good job!, now works perfect for me.  

------- Comment #15 From Masatomo Nakano (RETIRED) 2005-06-25 14:40:06 0000 -------
OK. I tried the Live CD in comment #13 on iMac G5 requested by nigoro.
The network problem seems to be fixed. Great!

------- Comment #16 From Yuta SATOH (RETIRED) 2005-07-01 07:17:14 0000 -------
Created an attachment (id=62406) [details]
patch for network device of a brand new iMacG5

taken from linuxppc64-dev mailing list
http://ozlabs.org/pipermail/linuxppc64-dev/2005-June/004371.html

------- Comment #17 From Yuta SATOH (RETIRED) 2005-07-01 07:41:28 0000 -------
kernel herds,

I want this patch (in Comment #16) to be included in gentoo-sources until this 
is merged into the kernel source.
This supports the network device of a brand new iMacG5.
I think that it is a function required in order to install Gentoo on new iMacG5.
Please add it to gentoo-sources-2.6.12 or later version.

Thank you.

------- Comment #18 From Daniel Drake 2005-07-01 08:36:41 0000 -------
How come nobody has told Ben H that the patch works?

------- Comment #19 From Greg Kroah-Hartman 2005-07-01 09:49:38 0000 -------
Yes, let's wait till upstream accepts this patch (odds are they will not, it
should be cleaned up more...)

------- Comment #20 From Greg Kroah-Hartman 2005-07-01 09:50:15 0000 -------
Also, the Summary is not true anymore, this has nothing to do with "i2c
keywest",
right?

------- Comment #21 From Daniel Drake 2005-07-07 14:37:17 0000 -------
Bump...

------- Comment #22 From Daniel Drake 2005-07-16 15:51:11 0000 -------
Now applied upstream, will include in next release

------- Comment #23 From Daniel Drake 2005-07-30 12:55:26 0000 -------
Fixed in gentoo-sources-2.6.12-r7
Fixed in genpatches-2.6.12-11