LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-11-2015, 02:23 PM   #1
GameCodingNinja
Member
 
Registered: Jul 2014
Posts: 100

Rep: Reputation: Disabled
How specific to my machine is my LFS build?


Say for example I were to take the hard drive of my LFS build and put it in a different computer. Granted, I'll need to generate a new kernel based on the different hardware but what about the differences in CPUs?

Say I go from an old single core AMD Athlon to a multi-core intel i7 chip? Does everything else also need to be recompiled? Are these binaries I compiled using chip specific registers?

Just curious.
 
Old 02-11-2015, 04:32 PM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Depends I suppose on the compiler options you have use to build the system and how different the two systems are, if you have used a lot of arch dependent optimizations you may run into anything from kernel panics to seg faults to just odd failures, best bet is just to 'suck it and see'.

Distros that are designed to run on a number of different machines even of the same basic architechture are quite complex an not heavily optimized, which is one of the main reasons I use LFS because I can tailer it to my individual machine.
 
Old 02-11-2015, 07:47 PM   #3
GameCodingNinja
Member
 
Registered: Jul 2014
Posts: 100

Original Poster
Rep: Reputation: Disabled
Thanks for the info. As I look through the LFS book, I don't think I see any arch dependent optimizations. I'm not savvy enough to deviate from the book without it breaking anything.

But when it comes to ./configure, it looks like some very specific information. I wander if that is capable of identifying and using CPU specific optimizations.
 
Old 02-11-2015, 07:53 PM   #4
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
configure is mostly concerned with deciideing what needs to be linked with, compiled and what needs to go where doesn't really affect the arch specific compilation, ( except in special cases ) too much, of course the further along you go with lfs/blfs tje more hardware problems you are going to run into, video and network are going to be your major causes of concern.
 
Old 02-11-2015, 10:42 PM   #5
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Quote:
Say for example I were to take the hard drive of my LFS build and put it in a different computer. Granted, I'll need to generate a new kernel based on the different hardware but what about the differences in CPUs?
To able to run LFS in any system you should build kernel with i686 option for 32bit system and generic x86_64 for 64bit system.

Build packages with i686-pc-linux-gnu for 32bit systems ad x86_64-unknown-linux-gnu for 64 bit systems.

Don't use a gcc -march compiler option specific to a system for example avoid 'athlon-xp'. Also check that some packages may use this specific cpu model option -march while building. Look logs of build output and build a correct one with generic cpu like i686 for 32 bit ones (for 64bit ones there is no such generic option; just don't let -march option while building.

For more info on sub-model-options see 'info gcc'.

Also try build a generic kernel with modules supporting each and every hardware. Use it as a reserve. After booting a different system with generic kernel, you can rebuild a kernel with modules for only that specific hardware.
 
  


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
VirtualBox Starter Pack - LFS as a Host For Your LFS Build basica Linux From Scratch 4 11-25-2015 12:02 PM
[SOLVED] i can't perfome make install commond while build binutils-build LFS plzzz help me Carl_cj Linux From Scratch 19 09-04-2014 11:52 AM
[SOLVED] The build is prepared but confused about the next steps to build the LFS system CBM200 Linux From Scratch 3 02-04-2014 10:47 AM
Exact steps to build kernel on a machine and copy it to another machine? ddel Linux - Newbie 1 03-29-2009 02:50 PM
Specific LFS ? taz.devil Linux - Distributions 3 12-13-2001 02:32 PM

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

All times are GMT -5. The time now is 06:44 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