I am working on linux from scratch and I am at section 5.6 linux-5.5.3 API Headers. I was able to extract the tar, cd into the new directory, and make. At this point I am inside the linux-5.5.3 directory. The command I am having trouble with is this:
cp -rv usr/include/* /tools/include
It just returns:
cp: target '/tools/include' is not a directory
What does work for me is changing the command to:
cp -rv usr/include/* ./tools/include
I did this because the only "tools" directory I know of is two levels up at the top. Here is an approximate tree:
mnt/lfs (mount point for the lfs partition)
|-sources
| |-*Many tar archives*
| |-linux-5.5.3
| |-*Some Directories*
| |-usr
| |-include
|-tools
I followed along with the book 100% and compiled all the other packages as instructed.
My question: How should I proceed? Should I just do what works with the upper-level "tools" directory or should I go back and troubleshoot? If I should troubleshoot, what specifically should I do?
This is the chapter I am reading for reference: http://www.linuxfromscratch.org/lfs/view/stable/chapter05/linux-headers.html
I followed along with the book 100%
No, you did not. The symlink from /tools
to $LFS/tools
is created in chapter 4.2 Creating the $LFS/tools
Directory:
mkdir -v $LFS/tools ln -sv $LFS/tools /
You ask:
what specifically should I do?
It is imperative that you follow the instructions exactly. It is even more important that for each and every command in the book, you fully understand the command, you fully understand what the command does, you fully understand why the command is there, and you fully understand why the command is at that place.
How should I proceed? Should I just do what works with the upper-level "tools" directory […]?
This is a good example of the above: this can't work, and it is important to understand why it can't work.