LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Compiling Binutils 2.20.1 (https://www.linuxquestions.org/questions/linux-from-scratch-13/compiling-binutils-2-20-1-a-912470/)

lfs_mm 11-08-2011 05:16 PM

I did found the trouble maker...

In the root directory... i had already a /tools folder which had some crap in it. I removed this folder and created a simlink to $LFS/tools. Now it worked.

Thanks for other the help! Hope i get further tomorrow with compiling gcc 4.5.1.
Just as question: I only want to work the CHAPTER 5 of the LFS Manual to get a functional toolchain. After that can I copy the toolchain to a already compiled linux kernel? Will the toolchain be able to compile further tools?

druuna 11-09-2011 01:37 AM

Hi,

Before you start you need to correct this:
Quote:

Originally Posted by lfs_mm
lfs@marius-HP-Pavilion-dv9500-Notebook-PC:~$ bash version-check.sh
bash, version 4.2.10(1)-release
/bin/sh -> /bin/dash

The link should point to bash and not dash.

Quote:

Originally Posted by lfs_mm
Just as question: I only want to work the CHAPTER 5 of the LFS Manual to get a functional toolchain. After that can I copy the toolchain to a already compiled linux kernel? Will the toolchain be able to compile further tools?

Although I'm not 100% sure what it is you want to do, at the end of chapter 5 there is a caution note (5.35. Changing Ownership - Caution) which indicates that you can re-use the temporary environment. It does assume that this is done to build another LFS system. It also is partially machine depended, the temporary environment does use parts of the host system (the kernel being one).

Hope this helps.

lfs_mm 11-09-2011 04:16 AM

Ok i'll correct that.

Maybe I misunderstand the LFS manual.. I thought that the Toolchain will be prepared that it is host independent. I refer to section 5.2:
Quote:

The overall goal of Chapter 5 is to produce a temporary area that contains a known-good set of tools that can be
isolated from the host system.
My main goal is to prepare the toolchain on my laptop and afterwoods i'd like to copy the toolchain to our embedded device which runs with an ATOM processor (x86). We already compiled a kernel (2.6.39) there. This toolchain should help to compile further tools for the embedded device. The embedded device have enough cpu power so we thought that such a toolchain would be a huge relieve. Is there a main problem in this goal ?

druuna 11-09-2011 05:49 AM

Hi,
Quote:

Originally Posted by lfs_mm (Post 4519569)
Maybe I misunderstand the LFS manual.. I thought that the Toolchain will be prepared that it is host independent. I refer to section 5.2:
Quote:

The overall goal of Chapter 5 is to produce a temporary area that contains a known-good set of tools that can be
isolated from the host system.

That is basically true. But, as you might have noticed, no kernel is installed in chapter 5 (only the API headers are). Once you reach chapter 6 you chroot into the environment you just created in chapter 5. The hosts kernel is still used, but the sane environment is used to build a fully functional LFS (which chapter 5 does not. It is a limited, sane environment).

Quote:

My main goal is to prepare the toolchain on my laptop and afterwoods i'd like to copy the toolchain to our embedded device which runs with an ATOM processor (x86). We already compiled a kernel (2.6.39) there. This toolchain should help to compile further tools for the embedded device. The embedded device have enough cpu power so we thought that such a toolchain would be a huge relieve. Is there a main problem in this goal ?
I don't have any experience building LFS/Linux on embedded devices, but the first thing that does come to mind: Are both platforms the same? You mention that the embedded platform is x86, how about the host you are building the temporary environment on? What you are building now is based on the hosts architecture, which might not (or might) be the same as your embedded system.

I do wonder if this is going to work. You might want to keep us updated on your progress, it could be of value for others that want to try this.

Hope this helps.

lfs_mm 11-09-2011 07:08 AM

I will keep you posted to my progress with the toolchain. I approached the section "5.8 Adjusting the Toolchain". Everything else worked well.
The exact kernel version of the embedded device is 2.6.39.1. I downloaded it on my host system into the sources folder. I used this for the section "5.6 Linux-2.6.35.4 API Headers" to expose the API to my kernel version (2.6.39.1).
Further information will follow or further questions will be asked.


All times are GMT -5. The time now is 03:41 AM.