Compiling MD380 firmware under windows

Last Updated on

The TYT MD380 / Retevis RT3

Compiling MD380 firmware under windows

DISCLAIMER: I’m not responsible to any damage you can do to your device. It’s risky 🙂

You probably heard of the TYT MD380 / Retevis RT3 handheld transceiver, the popular DMR radio.
Travis Goodspeed hacked the chinese firmware and made some useful tools to flash the patched firmware and flash DMR users database to the device (UHF version only, 16M memory).

The video from Shmoocon Firetalks 2016:

Here is the link for reading about it: Hackaday
And the github repository: Github
Compiling the firmware is a pain if you’re using Windows  like me.
I finally made it and here are the steps:

1. Install Git
2. Install Cygwin
3. Install ARM for windows

Notes:
On Git installation you will encounter a screen titled: “Adjusting yout PATH environment”  choose the third option.

About Cygwin, I’m not sure what packages are really needed, cause I tried a lot to get it work and downloaded a few packages, so make sure you download the following packages: Python 2, make, dash (those I remember) and if it’s not working, check my installed packages list versus yours (the command: cygcheck -c):

Cygwin Package Information

Package                                 Version                
_autorebase                             001004-1               
alternatives                            1.3.30c-10             
base-cygwin                             3.8-1                  
base-files                              4.2-4                  
bash                                    4.3.42-4               
binutils                                2.25-4                 
bzip2                                   1.0.6-2                
ca-certificates                         2.7-1                  
cmake                                   3.3.2-1                
coreutils                               8.25-3                 
cygutils                                1.4.15-2               
cygwin                                  2.5.1-1                
cygwin-debuginfo                        2.5.1-1                
cygwin-devel                            2.5.1-1                
cygwin32                                2.5.1-1                
cygwin32-binutils                       2.25-1                 
cygwin32-default-manifest               6.4-1                  
cygwin32-gcc-core                       5.3.0-3                
cygwin32-gcc-g++                        5.3.0-3                
cygwin32-w32api-headers                 4.0.4-1                
cygwin32-w32api-runtime                 4.0.4-1                
dash                                    0.5.8-3                
dash-debuginfo                          0.5.8-3                
editrights                              1.03-1                 
file                                    5.25-1                 
findutils                               4.6.0-1                
gawk                                    4.1.3-1                
getent                                  2.18.90-4              
grep                                    2.24-1                 
groff                                   1.22.3-1               
gzip                                    1.7-2                  
hostname                                3.13-1                 
info                                    6.1-2                  
ipc-utils                               1.0-2                  
less                                    481-1                  
libarchive13                            3.1.2-3                
libargp                                 20110921-2             
libattr1                                2.4.46-1               
libblkid1                               2.25.2-2               
libbz2_1                                1.0.6-2                
libcloog-isl4                           0.18.0-2               
libcom_err2                             1.42.12-2              
libcrypt0                               1.3-1                  
libcurl4                                7.49.0-1               
libdb5.3                                5.3.21-1               
libexpat1                               2.1.1-2                
libffi6                                 3.2.1-2                
libgcc1                                 5.3.0-5                
libgdbm4                                1.11-1                 
libgmp10                                6.1.0-3p1              
libgssapi_krb5_2                        1.14.1-1               
libguile17                              1.8.8-1                
libiconv                                1.14-3                 
libiconv2                               1.14-3                 
libidn11                                1.29-1                 
libintl-devel                           0.19.7-1               
libintl8                                0.19.7-1               
libisl10                                0.11.1-2               
libisl13                                0.14.1-1               
libk5crypto3                            1.14.1-1               
libkrb5_3                               1.14.1-1               
libkrb5support0                         1.14.1-1               
libltdl7                                2.4.6-3                
liblzma5                                5.2.2-1                
liblzo2_2                               2.08-1                 
libmpc3                                 1.0.3-1                
libmpfr4                                3.1.4-1                
libncursesw10                           6.0-5.20160423         
libnettle4                              2.7.1-1                
libnghttp2_14                           1.7.1-1                
libopenldap2_4_2                        2.4.42-1               
libopenssl100                           1.0.2h-1               
libp11-kit0                             0.22.1-1               
libpcre1                                8.38-3                 
libpipeline1                            1.4.0-1                
libpopt0                                1.16-1                 
libpsl5                                 0.13.0-1               
libreadline7                            6.3.8-1                
libsasl2_3                              2.1.26-9               
libsmartcols1                           2.25.2-2               
libsqlite3_0                            3.12.2-1               
libssh2_1                               1.7.0-1                
libssp0                                 5.3.0-5                
libstdc++6                              5.3.0-5                
libtasn1_6                              4.7-1                  
libunistring2                           0.9.6-1                
libusb1.0                               1.0.20-1               
libusb1.0-devel                         1.0.20-1               
libuuid-devel                           2.25.2-2               
libuuid1                                2.25.2-2               
libxml2                                 2.9.3-1                
login                                   1.11-1                 
lynx                                    2.8.7-2                
make                                    4.2-1                  
man-db                                  2.7.4-1                
mingw64-i686-binutils                   2.25.0.1.23f238d-1     
mingw64-i686-gcc-core                   4.9.2-2                
mingw64-i686-gcc-g++                    4.9.2-2                
mingw64-i686-headers                    4.0.6-1                
mingw64-i686-runtime                    4.0.6-1                
mingw64-i686-windows-default-manifest   6.4-1                  
mingw64-i686-winpthreads                4.0.6-1                
mingw64-x86_64-binutils                 2.25.0.1.23f238d-1     
mingw64-x86_64-gcc-core                 4.9.2-2                
mingw64-x86_64-gcc-g++                  4.9.2-2                
mingw64-x86_64-headers                  4.0.6-1                
mingw64-x86_64-runtime                  4.0.6-1                
mingw64-x86_64-windows-default-manifest 6.4-1                  
mingw64-x86_64-winpthreads              4.0.6-1                
mintty                                  2.3.7-0                
ncurses                                 6.0-5.20160423         
openssl                                 1.0.2h-1               
p11-kit                                 0.22.1-1               
p11-kit-trust                           0.22.1-1               
perl_autorebase                         5.22.2-1               
popt                                    1.16-1                 
python                                  2.7.10-1               
rebase                                  4.4.2-1                
rebase-debuginfo                        4.4.2-1                
run                                     1.3.4-2                
sed                                     4.2.2-3                
tar                                     1.28-1                 
terminfo                                6.0-5.20160423         
tzdata                                  2016d-1                
unzip                                   6.0-15                 
unzip-debuginfo                         6.0-15                 
util-linux                              2.25.2-2               
vim-minimal                             7.4.1816-1             
which                                   2.20-2                 
xz                                      5.2.2-1                
zlib0                                   1.2.8-3                

On the end of ARM installation check the “add path to environment variable” option.

After installing all, open Cygwin and write: git clone https://github.com/travisgoodspeed/md380tools.git
It’ll clone the git from Github to your drive.
Next, cd to the folder, cd /md380tools

Enter the following command: make clean dist
You should not have any problems and your screen should look like this:

md380 tools

Congratulations, you have it compiled.
You can find the files under /md380tools/md380tools-YEAR-M-D (the day you compiled it).

I don’t have the MD380 yet so I can’t guide you how to flash it.
You can find the entire info you need on Adafruit (she just got her license so welcome to the Ham Radio world Limor!)

P.S. If you have any problems compiling it, feel free to contact me (here or via QRZ.com info)
I had a few problems cause by different software installed that bumped into the process.

Did you like it?

Leave a Comment

Your email address will not be published. Required fields are marked *