Might be a bit controversial but I found writing drivers for Linux on my raspberry pi helped me understand kernels, virtual memory etc. I used Linux Device Drivers (ldd3) which is free online. The book was written for the 2.6 kernel but someone on GitHub updated the code for the latest kernels.
I've never written a driver myself, because all my hardware is supported. But I've certainly added new PCI IDs to existing drivers, and done that kind of low-level learning. I expect if I found a random piece of hardware that was close to an existing one that adding the driver, or updating things so that it worked on the new hardware would be possible. It's just not a situation I've come across. What I found useful/e…
Learning operating system development using Linux kernel and Raspberry Pi
11–20 of 40 posts
Re: Learning operating system development using Linux kernel and Raspberry Pi
#12If you are looking to learn operating system concepts using RPi there is a new textbook by Prof. Vanderbauwhede, under ARM textbook initiative [1]. I think for educational purposes it will be very interesting and useful if someone develop from scratch a simple System V UNIX for RPi based on Bach's description in his seminal book on "The Design of the UNIX Operating System" [2]. The book also covers multi processors t…
Re: Learning operating system development using Linux kernel and Raspberry Pi
#13Re: Learning operating system development using Linux kernel and Raspberry Pi
#14Might be a bit controversial but I found writing drivers for Linux on my raspberry pi helped me understand kernels, virtual memory etc. I used Linux Device Drivers (ldd3) which is free online. The book was written for the 2.6 kernel but someone on GitHub updated the code for the latest kernels.
Why would it be controversial?
Not OP but my perspective is that much of software development, engineering, and practices become cult like, often without theoretical or empirical basis.
I'm rarely surprised anymore when I see criticism of one approach over another. Someone may think "the way" to learn Linux kernel development isn't what OP suggested and there's a cult of people who agree who will adamantly concur to a fault.
Re: Learning operating system development using Linux kernel and Raspberry Pi
#15In terms of teaching fundamentals of operating system theory and systems programming, is there such a thing as an operating system kernel written in Python or some language which is meant to be easy to hack on for educational purposes? I wonder how useful that would be for a CS student, taking the complexity of C, C++, or Rust out of the picture and just running a kernel in a VM for educational purposes.
Re: Learning operating system development using Linux kernel and Raspberry Pi
#16In terms of teaching fundamentals of operating system theory and systems programming, is there such a thing as an operating system kernel written in Python or some language which is meant to be easy to hack on for educational purposes? I wonder how useful that would be for a CS student, taking the complexity of C, C++, or Rust out of the picture and just running a kernel in a VM for educational purposes.
If you are a solid programmer who already knows Python, learning C would only take 2-4 weeks. The benefit is worth the investment.
https://stackoverflow.com/questions/10904721/is-it-possible-...
Re: Learning operating system development using Linux kernel and Raspberry Pi
#17The offical Raspberry Pi distro of Linux is already called “Raspberry Pi OS”: https://www.raspberrypi.org/downloads/raspberry-pi-os/
https://www.raspberrypi.org/forums/viewtopic.php?f=117&t=275...
Re: Learning operating system development using Linux kernel and Raspberry Pi
#18In terms of teaching fundamentals of operating system theory and systems programming, is there such a thing as an operating system kernel written in Python or some language which is meant to be easy to hack on for educational purposes? I wonder how useful that would be for a CS student, taking the complexity of C, C++, or Rust out of the picture and just running a kernel in a VM for educational purposes.
Re: Learning operating system development using Linux kernel and Raspberry Pi
#19In terms of teaching fundamentals of operating system theory and systems programming, is there such a thing as an operating system kernel written in Python or some language which is meant to be easy to hack on for educational purposes? I wonder how useful that would be for a CS student, taking the complexity of C, C++, or Rust out of the picture and just running a kernel in a VM for educational purposes.
Re: Learning operating system development using Linux kernel and Raspberry Pi
#20In terms of teaching fundamentals of operating system theory and systems programming, is there such a thing as an operating system kernel written in Python or some language which is meant to be easy to hack on for educational purposes? I wonder how useful that would be for a CS student, taking the complexity of C, C++, or Rust out of the picture and just running a kernel in a VM for educational purposes.
For real world learning, C is still what you want. It is one of the easier roads through.
However, here's a just few languages that can let you build a kernel up quickly:
+ Forth. It is well suited for the purpose. A tiny bit of assembly, and then just a bunch of definitions and you've built it all from the ground up. But if you think C is too complex for learning, then the idea of moving to a stack-based language could get in the way.
+ Lisp. The Symbolic Lisp machines might be in the past, but the various versions of Lisp are still flexible enough to let you build an OS, and lots of CS students do.
+ Lua. It is only slightly higher level than C, but with fun things like coroutines, hash tables, dynamic typing and GC. Due to its C99 nature and the desire to keep the language constrained, it runs on bare metal great. You don't have to modify Lua to run it baremetal on a Pi. [0]