I'm interested in this, because my friend and I are considering writing our own distro. I know, it sounds like a bit of a feat, but one guy wrote MEPIS by playing with the Debian source code. I think the two of us could do something similar.
| |
|
Welcome to AstaHost - Dear Guest | |
Toggle shoutbox
Shoutbox
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
What Language Is Linux Written In ?
#1
Posted 16 November 2005 - 05:15 AM
I'm interested in this, because my friend and I are considering writing our own distro. I know, it sounds like a bit of a feat, but one guy wrote MEPIS by playing with the Debian source code. I think the two of us could do something similar.
#2
Posted 16 November 2005 - 05:38 AM
Writing a distro seems to be more about packages included and the package management used than actually altering the source code. If I was going to creat a distro, I'd basically end up creating another Slackware.
#3
Posted 16 November 2005 - 03:01 PM
however, for the sake of answering your question.....
Linux itself is written in C and Assembly.
GNU is written mostly in C.
Libraries are written in C and C++ (QT is written in C++, GTK i believe is C)
Boot scripts are USUALLY written in Bash Script, but there is no reason you couldnt use some other scripting language
To create a differant distro, here's what you need to do....
1) Decide on a package management system.
You can use a currently existing system such as RPM, Debian PKG, Gentoo's Portage, or Slackware's TGZ.
Alternativly, you could choose to have no package management system, and the user will needto compile everything from source (similar to Linux From Scratch)
OR Ideally, Program your own package management system (the language of your choice)
2) The Kernel....
Most distro's patch the vanilla linux kernel. For example, Gentoo has many krnels available, some patched to be optimised towards desktop use, some optimised for server use.
You need to decide on what makes your distro differant / beter than other distro's and patch the kernel accordingly.
For example, you may decide that disk IO is more important that disk reliability on your distro, so you may want to patch your kernel with the experimental file system Reiser4.
Alternativly, you could use the kernel from anouther distro, for example the Gentoo kernel for performance, or the Redhat kernel for a more server oriented kernel.
Alternativly, you could just use the un-patched vanilla linux kernel from kernel.org
3) Boot scripts.
Many disto's use differant methods for selecting what scripts are executed dureing boot up.
Slackware just executes every script that has executable permissions.
Redhat / Fedora executes every script that has a symbolic link in the runlevel folder.
Gentoo uses a tool called rc-update,
Either use a currently existing method, or create your own method.
4) Create an Install CD.
This doesnt have to be complicated.
a simple install CD could be a simpl bootable CD, that just coppies a default install folder to the root of the hard disk, and installs GRUB to the MBR.
Their are2 reasons i can think of for creating a distro...
1) for fun and learning
2) because there are no distro's that work exactly the way you like.
For help getting started, you may want to look at Linux From Scratch.
http://www.linuxfromscratch.org/
this is a book with step by step instructions on how to start with a completely empty hard disk, and download and compile a full linux distro.
the end result is a completely customised, lightning fast minimal distro.
then books like Beyond Linux From Scratch will help you turn this into a full OS with all the features of any top quality distro.
Many people create there own distro's using LFS as a base to work from.
Enjoy.
#6
Posted 17 November 2005 - 09:24 AM
Good Distros to contribute are Ubuntu , Fedora and Gentoo as they have a very strong community based program.
#9
Posted 18 November 2005 - 09:45 AM
A question is asked, but instead of beeing answered, they get an alien surgestion.
"Q: How do i create a new distro ?"
"A: Use Ubuntu"
"Q: Does Linux support brand X wireless network"
"A: I dont Know, use Ubuntu"
"Q: Whats the capital of Scotland?"
"A: Ubuntu"
Lol. If only this site had a humour section.
Seriously though.....
Go for Linux From Scratch, or google for "Meta Distribution"
a Meta Distribution is a bit like a distro used for creating s custom distro ( gentoo
#11
Posted 19 November 2005 - 06:20 AM
LFS sounds very interesting. I think I'm gonna take it up next semester when I have some free time. How long will it take to install LFS if I follow the handbook? A week maybe? Since Gentoo took 1 day to give me a usable KDE, LFS should take longer.
#12
Posted 19 November 2005 - 07:13 PM
After thinking for a while and returned back to SuSE Linux and have stuck to it since.
I don't like gentoo because there's too much configuration needed and the compilation takes forever.
xboxrulz
#13
Posted 19 November 2005 - 11:07 PM
I''ve been wondering lately, what language is Linux written in?
I'm interested in this, because my friend and I are considering writing our own distro. I know, it sounds like a bit of a feat, but one guy wrote MEPIS by playing with the Debian source code. I think the two of us could do something similar.![]()
I think in C
#14
Posted 20 November 2005 - 03:08 AM
How long will it take to install LFS
Linux from scratch leaves you with a bootable linux OS and a full set of development tools.
bascially, all your basic bash commands, and a compiler.
This took me 2 solid days on a 1.2Ghz Athlon Thunderbird.
he whole of the linux from scratch is equivelent to a gentoo @emerge system@ (forgive me, im on a windows machine, and the keyborad is set to american... no speach marks)
Its a good learning experiance, but it gets repetative.
you spend half the time readinf explanations of why you need to do each step, and typing...
wget files and patches tar -zxf blah gzcat patch.diff.gz | patch -P0 ./configre --prefix=/usr <and other random options > make make install
the *FUN* doesnt start untill you more onto the other books, like BeyondLinuxFrom scratch, which helps you build things like Xorg.
#15
Posted 20 November 2005 - 02:13 PM
I'll give LFS a shot .... let's see what it has to offer
#18
Posted 27 May 2012 - 12:54 PM
I would say that Linux, by itself, is rather easy to bo maked. Students are learning that at the university. Creating the Linux kernel and the main compiling the main programs is rather easy, because the sources are available.I''ve been wondering lately, what language is Linux written in?
I'm interested in this, because my friend and I are considering writing our own distro. I know, it sounds like a bit of a feat, but one guy wrote MEPIS by playing with the Debian source code. I think the two of us could do something similar.![]()
I would say that the most difficult part is writing down the drivers. You need to find a way of detecting wich hardware is present in each possible computer you are installing your distro on, and writing the corresponding driver, or obtaining the driver from somebody else.
The key point defining if a given current Linux distro is "better" than another one, from my point of view, is the fact that it already has all the drivers needed by my own PC, so the installation from the Linux distro is straightforward, I boot from the distro bootable CD and I click "accept" in each question. This supposed that a lot of people spent a lot of time on the install interface and on the automatic detection of all my communication, audio and printer devices which could possibly be found on my PC.
#19
Posted 29 May 2012 - 02:36 AM
I would say that Linux, by itself, is rather easy to bo maked. Students are learning that at the university. Creating the Linux kernel and the main compiling the main programs is rather easy, because the sources are available.
I would say that the most difficult part is writing down the drivers. You need to find a way of detecting wich hardware is present in each possible computer you are installing your distro on, and writing the corresponding driver, or obtaining the driver from somebody else.
The key point defining if a given current Linux distro is "better" than another one, from my point of view, is the fact that it already has all the drivers needed by my own PC, so the installation from the Linux distro is straightforward, I boot from the distro bootable CD and I click "accept" in each question. This supposed that a lot of people spent a lot of time on the install interface and on the automatic detection of all my communication, audio and printer devices which could possibly be found on my PC.
this is why Windows 7 rocks... because it comes with a huge readily available/accessible libraries of drivers
#20
Posted 29 May 2012 - 08:25 AM
And that's the main problem when we tell people that they should switch to Linux. We should provide them with a free Lunix distro which also has this huge amount of available drivers, so that whatever they buy, they can simply plug it.this is why Windows 7 rocks... because it comes with a huge readily available/accessible libraries of drivers
And, unfortunately, when a new device appears (printer, phone, mp3 player, camera) it usually has the drivers for the current Microsoft Windows version, and does not have the driver for my old Windows or my own Linux version.
Reply to this topic
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users












