Hacker News new | past | comments | ask | show | jobs | submit login

380280 total lines of assembly, but only 38925 lines of that are in arch/x86/ (again, v3.10), so barely a 10th of it.



There's also a bunch of stuff in drivers/ that would be excluded in a typical x86 build, though it (mostly) isn't explicitly architecture-dependent. Over half of the whole kernel LOC are in the drivers directory, which includes support for all sorts of unusual devices.


Oh good point.

I was curious so I did make allmodconfig (I'm on 64-bit x86) and 'made bzImage modules' and counted lines of c/asm source with a corresponding .o file, all the header files and Makefile/Kconfig lines and got:

headers: 3011226

c/asm source: 8264404

generated .mod.c: 8414151

makefile/kconfig: 2032728

total 21722509

(Again, this is v3.10) (I also included the generated .mod.c files) https://gist.github.com/fragmede/8782876




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: