openwrt只编译kernel
本想只编译ko, ,结果搜索论坛发现要编译 kernel
https://forum.archive.openwrt.org/viewtopic.php?id=23570
用下面这个命令编译内核:
make target/linux/{clean,compile} V=s
修改 linux-4.4.18/drivers/net/ethernet/realtek/r8169soc.c 后
make target/linux/compile V=s
拷贝到自定义路径下
cp linux-4.4.18/drivers/net/ethernet/realtek/r8169soc.ko files/evideo/
根据openwrt自定义文件配置,拷贝到files下的文件就会自动拷贝到对应目录
https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem#custom_files
Custom files
In case you want to include some custom configuration files, the correct place to put them is:
<buildroot>/files/
For example, let's say that you want an image with a custom /etc/config/firewall
or a custom etc/sysctl.conf
, then create this files as:
<buildroot>/files/etc/config/firewall
<buildroot>/files/etc/sysctl.conf
E.g. if your <buildroot>
is ~/source
and you want some files to be copied into firmware image's /etc/config
directory, the correct place to put them is ~/source/files/etc/config
.