smallest linux?
smallest linux?
What is the smallest, complete, self-compiling Linux?
Is there even such a thing?
Puppy is "small" - only about 50MB. But it is not "self-contained" at all. It does not include the source code. It does not include the tools for processing the source code. It does not include the source code for those tools...
Some Puppy source is made available. How complete it is seems fuzzy... Anyway, it seems to be at least three CDs!
There are some quite small Linux distributions. Some fit on just one floppy disk, such as tomsrtbt. But how big is the source? And the tools? And the source for the tools?
Does anyone have a linux that is complete and self-contained, preferably all fitting on one CD? With a simple magic re-make-everything script? GUI, web browsers, etc not required -- just a usable kernel, command-line utilities, file system, etc.
Interesting references:
http://www.dwheeler.com/sloc/redhat71-v ... 1sloc.html
a list of the current total source sizes for Linux -- the kernel is over 2 million lines of code
2437470 kernel-2.4.2 ansic=2285657,asm=144411,sh=3035,perl=2022,yacc=1147, tcl=576,lex=302,awk=248,sed=72
A tiny self-compiling C compiler - only about a thousand bytes!
http://fabrice.bellard.free.fr/otcc/
My goal was to write the smallest C compiler which is able to compile itself. I choose a subset of C which was general enough to write a small C compiler. Then I extended the C subset until I reached the maximum size authorized by the contest: 2048 bytes of C source excluding the ';', '{', '}' and space characters.
http://www.toms.net/rb/
Is there even such a thing?
Puppy is "small" - only about 50MB. But it is not "self-contained" at all. It does not include the source code. It does not include the tools for processing the source code. It does not include the source code for those tools...
Some Puppy source is made available. How complete it is seems fuzzy... Anyway, it seems to be at least three CDs!
There are some quite small Linux distributions. Some fit on just one floppy disk, such as tomsrtbt. But how big is the source? And the tools? And the source for the tools?
Does anyone have a linux that is complete and self-contained, preferably all fitting on one CD? With a simple magic re-make-everything script? GUI, web browsers, etc not required -- just a usable kernel, command-line utilities, file system, etc.
Interesting references:
http://www.dwheeler.com/sloc/redhat71-v ... 1sloc.html
a list of the current total source sizes for Linux -- the kernel is over 2 million lines of code
2437470 kernel-2.4.2 ansic=2285657,asm=144411,sh=3035,perl=2022,yacc=1147, tcl=576,lex=302,awk=248,sed=72
A tiny self-compiling C compiler - only about a thousand bytes!
http://fabrice.bellard.free.fr/otcc/
My goal was to write the smallest C compiler which is able to compile itself. I choose a subset of C which was general enough to write a small C compiler. Then I extended the C subset until I reached the maximum size authorized by the contest: 2048 bytes of C source excluding the ';', '{', '}' and space characters.
http://www.toms.net/rb/
Yes, I think I did mess with Forth back in the 1980's... I do remember it being very compact, but can't recall if it also has self-compiling aspects.
Is there a Forth, Lua, Python...? We need a wiki page summarizing programming languages for Puppy: what is available, how to get it, etc. The closest I can find is
http://puppylinux.org/wikka/OnlineResources
That is actually a very interesting resource/list -- but seems to have nothing to do with actually installing programming languages locally...
Is there a Forth, Lua, Python...? We need a wiki page summarizing programming languages for Puppy: what is available, how to get it, etc. The closest I can find is
http://puppylinux.org/wikka/OnlineResources
That is actually a very interesting resource/list -- but seems to have nothing to do with actually installing programming languages locally...
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
Programming Languages in Puppy
Flash is going Forth again (Lock up your programmers)
Languages IN Puppy:
Also available in special circumstances with a following wind:
Languages IN Puppy:
- Linux Script (similar to MS Dos batch files) Widely used by GuestToo and Barry
Tcl/tk (pronounced tickle and very powerful and mature)
PuppyBasic - also called wxbasicscript ( a smaller version of wxbasic) - we are just starting with this - MU created this especially for Puppy
XUL - built into Mozilla - I think this has great potential for Puppy but am too stupid to implement . . . Byzantine OS uses this
SVG - similar to actionscript - seen a tetris game written in this at croczilla. . .
javascript - thus of course Ajax (the present hyped language)
Actionscript - well there is openflash and wink but no one is programming directly in this
- Lua - pupget - very interesting language for games (as a glue) - good community
Tinyc - front end may be in preparation . . .
GCC C (Puppy can compile its own code with an add on)
nasm - assembler (G2 dotpup)
Also available in special circumstances with a following wind:
- Perl - pupget
Java - command line version available somewhere
Ruby - With Qemu Puppy
Python - available from grafpup
Xbasic - just go to website and install - GUI code also runs on Windows
Gambas - I loved this but no one else was keen
RealBasic - now free - not got this working John Murga may have done so?
ASQ - pre alpha design stage - Lobster insanity
X11 Basic (was a potential Puppy Basic - never got used)
As I understand it, Forth is an interpreted language; each 'word' that makes up the program is compiled and executed on the fly. The general idea of Forth is the only logical, self-explanatory, or intuitive approach to a programming language that I've seen. For some reason no one can explain, it can't get any respect - as Lobster's post shows.kethd wrote:Yes, I think I did mess with Forth back in the 1980's... I do remember it being very compact, but can't recall if it also has self-compiling aspects...
http://www.linuxfromscratch.org/
http://www.gentoo.org/
These are Distributions built from source on the End-users machine.
For a concept like Puppy it would make no sense.
Example:
wxBasic is built from the sources of Gtk, wxWidgets, Basic.
The final binary is 2 MB compressed.
The source + uncompressed binaries of wxWidgets + Basic is approx 70 MB.
You if you would add all this into puppy, you could not use it on small USB-sticks.
Mark
http://www.gentoo.org/
These are Distributions built from source on the End-users machine.
For a concept like Puppy it would make no sense.
Example:
wxBasic is built from the sources of Gtk, wxWidgets, Basic.
The final binary is 2 MB compressed.
The source + uncompressed binaries of wxWidgets + Basic is approx 70 MB.
You if you would add all this into puppy, you could not use it on small USB-sticks.
Mark
most distros do not come with the complete source code for every program, library, and driverit is not "self-contained" at all. It does not include the source code
just the source for the 2.6.14 kernel, for example, is 200 megs ... Puppy's kernel, vmlinuz, is about 1 meg compiled
http://kernel.org/
As far as a self-contained Linux including source code on One CD, I think you may find that a distro like Lunar might be what you are looking for.
Go to www.Distrowatch.com and check it, and Source-Mage out. They are about 300 meg, I think, and enable you to compile a basic command line system. You are then expected to build your complete system by downloading and compiling the rest of the components from downloads.
Either that, or Linux from Scratch .....
Rgds
GS
ftgs
Go to www.Distrowatch.com and check it, and Source-Mage out. They are about 300 meg, I think, and enable you to compile a basic command line system. You are then expected to build your complete system by downloading and compiling the rest of the components from downloads.
Either that, or Linux from Scratch .....
Rgds
GS
ftgs
Thanks for all those great comments and resources!
A 50MB Puppy cannot be completely self-regenerating self-contained, since that would greatly conflict with a prime goal of max ordinary-usable-function. But in theory, there could be a 700MB PuppyMaster version. In our current reality, we might have to settle for someday hoping for a one-DVD version along those lines.
It seems like it would be a great learning experience to work through Linux From Scratch -- but I can't tell if it contains the sources for all the tools it uses, or just the sources to make itself.
Gentoo seems like something I'd like to try. (Maybe it is pretty totally self-contained.) But not yet, not by far -- it sounds way too complex. I want to try to understand as much as possible. That's why I am starting with Puppy -- the small size seduces me into imagining it might be one of the most understandable distros, in terms of the whole internal structure. At least, I should be able to do serious work with it on the most limited equipment, compared to larger distros.
An entertaining tale of a rookie who eventually succeeds with Gentoo:
Source-based Linux distributions from a beginner's perspective
(contributed by Arvan Reese)
http://distrowatch.com/weekly.php?issue=20040510
Lobster, thanks for the great list of Programs! I'll try to wiki it, unless someone else does first...
(The from-source distros that dynamically pull all the pieces from cyberspace are sort of the opposite of what I am thinking of here. I am living at the end of a 28.8kbps pipe most of the time. Occasionally, I am lucky enough to get access to a fat pipe, CD burner etc. I have to drag everything back to my lair. And even getting one CD image worth of material may take weeks of planning/attempts etc.)
A 50MB Puppy cannot be completely self-regenerating self-contained, since that would greatly conflict with a prime goal of max ordinary-usable-function. But in theory, there could be a 700MB PuppyMaster version. In our current reality, we might have to settle for someday hoping for a one-DVD version along those lines.
It seems like it would be a great learning experience to work through Linux From Scratch -- but I can't tell if it contains the sources for all the tools it uses, or just the sources to make itself.
Gentoo seems like something I'd like to try. (Maybe it is pretty totally self-contained.) But not yet, not by far -- it sounds way too complex. I want to try to understand as much as possible. That's why I am starting with Puppy -- the small size seduces me into imagining it might be one of the most understandable distros, in terms of the whole internal structure. At least, I should be able to do serious work with it on the most limited equipment, compared to larger distros.
An entertaining tale of a rookie who eventually succeeds with Gentoo:
Source-based Linux distributions from a beginner's perspective
(contributed by Arvan Reese)
http://distrowatch.com/weekly.php?issue=20040510
Lobster, thanks for the great list of Programs! I'll try to wiki it, unless someone else does first...
(The from-source distros that dynamically pull all the pieces from cyberspace are sort of the opposite of what I am thinking of here. I am living at the end of a 28.8kbps pipe most of the time. Occasionally, I am lucky enough to get access to a fat pipe, CD burner etc. I have to drag everything back to my lair. And even getting one CD image worth of material may take weeks of planning/attempts etc.)
After what I read in my german linuxboard:
Gentoo is easy - but just if you read the very detailed Introduction.
Gentoo is not "learning by doing" - it is learning by studying literature.
I personally prefer another approach:
Started with a grafical System (Suse 5 or 6), and later slowly stepped deeper into Details with Micro-Linux and by learning "Linux"-Programming-languages like Tcl and Perl. Just trial and error with completely messing up the system (off course studying docs, too).
But though i use Linux since 7 years now, there still are things I watch with respect (don't understand everything), like building a kernel for example (not just "do a.) do b.) do c.)" , but understanding how all that works).
Mark
Gentoo is easy - but just if you read the very detailed Introduction.
Gentoo is not "learning by doing" - it is learning by studying literature.
I personally prefer another approach:
Started with a grafical System (Suse 5 or 6), and later slowly stepped deeper into Details with Micro-Linux and by learning "Linux"-Programming-languages like Tcl and Perl. Just trial and error with completely messing up the system (off course studying docs, too).
But though i use Linux since 7 years now, there still are things I watch with respect (don't understand everything), like building a kernel for example (not just "do a.) do b.) do c.)" , but understanding how all that works).
Mark
Linux From Scratch (LFS) has a live cd (390 MB) that contains all the sources and tools needed to allow you to follow the included LFS book to build the LFS system. Check distrowatch, a new version was just released.kethd wrote:It seems like it would be a great learning experience to work through Linux From Scratch -- but I can't tell if it contains the sources for all the tools it uses, or just the sources to make itself.
The live cd boots into text mode but you can access a gui with the xfce wm by issuing the startx command. The LFS book on the cd is in html format.
I just stumbled on this good resource:
http://distrowatch.com/dwres.php?resource=links
Which has some nice, organized lists of related things, such as:
Small and Floppy-based Linux Distributions
Embedded Linux Distributions
Windows-based Linux Distributions
http://distrowatch.com/dwres.php?resource=links
Which has some nice, organized lists of related things, such as:
Small and Floppy-based Linux Distributions
Embedded Linux Distributions
Windows-based Linux Distributions
Puppy Programming Languages
I started a wiki page of Programming Languages:
http://puppylinux.org/wikka/ProgrammingLanguage
Please add to it whenever the spirit moves you.
http://puppylinux.org/wikka/ProgrammingLanguage
Please add to it whenever the spirit moves you.
Actually with the kind of knowledge and background you've displayed in the forum, Gentoo wouldn't be difficult at all.Gentoo seems like something I'd like to try. But not yet, not by far -- it sounds way too complex.
The documentation takes you step by step explaining what's going on. Actually you learn a lot, but as MU pointed out, you have to read a lot too. I understood a lot of Linux concepts by trying Gentoo. I would not use it as my primary system though, but I think that Its quite a fast way to understand the posibilities.
size budget?
I was surprised to hear from Mark that PuppyBasic compressed takes up 2MB -- that is a significant fraction of 50MB total!
I don't question the decision to include it -- I am glad that it is there, and thankful for Mark's work to make it available.
But I would like to understand the overall "size budget" situation with Puppy. Is there somewhere that summarizes a breakdown of that 50MB -- which applications/functions are taking how much of it?
I don't question the decision to include it -- I am glad that it is there, and thankful for Mark's work to make it available.
But I would like to understand the overall "size budget" situation with Puppy. Is there somewhere that summarizes a breakdown of that 50MB -- which applications/functions are taking how much of it?
well, look at a program.
For example
int main(argc, argv){
(C-language)
will be after compilation something like
jmp c000
(assembler, machinecode,it means JuMPtoadress 49152 in memory and execute the comand there).
Binary Data is always smaller like text-data.
Then programs contain lots of debug-information (code needed to find errors).
Some days ago I stripped down a binary from 20 mb to 4 mb:
strip filename
(strip removes test/debugcode from the end-product).
Then source includes Pictures (media-files), often uncompressed to allow to alter them without qualityloss.
For a final program, they would be compressed to jpeg or with inbuilt methods.
wxbasic is 6 MB (not puppybasic, that is just 143 kb) compiled.
I finally compress it with upx, a "runtime-packer" to 2 MB.
Also wxbasic uses just some parts of the programming library wxidgets.
To compile wxbasic, you need a full wxwidgets-installation. That takes lots of space (compilation needs 1 hour, wxbasic 10 minutes).
wxbasic itself just contains maybe 40% of the wxidget-functions after compilation (it is incomplete, for example it misses Database-Classes).
So lets calculate (veery rough):
2 MB wxbasic compressed
= 6 MB uncompressed
= maybe 18 MB unstripped.
wxwidgets is double size, so approx 40 MB.
so 18 + 40 =~ 60MB.
Plus some images and documentation = 70 MB.
My x.org -developer-folder has 600 MB, the final binaries 100 MB, the files for the Dotpup 35 MB (50 MB just were fonts).
Mark
For example
int main(argc, argv){
(C-language)
will be after compilation something like
jmp c000
(assembler, machinecode,it means JuMPtoadress 49152 in memory and execute the comand there).
Binary Data is always smaller like text-data.
Then programs contain lots of debug-information (code needed to find errors).
Some days ago I stripped down a binary from 20 mb to 4 mb:
strip filename
(strip removes test/debugcode from the end-product).
Then source includes Pictures (media-files), often uncompressed to allow to alter them without qualityloss.
For a final program, they would be compressed to jpeg or with inbuilt methods.
wxbasic is 6 MB (not puppybasic, that is just 143 kb) compiled.
I finally compress it with upx, a "runtime-packer" to 2 MB.
Also wxbasic uses just some parts of the programming library wxidgets.
To compile wxbasic, you need a full wxwidgets-installation. That takes lots of space (compilation needs 1 hour, wxbasic 10 minutes).
wxbasic itself just contains maybe 40% of the wxidget-functions after compilation (it is incomplete, for example it misses Database-Classes).
So lets calculate (veery rough):
2 MB wxbasic compressed
= 6 MB uncompressed
= maybe 18 MB unstripped.
wxwidgets is double size, so approx 40 MB.
so 18 + 40 =~ 60MB.
Plus some images and documentation = 70 MB.
My x.org -developer-folder has 600 MB, the final binaries 100 MB, the files for the Dotpup 35 MB (50 MB just were fonts).
Mark
Last edited by MU on Wed 07 Dec 2005, 23:25, edited 1 time in total.
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
wxbasicscript: 143 K
Total: 143 K (1 file)
basefunctions.inc: 12 K
Total: 12 K (1 file)
= 155k
Lua (was included but not used)
128k (I seem to remember)
tinyc = small
gcc is an external add on because the libraries are 30 meg
Java (tiny version available) still big
Perl = 9 meg (I think)
I think you are confusing it with wxbasic which is the full language
which is 2 meg
x11 (a potential Puppybasic was 200 - 300k) but no one developed or showed an interest
I think most of that is correct
Total: 143 K (1 file)
basefunctions.inc: 12 K
Total: 12 K (1 file)
= 155k
Lua (was included but not used)
128k (I seem to remember)
tinyc = small
gcc is an external add on because the libraries are 30 meg
Java (tiny version available) still big
Perl = 9 meg (I think)
I think you are confusing it with wxbasic which is the full language
which is 2 meg
x11 (a potential Puppybasic was 200 - 300k) but no one developed or showed an interest
I think most of that is correct
Last edited by Lobster on Mon 23 Jan 2006, 14:09, edited 1 time in total.
perl (the naked interpreter) is 1 mb, but you need modules for many tasks.
I made a "mini-perl"-dotpup, that has perl and the Gtk-wrapper (2 MB).
The wrapper allows to create windows, while perl itself is a pure comandline-language.
You will need more modules like CGI/LWP (for dynamic webpages), or Database-modules.
I think puppys perl (usr_devx.sfs) is 20-30 MB, that should cover most.
Included in that is documentation and sources, so you might be right with 9 MB for the pure "program-files" (Interpreter + modules).
Mark
I made a "mini-perl"-dotpup, that has perl and the Gtk-wrapper (2 MB).
The wrapper allows to create windows, while perl itself is a pure comandline-language.
You will need more modules like CGI/LWP (for dynamic webpages), or Database-modules.
I think puppys perl (usr_devx.sfs) is 20-30 MB, that should cover most.
Included in that is documentation and sources, so you might be right with 9 MB for the pure "program-files" (Interpreter + modules).
Mark
Last edited by MU on Thu 08 Dec 2005, 13:53, edited 1 time in total.