diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml
index b06f5ce2f..65e5e802f 100644
--- a/chapter01/changelog.xml
+++ b/chapter01/changelog.xml
@@ -63,6 +63,15 @@
+May 10th, 2003 [gerard]: Chapter 05 - Binutils (pass1,
+pass2, locking glibc and adjusting toolchain): Change tooldir to /stage1
+(likewise we use tooldir=/usr in chapter 6).
+
+May 10th, 2003 [gerard]: Chaper 05 - Kernel headers:
+Removed the usage of cp -H because there are
+distributions out there that do not know about the
+-H option.
+
May 10th, 2003 [gerard]: New
gcc-3.2.3-specs-3.patch.
diff --git a/chapter05/binutils-pass1-inst.xml b/chapter05/binutils-pass1-inst.xml
index 53a59fb7b..7aaeb37ca 100644
--- a/chapter05/binutils-pass1-inst.xml
+++ b/chapter05/binutils-pass1-inst.xml
@@ -32,7 +32,7 @@ statically.
Continue with compiling the package:
-make LDFLAGS="-all-static -s"
+make tooldir=/stage1 LDFLAGS="-all-static -s"
The meaning of the make option is:
@@ -48,10 +48,10 @@ variable.
And finish off installing the package:
-make install
+make tooldir=/stage1 install
make -C ld clean
-make -C ld LIB_PATH=/stage1/lib
+make -C ld tooldir=/stage1 LIB_PATH=/stage1/lib
Do not remove the binutils-* directories. We need them again
later on in this chapter.
diff --git a/chapter05/binutils-pass2-inst.xml b/chapter05/binutils-pass2-inst.xml
index 77b464c17..22eadeceb 100644
--- a/chapter05/binutils-pass2-inst.xml
+++ b/chapter05/binutils-pass2-inst.xml
@@ -8,13 +8,12 @@ mkdir ../binutils-build
cd ../binutils-build
CFLAGS="-O2 -pipe" ../binutils-&binutils-version;/configure --prefix=/stage1 \
--enable-shared --with-lib-path=/stage1/lib
-make LDFLAGS="-s"
-make check
-make install
+make tooldir=/stage1 LDFLAGS="-s"
+make tooldir=/stage1 check
+make tooldir=/stage1 install
-cd ld
-make clean
-make LIB_PATH=/usr/lib:/lib
+make -C ld clean
+make -C ld tooldir=/stage1 LIB_PATH=/usr/lib:/lib
Do not remove the binutils-* directories after the installation.
We'll need this directory again in chapter 6 as-is.
diff --git a/chapter05/kernelheaders-inst.xml b/chapter05/kernelheaders-inst.xml
index 3c2f5fe0d..fc79a0e25 100644
--- a/chapter05/kernelheaders-inst.xml
+++ b/chapter05/kernelheaders-inst.xml
@@ -43,7 +43,8 @@ symlink:
Install the platform specific-header files:
-cp -HR include/asm /stage1/include &&
+mkdir /stage1/include/asm &&
+cp include/asm/* /stage1/include/asm &&
cp -R include/asm-generic /stage1/include
Install the cross-platform kernel header files:
diff --git a/chapter05/lockingglibc.xml b/chapter05/lockingglibc.xml
index 95d086467..b306398be 100644
--- a/chapter05/lockingglibc.xml
+++ b/chapter05/lockingglibc.xml
@@ -7,7 +7,7 @@
Installation of Binutils
-make -C ld install-data-local
+make -C ld tooldir=/stage1 install-data-local
You can remove the binutils-* directories now.
diff --git a/chapter06/adjustingtoolchain.xml b/chapter06/adjustingtoolchain.xml
index 78de9e897..7add84c7f 100644
--- a/chapter06/adjustingtoolchain.xml
+++ b/chapter06/adjustingtoolchain.xml
@@ -3,12 +3,11 @@
cd binutils-build
-make -C ld INSTALL=/stage1/bin/install install-data-local
-SPECFILE=/stage1/lib/gcc-lib/*/*/specs
-sed -e 's@/lib/ld.so.1@/stage1/lib/ld.so.1@g' \
- -e
-'s@/lib/ld-linux.so.2@/stage1/lib/ld-linux.so.2@g' \
- $SPECFILE > XX
+make -C ld tooldir=/stage1 INSTALL=/stage1/bin/install install-data-local
+
+SPECFILE=/stage1/lib/gcc-lib/*/*/specs &&
+sed -e 's@/stage1/lib/ld.so.1@/lib/ld.so.1@g' \
+ -e 's@/stage1/lib/ld-linux.so.2@/lib/ld-linux.so.2@g' $SPECFILE > XX
mv XX $SPECFILE
unset SPECFILE