I keep working with banana pi bpi-r2. Successfully launched a openwrt snapshot of it. I want to add a hw-nat kernel module. I have a patch that I put in target/linux/mediatek/patches-4.19 . I also created a file in package / kernel / linux / modules of the following content
define KernelPackage/nat-hw-mtk
TITLE:= MediaTek's hardware NAT module
DEPENDS:=@TARGET_mediatek_mt7623
KCONFIG:=
CONFIG_NET_MEDIATEK_HNAT=y
FILES:=$(LINUX_DIR)/drivers/net/ethernet/mediatek/mtk_hnat/mtkhnat.ko
AUTOLOAD:=$(call AutoLoad,90,mtkhnat)
endef
run
$ make target/linux/compile
The patch is applied successfully. Everything is built without errors, but there is no file mkthnat.ko .
What did I not do?
I'm looking for it in build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-mediatek_mt7623/linux-4.19.106/drivers/net/ethernet/mediatek/mtk_hnat.
I watched it work make target/linux/compile V=s
There is no activity in this folder
These need to be added to your Makefile KCONFIG line or defined indirectly through the DEPENDS:= line if the relevant kmod- is part of the Openwrt packages so that it compiles the relevant dependent modules and defines the kernel symbols. So, if none of the dependent symbols are already packaged by other kmod- packages (which is not the case for the netfilter ones), the line would look thus:
But, as I mentioned, some of those kernel symbols above are set by other kmod- packages. Most of the netfilter ones are set in openwrt/include/netfilter.mk, so you'd need to check yourself which ones and then put the associated kmods in the DEPENDS line (for example DEPENDS=+kmod_nf_conntrack) instead of explicitly putting those symbols in the KCONFIG line, as the kmod- packages will then build the required dependent kmods and define the kernel symbols.
I'm trying to move this patch from here https://github.com/eliasmagn/bpir2wrt
Had to modify it for work with the kernel 4.19. But the compiler bypasses it. In the kernel .config file by eliasmagn is present a line
CONFIG_NET_MEDIATEK_HNAT=m
what i am doing does not add such a line in .config file
I worked on the problem again.
Found the following: The scripts/kconfig/conf program removes a CONFIG_NET_MEDIATEK_HNAT=m parameter from a .config file
Im trying to learn how to do this but im not having success. Im new to both linux and openwrt but ive learned some over the past week.
Im not sure how to do this though.
EDIT: Would adding kmod-usb-net-rtl8152 with an asterisk, instead of a module make a difference when making the firmware?
Installing kmod-usb-net-rtl8152 on 19.07.3 x86_64 after the fact does not work with my 2.5gbit usb ethernet