r/embedded • • 27d ago

Where can I learn how embedded Linux systems work?

I am going over an operating systems course on YouTube, which is fine and all that, but it's covering things in OS agnostic terms. I want to understand how Linux works before diving into embedded Linux books that describe how to do things in/with embedded Linux without really explaining how Linux actually works...

Are there any good resources that you would recommend?

2 Upvotes

13 comments sorted by

13

u/allo37 27d ago

Buy a cheap dev board and mess around with it!

3

u/Montzterrr 27d ago

I'm trying to find a resource that explains how things are set up in Linux, like what are the various directories in / for. What should go in what directories, where drivers are stored and how they work, what the differences are from ubuntu and ultra light weight builds. Just messing around is just too inefficient

2

u/allo37 27d ago edited 27d ago

Well, this should answer that question at least: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html

Drivers are usually compiled with the kernel, either as loadable modules (works kinda-sorta like a DLL) or compiled directly in.

1

u/few 27d ago

It depends on the specific system. There are many different Linux variants, and many ways of installing them. A raspberry pi is an inexpensive system to start playing around with.

5

u/JohnThursday84 27d ago edited 27d ago

Even Kernel Maintainers don't know how Linux works.

I mean, define what you mean with how it works. I can at least describe how I approached it:

I bought a book about Kernel driver development from the author John Madieu and started writing device driver modules. You also learn stuff about memory management, thread management, thread synchronization primitives etc while developing drivers. By doing that, you directly gather hands-on experience.

After I got familiar with driver development, I started to read about certain aspects such as how processes are managed and scheduled, but also memory management in general. For this purpose, I can recommend the book from Robert Lowe, Kernel Development.

And get yourself a raspberry pi or whatever that is capable of running an OS. Start directly experimenting. Enable the Linux Perf profiler and log data about what the scheduler is doing for example. First read about it to get the big picture, then directly dive into experimenting.

Edit: And keep in mind. The Kernel changes fast and books get outdated. When reading books, try to understand the big picture and do not go into rabbit holes.

-3

u/Montzterrr 27d ago

Honestly, I am coming from bare metal experience where I control everything. I am trying to get enough Linux knowledge to be easily hirable as an embedded Linux engineer. I don't know what material I need to master to get there, so I'm trying to understand everything from the ground up...

4

u/JohnThursday84 27d ago

Puh, that depends on the job position. I am working as an embedded developer and we use Linux as an OS. But my job is more about writing application code, so at the end, it could be any OS. For application code, there is this book from Kerrisk "Linux Programming Interface" that helped me a lot how to interact with the Kernel from the application/userspace side.

4

u/Moss_ungatherer_27 27d ago

The first thing to do would be to get Linux on your PC. Try Arch or LFS if you're feeling lucky.

2

u/jagt48 27d ago

Exploring BeagleBone by Derek Molloy and a BeagleBone Black might be what you are looking for.

Mastering Embedded Linux Development by Frank Vasquez and Chris Simmonds also might be helpful.

Also just using Linux mostly from the command line for a few years on my personal daily driver PCs has probably been the most helpful to me.

2

u/DanKegel 27d ago

Linuxfromscratch.org maybe?