Adding OpenWrt support for Xiaomi AX3600 (Part 1)

yes it seems in openwrt we compile the target in a way that is not really compatible with qsdk
could be that they just disable neon instruction

anyway in the current state it doesn't work...

Hm, but why would SSDK even care about NEON, that is a compiler feature to support NEON based FPU-s.

current error is this

error: /home/ansuel/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/qca-ssdk-2021-04-28-c9bc3bc3/temp//qca-ssdk.ko uses VFP register arguments, /home/ansuel/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/qca-ssdk-2021-04-28-c9bc3bc3/temp//qca-ssdk.mod.o does not

there seems to be a mismatch somewhere but i can't find where...

why they did all the mess in that config file by hardcoding flags... can't they use the normal kernel compilation flags?

Hm, that is weird as they explicitly pass -mfpu=vfp to enable VFP FPU support.
Are you sure that SSDK config file in the source is updated?

yes... it really seems some file are using different flags

any idea how to purify the config file and use the openwrt flags without overwriting?

Not really as they have the flags hardcoded in tons of places.

could be that i found the problem... in the last step when they make a big module, the flags are lost and i think that is the problem

the all process
second line
the make -C

Kernel probably enforces its flags, I dont think it allows you to override the GCC flags when building out of tree modules.

interesting the make in the last step actually use my system make and not the one from the toolchain

@robimarko guess what... i was searching ghost...

the problem was that cflags for some reason had -mfloat-abi=hard and then we used -mfloat-abi=soft or other compatible flags...
in short it's all a mess and i really can't find why ssdk doesn't like mfloat-abi=hard... for now i have this workaround of dropping float hard as the cpu flags for plan arm enforce soft float...

I would guess that its passsed as part of the kernel flags.

mhhh could really be in the kernel make flags

It should as the kernel is built with FPU support and that includes -mfloat-abi=hard

also sorry for another ot... can't understand if ssdk can be used for ipq806x switch

Yes, its used for IPQ806x as well, all of the switches use it, especially the AR83x7 based ones.

so the idea will be to declare a ess-switch compatible

mhh think it needs the swconfig legacy driver

Ahh, that one requires changes to the OpenWrt swconfig driver and a lot of them.