Instead of creating template files in the repo, maybe a script in tools
that creates the files with all the proper contents?
Why not create an entire project framework is the spirit of VisualStudio:
I want to create:
[ ] Device driver
[ ] An MTD driver
[ ] A new board
[ ] etc.
Then create all of the necessary files and update the build sysgtem
for the new component.
This is not really as far-fetched as it sounds. There are already
half-cooked, general, "skeleton" examples of drivers in the source tree:
./drivers/ioexpander/skeleton.c
./drivers/lcd/skeleton.c
./drivers/mtd/skeleton.c
./drivers/net/skeleton.c
./drivers/usbhost/usbhost_skeleton.c
./fs/procfs/fs_skeleton.c
These could pretty easily be extended to support automated generation of
customized OS components.