Md380tools on Pi-Star
- PLEASE CONSIDER THIS GUIDE IN BETA UNTIL IT HAS BEEN TESTED BY A FEW MEMBERS.**
1. Confirm that you have a large enough SD card in your Pi-Star, we need at least a 4G card. The base image will work on a 2G card, but for md380tools we need a LOT more space!
2. Confirm that you are running Pi-Star 3.3.9 or newer (you need this version for a patched version of 'raspi-config'
- If you have a version of Pi-Star prior to 3.3.9 - Please scroll to the bottom for an alternative to Step 3.
3. Expand your filesystem to fill your card.
[email protected](ro):~$ sudo pistar-expand
Once this step is complete, your Pi will reboot and expand the disk, this WILL take some time, be patient.
4. Login to your Pi-Star over SSH.
5. Unlock the disk
[email protected](ro):~$ rpi-rw
6. Install the supporting tools;
[email protected](rw):~$ sudo apt-get install gcc-arm-none-eabi binutils-arm-none-eabi libusb-1.0 libnewlib-arm-none-eabi make curl python-pip
7. Install pyusb to support the USB connection to the radio (Note: Thanks to Bob Finch for this update, it appears we no longer need the old pyusb library.)
[email protected](rw):~$ sudo pip install pyusb
8. Download the md380tools from GitHub
[email protected](rw):~$ git clone https://github.com/travisgoodspeed/md380tools.git
9. Boot your radio in DFU mode (with the top two buttons on the left held while turning on) Radio should now have the busy light flashing red/green.
10. Make the firmware; For NON GPS radios (MD380)
[email protected](rw):~$ cd md380tools [email protected](rw):md380tools$ sudo make flash
For GPS models (MD390G)
[email protected](rw):~$ cd md380tools [email protected](rw):md380tools$ sudo make flash_S13
11. Reboot the radio.
12. With the radio booted normally - you can now update the user database.
[email protected](rw):md380tools$ sudo make flashdb
This does take a LONG time to erase and re-write the flash area containing the user database, wait it out...
13. Process completed - your MD380/390 radio is fully updated, including the user database.
If you want to later update your version of the md380tools;
[email protected](rw):~$ cd md380tools [email protected](rw):md380tools$ git pull
If you want to re-flash your radio after a tools update: Boot your radio in DFU mode (with the top two buttons on the left held while turning on) Radio should now have the busy light flashing red/green.
For NON GPS radios (MD380);
[email protected](rw):~$ cd md380tools [email protected](rw):md380tools$ sudo make flash
For GPS models (MD390G);
[email protected](rw):~$ cd md380tools [email protected](rw):md380tools$ sudo make flash_S13
Finally for updating the userdb and re-flashing to the radio;
[email protected](rw):md380tools$ make updatedb flashdb
- Alternative Step 3 for Pi-Star versions before 3.3.9
[email protected](ro):~$ rpi-rw [email protected](rw):~$ sudo raspi-config
Choose option 7 "Advanced Options"
Choose option A1 "Expand Filesystem"
When prompted choose reboot.
Once the Pi reboots and you can login again
[email protected](ro):~$ rpi-rw [email protected](rw):~$ sudo e2fsck -f /dev/mmcblk0p2 [email protected](rw):~$ sudo resize2fs /dev/mmcblk0p2
Once those complete you can continue with Step 4 and onwards from above.