Answer the question
In order to leave comments, you need to log in
How to test drivers?
It became known to me that some modules cannot be compiled separately from the entire kernel, hence the question is how to test kernel components (which need to be fully compiled) without recompiling the rest of the content. I must say right away that my computer is weak and I have to wait 3-4 hours to understand that I forgot to put a semicolon at the end of the operator, is that not good ?!
Answer the question
In order to leave comments, you need to log in
With the compilation, you have already been told. Let me talk about debugging. Firstly, it is very desirable to have two machines - one for compilation and debugging, the second - a target where we load everything and where we test and check
1) we use printk, in 95% of cases this is enough
2) if the hardware allows, we use jtag - this is a hardware module for debugging - 100% success!
3) you can use kgdb - it doesn't always work.
Well, quite a strong magic is to use a static memory area, where we implement a ring buffer and write debug information directly there with our own means. But for this, static memory must be on one of the devices, I usually write to statics in real-time clock, but not everywhere they are and are available. For this, absolutely everything can be debugged in this way, from NME to high-speed device drivers.
I must say right away that my computer is weak and I have to wait 3-4 hours to understand that I forgot to put a semicolon at the end of the operator, is that not good ?!
*.o
. Those. you can take and compile one file from the kernel source tree. For example: make init/main.o
. .c
, the only file corresponding to it will be recompiled .o
.Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question