Shop OBEX P1 Docs P2 Docs Learn Events
Learning the Linux Kernel — Parallax Forums

Learning the Linux Kernel

LoopyBytelooseLoopyByteloose Posts: 12,537
edited 2012-12-25 19:43 in General Discussion
In trying to get started with my Cubieboard, I have been finding just two alternatives - use someone else's provided image or make my own.

For starters, working with other people's images is helpful. At least I can verify the hardware arrived in good shape. But the 'best images' seem to be Android and I really want this to work in Ubuntu Linux.

That has led me once again into the rather exotic world of building Linux kernels. But I am pleased to see there is a new website.

kernelnewbies.org

It seems this is intended to help people get involved. And maybe even start out by making their own contributions as 'kernel janitors'.

I am not sure I particularly like the idea of starting out as a janitor, but I certainly like the idea that people can get involved without having to enroll in certification programs and pay hefty tuition.

Comments

  • Martin_HMartin_H Posts: 4,051
    edited 2012-12-25 05:43
    Be careful Loopy! You don't want to end up a cautionary tale!

    http://xkcd.com/456/
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-12-25 08:48
    I've been using Ubuntu Linux for several years now. I don't think it will become a compulsive disorder. In fact, I have grown accustom to reading Linux documentation and even have learned a bit about computing from it.

    I certainly see no reason to compile a kernel for a desktop. But the Beagleboards, the Raspberry Pis, and the Cubieboards are a bit more diverse as embedded systems seem to come up with endless board variations.

    Life could be worse without Linux. I have one buddy that loads and breaks and reloads Windows endlessly in pursuit of the right combination of junk hardware and various versions of Windows. He suffers through a lot of down time and reloading Ghost images and such. Occasionally he gets a virus or something. In the meantime, my Ubuntu just keeps puttering away and rejecting Windows viruses that come off the web.
  • prof_brainoprof_braino Posts: 4,313
    edited 2012-12-25 08:56
    I clicked on that link and an hour disappeared

    -Edit- and now my helicopter is charged! COOL!
  • Heater.Heater. Posts: 21,230
    edited 2012-12-25 09:23
    It's a long while since i have been into compiling kernels. For a long time I just use whatever comes with Debian and it's not missing anything form me now a days.

    But that was on x86 anyway. From what I read the Linux on ARM world is a lot more complex as there are a lot of ARM architectures and they live in a lot of different SOC's (System On a Chip) with a lot of different peripherals. Many of these custom kernels don't seem to have made it into the official Linux source tree yet.

    As an example look at the Debian used for the Raspi. There is the regular ARM Debian but that is slow because it does not support the particular floating point hardware of the Raspi ARM. Then there is Raspian which is Debian Wheezy totally rebuilt from the kernel up to support the Raspi floating point. Binaries are not compatible between these two Debians.

    If I were to be getting into compiling kernels for your board I'd want to start with a known good distributions kernel. Debian or Ubuntu or whatever. Start out by seeing if I could recreate it's "known good" kernel from the sources provided.
  • Heater.Heater. Posts: 21,230
    edited 2012-12-25 10:15
    Actually the last time I built a Linux system, kernel upwards it was for an embedded system based on an ATMEL ARM chip. I could only do it under advice from a genius in a company in Denmark who had designed the board and he in turn depended on a lot of patches from a company in South Africa who had been building embedded systems with that particular chip. This was a few years back and was very non-trivial. I wonder how much the situation has improved?

    A good exercise if you want to get into this sort of thing is to build yourself a Linux From Scratch (LFS) using instructions from the LFS project:
    http://www.linuxfromscratch.org/

    Since I did hat last hey have developed a cross LFS which can be used to build ARM systems.
    http://http://trac.cross-lfs.org/
    It probably helps to do this for x86 first and then use QEMU for ARM emulation on your PC.

    Beware, these are long and complex procedures with much compiling to do.
  • softconsoftcon Posts: 217
    edited 2012-12-25 18:07
    Wow! The last time I compiled a linux kernel, was probably 8 or 10 years ago. At the time, I had two linux servers, both hosted on a dsl line out of my home. When I moved out of that house, I wasn't able to get dsl at the new location, so had to farm out my server hosting, and haven't done it since, though I do certainly miss it. I used to recompile, install, and reboot, even if I wasn't at home, and it all worked like a champ. I don't think I've ever used a distributed kernel, I'd always compiled my own, (smaller kernels, less memory usage, and smoother operation with only what I had in the machine), can't get any better than that. :)
    But, anyhow, that doesn't help you now. I've not played with linux on anything but x86 machines anyhow, but just wanted you to know, at least that much was about as simple as it gets, so providing you're interest is in an area with moderate usage, it shouldn't be difficult to get your systems up and running.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-12-25 19:43
    Well, for the Cubieboard getting good kernels is split between the SoC supplier -- Allwinner A10, and a few committed creators of Linux embedded kernels. Debian has Emdebian, which may be one of the more straight forward sources. Ubuntu also has embedded images, but I have doubts that they are as generic.

    Allwinner A10 seems to provid .img files as binaries and some binaries for hardware. While Emdebian provides very open information.
Sign In or Register to comment.