patch时,新增文件的问题。

时间:2024-02-20 16:25:04

patch文件放在了内核目录的外面,然后执行的 patch -p1 ../patch_filelinux内核新增新文件.config的时候,一直提示如下错误:

 

can\'t find file to patch at input line 268

Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

--------------------------

|diff -urNp /home/cql/smb/fuxi_h/sdk-v1.1-test/taeho_sdk_release_v1.1/linux-4.19.15/.config linux-4.19.15/.config

|--- /home/cql/smb/fuxi_h/sdk-v1.1-test/taeho_sdk_release_v1.1/linux-4.19.15/.config 2020-10-16 14:48:32.315740274 +0800

|+++ linux-4.19.15/.config 2020-09-29 16:14:59.000000000 +0800

--------------------------

File to patch:

patch文件放在了内核目录里面,执行patch -p1 patch_file就可以了,有点奇怪。