Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Linux development help

Status
Not open for further replies.

Ashford

New Member
Does anyone know of any tutorial where i can learn how to develop an OS using the Linux kernel. I am looking for sometime that would bridge the gap between downloading the kernel and making a fully functional OS (like Debian for instance). I've considered reading the "Linux from Scratch" tutorial but I'm not too sure its what I'm looking for cause I don't want to spend an entire month reading it and it doesn't help me. Basically what I intend on doing is making a new desktop environment using X11, configuring the kernel, etc then generate a kernel image so that i could make a liveCD. I know this would take a great deal of time and effort but thats not a problem. Any help would be greatly appreciated.
 
Are you trying to re-invent the wheel? If you have an idea it sounds like you're stepping into territory FAR outside your experience, and developing your own OS is not something even an insane person would take on willingly, Linus Torvalds did it on accident.

If you have an idea that would require this sort of software development then you should find like minded people that can fill in the gaps of your expertise, one person can not do it all, Linus didn't it grew way out of his hands a long time ago.
 
"Linux from Scratch" (LFS) is essentially a good starting point if you are looking to roll your own distro, which is what it is sounding like. You certainly aren't wanting to create your own operating system, and LFS doesn't pretend to be about such an endeavour (really - trying to make your own OS is something that, while you can create something simple on your own, can easily "take over your life" if you are serious about it - writing an OS from scratch is anything but easy). However, if you are asking these questions, are you sure you are up to the task?

Have you any in-depth experience with configuring and admin'ing a *nix system?
Have you ever compiled and installed a custom kernel?
Have you ever tried to set *nix up to run something other than X as a GUI (seriously, if you wanted to, you could boot right into a browser or some other non-GUI "gui")?
Do you understand what run-levels are and how they work?

I've been playing around with *nix in one form or another since 1991 or thereabout, and Linux since 1995 (computers in general since 1984 - starting w/ 8-bit TRS-80 systems). At my level of experience, I think I could build up an LFS system, but I think I would still need more than a bit of studying how to do it, and I still think there would be more than a bit of learning as I went along, too (and probably a whole lot of googling and forum questions elsewhere!). I have yet to need such a custom system (but who knows what might be needed in my custom robot I am building!), but my point is that you should have a certain level of experience to tackle such a project, and an understanding that even with such experience, it won't be a walk in the woods.

What you might try first, is figuring out how to take something like Ubuntu, and customizing your own LiveCD image from a base level - research how other "spinoffs" were done, what needs to be changed/updated/configured, and how to generate the LiveCD image - that would give you a good learning environment, and while you are doing that, read up more on LFS and such.

Another possibility you might look into is getting intimate with Slackware. Its one distro (among many) which I have yet to touch, but I have heard it is one of the more challenging distros to get up and running (maybe that's changed by now...?). Then again, when I was starting out with Linux back in 1995, I took it upon myself to get Turbo Linux 2.0 (a long defunct Japanese distro) running on a 486 laptop with 8 meg (that was a treat - but I managed to get the whole thing working - X, sound, and tulip ethernet card - all running well; those must've been my "sadist" years).

:)
 
Ok, well the thing is you guys seem to be a bit over-paranoid. I'm not going to "reinvent the wheel", like I said I'm going to be build upon the Linux Kernel, or at least thats my intention. For example at the end of my learning I want to be able to develop an an OS for an HTC or for my Laptop USING THE LINUX KERNEL of course.
 
Ok, well the thing is you guys seem to be a bit over-paranoid. I'm not going to "reinvent the wheel", like I said I'm going to be build upon the Linux Kernel, or at least thats my intention. For example at the end of my learning I want to be able to develop an an OS for an HTC or for my Laptop USING THE LINUX KERNEL of course.

That makes sense. Sceadwian conflated "OS" and "kernel": Linus T. created the Linux *kernel* (not by accident) but Richard Stallman and others created the rest of the system which, combined with the kernel, provides an OS. (I'm sure you already know all that ;) ). And that's not even getting into all the distros on top of the base GNU/Linux OS, and all the OSes built on the Linux kernel which aren't even GNU/Linux at all.

I think cr0sh asked a lot of good questions, the answers to which will probably be important. Pending those answers:

I started with Slackware around 1994/95 and it wasn't really that bad. Of course I was in university in Finland studying comp. sci. at the time so that probably helped as everybody I knew was pretty much doing the same thing. As far as what you're doing, Slackware wouldn't be a bad place to start, actually.

Have you considered using a VirtualBox or similar VM environment to host your tests? That would be safer than subjecting the actual hardware to a new system. Especially the first few times you (try to) boot it up. :)

If you're not familiar with initramfs or similar, and the boot sequence in general, you probably should get familiar with it. Much will be dependent upon the actual hardware you are wanting to support, though. Also, something like RedBoot would be good to get familiar with.

Have you messed with custom/minimized Linux installs on embedded hardware before? The one I'm most familiar with is the system used by the TS-7400 module, but there are others. Might be a good idea to take a look at how they do things. And check out Android's architecture.

What is the ultimate scope of your plan? It's very important to decide on this--and to spell it out in painful detail just so we don't make unrelated suggestions.

I also agree with cr0sh that you probably should ready & study LFS. You said that you don't want to "spend a month reading it", but then you went on to say that you understand the project will take a significant amount of time. I'd just like to point out that laying a good foundation in your understanding is not a waste of time at all--and compared to the amount of time you will spend on the project as a whole, a month is likely to be a vanishingly short period, and thus well worth it. You'd probably waste well more than that figuring out all the stuff the book would have told you to start with.

Anyway, that's my $0.02 CDN. Without a LOT more information, there's really not a lot of concrete advice that can be given.


Cheers & good luck,

Torben
 
Last edited:
if you want an existing distro that you can configure into just about anything you want, try The Slackware Linux Project

by editing the tagfiles, you can make it anything from a minimalist install to a windows-like desktop and anything in between...
 
Last edited:
HTC or laptop? Those are two very different worlds.
 
an excellent resource for you would be https://www.linuxquestions.org
you can find everything you need there, and lot's of people with years of expertise
 
Last edited:
Basically I don't have any experience with the base kernel itself (i.e. I haven't compiled any kernel images, configured distros, created liveCDs, etc) so far, I'm only familiar with Linux systems the on user level (e.g. the Unix commands, etc). However, I have read "Understanding the Linux kernel 3rd edition". I'm just getting my feet wet in OS development. I guess maybe reading the LFS tutorial isn't a bad idea after all since it does, give some base knowledge. Basically all I want to do is to develop Linux distros for a wide range of architectures. I know certain thing are architecture dependent and it requires a certain level of knowledge about the architecture but I just want to get a tutorial that explains how to develop an OS from the kernel up all from the programmer's perspective. The reason for specifying "programmer's perspective" is because I've asked around a bit and all I found are tutorials that explain how to "piece together" a Linux distro.
If my plans still seem a bit vague an example would be, downloading the Linux kernel and developing iPodLinux.
hope this helps
 
Last edited:
Basically all I want to do is to develop Linux distros for a wide range of architectures
You want the sun, moon, and stars with that?

You're asking for advice on running before you have even taken your first steps.

I personally know the difficulties involved to a greater degree than yourself simply because I have compiled my own kernel for my own computer, and I know even based on doing that, it's not as simple as all that. What you're talking about will require dedication to the OS and architecture for years to develop the kernel and even lower OS levels...

This is what programming langauges like Java and the Android OS were invented for.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top