Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#37 closed task (fixed)

The ppc64 version of 'To Boot or to Chroot ?' is wrong.

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

Description

Background: I use a G5 (ppc970 cpu) which has to have a 64-bit kernel nowadays (64-bit was always recommended). When I want to test the ppc book, I use linux32 to alter the kernel personality. The only visible results of that are that uname shows ppc instead of ppc64. Interestingly, it is totally capable of running both versions of libc.so.6 in /tools/lib{,64}, and anything else in /tools.

Unfortunately, the glibc configury gets well and truly confused when trying to build 64-bit glibc:

gcc -m64 ../sysdeps/powerpc/powerpc32/libgcc-compat.S -c  -I../include -I/building/glibc-build/csu -I/building/glibc-build -I../sysdeps/powerpc/powerpc32/elf -I../sysdeps/powerpc/elf -I../sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu -I../sysdeps/powerpc/powerpc32/fpu -I../nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32 -I../sysdeps/unix/sysv/linux/powerpc/powerpc32 -I../nptl/sysdeps/unix/sysv/linux/powerpc -I../sysdeps/unix/sysv/linux/powerpc -I../sysdeps/ieee754/ldbl-128ibm -I../sysdeps/ieee754/ldbl-opt -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/powerpc -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/powerpc/powerpc32 -I../sysdeps/wordsize-32 -I../sysdeps/powerpc/fpu -I../nptl/sysdeps/powerpc -I../sysdeps/powerpc -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl  -I.. -I../libio -I.  -D_LIBC_REENTRANT -include ../include/libc-symbols.h  -DPIC -DSHARED  -DHAVE_DOT_HIDDEN   -DHAVE_INITFINI -DASSEMBLER  -I/building/glibc-build/csu/.    -o /building/glibc-build/csu/libgcc-compat.os -MD -MP -MF /building/glibc-build/csu/libgcc-compat.os.dt -MT /building/glibc-build/csu/libgcc-compat.os
../sysdeps/powerpc/powerpc32/libgcc-compat.S: Assembler messages:
../sysdeps/powerpc/powerpc32/libgcc-compat.S:70: Error: syntax error; found `@' but expected `,'
../sysdeps/powerpc/powerpc32/libgcc-compat.S:70: Error: junk at end of line: `@local'
../sysdeps/powerpc/powerpc32/libgcc-compat.S:77: Error: syntax error; found `@' but expected `,'
../sysdeps/powerpc/powerpc32/libgcc-compat.S:77: Error: junk at end of line: `@local'
[ snip lots more of these ]
make[2]: *** [/building/glibc-build/csu/libgcc-compat.os] Error 1
make[2]: Leaving directory `/building/glibc-2.4/csu'
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory `/building/glibc-2.4'
make: *** [all] Error 2

So, for ppc64 I propose to change the book to

uname -a | grep '^Linux.*2\.6\..*ppc64' && echo "ok to chroot" || echo "you must boot"

Change History (6)

comment:1 by ken, 19 years ago

Milestone: CLFS 1.0
Priority: majorcritical

Forgot to set the priority etc. Guess I'd better give people time to comment before I change the book.

comment:2 by Jim Gifford, 19 years ago

Owner: changed from clfs-commits@… to ken

Make the change. Should we also make this change for the other architectures also?

comment:3 by ken, 19 years ago

Status: newassigned

I knew there was something else I was supposed to do, but trying to get working sound is addictive.

Still grovelling with my version of booting, thanks for the reminder.

comment:4 by ken, 19 years ago

forgot to answer the question -

For x86_64 and x86_64-64, which is where people were having problems, the book is correct. I don't really understand how the kernel personality works, but it's possibly an issue in sparc and mips - someone who has the hardware and the time can look to see if chrooting from the other wordsize works.

For ppc, if you go the other way (64-bit kernel, userspace fully 32-bit) there are different issues (use linxux32 to run your shell, and to run the getties) but we don't really support that (you need a ppc64 compiler for your kernel). Note that running a 32-bit kernel on ppc970 processors has not been supported for some time.

comment:5 by ken, 19 years ago

Resolution: fixed
Status: assignedclosed

Fixed in r1708.

comment:6 by Jim Gifford, 18 years ago

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