Flashing a TPE-R1400 router with a new version of libreCMC

We're documenting two ways to flash a new version of libreCMC to the router. The first is a more traditional method. Further down we'll provide instructions for making a microSD card with a new version of libreCMC.

Directions to flash libreCMC on a TPE-R1400 router from the libreCMC user interface:

1. Download the libreCMC ISO for TPE-R1400 from https://www.librecmc.org/

Downloads > OEM > thinkpenguin > librecmc_tpe_vXXXX_src.iso

2. Open a terminal and use the cd command to change to the appropriate directory where you have downloaded the ISO; example:

cd Downloads

3. Create a directory to mount the ISO file to and mount it

mkdir iso
sudo mount librecmc_tpe_vXXXX_src.iso ./iso

4. cd to the location containing the firmware image librecmc-rockchip-armv8-thinkpenguin_tpe-r1400-ext4-sysupgrade.img.gz

cd iso/bin/rockchip

5. Copy the librecmc-rockchip-armv8-thinkpenguin_tpe-r1400-ext4-sysupgrade.img.gz file to a writable temporary folder

cp librecmc-rockchip-armv8-thinkpenguin_tpe-r1400-ext4-sysupgrade.img.gz /tmp

6. cd to the temporary folder and decompress the .img.gz file containing our disk image

cd /tmp
gzip -d librecmc-rockchip-armv8-thinkpenguin_tpe-r1400-ext4-sysupgrade.img.gz

7. Connect an ethernet cable from the routers LAN port to a computer's ethernet port
8. Plug the power in, make sure there is already a working microSD card inserted in the slot with libreCMC on it
9. Go to https://192.168.10.1/ or if you have a 4G setup and/or VPN https://192.168.3.1/ or https://192.168.8.1/ (these are the default IP addresses we use anyway)
10. Login to the libreCMC user interface, note: you may need add an exception if prompted with a security warning, the default password is 'none' or it's empty and you can just click login
11. Go to System > Backup / Flash Firmware

12. Under Flash new firmware image select the Browse button and find the librecmc-rockchip-armv8-thinkpenguin_tpe-r1400-ext4-sysupgrade.img file that you decompressed in step 6.

Warning: As of at least the first release of libreCMC for this router the "Keep settings" option does not retain configuration changes made to the router no matter whether this option is checked or not checked. As such be sure to backup any configuration changes prior to flashing using the generate archive button under the Backup / Restore section before flashing (assuming you need to save anything).

2nd Warning: This may reduce the amount of free space available from gigabytes to hundreds of megabytes. It's possible to insert the microSD card in a computer and resize the partition, but the process is a bit complicated at the moment, and as such we will not document that here given most users and use cases should be satisfied with the hundreds of megabytes of free space.

13. Click the Flash image button...
14. After a minute it'll prompt you to confirm that you really want to flash the image, do so

The router should reboot on its own after confirming you want to flash the image and after a minute or two you should end up with a new version of libreCMC showing at the bottom of the login screen. If the IP has changed you may need to disconnect and reconnect using your network applet. The default IP for the router is https://192.168.10.1/.

Creating a microSD card with a new version of libreCMC using a SD card reader on a computer

1. Download the libreCMC ISO for TPE-R1400 from https://www.librecmc.org/

Downloads > OEM > thinkpenguin > librecmc_tpe_vXXXX_src.iso

2. Open a terminal and use the cd command to change to the appropriate directory where you have downloaded the ISO; example:

cd Downloads

3. Insert a microsd card to your computers microsd card reader and unmount any auto-mounted partitions; example:

sudo fdisk -l

Disk /dev/mmcblk0: 7.44 GiB, 7990149120 bytes, 15605760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 32 15605759 15605728 7.4G c W95 FAT32 (LBA)

Note: The above Disk /dev/mmcblk0 matches the size of our sd card, this is the disk and /dev/mmcblk0p1 is a partition on the disk, so unmount the partition

sudo umount /dev/mmcblk0p1

4. Make a directory called iso and mount the librecmc ISO file to it and cd to the directory with the libreCMC image for the router

mkdir iso
sudo mount librecmc_tpe_vXXXX_src.iso ./iso
cd iso/bin/rockchip

5. Copy the librecmc-rockchip-armv8-thinkpenguin_tpe-r1400-ext4-sysupgrade.img.gz file to a writable temporary folder

cp librecmc-rockchip-armv8-thinkpenguin_tpe-r1400-ext4-sysupgrade.img.gz /tmp

6. Cd to the temporary folder and decompress the .img.gz file containing our disk image

cd /tmp
gzip -d librecmc-rockchip-armv8-thinkpenguin_tpe-r1400-ext4-sysupgrade.img.gz

7. Identify the disk using fdisk -l (see step 3 to identify the Disk or sd card, as oposed to the partition, in our example it is /dev/mmcblk0)

sudo dd if=librecmc-rockchip-armv8-thinkpenguin_tpe-r1400-ext4-sysupgrade.img of=/dev/mmcblk0

8. Insert the microSD card in the microSD card slot on the router and power it on