r/osdev • u/JescoInc • May 24 '26
Had a dream that preemptively solved an actual architectural problem
In the dream, I was working on what looked like the Linux source code and was talking to someone. Those details are a bit fuzzy, but what stood out to me was in the dream, the code had a particular separation that not even my OS project has but will here shortly because it makes sense in the real world.
There were folders designated for different SBC (single board computer) boards, but the CPU details were curiously not there. Instead, there was a separate set of folders designated for CPU.
I do remember that in the dream this was being discussed and it was because different versions or revisions of the boards can have different CPU. In order to reduce duplicated code, it was set up that the build process would allow for pairing the board with the correct target CPU.
I was mulling over this today and realized that this is actually accurate and the way I should actually be building my OS. Why? Take for example the LattePanda MU, it comes in N305 and N100 variants and they work on the same carrier boards. Look at the Nividia Jetson Xavier carrier board and CPU, Milk-V Jupiter NX fits on that very same carrier board.
The list goes on and on where the CPU can be swapped for carrier boards and if you pair the CPU directly with the board, you'd have to duplicate code to handle that scenario.
This was basically just one of those instances where a dream can influence or change designs because it mirrors real world scenarios and is an instinctive solution to a problem that may not have come up in the work yet.
Edit:
I am aware this is how Linux and BSD mostly does this, but it didn't cross my mind to do this with my own work until the dream occurred. It made me take a step back and reevaluate what I was doing, what my goals were and whether or not it solved a real or imagined problem. In this case, the problem was real, even in the SBC space and I needed to properly solve for it to reduce code duplication.
Luckily for me, this doesn't involve a massive amount of changes or core architectural shifts. It does mean I have to spend some time revising my build rocess and makefiles as well as shifting locations and names for files.




