dtechsrv / LibreELEC-AML

'Just enough OS' for Kodi for some Amlogic TV boxes
46 stars 9 forks source link

missing 6181 nvram for some MXIII-1G variants #30

Closed M0Rf30 closed 9 months ago

M0Rf30 commented 11 months ago

Hi and thanks for your efforts. Seems that my variant has this nvram descriptor

<4>[   27.085041@2] dhd_conf_set_hw_oob_intr: Enable HW OOB for 43362
<4>[   27.091546@2] dhd_conf_set_fw_name_by_chip: firmware_path=/etc/wifi/40181/fw_bcm40181a2.bin
<4>[   27.108065@2] @@@@@nv_6181_path=@@@@@@@
<4>[   27.108133@2] dhd_conf_read_config: nv_path = /etc/wifi/40181/nvram_ap6181.txt
<4>[   27.115589@2] dhd_conf_set_nv_path: nv_path is changed to /etc/wifi/40181/nvram_ap6181.txt
<4>[   27.122934@2] Final fw_path=/etc/wifi/40181/fw_bcm40181a2.bin
<4>[   27.127625@2] Final nv_path=/etc/wifi/40181/nvram_ap6181.txt
<4>[   27.133227@2] Final conf_path=/system/etc/wifi/config.txt
<4>[   27.202977@0] NVRAM version: AP6181_NVRAM_V1.1_01152013
<4>[   27.204101@0] dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.
<4>[   27.216794@0] dhd_bus_init: delay 100ms for BCM43362

Is it possible to add it? Thanks

dtechsrv commented 11 months ago

What system is generated this kernel log snippet? Would it be possible to request a complete (not truncated) kernel log?

M0Rf30 commented 11 months ago

This is the dmesg generated by LibreELEC-AML dmesg.txt

This the one generated by stock kernel https://github.com/M0Rf30/amlogic-s8x2/blob/main/dmesg

dtechsrv commented 11 months ago

First, try the M8S+ image from an sd card, because it has a bcmdhd driver version that is suitable for several Broadcom wifi chips. Under all other Meson8/8m2 images, the configuration of the Broadcom chip is fixed.

Unfortunately, I can't go deeper into the MXIII* images because I can't test them. I have already tried several similar modification attempts, but unfortunately the owners indicated that these did not work, so I stopped these modifications, which I cannot test.

M0Rf30 commented 11 months ago

Have to say it clearly ap6330 is loaded correctly on libreelec and wifi works. Mine is only an highlight on the fact that stock kernel uses ap6181. Same stuff on m8s images. Because I don't know if there is also a minimal change between ap6330 and ap6181 I just put some doubt on this topic.

dtechsrv commented 11 months ago

Unfortunately, only Broadcom engineers can answer the question about the differences between these two chips. :)

However, the bcmdhd driver in my M8S+ image loads the appropriate config and firmware based on the type of chip, and it contains the nvram of the ap6181. But this is only true for my M8S+ releases! So if the AP6330 loads there as well, the explanation may be that you actually have an AP6330 in your box.

M0Rf30 commented 11 months ago

I opened the hardware and the chip is here, marked as ap6181. My supposition is that mxIII 1g doesn't have support for it. maybe adding it would finally load the appropriate nvram? Mine is only an hypothesis

dtechsrv commented 11 months ago

In the meantime, I realized that the M8S+ image won't boot since there is only 1G of RAM in the box.

The bcmdhd driver in the MXIII* images is not able to "find" the correct hardware id, because it works incorrectly for some reason. Therefore, the hardware id is "hardwired" into the kernel configuration, so it is not possible to modify it afterwards: https://github.com/dtechsrv/LibreELEC-AML/blob/6e73c2e83460a46df50fe934ed3f87a5c9480436/projects/S8X2/devices/MXIII-1G/linux/linux.arm.conf#L1142

If you want to modify it, you have to compile it from source and test it yourself. Since I don't have such a box, I already indicated that I don't want to modify the original code, because I can't test it, and in addition, I could spoil the functionality of the existing devices. And I want to avoid that...

dtechsrv commented 10 months ago

I found the cause of the previous errors, so I enabled the updated universal bcmdhd driver, but it should be tested (#33).

If there is a compiled image, I will send a link.

dtechsrv commented 10 months ago

And there it is: https://libreelec.dtech.hu/snapshots/20231114_s8x2-bcmdhd-v2_66af60b/

If you have the chance, please test it. I hope it works. Thanks.

M0Rf30 commented 10 months ago

I will give confirmations in the next days

dtechsrv commented 9 months ago

I don't want to rush you, but I'd like to release LE-AML v9.2.8.12 and if that works, that would be included. And this is the only thing I'm waiting for before release.

M0Rf30 commented 9 months ago

I tested it and works

dtechsrv commented 9 months ago

Can I get a kernel log?

dtechsrv commented 9 months ago

I'm closing this now, but regardless, I would have been really happy if you had sent me a log.