Hi,everyone,
i'm new to openwrt, and i learn it by reading [OpenWrt Wiki] Patching your application: Adding new files, but i encounter difficulties in the seventh chapter. I executed the commands in the order given in the manual, but it resulted in an error.Below is the content of the error:
$ make package/helloworld/{clean,prepare} V=s
make[2]: Entering directory '/home/wjm/projects/buildbot/openwrt/scripts/config'
make[2]: 'conf' is up to date.
make[2]: Leaving directory '/home/wjm/projects/buildbot/openwrt/scripts/config'
make[1]: Entering directory '/home/wjm/projects/buildbot/openwrt'
make[2]: Entering directory '/home/wjm/projects/buildbot/mypackages/examples/helloworld'
rm -rf /home/wjm/projects/buildbot/openwrt/build_dir/target-mips_24kc_musl/helloworld-1.0
rm -f /home/wjm/projects/buildbot/openwrt/staging_dir/target-mips_24kc_musl/stamp/.helloworld_installed
rm -f /home/wjm/projects/buildbot/openwrt/staging_dir/target-mips_24kc_musl/packages/helloworld.list
make[2]: Leaving directory '/home/wjm/projects/buildbot/mypackages/examples/helloworld'
time: package/feeds/mypackages/helloworld/clean#0.06#0.00#0.08
make[1]: Leaving directory '/home/wjm/projects/buildbot/openwrt'
make[2]: Entering directory '/home/wjm/projects/buildbot/openwrt/scripts/config'
make[2]: 'conf' is up to date.
make[2]: Leaving directory '/home/wjm/projects/buildbot/openwrt/scripts/config'
make[1]: Entering directory '/home/wjm/projects/buildbot/openwrt'
make[2]: Entering directory '/home/wjm/projects/buildbot/mypackages/examples/helloworld'
touch /home/wjm/projects/buildbot/openwrt/build_dir/target-mips_24kc_musl/helloworld-1.0/.prepared_2db80bf376860945c82883a81ff9256f_6664517399ebbbc92a37c5bb081b5c53_check
mkdir -p /home/wjm/projects/buildbot/openwrt/build_dir/target-mips_24kc_musl/helloworld-1.0
cp /home/wjm/projects/buildbot/helloworld/* /home/wjm/projects/buildbot/openwrt/build_dir/target-mips_24kc_musl/helloworld-1.0 -r
Applying ./patches/100-add_module_files.patch using plaintext:
The next patch would delete the file functions.c,
which does not exist! Applying it anyway.
patching file functions.c
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file functions.c.rej
The next patch would delete the file functions.h,
which does not exist! Applying it anyway.
patching file functions.h
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file functions.h.rej
Patch failed! Please fix ./patches/100-add_module_files.patch!
make[2]: *** [Makefile:69: /home/wjm/projects/buildbot/openwrt/build_dir/target-mips_24kc_musl/helloworld-1.0/.prepared_2db80bf376860945c82883a81ff9256f_6664517399ebbbc92a37c5bb081b5c53] Error 1
make[2]: Leaving directory '/home/wjm/projects/buildbot/mypackages/examples/helloworld'
time: package/feeds/mypackages/helloworld/prepare#0.08#0.00#0.09
ERROR: package/feeds/mypackages/helloworld failed to build.
make[1]: *** [package/Makefile:129: package/feeds/mypackages/helloworld/prepare] Error 1
make[1]: Leaving directory '/home/wjm/projects/buildbot/openwrt'
make: *** [/home/wjm/projects/buildbot/openwrt/include/toplevel.mk:232: package/helloworld/prepare] Error 2
Thanks!