TS-7680 eMMC Backup

From embeddedTS Manuals
Note: It is generally not required to re-create the partition table. Skip ahead to the next section if the eMMC is otherwise unmodified.

These instructions assume the unit is booted to the SD card (either the stock image or the aftermarket image and the user is logged in as "root".

The eMMC partition table can be created from scratch with the following commands. The command 'parted' is required for re-creating the partition table and it may need to be installed first. Note that if booted to an SD card running Debian Stretch with Linux 4.9, the eMMC device node is different as noted in the caveats. Uncomment the correct bash variable below.

# The 'parted' tool is required and may need to be installed if not already
# apt-get update && apt-get install -y parted

# Uncomment the line below if booted from the stock 3.14 Linux image
# export EMMC_DEV="/dev/mmcblk2"

# Uncomment the line below if booted from the aftermarket 4.9 Debian Stretch image
# export EMMC_DEV="/dev/mmcblk1"

# Verify nothing else has the standard partitions mounted
umount "${EMMC_DEV}"p1
umount "${EMMC_DEV}"p2

dd if=/dev/zero bs=512 count=1 of="${EMMC_DEV}"
parted -s -a optimal "${EMMC_DEV}" mklabel msdos
parted -s -a optimal "${EMMC_DEV}" mkpart primary ext3 1MiB 9MiB
parted -s -a optimal "${EMMC_DEV}" mkpart primary ext3 9MiB 100%

Any number of other partitions can be created at this time, however, U-Boot expects the root filesystem to be on the second partition of the disk.

The instructions below will update the eMMC disk with the latest stock image, but it is also possible to use this process to update the TS-7680 to the Linux 4.9 kernel with Debian Stretch

If booted to an SD card running Debian Stretch with Linux 4.9, the eMMC device node is different as noted in the caveats. Uncomment the correct bash variable below.

# Uncomment the line below if booted from the stock 3.14 Linux image
# export EMMC_DEV="/dev/mmcblk2"

# Uncomment the line below if booted from the aftermarket 4.9 Debian Stretch image
# export EMMC_DEV="/dev/mmcblk1"

# Verify nothing else has the standard partitions mounted
umount "${EMMC_DEV}"p1
umount "${EMMC_DEV}"p2

# Mount, download and unpack filesystem tarball, and flush all cached data
mkfs.ext3 -F "${EMMC_DEV}"p2
mkdir /mnt/emmc
mount "${EMMC_DEV}"p2 /mnt/emmc

# Unpack stock image
wget ftp://ftp.embeddedTS.com/ts-arm-sbc/ts-7680-linux/distributions/ts7680-latest.tar.bz2
tar -xf ts7680-latest.tar.bz2 -C /mnt/emmc

# Comment the above two commands and use the following two commands instead to unpack the Linux 4.9 with Debian Stretch image
# wget http://ftp.embeddedTS.com/ftp/ts-arm-sbc/ts-7680-linux/distributions/ts7680-linux4.9-debian-stretch-arm-latest.tar.bz2
# tar -xf ts7680-linux4.9-debian-stretch-arm-latest.tar.bz2 -C /mnt/emmc

umount /mnt/emmc
sync