You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write rootfs using compressed tarball to partition on SD-Card
export ROOTFS_PART=/dev/mmcblk0p2
# Format the rootfs partition as 'ext4' and label it 'rootfs'
sudo mkfs.ext4 -F -m 0 -L rootfs $ROOTFS_PART# Mount the target rootfs
udisksctl mount -b $ROOTFS_PART# Unpack the rootfs tarball contents to mounted fs# NOTE: You will need 'pv' tool installed with your host distro for progress indicatorexport ROOTFS_MOUNTPOINT=$(lsblk -nro MOUNTPOINT $ROOTFS_PART)
pv rootfs.tar.gz | sudo tar xpzf - -C $ROOTFS_MOUNTPOINT# Unmount the target rootfs
udisksctl unmount -b $ROOTFS_PART
Update mounted target rootfs using rsync
export ROOTFS_PART=/dev/mmcblk0p2
# Get path to Yocto rootfs staging dir (IMAGE = image recipe)export ROOTFS_DIR=$(bitbake -e $IMAGE| grep -oP '^IMAGE_ROOTFS=["]*"\K[^"]*')# Mount the target rootfs
udisksctl mount -b $ROOTFS_PART# Get mount point of target rootfsexport ROOTFS_MOUNTPOINT=$(lsblk -nro MOUNTPOINT $ROOTFS_PART)# Use rsync to sync src and dest
sudo rsync -axHAWXS --numeric-ids --no-owner --no-group --info=progress2 $ROOTFS_DIR/ $ROOTFS_MOUNTPOINT --delete
# Unmount the target rootfs
udisksctl unmount -b $ROOTFS_PART