Cisco MX65 - switch-qca8k

Hi,

I already wrote here Cisco Meraki MX64/MX65 image support - #255 by olifr but did not got any response.

I am trying to build 23.05-rc2 (also tried Main branch) for the Cisco Meraki MX65 but I cannot build the image due to router having a kmod-switch-qca8k. The router is defined as:

define Device/meraki_mx6x
  KERNEL_IN_UBI := 1
  KERNEL_LOADADDR := 0x60008000
  DEVICE_PACKAGES := -oseama kmod-i2c-bcm-iproc kmod-i2c-gpio kmod-eeprom-at24 \
	kmod-leds-pwm kmod-usb-ehci kmod-usb-ohci kmod-usb2 \
	kmod-ledtrig-default-on kmod-ledtrig-netdev
  DEVICE_VENDOR := Cisco Meraki
  KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
  KERNEL_INITRAMFS := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
  KERNEL_INITRAMFS_SUFFIX := .bin
  IMAGES := sysupgrade.bin
  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef

define Device/meraki_mx65
  $(call Device/meraki_mx6x)
  DEVICE_MODEL := MX65
  DEVICE_DTS_CONFIG := config@3
  DEVICE_DTS := bcm958625-meraki-mx65
  DEVICE_PACKAGES += kmod-hwmon-bcm59111 kmod-switch-qca8k
endef
TARGET_DEVICES += meraki_mx65

When I compile the image, I get this error:

SHELL= flock /Volumes/OpenWrt-23.05/openwrt/tmp/.root-copy.flock -c 'cp -fpR /Volumes/OpenWrt-23.05/openwrt/build_dir/target-arm_cortex-a9_musl_eabi/linux-bcm53xx_generic/packages/.pkgdir/kernel/. /Volumes/OpenWrt-23.05/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/root-bcm53xx/'
touch /Volumes/OpenWrt-23.05/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/root-bcm53xx/stamp/.kernel_installed
ERROR: module '/Volumes/OpenWrt-23.05/openwrt/build_dir/target-arm_cortex-a9_musl_eabi/linux-bcm53xx_generic/linux-5.15.118/drivers/net/dsa/qca8k.ko' is missing.
make[3]: *** [/Volumes/OpenWrt-23.05/openwrt/target/linux/bcm53xx/modules.mk:69: /Volumes/OpenWrt-23.05/openwrt/bin/targets/bcm53xx/generic/packages/kmod-switch-qca8k_5.15.118-1_arm_cortex-a9.ipk] Error 1
make[3]: Leaving directory '/Volumes/OpenWrt-23.05/openwrt/package/kernel/linux'
time: package/kernel/linux/compile#1.84#0.18#2.09
    ERROR: package/kernel/linux failed to build.
make[2]: *** [package/Makefile:120: package/kernel/linux/compile] Error 1
make[2]: Leaving directory '/Volumes/OpenWrt-23.05/openwrt'
make[1]: *** [package/Makefile:114: /Volumes/OpenWrt-23.05/openwrt/staging_dir/target-arm_cortex-a9_musl_eabi/stamp/.package_compile] Error 2
make[1]: Leaving directory '/Volumes/OpenWrt-23.05/openwrt'
make: *** [/Volumes/OpenWrt-23.05/openwrt/include/toplevel.mk:232: world] Error 2

it appears that dsa/qca8k.ko is not provided with Openwrt running on 5.15 kernel, is there something I should use instead?

Thanks

any chance to get any help?

I tried the same thing the last two days and turns out qca was just moved.
It isn't anymore in drivers/net/dsa/qca8k.ko but in drivers/net/dsa/qca/qca8k.ko, so just in a subdirectory.

To be able to compile, don't move the file but change modules.mk in openwrt\target\linux\bcm53xx\modules.mk.

Line 57: FILES:=$(LINUX_DIR)/drivers/net/dsa/qca8k.ko
to FILES:=$(LINUX_DIR)/drivers/net/dsa/qca/qca8k.ko

I compiled it that way and my Meraki MX65 booted to OpenWrt SNAPSHOT, r23763+4-46ed38adeb

THANK YOU SO MUCH!

I can't believe I missed that but it's working great!

1 Like