From 4f2d91dc657f2af91cc14f1f6e7eec98acf52b7c Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 17 Dec 2021 20:15:38 +0800 Subject: [PATCH] cross-ng: linux and linux-headers: specify ARCH for cross build --- chapter05/linux-headers.xml | 5 +++-- chapter06/kernel.xml | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/chapter05/linux-headers.xml b/chapter05/linux-headers.xml index 24415bf55..ea510b85f 100644 --- a/chapter05/linux-headers.xml +++ b/chapter05/linux-headers.xml @@ -56,9 +56,10 @@ used, because it requires rsync, which may not be available. The headers are first placed in ./usr, then copied to the needed - location. + location. Replace x86 with a value suitable + for your target machine if it's not a 32-bit or 64-bit x86: -make headers +make headers ARCH=x86 find usr/include -name '.*' -delete rm usr/include/Makefile cp -rv usr/include $LFS/usr diff --git a/chapter06/kernel.xml b/chapter06/kernel.xml index 8c7950422..190d47f66 100644 --- a/chapter06/kernel.xml +++ b/chapter06/kernel.xml @@ -58,7 +58,7 @@ There are several ways to configure the kernel options. Usually, This is done through a menu-driven interface, for example: -make ARCH=x86 CROSS_COMPILE=$LFS_TGT- menuconfig +make ARCH=x86 CROSS_COMPILE=$LFS_TGT- menuconfig The meaning of make environment variables: @@ -66,7 +66,9 @@ ARCH=x86 - Configure the kernel for running on the target machine. + Configure the kernel for running on the target machine. + Replace x86 with a value suitable + for your target machine if it's not a 32-bit or 64-bit x86.