bousqi / SMEG_PLUS

SMEG+ Unit reverse engineering
42 stars 7 forks source link

Firmware Flashing? #5

Closed guglicap closed 1 year ago

guglicap commented 1 year ago

Hello, I'm hoping not to bother after a very long period of inactivity...

My SMEG broke after a battery fault, it's stuck on the peugeot logo, which makes me think it's probably a firmware corruption or something. I also had a look at the HU board and nothing looks burnt. I already tried flashing firmware with the usb method, which doesn't seem to be working. I was wondering if you know of a more barebones method maybe with UART or by connecting directly to the board anyway. Thanks!

Th30wl commented 1 year ago

Infotainment unit has a MicroSD card on its motherboard (inside regular MicroSD card slot). Maybe you can try replacing it with a new one and see if that helps.

https://www.drive2.ru/l/616098422436402793/

I guess that you should not clone it as i this tutorial because you might have corrupted files already but it will help you to find it at least.

guglicap commented 1 year ago

Thanks for the info. I did already disassemble the board and found the SD card - I believe it doesn't host the "critical" part of the SMEG filesystem (it's a SMEG+ IV2, btw), as I was able to plug it into the laptop and read it correctly. The contents seem to be mostly maps and some stock sounds, I guess?

guglicap commented 1 year ago

Hello, an update for those who might find themselves stuck with the same issue, I managed to fix this.

I did investigate the issue quite a bit through the UART connection, which confirmed my hypothesis about the firmware being corrupted. Basically, the boot process was stuck on an fsck on the USER_DATA partition of the NAND flash memory. I do not have a solid understanding of the boot process, or the firmware itself, but I think the fsck comes before the user interface and the "USB-listening" process (for firmware update). I then spent some hours trying to abort the fsck via the shell without much success, although I cannot tell if this is due to my incompetence or to it not being possible.

At this point I had noticed a button on the other side of the UART port, which kinda screamed programming mode or something. I was hesitant to press it because I thought it might mess up the U-Boot and I didn't wanna lose the shell. Out of despair I decided to try anyway. I inserted an USB key with firmware update on it, pressed the button and rebooted the SMEG. It seemed like nothing was happening for the first 2-3 reboots but then the firmware update process started and at the end of it, I had a fully functional SMEG once again!

TL;DR: if your SMEG is bricked, try inserting a USB key with the fw update and reboot the SMEG a couple times while keeping the button on the other side of the UART port pressed, until the fw update process starts. worked for me, your mileage may vary.