• Hey there, Guest! Share your idea for a new trophy in the forums and win bragging rights and a $100 Amazon gift card! Check out the New Community Trophy Contest here!
  • Pardon our dust as we work on some regularly scheduled forum maintenance. You may notice some missing features during this time. Thank you for your patience!

Creating Specialized, Custom Linux Distributions

Pyroflea

Distinguished
Mar 18, 2007
2,156
0
19,960
89
Hey everybody,

I've recently been considering taking on a project that is way out of my comfort zone. :D Basically, I'm wanting to learn to put together custom Linux distributions for specialized applications. I have a few ideas at this point, but nothing is set in stone. I'm basically just wanting to learn how to do this for my own self satisfaction, and to expand my current knowledge of Linux/Unix in general. Also being back in school, I'm just irking to find some programming projects :D

What I'm looking for are some resources on how to go about doing this. Most of the results I've found are just LFS, or guides on modifying current installations. I can't really find much on starting from scratch. I just honestly have no idea where to start.

Any suggestions, links, etc. are very greatly appreciated. I look forward to discussing the feasibility of this all with you guys :)

Thanks,


- Jesse
 

bmouring

Distinguished
May 6, 2006
1,215
0
19,360
26

+1

If you wanted to continue down this path, you'd either a) need to purloin one of the "install choices" programs and re-purpose it for your needs b) write your own or c) force a default install and make users change things if needed.

I personally feel just going through a LFS build will essentially give you a deep understanding of what goes into a linux system. Gentoo also gives you this experience but has a nice little package management system called portage (base don FreeBSD's ports system but some nice improvements)
 

Pyroflea

Distinguished
Mar 18, 2007
2,156
0
19,960
89
Alright, thanks guys. As I said, I wasn't sure how feasible this was to begin with. I'll just have to get into some HEAVY modification :D I'll also run through LFS and Gentoo as time permits.

Thanks again,


- Jesse
 

Pyroflea

Distinguished
Mar 18, 2007
2,156
0
19,960
89


Working on that as we speak :D

(Homework can wait, right?)

EDIT: Also, I was wanting to work on a distribution for embedded solutions. Any particular topics I need to research, or is it just the basic stuff like optimization and low-resource programs/packages?
 

bmouring

Distinguished
May 6, 2006
1,215
0
19,360
26


Look into:
Yocto - a build system to create system images
OpenEmbedded - also abuild system, Yocto is based on it
CodeSourcery Lite - An easy-to-use, free-as-in-beer (and eventually makes it back to the gcc project) cross toolchain
Angstrom - a base distro used by the first two
busybox - A tool that replaces many of the standard GNU utilities on resource-limited devices, may need to configure and build your own to fit needs
u-boot - Embedded bootloader du jour. Useful as you may need to configure how the device boots or use it for lowlevel HW debugging
 

Corrytonapple

Distinguished
Sep 12, 2011
48
0
18,540
1

Excellent guide.
Consider Arch Linux, although it is a bit more than what you want. It comes with a package manager and basic CLI applications. There is no GUI on it, and really just a CLI waiting for you to customize it.
http://archlinux.org
 

Pyroflea

Distinguished
Mar 18, 2007
2,156
0
19,960
89


Thank you for you suggestion! I have in fact used Arch, and if I did end up going the modification route was debating between Debian and Arch :) I just have an interest at an even lower level than Arch offers, and was wanting to get into modifying/compiling my own kernel even. We'll see how things go though :)
 

bmouring

Distinguished
May 6, 2006
1,215
0
19,360
26

Gentoo.
 

Pyroflea

Distinguished
Mar 18, 2007
2,156
0
19,960
89


Normally I would, but he seems to be MIA as of late. :lol:



Gentoo it is then :D I'm hoping to have time to try this all out on the weekend. I had a couple assignments dumped on me, but they shouldn't take too long ;)
 

Pyroflea

Distinguished
Mar 18, 2007
2,156
0
19,960
89


I'll be sure to contact you once I get to that point. I'm not the artsiest person out there :D



That is true, welcome back (although it's a tad belated ;) )
 

Pyroflea

Distinguished
Mar 18, 2007
2,156
0
19,960
89
Got some more questions! Seems the more I learn, the less I know :D

I also got recommended some other tools on another forum (mostly Scratchbox and Buildroot), so I've got some comparing and whatnot to do.

Another thing I've run into is QEMU. I've found guides for compiling ARM kernels and running them through QEMU on an x86 PC for testing/dev purposes (at least I think that's what they meant :D). Would this be the way to go just as far as learning/developing things, or would there be a better option? (Don't have the ARM hardware yet, waiting for the release of a certain board later this year)

Also slightly less related, but due to the security breach of the kernel.org site, I can't seem to find a download for the kernel itself (following a guide for something :p) anywhere else. Anybody know where I can find it?

Thanks,


- Jesse

EDIT: apt-get source linux-source-2.6.38 :D That'll do for now, just for practice
 

bmouring

Distinguished
May 6, 2006
1,215
0
19,360
26

Rasberry Pi?

Scratchbox is a toolset for cross-compiling, usually single applications. Building components for my phone (n900) uses scratchbox, and it seems pretty easy to use as far as cross-compiling within the confines of the target system go (making sure it can use the libraries that will be available, etc.)

I haven't used buildroot before, but it seems fairly reasonable, so long as your hardware's supported (or you're willing to invest the time to make it supported)

I've heard QEMU is a fine way to approach testing that your applications work properly on an arm system, but usually pays off a bit better if you can get ahold of an already-created image that's fairly close to what you expect to see on the device

https://github.com/torvalds/linux, how to use git
 

Pyroflea

Distinguished
Mar 18, 2007
2,156
0
19,960
89


How did you know! :D But yes. The B Model of course.



Again, they were just recommended to me and I still need to do some research. I'm still working on figuring out exactly what everything you recommended me is. :p



Thank you! I did a search there last night, but I must have just screwed something up royally :D Thanks for pointing it out though.
 

Pyroflea

Distinguished
Mar 18, 2007
2,156
0
19,960
89
I think for now I'm just going to tear apart Debian and work with that. I plan on removing literally everything not needed (this distro will JUST be for this board), and then adding in whatever drivers required, packages I want, etc.

I still plan on going through with a Gentoo install this weekend (Stage 2 I'm thinking), but that will just be for the purpose of learning.

Thanks,


- Jesse
 

bmouring

Distinguished
May 6, 2006
1,215
0
19,360
26
Stage 2 vs. Stage 3 will only win you lower compile times if you plan on creating an x86 (32-bit) install on a more recent processor at the cost of additional time spent upfront. You literally only run a few scripts as I recall (and unless you plan on reading the contents of those scripts, doesn't teach you too much about what's going on). x86_64 predefines a lot of functionality/capabilities such that it's difficult to really squeeze any extra performance out of the build system.

In short: unless you really feel it will add something, go with Stage 3 over Stage 2
 

Pyroflea

Distinguished
Mar 18, 2007
2,156
0
19,960
89
Alright. I must have a misunderstanding of what the difference is. I'll read up on the differences and then start fooling around. I basically have only gotten around to partitioning the drive so far :p
 

bmouring

Distinguished
May 6, 2006
1,215
0
19,360
26

Experience here alone I've used more times that I care to count (including my recent work at my real job; a customized Linux distro running on (you guessed it) recent ARM platforms; those flash devices don't partition themselves... yet)
 
Thread starter Similar threads Forum Replies Date
J Open Source Software 1

Similar threads