I am new to linux programming & interested to tweak linux kernel(though I am not sure, what to tweak, I am planning to write drivers for particular device). To learn internal of kernel, I have started from historic kernel release (first release).
My problem is, how to test whatever changes I am doing for development, without disturbing my current os environment.(ubuntu 12, 64 bit). Is there any way like virtual box, sandbox?
Along with these, if anybody send some good approaches to learn these things, I would be really greatful.
Thank You.
If you're new to linux programming then you really don't want to be tweaking the kernel. You really want to be an advanced programmer capable of programming drivers and complex software first.
But yes there is, you can can create a virtual machine using openbox or vmware. If you're really keen on tweaking the kernel you probably want to first just try compiling and configuring the kernel and seeing if that works.
Also make sure you're well acquainted with how the kernel works and advanced OS designs in general.
Search in google fr "Kernel configuration" you u will get many links how to configure your own kernel.
And one more thing do not use a outdated version of kernel ,always use latest stable release , because a lot of code and API is changed in new versions and no book in market is updated so ,, u have to read from kernel documentation. Thats the best way to learn the most updated information about linux kernel
Yes, you can test your changes on any of the commonly available virtual machines (VMs); that way, whatever changes you make to the VM kernel won't affect native OS.
Personally, I prefer using CentOS 64 bit on VMWare Player. With this setup, I got away with minimal system maintenance while was able to focus on the actual job at hand. Once the VM is up & running, you can download and compile one of the latest stable releases from kernel.org. Instructions on compiling your downloaded version of kernel could be found here and here; however, this may require little tweaking based on your actual setup. Once the VM is running on your desired version of kernel, using a combination of cscope and ctags will help you immensely in kernel code browsing.
Finally, if you want to become a serious kernel programmer and write your own device drivers, you need to get familiar with it in the first place. Below are a few excellent references -
Linux Device Driver by Corbet, Rubini, Kroah-Hartman, 3rd edition
Linux Kernel Development by Robert Love, 3rd edition
Understanding the Linux Kernel by Bovet, Cesati
Linux kernel source (ideally placed into your /usr/src/$(DESIRED_KERNEL) path, symlinked to /usr/src/linux)
Going through these books is a tedious job and chances are that you may hit the roadblock from time to time. kernelnewbies mailing list and StackOverflow are some of the few reliable places where people would be happy to answer to your queries.
Good luck!
We a team of 10 people are set out to build an Operating System for mobiles/tablet from scratch.
I then came by this link awesome-link
which has a load of OS briefed. But we would like to build the OS in Java on top of linux kernel(possible?) .
I would like to know whether the project is feasible and if yes, from where should I start ?
And with all the knowledge and right resources(assume), will it be possible to build an OS with all the mobile functionalities within 6 months?
Any help is much appreciated. Thanks.
But we would like to build the OS in Java on top of linux kernel(possible?)
Yes, what do you think Android is made of (of course it's not just Java + Linux kernel, but both are inside Android)?
I would like to know whether the project is feasible and if yes, from where should I start ?
Ever written an OS? How well do you know Linux kernel APIs? Do you know what's missing from Linux kernel to build a full featured OS? Answer those, they're your starting point.
And with all the knowledge and right resources(assume), will it be possible to build an OS with all the mobile functionalities within 6 months?
"All mobile functionalities" is biased, what is "all"? Be specific.
Please make enough research and planning before you are set out to start such a difficult, yet excellent journey.
Make sure you know what you should do, right from the technologies you are gonna use, the architecture you are planning to establish upon, the pros and cons of all the approach, the issues with the current OS and your idea of correcting those issues.
With a site like SO for your help, it is never a question of feasibility, but you would require the determination and the perseverance to achieve it.
Finally, all the best!!
You have Android build on scaled down Linux Kernel and apk is build through java & sdk manager. So you have the things in your hand, similarly ubuntu touch is also coming. What you can do is to customize things as per your requirements as per your architecture.
For ubuntu touch :- https://wiki.ubuntu.com/Touch/Building
For Your own customized Android:- http://source.android.com/source/index.html
Thanks & Regards,
Alok Thaker
I would like to learn how to write device drivers for IBM AIX OS.
I wanted to know is there any way to do this?
Can I download AIX? any books or docs available on the same?
If not, then if I learn how to write drivers on FreeBSD/Linux will that knowledge help?
Please suggest me..
Thanks a lot in advance.
Marc
Writing drivers for other platforms like BSD or Linux helps but it also hurts.
AIX has a preemptible, page-able kernel which makes it really weird to write for. A thread, in a system call, can get preempted. This is unusual for kernels. Data structures in the kernel can be paged out. This is also unusual. The locking mechanisms are unusual as well.
As you can tell, finding info about AIX is rather hard. The pubs actually does have most things documented but finding it is rather challenging because IBM and AIX tends to use their own terms.
There is a fairly good book that was published years ago. You might find it on ebay or something about writing device drivers for AIX.
There are also partner programs that IBM has, google "Partner World", that try to help.
The other thing you will find (especially with the partner programs) is AIX is like the red-headed step child of IBM. The folks at partner world want to talk about Tivoli, Lotus, DB2, Rational, etc. and few will know much / anything about AIX. But they do have access to equipment, etc.
Its going to be a tough road to climb. I keep wondering, why you have decided to do this. The market for AIX driver writers is nil.
Anonymous disinterested help (posted as a guest!)
Found this rather obsolete book on AIX 4.1,
http://bio.gsi.de/DOCS/AIX/SC23-2593-00.pdf
As I come up with linux ,I found the commands are different in OpenSuse and Ubuntu.
Which of them is suitable to somebody who was new in linux and want to master the command
needed when programming and using linux?
I got the impression that OpenSuSE did some things a little unconventionally (kdesu, gksu), but it's a fine (KDE) distro. I've found (K)Ubuntu is a little better for beginners since it has access to huge compiled package repositories, plus the community is unbeatable.
They're pretty similar for most things, including programming.
Whichever one the people around you can ask questions of know. The value of a knowledgeable support network vastly outweigh the benefits of a particular distribution. If you don't have a local support network, I'd go with Ubuntu, they tend to have more useful resources on the 'net (and it's the distro I'd prefer out of those two options).
Any of Ubuntu/Slackware/Gentoo should be fine as a development environment. You didn't mention what kind of programming you're interested in, and that may have some influence on the answer, too.
If you are at all interested in making better code I also recommend dual booting (or running a 2nd computer) into a non-Linux system such as OpenBSD/FreeBSD, OpenSolaris, etc. Writing code that's portable across UNIX systems isn't just a good idea for portability's sake, it can also help shake out some bugs. The same can be said for working with 32-bit vs. 64-bit, big endian vs. little endian platforms. You can pick up an old 64-bit Sun workstation for cheap and use it to test your code.
We'd have to know your preferences better to be able to answer that. Basically any LINUX would do i guess. I heard nice feedback from Ubuntu, though.
I'm running on Ubuntu right now. It was easier than windows to get running. Very smooth. Of course, advanced functions are beyond me right now. With C# classes and everything else I gave up on trying to learn too much and just run it as is. It has a very good user interface, and I've heard a new version is out or coming out as well, probably more eye candy.
Check out Ubuntu. Doing a dual boot can't hurt since then you can try it out! You can also run some distributions straight off the disc to try them out.... Can't hurt to try it when it is free. Much more stable for me than XP, and faster. I HOPE Windows 7 ends up being less of a monster! I'd stick with Ubuntu if it was more compatible with windows programs. .NET development while in school typically isn't done on a Linux distribution!
best wishes, try it out!
I prefer Ubuntu. my 2 cents...
They are tools. Use the one that you are most comfortable with. Really calling them tools isn't a good analogy. Better is to call them vehicles. Use the vehicle that fits your needs and desires.
Actually , as a programmer you would face such questions everyday. Which framework? which language? which data structure ? ... you get the idea. There is no right answer.
Choose any. They are not too different. Soon you would not be a "new learner" and then it wouldn't matter anyway.
Depending on how deeply you want to learn, one possible candidate distro would be Linux From Scratch. It also has awesome documentation and by playing with it will surely make you think more "Linux"-way.
This is a very hard question; most distros aim to be "the best", or at least "good enough" for a wide variety of activities, of course including programming.
It's also an issue that easily spawn "wars", where people fight to claim that the distribution they use is the best, and that all others should conform. Heh.
My current preference is for Gentoo, and I think one (probably minor) advantage it has when programming is that since it is a source-based distribution, you typically never need to bother to get the "development version" of packages. If you have e.g. readline installed, you will have its header file(s) too, and so on. Many other distros split packages into "user" and "developer" versions, so you need to install both packages.
Of course, I guess in those cases the developer packages depend on the non-developer versions anyway, so if you always install developer versions, you'd be all set. Oh well. Nevermind, then. :)
When choosing a linux distro I usually consider two things:
1: packaging system (and release cycle):
Opensuse probably has the most up to date packages of any distro (without building your own), Ubuntu's packaging system tends to hold your hand a little bit more though. I have used both and found that as a developer I slightly preferred Opensuse since it was easier to get the latest versions of development packages (for example, IDEs).
2: default configuration/ease of administration:
All linux distros have their quirks here. Both Opensuse and Ubuntu are well documented and have good support forums. Opensuse has Yast which is a nice one stop shop for most configuration tasks. Ubuntu seems to be slightly better at automatically configuring itself. Really, either distro is fine here.
The good news is that there is not a wrong decision per se. I have used a lot (more than 10) linux distributions and I now stick to Opensuse. Ubuntu was a close second, the only reason that I don't use it is that I found I was often stuck waiting for its 6 month release cycle to get up to date dev packages (building the monodevelop beta was not feasible at the time). Opensuse's build service and the Packman third party repository seem to keep nearly current packages for everything I've ever wanted.
I use Gentoo and Ubuntu for development.
Gentoo I love because I can so easily select which packages I have available and which versions. The guy that did Flash 9 and 10 does his development on a Gentoo system as well.
Ubuntu I enjoy now because it's so stable. After a few years, a Gentoo installation will tend toward some instabilities that require sometimes rebuilding the whole installation.
Another I'd look at is Slackware.
The principles are mostly the same over the different distributions, so I'd suggest you to choose one and dig in. However, there are some considerations to make. If you want to program gui programs you need to make a decision about which graphic toolkit library to use (Qt, Gtk+ ...), which would also imply the choice of your desktop environment (GNOME, KDE, XFCE). As you will notice, in Linux world everything (or almost everything) depends on something else. I'm talking about the packages. It is quite common to reuse available libraries and not write your own so the decisions you would probably have to make are about which libraries/frameworks to use and which language.
I, however, chose Ubuntu and don't feel sorry at all.
It depends on what you want to do. If you want something easy to setup and basically just works, use Ubuntu. If you want to /learn/ Linux, I would recommend Slackware. Getting Slackware up and running will force you to know HOW and WHAT is going on with your installation. This can be good or bad, depending on your desires.
Ubuntu fits the build and the community is very helpful.
If your exploring Linux / GNU as a programmer, you might consider selecting a distribution that uses the apt packaging tool.
You will likely need to install lots of libraries with development headers and obtain the source code to other things. Apt makes it quite simple to do such things, it is very good at resolving package dependencies and fetching source packages.
Distributions using apt (either with .deb or .rpm packages) are Debian, Ubuntu (and its forks) and others.
That being said, Ubuntu does a really good job at keeping up to date with recent libraries and tools, while resisting the urge to cherry pick alpha / unstable code. My desktop is my development machine, I use Ubuntu.
I would vote for Ubuntu. The principles are the same while some of the "commands" are different. I assume you mean differences such as "sudo".
I'm very happy with my Ubuntu Server which handles all my development Windows VMs. I even used Ubuntu desktop on my laptop for a time...at least until I needed Visual Studio on it again. :-)
EDIT - "sudo" does exist in OpenSUSE
Gentoo is the easiest to use. I'd go with that
What book or website would you recommend to learn about QEMU? I'd like to see some usage examples as well as how to use the APIs.
Best Resources:
Main QEMU Usage Documentation
Qemu Man Page - Invaluable resource when working with qemu.
Quick Start Guide - Slightly ubuntu/debian specific. Covers KVM.
Qemu Networking Guide - Great resource, super useful.
Have fun qemu's a great tool.
Some additional resources to understand and get started with the source code:
http://vmsplice.net/~stefan/qemu-code-overview.pdf
https://wiki.aalto.fi/download/attachments/41747647/qemu.pdf
https://www.usenix.org/legacy/event/usenix05/tech/freenix/full_papers/bellard/bellard.pdf
http://www.ece.cmu.edu/~ee349/f-2012/lab2/qemu.pdf
http://events.linuxfoundation.org/sites/events/files/slides/cloudopen-liguori.pdf
Detailed technical info:
http://www.csd.uoc.gr/~hy428/reading/qemu-internals-slides-may6-2014.pdf
http://lists.gnu.org/archive/html/qemu-devel/2011-04/pdfhC5rVdz7U8.pdf
I was not able to find the other chapters
http://connect.ed-diamond.com/GNU-Linux-Magazine/GLMF-147/Qemu-Visite-au-caeur-de-l-emulateur (French only unfortunately)