Custom image for asus_wl-500w to include ralink drivers (rt2800)

Hello,

I installed openwrt on an asus_wl-500w, but i could not install drivers for ralink device. Please see below:

First try:

root@OpenWrt:~# cat /etc/openwrt_release 
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='21.02.2'
DISTRIB_REVISION='r16495-bf0c965af0'
DISTRIB_TARGET='bcm47xx/legacy'
DISTRIB_ARCH='mipsel_mips32'
DISTRIB_DESCRIPTION='OpenWrt 2  				1.02.2 r16495-bf0c965af0'
DISTRIB_TAINTS=''
root@OpenWrt:~# cat /etc/opkg/distfeeds.conf
src/gz openwrt_core https://downloads.openwrt.org/releases/21.02.2/targets/bcm47xx/legacy/packages
src/gz openwrt_base https://downloads.openwrt.org/releases/21.02.2/packages/mipsel_mips32/base
src/gz openwrt_luci https://downloads.openwrt.org/releases/21.02.2/packages/mipsel_mips32/luci
src/gz openwrt_packages https://downloads.openwrt.org/releases/21.02.2/packages/mipsel_mips32/packages
src/gz openwrt_routing https://downloads.openwrt.org/releases/21.02.2/packages/mipsel_mips32/routing
src/gz openwrt_telephony https://downloads.openwrt.org/releases/21.02.2/packages/mipsel_mips32/telephony
root@OpenWrt:~# 

root@OpenWrt:~# opkg install kmod-rt2800-lib kmod-rt2800-usb kmod-rt2x00-lib kmo
d-rt2x00-usb
Unknown package 'kmod-rt2800-lib'.
Unknown package 'kmod-rt2800-usb'.
Unknown package 'kmod-rt2x00-lib'.
Unknown package 'kmod-rt2x00-usb'.
Collected errors:
 * opkg_install_cmd: Cannot install package kmod-rt2800-lib.
 * opkg_install_cmd: Cannot install package kmod-rt2800-usb.
 * opkg_install_cmd: Cannot install package kmod-rt2x00-lib.
 * opkg_install_cmd: Cannot install package kmod-rt2x00-usb.
root@OpenWrt:~# 


root@OpenWrt:~# 
root@OpenWrt:~# opkg list | grep rt28
rt2800-pci-firmware - 20211216-1 - Ralink RT28xx/3xxx PCI/SoC firmware
rt2800-usb-firmware - 20211216-1 - Ralink RT28xx/3xxx USB firmware
root@OpenWrt:~#

Seceond try:
Then I tried to compile from source and had the following error:

ERROR: module '/media/user/e2e91b44-16b2-4fea-8d27-aaec833ecc2d/openwrt_compile/openwrt/build_dir/target-mipsel_mips32_musl/linux-bcm47xx_legacy/backports-5.15.8-1/drivers/net/wireless/broadcom/brcm80211/brcmsmac/brcmsmac.ko' is missing.
Makefile:553: recipe for target '/media/user/e2e91b44-16b2-4fea-8d27-aaec833ecc2d/openwrt_compile/openwrt/bin/targets/bcm47xx/legacy/packages/kmod-brcmsmac_5.10.107+5.15.8-1-2_mipsel_mips32.ipk' failed
make[3]: *** [/media/user/e2e91b44-16b2-4fea-8d27-aaec833ecc2d/openwrt_compile/openwrt/bin/targets/bcm47xx/legacy/packages/kmod-brcmsmac_5.10.107+5.15.8-1-2_mipsel_mips32.ipk] Error 1
make[3]: Leaving directory '/media/user/e2e91b44-16b2-4fea-8d27-aaec833ecc2d/openwrt_compile/openwrt/package/kernel/mac80211'
time: package/kernel/mac80211/regular/compile#0.58#0.17#0.67
    ERROR: package/kernel/mac80211 failed to build (build variant: regular).
package/Makefile:114: recipe for target 'package/kernel/mac80211/compile' failed
make[2]: *** [package/kernel/mac80211/compile] Error 1
make[2]: Leaving directory '/media/user/e2e91b44-16b2-4fea-8d27-aaec833ecc2d/openwrt_compile/openwrt'
package/Makefile:110: recipe for target '/media/user/e2e91b44-16b2-4fea-8d27-aaec833ecc2d/openwrt_compile/openwrt/staging_dir/target-mipsel_mips32_musl/stamp/.package_compile' failed
make[1]: *** [/media/user/e2e91b44-16b2-4fea-8d27-aaec833ecc2d/openwrt_compile/openwrt/staging_dir/target-mipsel_mips32_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/media/user/e2e91b44-16b2-4fea-8d27-aaec833ecc2d/openwrt_compile/openwrt'
/media/user/e2e91b44-16b2-4fea-8d27-aaec833ecc2d/openwrt_compile/openwrt/include/toplevel.mk:228: recipe for target 'world' failed
make: *** [world] Error 2

Third try:
Then I tried like this https://openwrt.org/docs/guide-user/additional-software/imagebuilder

make image PROFILE="asus_wl-500w" PACKAGES=" kmod-usb2 kmod-rt2800-lib kmod-rt2800-usb kmod-rt2x00-lib kmod-rt2x00-usb" FILES="files"

Collected errors:

  • opkg_install_cmd: Cannot install package kmod-rt2800-lib.
  • opkg_install_cmd: Cannot install package kmod-rt2800-usb.
  • opkg_install_cmd: Cannot install package kmod-rt2x00-lib.
  • opkg_install_cmd: Cannot install package kmod-rt2x00-usb.

What to do to be able to install drivers for ralink device (kmod-rt2800-lib kmod-rt2800-usb kmod-rt2x00-lib kmod-rt2x00-usb) ?

Thanks!