$ diff -puN .config arch/arm/configs/android_zoom3_defconfig>tmp.patch
-r 是一个递归选项,设置了这个选项, diff 会将两个不同版本源代码目录中的所有对应文件全部都进行一次比较,包括子目录文件。
-N 选项确保补丁文件将正确地处理已经创建或删除文件的情况。
-u 选项以统一格式创建补丁文件,这种格式比缺省格式更紧凑些。
-u -U NUM --unified[=NUM] 输出 NUM (默认 3) 行合并的上下文。
--label LABEL 使用 LABEL 而非文件名。
-p --show-c-function 显示每条更改所在的 C 函数。
-r --recursive 递归对比所有的子目录。
-N --new-file 将不存在的文件当成空文件。
"diff -up"
------------
Use "diff -up" or "diff -uprN" to create patches.
All changes to the Linux kernel occur in the form of patches, as
generated by diff(1). When creating your patch, make sure to create it
in "unified diff" format, as supplied by the '-u' argument to diff(1).
Also, please use the '-p' argument which shows which C function each
change is in - that makes the resultant diff a lot easier to read.
Patches should be based in the root kernel source directory,
not in any lower subdirectory.
Documentation/SubmittingDrivers