LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 11-01-2014, 07:32 PM   #1
tcymtz
LQ Newbie
 
Registered: Oct 2014
Posts: 8

Rep: Reputation: Disabled
How to find the target triplet?


Hello, I am on step 5.2 of LFS and I have hit another snag. He wants me to find the target triplet before continuing:

Code:
Before continuing, be aware of the name of the working platform,
often referred to as the target triplet. A simple way to determine the
name of the target triplet is to run the config.guess script that comes
with the source for many packages. Unpack the Binutils sources and run
the script: ./config.guess and note the output. For example, for a modern
32-bit Intel processor the output will likely be i686-pc-linux-gnu.
I am unfamiliar with unpacking in linux, so I made a temp folder to practice in and copied the 3 binutils* files from sources into it. I looked up unpacking on Google but I am just getting errors. Not sure what I am doing wrong. Can someone tell me which of the following 3 files I need to unpack to get the target triplet:

binutils-2.24-load_gcc_lto_plugin_by_default-1.patch
binutils-2.24-lto_testsuite-1.patch
binutils-2.24.tar.bz2

And also, what is the command to unpack it/them?

Lastly, when I do unpack it/them, do I just type './config.guess' while I am in my 'temp' folder and I will see the target triplet?

Thank you.
 
Old 11-01-2014, 09:16 PM   #2
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
The one to "unpack" is the tar.bz2 file (aka tarball). It contains the source code tree archived in a bzipped tarball. You unpack (or untar) it by opening a terminal, changing directories to where it's located, and using the tar command on it like this...
Code:
tar xf binutils-2.24.tar.bz2
After a few seconds, the prompt returns. Then change directories to the new directory created by untarring the tarball and run the config.guess command. Like this...
Code:
cd binutils-2.24
./config.guess
i686-pc-linux-gnu <--my result on this machine
All of this is just sort of educational. You don't do anything with this information. It's so you'll realize that the LFS_TGT variable is intentionally slightly different from the actual triplet name that you just discovered. That causes the first builds of Binutils and GCC to result in a cross-compiler which by definition is not linked to anything in the host system. It's the key strategy of the LFS method for distancing the tools built in chapter 5, and ultimately the finished LFS system, from the libraries and headers of the host system.
 
Old 11-01-2014, 10:07 PM   #3
tcymtz
LQ Newbie
 
Registered: Oct 2014
Posts: 8

Original Poster
Rep: Reputation: Disabled
Cool. I got it all to work. Thanks for explaining that. It was very helpful.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find symlink target name in script germanyzulu Linux - Software 4 08-14-2015 10:23 AM
Unetbootin does not find files and target. Novatian Linux - Software 3 04-23-2014 03:25 PM
How do I find the target directory (not the target fs) of a mount -bind raananh Linux - Newbie 2 01-13-2013 09:18 AM
[SOLVED] Target filesystem cant find sbin/init Manobi Ubuntu 3 12-27-2010 06:41 PM
Find Target for Any Window Manager fozner Linux - Desktop 0 02-17-2009 08:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 11:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration