Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Notes on installing ppc64 (64bit userland)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
downsj
n00b
n00b


Joined: 24 Jun 2017
Posts: 19

PostPosted: Thu Jun 29, 2017 12:58 am    Post subject: Notes on installing ppc64 (64bit userland) Reply with quote

I wanted to share some of my notes while they're still fresh in my mind.

The following stage3 works: http://distfiles.gentoo.org/releases/ppc/autobuilds/20170322/stage3-ppc64-20170322.tar.bz2

Regardless of how "optional" it may sound, you do need a separate /boot formatted to ext2 when using yaboot. Also, if you're wanting to dual boot MacOS X, the yaboot autoconfiguration will get it wrong. Don't let it format, just save the config and then fix the bootstrap partition to point to the one you created instead of the one belonging to MacOS... After installing the bootstrap, holding Option at boot will give you both MacOS and Linux as bootable systems.

It's noted in the ppc64 handbook that you must install yaboot-static; that is still very true. That's one of the few PPC64 specific items which is accurate.

Use "make g5_defconfig" to produce a baseline kernel config for G5.

genkernel is slightly broken on PPC64, apparently. You must specify the full path of the current kernel config in order to do anything with it, including building an initramfs (which you will need for yaboot, it's not optional). Specify --kernel-config=/usr/src/linux/.config as an argument to do so.

Bootstrap the toolchain first thing, so that you're on gcc-5.4.0 or better. Don't forget to rebuild texinfo as part of this.

Oh, and run AHT to check your RAM first.

Anyway, hope this helps anyone else considering embarking upon this odyssey.
Back to top
View user's profile Send private message
trigggl
Apprentice
Apprentice


Joined: 26 Aug 2007
Posts: 250
Location: Arkansas

PostPosted: Fri Dec 29, 2017 5:19 pm    Post subject: Reply with quote

I'm tempted to pull my IBM RS/6000 44P-170 back down from the attic. There are some things on the Mac that the IBM doesn't possess, so I would probably need to keep some things from the config files.

How hard do you think it would be to re-install the latest Gentoo, since do doubt, what's on the old black box probably has a 5 year old (or longer) Gentoo install.
_________________
Greg
Back to top
View user's profile Send private message
starpa
n00b
n00b


Joined: 13 Jan 2018
Posts: 9

PostPosted: Sat Jan 13, 2018 8:37 am    Post subject: Reply with quote

How does your yaboot.conf look with a separate /boot partition?
And do you have 5 partitions in total without dual booting?

Mine looks like this and I'm having issues getting root to mount, and I'm suspecting yaboot.conf

sda1 Apple_partition map
sda2 bootstrap
sda3 boot
sda4 swap
sda5 root

I have my initrmfs and kernel in /boot.
I used /usr/share/genkernel/arch/ppc64/kernel-2.6.g5 as the config for genkernel (there wasn't anything in called /usr/src/linux/.config)
I'm not sure what you mean by "make g5_defconfig" and bootstraping the toolchain first.

I apologize but I am very new to this and I'm just trying to get a working distro on this g5. The handbook is kind of all over the place.
Back to top
View user's profile Send private message
schwarzygesetzlos
Apprentice
Apprentice


Joined: 11 Dec 2004
Posts: 187
Location: Funeralopolis

PostPosted: Mon Jan 22, 2018 3:31 pm    Post subject: Reply with quote

For a good working G5-kernel have a look at: https://forums.gentoo.org/viewtopic-t-1055626.html

Probably you are right to suscpect yaboot, it is veeery picky these days. You need to emerge yaboot-static and the boot partition must be ext2 (ext4 used to work, but seemingly not any longer). I got dualboot Gentoo + MorphOS on my G5 and my partition layout looks like this:

Code:
/dev/sda1: PARTLABEL="Apple"
/dev/sda2: UUID="42dede74-c20d-4493-96f6-daf13c99589e" TYPE="swap" PARTLABEL="swap"
/dev/sda3: LABEL="bootstrap" TYPE="hfs" PARTLABEL="yaboot"
/dev/sda4: UUID="e4225bdc-7245-4286-8fed-24c2369ae275" TYPE="ext2" PARTLABEL="kernel"
/dev/sda5: LABEL="Boot" TYPE="hfs" PARTLABEL="DH0"
/dev/sda6: PARTLABEL="DH1"
/dev/sda7: PARTLABEL="DH2"
/dev/sda8: LABEL="gentoo_ppc32" UUID="e3d6899c-391f-459e-8a07-09a42c75cfec" TYPE="ext4" PARTLABEL="untitled"
/dev/sda9: LABEL="stable_ppc32" UUID="65e24a4d-ec13-4d6f-add5-997216950e55" TYPE="ext4" PARTLABEL="untitled"
/dev/sda10: LABEL="exp_ppc32" UUID="e3d6899c-391f-459e-8a07-09a42c75cfec" TYPE="ext4" PARTLABEL="untitled"
/dev/sda11: PARTLABEL="Extra"
/dev/sda12: PARTLABEL="Extra"

Don't know how I got those sda11, sda12 partitions but they seem to do no harm...
_________________
Talos II. [Gentoo Linux] | PMac G5 11,2. PMac G4 3,6. PBook G4 5,8. [MorphOS 3.18 / Gentoo Linux] | Vampire V4 SA [ApolloOS / Amiga OS 3.2.2]
Back to top
View user's profile Send private message
starpa
n00b
n00b


Joined: 13 Jan 2018
Posts: 9

PostPosted: Thu Feb 01, 2018 12:48 am    Post subject: Reply with quote

Got it working! Thanks for your help.

Boot partition was ext2 but my yaboot.conf was messed up. Took me awhile to realize the "partition=x" is your /boot and "root=/dev/sdax" is your root partition.
I also tried it without a separate boot partition in ext3, but obviously didn't work.

I then had a fan issue where they would just ramp up to 100%. That kernel-config you linked was my savior.
I don't know if this is a common issue but you have to do "make menuconfig" again and change Device drivers>Macintosh drivers>Power management (your model)<M>

Do you have to recompile every time you make a kernel-config change? I was able to reboot and the fans stopped.

This is fun stuff.
Back to top
View user's profile Send private message
schwarzygesetzlos
Apprentice
Apprentice


Joined: 11 Dec 2004
Posts: 187
Location: Funeralopolis

PostPosted: Sat Feb 10, 2018 9:48 am    Post subject: Reply with quote

starpa wrote:
I then had a fan issue where they would just ramp up to 100%. That kernel-config you linked was my savior.
I don't know if this is a common issue but you have to do "make menuconfig" again and change Device drivers>Macintosh drivers>Power management (your model)<M>

To get fan control working you need these components, CONFIG_I2C_POWERMAC and the relevant windfarm part for your machine:
CONFIG_I2C_POWERMAC=m
CONFIG_WINDFARM=m
CONFIG_WINDFARM_PM81=m
CONFIG_WINDFARM_PM72=m
CONFIG_WINDFARM_RM31=m
CONFIG_WINDFARM_PM91=m
CONFIG_WINDFARM_PM112=m
CONFIG_WINDFARM_PM121=m

I think the problem is they are not necessarily autoloaded. The windfarm is controlled through I2C_POWERMAC, which loads the other necessary parts. Once I figured that out, I just created a config file /etc/modules-load.d/fancontrol.conf. It consists of only one line, the module name of I2C_POWERMAC. You find the module names of the modules you built in /lib/modules/<your-kernel>/kernel/. You don't need to to that when you compile theses parts statically (not as modules) in your kernel.

starpa wrote:
Do you have to recompile every time you make a kernel-config change?

Of cource, or the nice options you just changed never get used. ;)
_________________
Talos II. [Gentoo Linux] | PMac G5 11,2. PMac G4 3,6. PBook G4 5,8. [MorphOS 3.18 / Gentoo Linux] | Vampire V4 SA [ApolloOS / Amiga OS 3.2.2]
Back to top
View user's profile Send private message
starpa
n00b
n00b


Joined: 13 Jan 2018
Posts: 9

PostPosted: Sun Feb 11, 2018 11:37 am    Post subject: Reply with quote

Yea those are the ones in the make menuconfig that I changed. I made them all <M> just in case. That config you linked was pretty extensive.

So if I want to change my profile to systemd or gnome, after doing the emerge steps to update it do I have to recompile the kernel also?

Sorry if this is a dumb question, I guess I'm just not understanding what the profiles are for.
Is it just a portage thing, or do I have to repeat the steps in the handbook from that point on again?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22876

PostPosted: Sun Feb 11, 2018 5:26 pm    Post subject: Reply with quote

You might need to recompile the kernel if the new software depends on kernel features that are not enabled in your current kernel. Although the list is maintained by hand, Portage is reasonably good at warning you via log messages if you install software that depends on kernel features you currently lack. It's extremely unlikely that such a conversion could break the system so badly that it cannot be repaired, so the practical worst-case scenario (which is still relatively unlikely) is that you find yourself unable to start GNOME until you reconfigure and recompile the kernel. Working from a text-only console is not as convenient, but is quite viable.

Profiles are a shortcut for groups of system settings. Users who want GNOME generally want any packages that have optional GNOME-integration features to enable those features, so the profile sets USE flags to implement that. Similarly, profiles can disable features or packages known not to work in a given environment. You see that more for hardware profiles, but also sometimes in the hardened profiles (which will mask out packages that simply cannot work as written on hardened). Generally, you do not need to repeat steps from the handbook. However, after a profile change, you will need to rebuild the affected packages to apply the changes that the profile configures. Going to the earlier GNOME example, setting your profile does not instantly add GNOME-integration to packages which offer it. Rather, it sets Portage so that, when next you rebuild those applications, they will be instructed to enable their GNOME-integration.

If this is not clear enough, please post the specific commands and/or packages you are contemplating and we can give you a more definitive answer.
Back to top
View user's profile Send private message
starpa
n00b
n00b


Joined: 13 Jan 2018
Posts: 9

PostPosted: Fri Feb 16, 2018 1:05 am    Post subject: Reply with quote

That was very clear.

Thank you
Back to top
View user's profile Send private message
starpa
n00b
n00b


Joined: 13 Jan 2018
Posts: 9

PostPosted: Fri Feb 23, 2018 9:48 am    Post subject: Reply with quote

I got another question for anyone out there that I can't seem to solve about changing to systemd:
Is there something I need to change in the yaboot.conf to get systemd to work?

I was able to install systemd packages and I have the correct USE flags enabled/disabled, but I'm still starting in OpenRC.
Changed profile to systemd (stable) and performed emerge -avDN @world
I setup the kernel, made sure UDEV=yes
compiled with make && make modules_install and did genkernel --install initramfs (both put in /boot)

I'm following https://wiki.gentoo.org/wiki/Systemd

When I get to the bootloader part is says nothing of yaboot.
I see you have to pass an argument for grub2.
Is yaboot not compatible with systemd?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22876

PostPosted: Sat Feb 24, 2018 3:02 am    Post subject: Reply with quote

From your post, it sounds like you did not modify the kernel command line as described for grub. Although the procedure may be different for yaboot, the requirement is the same. You must pass an appropriate init= to the kernel from your bootloader.
Back to top
View user's profile Send private message
starpa
n00b
n00b


Joined: 13 Jan 2018
Posts: 9

PostPosted: Sat Feb 24, 2018 5:09 am    Post subject: Reply with quote

My mistake. I was doing it at the bottom of the image section.
I passed the argument directly after the kernel image and it works now.

Looks like this:

Code:
image=/kernel
   append="init=/usr/lib/systemd/systemd"
   label=Linux
   read-only
   initrd=/initramfs
   initrd-size=8192

Thanks for the pointing that out.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum