LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-24-2013, 09:05 PM   #1
KansaiRobot
Member
 
Registered: Dec 2013
Location: Japan
Distribution: Debian...very few times Ubuntu
Posts: 51

Rep: Reputation: 0
Source based distribution for development


Hello Everybody this is my first post and would appreciate if someone can help me.

I have some experience working with Linux. In the past I have used Fedora, and lately Debian.

The thing is I have used Linux because I needed it without thinking much about definitions and I need them now. So far my experience is limited to Fedora and lately Debian. Ergo, binary based distributions. Within there I compiled programs and always had a Hard Disk to store my files. not even once I had to build the kernel or the userland. just my programs.

My problem is now I am working with a "Source Based Distribution for Development for a microcontroller without a hard disk. And I dont know what that means

So I would appreciate definitions.

Another definition I would like to get is : "image file" (bin.gz and img.gz)

It seems the way of working here is way different to what I am used to. It seems whenever I write a program (using C) I have to put that source (and the makefile) in the source of the whole system, make make config to change any configuration I would like and then rebuild the entire thing each and every time! (really?)

Is that how this "source based distribution for development" works? Has any of you have any experience or comment on that.

I would really appreciate your feedback on this to help my confused state of mind.

Thank you very much

Kansai

Last edited by KansaiRobot; 12-24-2013 at 09:12 PM.
 
Old 12-24-2013, 09:52 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 11,687
Blog Entries: 12

Rep: Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903Reputation: 2903
The short definition would be that source-based distribution is one in which all software is compiled for sources, rather than installed from binary packages. You download the source code for the software, rather than a copy of the already-compiled program file, and compile it locally.

This will tell you more about compiling software. http://linuxgazette.net/issue38/pollman.html

An image file is a file which contains a compressed image of, say, a CD. When decompressed, it replicates the file structure and files of the original. If you are familiar with the Windows program "Ghost," it works by creating an "image" of the target. You may need special-purpose software to restore the image; for example, if you want to recreate a CD to a new disc, you need to use the "burn image" tool in your CD burning program, not the "copy" tool to do so.

Wikipedia has a nice article on image files: https://en.wikipedia.org/wiki/Image_file_formats

Last edited by frankbell; 12-24-2013 at 10:00 PM.
 
1 members found this post helpful.
Old 12-24-2013, 11:28 PM   #3
KansaiRobot
Member
 
Registered: Dec 2013
Location: Japan
Distribution: Debian...very few times Ubuntu
Posts: 51

Original Poster
Rep: Reputation: 0
Thank you very much for your reply

I am wondering about the normal development flow in these kind of distributions. Do I really have to rebuild everything from scratch every time?
And if I do project 1 and then project 2 do I have to have the source code of both projects?

To understand my confusion please take a look at the pic

Click image for larger version

Name:	Development Flow.jpg
Views:	13
Size:	106.5 KB
ID:	14312

Normally in desktop binary distributions, I work on a project, compile it and then write the executable on some directory. Later when I work on a different project I build it and the executable is in another directory. It works incrementally and I don't need to have the original system at all. Even more, I don't even need the source code of project 1, just the binaries to add project 2.

But from what I have read for source based distributions (without a HD) I work on a project, then put it in a directory, use make config to configurate it and then build everything. This will make me a image file 1 that I write on flash

Later if I work on project 2 I have to put it in a directory and then using the original system use make config again and then build everything again to generate image file 2 to write on flash.

In other words I can not use Image file 1 to increment project 2 over it, but instead I have to use the original system files

Is that how it works? Or am I missing something?

Kansai

Last edited by KansaiRobot; 12-24-2013 at 11:30 PM.
 
Old 12-25-2013, 07:12 AM   #4
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
It's hard to guess without knowing exactly what are you comparing against... That would help. What are you used to?

You also are mixing apples and oranges here.

You can perfectly develop an OS based for a microcontroller in any Linux (binary or not), or even in Windows or MacOSX if that's your call. There are also virtual machines, native sdks and that stuff for that.

And you can always cross-compile, of course.

So, what are you exactly trying to do?

Are you maybe developing apps for a mobile phone? Are you developing or hacking an OS for an embedded device? Developing regular applications? Developing drivers? We need to know that.

-----

Now, about source based distributions, what I use and know is Gentoo. This OS is compiled from the Ground, and you have all the source code right there. But that really shouldn't be a thing that will stop you from using your favourite binary distro either. There are -lib and -devel packages in most distros that you can use to get the source of the libraries or applications that you wish, so you can #include them in your projects or something... we would need to know more specific details about "WHY" you need (or why you think you need) the sources of your whole OS.

You can always get them, but maybe you are trying to kill a fly with a bomb here.

-----

About your other question, you really shouldn't need to rebuild most parts of anything nowadays. That's what build systems are for. There's gnu make/autotools/automake, cmake, pmake, nmake, etc. Those should evaluate the dependencies, modification dates et al, and decide what parts of given project need to be rebuilt. All the frontends use this nowadays.

Definitely, you don't need to rebuild your OS each time you compile a program.

Source distros, however, need a way to control ABI breakage. Sometimes, when you update a given lib (let's say SDL or libpng), all or most of the programs that are linked dynamically to that library will remain broken (and won't work) until you recompile them against the new version of the library.

In Gentoo, portage (it's "package manager", to call it something) can take care of that. There's also a now to be deprecated tool to do that, that's called "revdep-rebuild". In Linux From Scratch the one to take over that responsibility would be the user.

In those cases, just like you have to rebuild the OS applications depending on libpng, you would also need to rebuild your program if it depends on libpng.

But I have no idea if that's what you are talking about, since you spoke in such general terms...

I hope this offer at least a starting point to iron the issue a bit. Feel free to ask for details if you need more info.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Looking for a skinny distribution for C/C++ development mlegako@gmail.com Linux - Distributions 2 08-11-2013 01:03 PM
Which distribution is the best for development? nitzix Linux - Distributions 1 06-17-2012 02:03 AM
move development environment from distribution to distribution ikkyusan Linux - Desktop 1 07-06-2010 05:23 AM
LXer: Alan Cox on open-source development vs. proprietary development LXer Syndicated Linux News 0 10-25-2007 05:21 PM
Best Linux distribution for commercial development chuckleberry Linux - Software 1 02-18-2006 09:12 AM


All times are GMT -5. The time now is 07: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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration