travisgoodspeed / md380tools

Python tools and patched firmware for the TYT-MD380
804 stars 245 forks source link

Error when building "old" firmware (D02.032) #894

Closed LouisErigHerve closed 5 years ago

LouisErigHerve commented 5 years ago

Dear developers,

I've tried to rebuild a fresh firmware from a clean install but I get an error at old firmware (D02.032) build step.

My tests are based on the Git repo of 10 Oct 2018 (commit 150c1de8a2e23598c9f59e70cf2d5ee7b8e631d1)

Compilation logs (end only):

arm-none-eabi-objcopy -O binary applet.elf applet.img
"make" -C ../patches/2.032 patched.img

make[3] : on entre dans le répertoire « /cygdrive/q/Projets/Perso/MD380/md380tools-master-perso/patches/2.032 »
cd ../../firmware && "make" unwrapped/D002.032.img

make[4] : on entre dans le répertoire « /cygdrive/q/Projets/Perso/MD380/md380tools-master-perso/firmware »
"make" -f Makefile_orig unwrapped/D002.032.img

make[5] : on entre dans le répertoire « /cygdrive/q/Projets/Perso/MD380/md380tools-master-perso/firmware »
../md380-fw --unwrap bin/D002.032.bin unwrapped/D002.032.img

DEBUG: reading "bin/D002.032.bin"

Guessing MD380 for radio model
Traceback (most recent call last):
  File "../md380-fw", line 7, in <module>
    main()
  File "/cygdrive/q/Projets/Perso/MD380/md380tools-master-perso/md380_fw.py", line 280, in main md.unwrap(input)
  File "/cygdrive/q/Projets/Perso/MD380/md380tools-master-perso/md380_fw.py", line 18, in unwrap header = header.unpack(img[:256])

struct.error: unpack requires a string argument of length 256

make[5]: *** [Makefile_orig:47: unwrapped/D002.032.img] Error 1

The file /fimware/bin/D002.032.bin exists but have a size equal to 0 bytes...

This issue can be bypassed by commenting all lines containing image_D02 in the makefile to generate all others releases.

Could you please check on your side please ?

Thanks !

dtc2344 commented 5 years ago

I cloned a fresh copy and it compiled fine for both D02 and D13 but i don't have a radio to test the D02 firmware on as all mine are D13.

Delete the repo and clone a new copy and try again.

LouisErigHerve commented 5 years ago

Ok I just cloned a fresh copy and it compiles well now... There were probably some files to clean in my previous repository... Sorry for the inconvenience. I close this issue.