$ sudo apt install expect
$ cd ./bm1880-system-sdk/build/sd_tools/
$ sudo ./sd_creat_rootfs_sd.sh /dev/sdc
umount: /dev/sdc: not mounted
args: /dev/sdc +128M +3072M
Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Partition number (1,2, default 2):
Partition 2 has been deleted.
Partition 1 has been deleted.
No partition is defined yet!
Could not delete partition 1
Created a new DOS disklabel with disk identifier 0x9bbd8a4f.
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Partition number (1-4, default 1):
First sector (2048-124735487, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-124735487, default 124735487): +128M
Created a new partition 1 of type 'Linux' and of size 128 MiB.
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Partition number (2-4, default 2):
First sector (264192-124735487, default 264192):
Last sector, +sectors or +size{K,M,G,T,P} (264192-124735487, default 124735487): +3072M
Created a new partition 2 of type 'Linux' and of size 3 GiB.
The partition table has been altered.
Calling ioctl() to re-read partition table.
mkfs.fat 3.0.28 (2015-05-16)
mlabel -i /dev/sdc1 ::IMAGES
mke2fs 1.42.13 (17-May-2015)
/dev/sdc2 contains a ext4 file system labelled 'rootfs'
last mounted on /media/hinton/rootfs on Sat Mar 9 10:59:03 2019
Creating filesystem with 786432 4k blocks and 196608 inodes
Filesystem UUID: 8b6ee338-bd57-4ca8-b6b1-2821b9f8d3a1
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done