Not sure I understood the initial post question here, but if it is how to expand the uSD card filesystem so it can take advantage of the whole uSD card size instead of the default 100mb filesystem that comes with the OpenWRT image, I can report did the following successfully:
Had a fully working uSD card with OpenWRT, as described in previous posts on this thread.
Then, in a linux box:
Put the card in a card reader
sudo dd bs=4M if=/dev/sdc | gzip > ./nanopi_
date +%d%m%y.gz
(created a uSD card backup to a file in the linux box.)
take the card, put another one and:
sudo gzip -dc ./nanopi_161222.gz| sudo dd bs=4M of=/dev/sdc
(restored the backup to other uSD card)
Tested the card in nanopi. It works, so the backup/restore worked fine.
Then, put one card in the linux box again and expand the partition with
sudo cfdisk /dev/sdc
(this is an interactive command, but quite intuitive)
Then, the partition is expanded, but the filesystem still needs to be expanded as well, so:
sudo e2fsck -f /dev/sdc2
sudo resize2fs /dev/sdc2
sudo e2fsck -f /dev/sdc2
Tried the card in nanopi, and viola! I have a filesystem of ~31.5GB available!
Your uSD device in your linux box may be different than /dev/sdcx. If you don't understand why is that you may want to ask help in a *nix forum, because a little mistake with dd can destroy anything.
(people used to call 'dd' "disk destroyer" for some reason
)
The dd command sometimes can take up to 1 or 2 hours without any feedback. Just be patient.
Sorry for having my previous posts slightly off-topic, but I hope to compensate with this.
Hope it helps. Happy OpenWRTing!