cvs commit: hints lfs-from-osx.txt

tushar at tushar at
Fri Apr 16 17:20:31 PDT 2004

tushar      04/04/16 18:20:31

  Modified:    .        lfs-from-osx.txt
  Updated Hint: lfs-from-osx
  Revision  Changes    Path
  1.2       +14 -10    hints/lfs-from-osx.txt
  Index: lfs-from-osx.txt
  RCS file: /home/cvsroot/hints/lfs-from-osx.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -u -r1.1 -r1.2
  --- lfs-from-osx.txt	1 Apr 2004 15:29:19 -0000	1.1
  +++ lfs-from-osx.txt	17 Apr 2004 00:20:31 -0000	1.2
  @@ -7,17 +7,21 @@
   DESCRIPTION: This hint lets you install LFS on a (newworld) Macintosh without first installing a binary distribution. This is accomplished by cross-compiling everything in chapter 5, and then rebooting instead of chrooting. This hint doesn't repeat anything from the LFS 5.0 book, it only tells what to do differently. Maybe it is also helpful if someone tries to compile LFS from another system (MinGW and Cygwin come to mind), I'm interested to know if you try.
   * Mac OS X 10.3 on a partitioned hard disk
  -* Use fink ( to get "gawk", "sed", "wget". You'll also want "fileutils", so you can do "ls foo -al".
  +* Use fink ( to install "gawk", "sed", "wget". You'll also want "fileutils", so you can do "ls foo -al".
   * ext2fsx (, latest version
  -* crosstool (, at least 0.28-pre7:
  +* crosstool (, at least 0.28-rc1:
   * yaboot:
   * hfsutils (
   * powerpc-utils ( download and
  +* the following patches from the lfs-patches project:
  +    bash-2.05b-crosscompile.patch
  +    coreutils-5.0-remove_du.patch
  +    linux-2.4.23-nognuexpr.patch
  +    sed-4.0.7-cross_hack_for_powerpc_linux_gnu.patch
  +    yaboot-1.3.11-crosscompile.patch
  @@ -84,7 +88,7 @@
   Next, you need to "lock" the cross-compiler to the glibc library which will be in /tools: Edit /opt/crosstool/powerpc-750-linux-gnu/gcc-3.3.3-glibc-2.3.2/lib/gcc-lib/*/*/specs by putting "/tools" in front of all occurences of "/lib/".
   Next, you need to install linux and the linux headers. I used linux-2.4.25, which has HFS+ support. linux-2.6.4 also has that, but has some problems compiling on Mac OS X.
  -Apply crosstool-0.28-pre7/patches/linux-2.4.24/linux-2.4-bsd-expr.patch
  +Apply linux-2.4.23-nognuexpr.patch
   For all invocations of "make", append: 
   CROSS_COMPILE=powerpc-750-linux-gnu- ARCH=ppc
   Follow the book's section "installing linux headers".
  @@ -102,18 +106,18 @@
   * gcc (pass 2): "expect" is not installed so the test at the beginning does not work. Only enable-languages=c (no c++). After installing, change the specs file in /tools/lib/gcc-lib/*/*/specs by removing all occurences of "/tools", and changing the number after "cross-compile" to 0 instead of 1.
   * binutils (pass 2): append "--disable-nls" to the configure command. Don't prepare for re-adjusting.
   * gawk
  -* coreutils: the "du" command uses the UTILS_OPEN_MAX macro, which configure sets wrongly. Therefore, apply coreutils-crosscompile.patch before running configure.
  +* coreutils: apply coreutils-5.0-remove_du.patch before running configure.
   * bzip2: append to the make command: CC=powerpc-750-linux-gnu-gcc AR=powerpc-750-linux-gnu-ar RANLIB=powerpc-750-linux-gnu-ranlib
   * gzip
   * diffutils
   * findutils
   * make
   * grep
  -* sed: apply: sed-cross-to-powerpc-linux-gnu.patch
  +* sed: apply sed-4.0.7-cross_hack_for_powerpc_linux_gnu.patch before running configure
   * gettext
   * patch: remove "setmode" from the configure script, append to make: CC=powerpc-750-linux-gnu-gcc
   * tar
  -* bash: apply bash-crosscompile.patch, run "autoconf" before running "configure" (takes patch into account and fixes another cross-compile problem), ignore error for make and make install, don't reload bash
  +* bash: apply bash-2.05b-crosscompile.patch and run "autoconf" before running "configure", ignore error for make and make install, don't reload bash
   * util-linux: prepend configure with CC=powerpc-750-linux-gnu-gcc CFLAGS=-I/opt/crosstool/powerpc-750-linux-gnu/gcc-3.3.2-glibc-2.3.2/include/ and don't build or install "more". You can use "tail -n <line_count> <file>" if you want to see a part of a file.
   It is not necessary to install tcl, expect, dejagnu, ncurses, perl, texinfo
  @@ -121,7 +125,7 @@
   Before getting to chapter 6, we need to make our system in $LFS/tools bootable.
  -Unpack yaboot, and apply: yaboot-crosscompile.patch
  +Unpack yaboot, and apply: yaboot-1.3.11-crosscompile.patch
   Compile and install with:
   make yaboot CROSS=powerpc-750-linux-gnu-
   cp second/yaboot /

More information about the hints mailing list