Tuesday, June 14, 2016

kernel patch check

1. checkpatch script
./scripts/checkpatch.pl xxx.patch

2. Endianess check (sparse)
* module
make M=drivers/net/wireless/ath/ath10k C=2 CF="-D__CHECK_ENDIAN__"
* full
make C=2 CF="-D__CHECK_ENDIAN__"
make C=1 /* for re-compiled C files */
make C=2 /* for all C files */

* make C=2 requires "apt install sparse"