morfast wrote: > Hello,everyone > > I wrote a script to accomplish the building of the tool chain. I use a > variable in the script instead of the /tools soft link to refer to the > $LFS/tools directory. The script seems to finish without errors. But > when I try to chroot to the $LFS directory, a error message was encountered:
You've missed the point of the symlink. It's actually a very necessary part of setting up the build environment, since it means that your paths will look the same both inside and outside of chroot. There's nothing wrong with changing the value of the $LFS directory to something besides '/mnt/lfs'. There's also nothing wrong with changing 'tools' to be something else, if you're consistent, but you need to keep the principle of the thing intact. Think about it... in the book's example, what you have after creating the symlink is: /tools -> /mnt/lfs/tools Any packages you configure with '--prefix=/tools' wind up inside the /mnt/lfs/tools directory because that symlink exists. The binaries you made have been placed in /mnt/lfs/tools, but for all intents and purposes, they work like they exist in /tools. So when you run the chroot command, you place yourself inside '/mnt/lfs' and mask off anything in the path above that -- '/mnt/lfs' is the new '/'. So now the binaries that thought they are in '/tools' outside of chroot still work because '/mnt/lfs/tools' has now effectively become '/tools'. You follow? -- JH -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
