i untaring rootf.tar.gz in embedded linux board using busybox sh shell,
how make untaring of tar.gz file faster
using below option,
tar -xzf rootfs.tar.gz is there option make untaring faster, referred this link doesn't work me.i referred this question on stackoverflow didn't either.
extracting tar.gz won't faster on same hardware. let's think bit out of box.
does have compressed?
you can uncompress archive beforehand, maybe on host system
gunzip rootfs.tar.gz then untar uncompressed archive
tar xf rootfs.tar thus saving lot of processor cycles on embedded board.
does have archive @ all?
creating lots of small files can slow on memory card devices, because operate larger block size, 128k. can accelerate process preparing filesystem image on host, , copying in 1 piece.
first, create empty image file of e.g. 128 mbytes. should change size fit device.
# dd if=/dev/zero of=rootfs.ext4 bs=1m count=128 create filesystem on image
# mkfs.ext4 -f rootfs.ext4 mount image
# mount rootfs.ext4 /mnt -o loop extract rootfs
# (cd /mnt/;tar xf /somewhere/rootfs.tar.gz) don't forget unmount afterwards
# umount rootfs.ext4 now can copy rootfs.ext4 on target board, , install on partition (just make sure it's not mounted, , adjust device name accordingly)
# cat rootfs.ext4 > /dev/mmcblk0p2
Comments
Post a Comment