复制/tmp/deploy/images/下rootfs,替换到以前能sdcard的rootfs,在mkfs.ext4报错如下:
__populate_fs: Could not allocate block in ext2 filesystem while writing file "armor_missing_tangents.fsf"
mkfs.ext4: Could not allocate block in ext2 filesystem while populating file system
应该怎么升级系统呢
执行下面报错:
export LC_ALL=C
set -e
rawsize=8192
fatsize=65536
ext4size=3145728
totalsize=`expr $rawsize + $fatsize + $ext4size + $rawsize`
if [ -e $SDK_PATH/images/rootfs.ext4 ];then
rm $SDK_PATH/images/rootfs.ext4
fi
dd if=/dev/zero of=$SDK_PATH/images/rootfs.ext4 bs=1K count=0 seek=$ext4size
echo $totalbytes
chown -h -R 0:0 $DESTDIR
sudo $SDK_PATH/tools/bin/mkfs.ext4 -F -i 4096 $SDK_PATH/images/rootfs.ext4 -d $DESTDIR
$SDK_PATH/tools/bin/fsck.ext4 -pvfD $SDK_PATH/images/rootfs.ext4
fatstart=$rawsize
fatend=`expr $rawsize + $fatsize`
ext4start=$fatend
ext4end=`expr $fatend + $ext4size`
echo $ext4end
dd if=/dev/zero of=$SDK_PATH/images/rootfs.sdcard bs=1K count=0 seek=$totalsize
parted -s $SDK_PATH/images/rootfs.sdcard mklabel msdos
parted -s $SDK_PATH/images/rootfs.sdcard unit KiB mkpart primary fat32 $fatstart $fatend
parted -s $SDK_PATH/images/rootfs.sdcard unit KiB mkpart primary $ext4start $ext4end
parted $SDK_PATH/images/rootfs.sdcard print
dd if=$SDK_PATH/images/flash_sd_emmc.bin of=$SDK_PATH/images/rootfs.sdcard conv=notrunc seek=33 bs=1K
echo $fatstartbytes
echo $ext4startbytes
dd if=$SDK_PATH/images/boot.img of=$SDK_PATH/images/rootfs.sdcard conv=notrunc,fsync seek=1K bs=$fatstart
dd if=$SDK_PATH/images/rootfs.ext4 of=$SDK_PATH/images/rootfs.sdcard conv=notrunc,fsync seek=1K bs=$ext4start