LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Distributions (http://www.linuxquestions.org/questions/linux-distributions-5/)
-   -   Looking for a highly customizable distro... (http://www.linuxquestions.org/questions/linux-distributions-5/looking-for-a-highly-customizable-distro-4175425248/)

soroush 09-02-2012 07:39 AM

Looking for a highly customizable distro...
 
I'm looking for a Linux distribution to be installed on an embedded system with i586 architecture. Such a distro should satisfy following conditions:

1. It should provide new versions of packages (gcc version 4.7, openCV 2.4 etc). Not necessarily provide last stable versions, (like what ArchLinux doing) just be updated enough.

2. It should provide source code instead of precompiled, non-optimized binaries. I would like to compile all system processes with optimization flags turned on (-O3 -mtune=i586) since the system is performance critical.

3. The board has a very slow cpu. I would like to be able to cross-compile packages for that distro on my laptop. Or may be install the whole OS on microSD card from laptop (not using board).

Also I would like to replace default kernel with my own hard real-time one (2.6.38.8-xenomai)

Googling around I found that there is a distro named Gentoo which compiles everything instead from scratch. i can't find detailed documentation about distro, so asking here. (well, I'm lazy enough to avoid searching in depth for documentations...)

Will Gentoo satisfy my needs? Or else what you will suggest instead?

pixellany 09-02-2012 08:22 AM

Quote:

Googling around I found that there is a distro named Gentoo which compiles everything instead from scratch. i can't find detailed documentation about distro, so asking here.
????
What do you need that is not found here?:
http://www.gentoo.org/doc/en/

Also, have you considered LFS?

Quote:

I'm lazy enough to avoid searching in depth for documentations...
That does note bode well for embarking on setting up a customized embedded application......

soroush 09-02-2012 08:37 AM

Quote:

Originally Posted by pixellany (Post 4770582)
Also, have you considered LFS?

Versions in official LFS are too old. I need some new features of C++11.

found this: http://www.gentoo.org/proj/en/base/embedded/handbook/ I'm now reading docs. (boring...)

pixellany 09-02-2012 08:44 AM

Quote:

(boring...)
sorry....

konsolebox 09-02-2012 09:26 AM

Quote:

Originally Posted by soroush (Post 4770559)
I'm looking for a Linux distribution to be installed on an embedded system with i586 architecture. Such a distro should satisfy following conditions:

1. It should provide new versions of packages (gcc version 4.7, openCV 2.4 etc). Not necessarily provide last stable versions, (like what ArchLinux doing) just be updated enough.

Sorry but the price of having a highly customizable distro is only by having everything composed by [re]compilation. Some packages are still not adaptable to newer versions of packages in which they are dependent from. Using new untested versions gives risk of breaking your system. But that's still your option. Gentoo by default masks untested packages, and also hard-masks packages which are known to break dependencies.

Quote:

2. It should provide source code instead of precompiled, non-optimized binaries. I would like to compile all system processes with optimization flags turned on (-O3 -mtune=i586) since the system is performance critical.
You could do these things in Slack and other distros as well, but Gentoo is more specialized with that. If you are to use newer packages, expect possibly lesser number of dependent packages that would work.

Quote:

3. The board has a very slow cpu. I would like to be able to cross-compile packages for that distro on my laptop. Or may be install the whole OS on microSD card from laptop (not using board).
Hmm.. I haven't tried this yet. But I think the details are about the first 2 stages, and using buildpkg or quickpkg.

Quote:

Also I would like to replace default kernel with my own hard real-time one (2.6.38.8-xenomai)
You could build your own portage if you like.

Quote:

Googling around I found that there is a distro named Gentoo which compiles everything instead from scratch. i can't find detailed documentation about distro, so asking here. (well, I'm lazy enough to avoid searching in depth for documentations...)

Will Gentoo satisfy my needs? Or else what you will suggest instead?
Well it's best if you just try it and see for yourself.

soroush 09-02-2012 03:21 PM

Ok dudes,
I read documentation of Gentoo Embedded project. Sounds like it's all about making a cross toolchain on a Gentoo host. There is workaround about cross-compile a Gentoo for a target machine...

I think I'm going to remove all C++11 features from my code and start to configure an LFS system.

TobiSGD 09-02-2012 03:59 PM

If you want to cross-compile optimized distros you may want to have a look at the T2 SDE: http://www.t2-project.org/

soroush 09-02-2012 04:08 PM

Quote:

With T2 all packages are built with the optimisations you want and the target platform. Other
distributions usually build for generic i386 or Pentium. With T2 you can automatically build
Linux, glibc, X.org, KDE, GNOME and the other CPU intensive packages - yes the whole distribution! - optimized for your CPU.
Quote:

T2 contains the latest versions of packages.
One great aspect of T2 is that the package configurations usually point to the latest packages
and so also one of the latest kernels.

That's exactly what I'm looking for! Thank you for the link.

konsolebox 09-02-2012 07:53 PM

@soroush: Gentoo is capable of that. You just have to unmask packages at your risk. There's a general method to unflag all packages marked for testing, and probably those of hard-masked as well.

Btw, do they mean they already have precompiled packages optimized for specific systems?

soroush 09-03-2012 08:47 AM

Quote:

Originally Posted by konsolebox (Post 4770989)
Btw, do they mean they already have precompiled packages optimized for specific systems?

There are stage3 tarballs for Gentoo: http://www.gossamer-threads.com/list...oo/user/225834

I never installed Gentoo before. Not sure about choosing between T2, Gentoo and CLFS. The later one seems to be most flexible and smooth. T2 is a nightmare. Most problematic thing I ever seen... Gentoo should be less problematic. If it's capable of being compiled from s host machine using a cross compiler, I would like to install Gentoo instead of CLFS.

I'm gonna try both and post results here.

Johnny Who 09-03-2012 10:47 AM

Gentoo, that `s it!(If you are too lazy or too bored to install this, go on with sabayon, but Gentoo is what you ask for). How about a flavour of BSD?

konsolebox 09-03-2012 08:06 PM

Quote:

Originally Posted by soroush (Post 4771444)
There are stage3 tarballs for Gentoo: http://www.gossamer-threads.com/list...oo/user/225834

Certainly. But I don't mean about Gentoo, I mean T2. And not only about i586/i686 builds. Those with machine-specific optimizations e.g. Pentium4, Core2, etc.
Quote:

I never installed Gentoo before. Not sure about choosing between T2, Gentoo and CLFS. The later one seems to be most flexible and smooth. T2 is a nightmare. Most problematic thing I ever seen... Gentoo should be less problematic. If it's capable of being compiled from s host machine using a cross compiler, I would like to install Gentoo instead of CLFS.

I'm gonna try both and post results here.
Best results are not always taken in first attempts especially if you like playing around with CFLAGS and use flags. (If you don't mind spending time speeding up your system (risky, and most of the time causes Segmentation Faults on runtime of builds), don't mind about the people who'd call you a ricer. It's not always about getting the best speed, but saving power and making use of the advanced cpu instructions available. What's the use of them being there if it won't be used?)

Anyway good luck.

Ion Silverbolt 09-04-2012 04:36 AM

Gentoo is well suited for what you want to do. I wouldn't bother with cross compiling though if that system is only i586. Compile the whole thing from another computer in a chroot and fill up a binhost. I frequently install Gentoo on slow systems all the time without even compiling a single package on the local system that way.

Mageia is i586-based if you want something simpler to work with. Otherwise, I wouldn't bother with compiling on that fossil unless you intend to compile it elsewhere.

soroush 09-04-2012 08:34 AM

Thanks for all answers.

Currently available options are:
  • Gentoo (Cross compiling)
  • Buildroot
  • CLFS (Cross-compiled Linux from scratch)
  • T2
I'm going to try them in specified order. I'll post results here in a couple of days.


All times are GMT -5. The time now is 12:29 AM.