steward-fu / website

Steward's website
https://steward-fu.github.io/website/index.htm
18 stars 2 forks source link

Help with building Miyoo A30 firmware? #3

Closed ndguardian closed 2 months ago

ndguardian commented 3 months ago

Howdy,

I've been troubleshooting wifi issues on the Miyoo A30, and I think the issues might be related to a faulty wifi driver bundled in its firmware image. I'm happy to share the write-up I sent Miyoo a couple weeks ago, if you're interested. I was going to try replacing the driver in-place, but given it's using squashfs that doesn't seem feasible, so it looks like I might need to try rebuilding the firmware image to do the upgrade.

I'm reading up on buildroot now, but would you happen to have a quick overview on how I should go about building this? I'll be trying to build from a Kali Linux x64 VM, unless of course you happen to have a better recommendation.

Of course, if I happen to be asking the wrong question here, that's fine too. I'm not exactly new to Linux, but I am fairly new to Linux for embedded systems.

Thanks!

steward-fu commented 3 months ago

Wrong wifi driver ? Here is the firmware you can download and then flash into Miyoo A30 https://github.com/steward-fu/website/releases/download/miyoo-a30/firmware_20240516.zip

Since Miyoo A30 is close-source handheld, it is not easily to rebuild image from scratch.

ndguardian commented 3 months ago

I don't think it's so much the "wrong" driver, rather it may be a bad version or something like that. Don't know if you've seen this, but even on the latest firmware that I've seen, after a certain amount of time the wifi just stops working.

What's happening is the wifi controller thread is closing, at which point the kernel no longer is able to communicate with the wifi chip. That's why I was hoping to patch it. :/ I knew the firmware was closed-source, but I didn't know if the dumps you had were the complete firmware or not. That's a bummer though. I sent a full write-up to Miyoo on the issue a couple weeks ago, but I've not heard back from them.

steward-fu commented 3 months ago

Got it. Since it is close-source, it is hard to build a driver and then replace the old wifi driver because the signaure is different with the kernel on Miyoo A30. It means you cannot install the wifi driver (insmod xxx.ko) because the signature is different. Unpacking the existing squashfs rootfs from Miyoo A30 is not hard to do.