Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#23 closed task (fixed)

ppc64 outstanding issues

Reported by: ken Owned by: ken
Priority: major Milestone: CLFS Standard 1.0.0
Component: BOOK Version: CLFS Standard 1.0.0
Keywords: Cc:

Description

Since we're supposed to be creating tickets to discuss non-trivial stuff, this is a general place to record breakage in ppc64. Some of this actually is trivial, but it's convenient to record it here as a reminder.

  1. in chapter 5, for glibc headers and probably for the 64-bit glibc we need to add the following to config.cache:

echo "libc_cv_mlong_double_128ibm=yes" >> config.cache echo "libc_cv_mlong_double_128=yes" >> config.cache echo "libc_cv_powerpc64_tls=yes" >> config.cache

  1. chapter 7 is problematic - my understanding is that running ybin to bless the boot partition

(yes, that really is the term) will either fail because the host is a machine not using Open Firmware, or (e.g. on a 32-bit mac) will update the host's bootloader. Possibly, it can be done if the host is the same machine running OSX, I don't know and I'm not about to try that.

  1. chapter 10 needs to install perl with the Configure_multilib and libc_lib64 patches plus -Dlibpth and -Dcc as in other multilib.
  1. chapter 10 needs to build the following as both 32 and 64 bit: zlib, ncurses, readline,

flex, gettext, procps, file, libtool, bzip2, e2fsprogs, shadow,

  1. chapter 10 binutils needs --libdir=/usr/lib64, and from memory there might be test failures.

I haven't tested these toolchain versions yet.

  1. chapter 10 gcc remove --disable-multilib and add --libdir=/usr/lib64 --libexecdir=/usr/lib64
  1. chapter 10 add lib64 references when configuring findutils, gawk, groff.
  1. powerpc-utils doesn't want to build with a compiler which defaults to -m64. I've got a new

version of the patch which allows us to pass ${BUILD32} as EXTRACFLAGS - builds, but I'm not entirely sure about it: on a distro you can use nvsetenv to enquire about the nvram, but that doesn't work here.

  1. yaboot - we need to pass -m32 to '$(CC) --print-libgcc-file-name' in the Makefile, and

CC is already overridden to ${CROSS}gcc, so I use a sed - sed -i "s/\(-print-libgcc-file-name\)/${BUILD32} \1/" Makefile

ISTR that it needed more patches to compile - I've got a pile of random patches from fedora,

but although it ompiles and the first-stage (OS chooser) works, the second stage (linux loader) doesn't work.

  1. In general, chapter 10 needs loat of CC="gcc ${BUILD64}" and similar CXX, to match the other

multilib arches. This is purely cosmetic if our default compiler is 64-bit.

Change History (14)

comment:1 Changed 14 years ago by Jim Gifford

Owner: changed from clfs-commits@… to ken jhuntwork

comment:2 Changed 14 years ago by Jim Gifford

Owner: changed from ken jhuntwork to ken jhuntwork@…

comment:3 Changed 14 years ago by ken

I've (at last) completed the cross-tools with the current toolchain and linux-headers, I suppose this could still show breakage when I eventually get to use them, but I'll log what has come up so far in case I get run over by the proverbial bus:

For glibc headers (only - not needed for 32- or 64- bit glibc), the same additions as ppc

echo "libc_cv_mlong_double_128ibm=yes" >> config.cache

echo "libc_cv_mlong_double_128=yes" >> config.cache

echo "libc_cv_powerpc64_tls=yes" >> config.cache

plus two more, maybe these depend on the host (/me notes in passing that compiling glibc headers spews out horrendous error messages if the host compiler doesn't support the target's options)

echo "libc_cv_initfini_array=yes" >>config.cache

echo "libc_cv_gcc_thread=yes" >>config.cache (yes, three underscores in a row there)

and a fix-up for glibc to use the new headers :) in powerpc, #ifdef PPC64_ELF_H is used as a test for powerpc64 on linux - this used to be defined by including asm-ppc64/elf.h. Now, that file just defines ASM_POWERPC_ELF_H which does not provide a distinction between ppc and ppc64. For our purposes, we can use the following sed on every build of glibc throughout the whole process, because each of them installs <sys/procfs.h>.

sed 's/PPC64_ELF_H/powerpc64/' \

sysdeps/unix/sysv/linux/powerpc/sys/procfs.h.orig \

sysdeps/unix/sysv/linux/powerpc/sys/procfs.h

Clearly, at some point glibc will have to bite the bullet about the headers, but unless fedora update their antique glibc-kernheaders, or the latest attempt to create genuine userspace headers in the kernel succeeds, we are stuck with this.

comment:4 Changed 14 years ago by Jim Gifford

Ken,

Do I need to change to the headers script, or is the change elsewhere?

comment:5 Changed 14 years ago by ken

Jim,

the change is upstream's merging of ppc and ppc64 into powerpc - the old file was only included for ppc64, the new one is included for both 32 and 64. Perhaps, changing the headers so that the old definition gets generated within 64-bit part of the powerpc version of elf.h is an option, but I'm more comfortable at the moment with just doing the sed in the ppc64 book - no point in accidentally breaking something else in the headers.

comment:6 Changed 14 years ago by ken

Owner: changed from ken jhuntwork@… to ken
Status: newassigned

Doing this in stages. Starting with glibc and cosmetic fix for choose.xml. This should get us back to where we were before the glibc and header updates (ok for chapters 5, 6, 8).

comment:7 Changed 14 years ago by ken

First stage complete, glibc instructions should now be correct.

comment:8 Changed 14 years ago by ken

Build complete, apart from the little matter of the bootloader. I'll fix the rest of the final-system chapter before I start fighting yaboot.

comment:9 Changed 14 years ago by ken

Powerpc-utils is in the clear (copied the necessary yaboot files from a ppc32 build on the same machine with the same toolchain, boots ok after rerunning ybin), so the error I've seen since last year is either in yaboot, or in my technique. Getting closer.

comment:10 Changed 14 years ago by ken

Yaboot is now sorted for multilib on my machine, but it's a bit late to start editing those pages tonight. As well as the patches (one for sata boxes) it needs a sed to pass -m32 to gcc and another to pass -melf32ppclinux to ld. I know we can use both patches on ppc32, so that will tidy things up a little.

I probably ought to clean up the example yaboot.conf as well, nobody, not even me now, uses a separate /boot partition on ppc{,64}, and green text on the "menus" would match lfs's grub.

After that, it will be time to look at the boot option.

comment:11 Changed 14 years ago by ken

Yaboot fixed, r1549. yaboot.conf still to do. The last remaining issue is yaboot (and dependencies) in the boot option, which applies equally to ppc. I'll open a separate ticket for that.

comment:12 Changed 14 years ago by ken

Opened ticket #35 for the ppc and ppc64 temporary-system boot option. I'll revisit yaboot.conf later.

comment:13 Changed 14 years ago by ken

Resolution: fixed
Status: assignedclosed

yaboot.conf wasn't so bad as I remembered (thought I'd included a /boot partition in the example) - added colour, enable open firmware, small textual enhancements, and examples of what the SATA device paths look like. r1556.

Done.

comment:14 Changed 13 years ago by Jim Gifford

Version: unstable1.0.0
Note: See TracTickets for help on using tickets.