Am (trying) to add support for IPQ5018 devices but am getting the following error while compiling QCA-SSDK, any help would be highly appreciated as I'm stuck now. Usually incompatible pointers trigger warnings unless CFLAGS have been changed.
I don't want to mess around with changing any of the SSDK code and/or Makefiles. Has anyone encountered this before and/or is able to provide any guidance on how to solve this issue?
/home/gemous/openwrt/mx5500/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq5018/qca-ssdk-2023-06-06-74caf88a/temp/src/hsl/dess/dess_qos.c:1536:39: error: assignment to 'hsl_qos_port_rx_buf_nr_set' {aka 'sw_error_t (*)(unsigned int, unsigned int, unsigned int *, unsigned int )'} from incompatible pointer type 'sw_error_t ()(a_uint32_t, fal_port_t, a_uint32_t )' {aka 'sw_error_t ()(unsigned int, unsigned int, unsigned int *)'} [-Werror=incompatible-pointer-types]
1536 | p_api->qos_port_rx_buf_nr_set = dess_qos_port_rx_buf_nr_set;
thanks frollic, I understand it's a 3rd party SDK, but this is as part of compiling openwrt and trying to add openwrt support for new devices. I've seen other threads on issues with this SDK where Qs have been answered here too and am just looking to see if anyone has run into this issue or is able to give me any pointers.
this is openwrt as I'm trying out patches that have been submitted upstream to find out what's working and what's missing (and that's a lot). Nonetheless, it's at very early stages, but am trying to see if we can get openwrt booted and move from there. Serial (UART), SPI, I2C, MDIO, the two switches should be working (QCA8337 and the soc's builtin) based on existing drivers and submitted patches (GCC, pinctrl, and more), perhaps USB2, wireless too (QCN9074, IPQ5018, both available on QUIC and kvalo's repo), and the PWM leds. Obvious components missing are the QPIC nand controller for SPI Nand, USB3 (uniphy), PCIE (uniphy), tsens (though people are working on it). If working and accepted upstream, I intend to submit the patches for 6.1 kernel support such as robimarko has done for IPQ8074.
Yes, makefile is checking the subtarget to pass the codename for the correct soc.
If none is passed it will try and compile for dess(ipq40xx) and that will fail.
build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq50xx/qca-nss-dp-2023-06-06-fa674644/nss_dp_main.c:552:13: error: implicit declaration of function 'skb_vlan_tagged_multi' [-Werror=implicit-function-declaration]
552 | if (skb_vlan_tagged_multi(skb)) {
| ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
great stuff, ssdk compiles now and is taking a different path based on the subtarget update and your pach!
it now indeed fails on compiling the qca-nss-dp package with:
CC [M] /home/gemous/openwrt/ipq5018/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq50xx/qca-nss-dp-2023-06-06-fa674644/hal/gmac_ops/syn/gmac/syn_if.o
/home/gemous/openwrt/ipq5018/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq50xx/qca-nss-dp-2023-06-06-fa674644/hal/dp_ops/syn_gmac_dp/syn_dp_rx.c: In function 'syn_dp_rx_inval_and_flush':
/home/gemous/openwrt/ipq5018/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq50xx/qca-nss-dp-2023-06-06-fa674644/hal/dp_ops/syn_gmac_dp/syn_dp_rx.c:80:17: error: implicit declaration of function 'dmac_flush_range_no_dsb' [-Werror=implicit-function-declaration]
80 | dmac_flush_range_no_dsb((void *)&rx_info->rx_desc[start], (void *)&rx_info->rx_desc[end] + sizeof(struct dma_desc_rx));
| ^~~~~~~~~~~~~~~~~~~~~~~
/home/gemous/openwrt/ipq5018/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq50xx/qca-nss-dp-2023-06-06-fa674644/hal/dp_ops/syn_gmac_dp/syn_dp_rx.c: In function 'syn_dp_rx_refill_page_mode':
/home/gemous/openwrt/ipq5018/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq50xx/qca-nss-dp-2023-06-06-fa674644/hal/dp_ops/syn_gmac_dp/syn_dp_rx.c:135:17: error: implicit declaration of function 'dmac_inv_range_no_dsb' [-Werror=implicit-function-declaration]
135 | dmac_inv_range_no_dsb(page_addr, (page_addr + PAGE_SIZE));
| ^~~~~~~~~~~~~~~~~~~~~
/home/gemous/openwrt/ipq5018/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq50xx/qca-nss-dp-2023-06-06-fa674644/hal/soc_ops/ipq50xx/nss_ipq50xx.c: In function 'nss_dp_hal_tcsr_set':
/home/gemous/openwrt/ipq5018/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq50xx/qca-nss-dp-2023-06-06-fa674644/hal/soc_ops/ipq50xx/nss_ipq50xx.c:85:23: error: implicit declaration of function 'qti_scm_tcsr_reg_write' [-Werror=implicit-function-declaration]
85 | err = qti_scm_tcsr_reg_write((tcsr_base + TCSR_GMAC_AXI_CACHE_OVERRIDE_OFFSET),
| ^~~~~~~~~~~~~~~~~~~~~~
/home/gemous/openwrt/ipq5018/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq50xx/qca-nss-dp-2023-06-06-fa674644/hal/dp_ops/syn_gmac_dp/syn_dp_tx.c: In function 'syn_dp_tx_process_nr_frags':
/home/gemous/openwrt/ipq5018/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq50xx/qca-nss-dp-2023-06-06-fa674644/hal/dp_ops/syn_gmac_dp/syn_dp_tx.c:109:17: error: implicit declaration of function 'dmac_clean_range_no_dsb' [-Werror=implicit-function-declaration]
109 | dmac_clean_range_no_dsb(frag_addr, frag_addr + length);
| ^~~~~~~~~~~~~~~~~~~~~~~
/home/gemous/openwrt/ipq5018/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq50xx/qca-nss-dp-2023-06-06-fa674644/hal/dp_ops/syn_gmac_dp/syn_dp_rx.c: In function 'syn_dp_rx':
/home/gemous/openwrt/ipq5018/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq50xx/qca-nss-dp-2023-06-06-fa674644/hal/dp_ops/syn_gmac_dp/syn_dp_rx.c:442:17: error: implicit declaration of function 'dmac_inv_range' [-Werror=implicit-function-declaration]
442 | dmac_inv_range((void *)rx_buf->map_addr_virt,
| ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.build:250: /home/gemous/openwrt/ipq5018/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq50xx/qca-nss-dp-2023-06-06-fa674644/hal/soc_ops/ipq50xx/nss_ipq50xx.o] Error 1
make[4]: *** Waiting for unfinished jobs....
/home/gemous/openwrt/ipq5018/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq50xx/qca-nss-dp-2023-06-06-fa674644/nss_dp_main.c: In function 'nss_dp_feature_check':
/home/gemous/openwrt/ipq5018/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq50xx/qca-nss-dp-2023-06-06-fa674644/nss_dp_main.c:552:13: error: implicit declaration of function 'skb_vlan_tagged_multi' [-Werror=implicit-function-declaration]
552 | if (skb_vlan_tagged_multi(skb)) {
| ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
getting closer though!
just adding the driver for PWM, PWM leds and ipq5018-wifi now and will do some testing.
alright, am able to compile NSS-DP now. I changed the above-mentioned patch to include a missing variable to syn_dp_cfg_rx.c in function sync_dp_cfg_rx_setup_desc_queu(): dma_addr_t dma_addr;
nss_dp_main.c was missing a reference to a header file:
and last, had to edit the config file of QCA-SSDK and include two extra modules for the MP chiptype as the compiler was throwing modpost errors to undefined functions in QCA-SSDK. The functions were exported though, but they weren't included as modules so the compiler wouldn't pick up on them.