Images operation:
1、Find a USB flash disk with at least 4G space reserved for storing the final generated file FAT32 format;
2、Insert a USB flash drive into the system and mount it to the/media/usb directory;
cd /mnt/
sudo mkdir usb
sudo fdisk -l
# For example, the result is: /dev/sda1
sudo mount /dev/sda1 /mnt/usb
3、Enter the U disk mount directory, create a new folder "build_rootfs", and enter;
cd /mnt/usb/
sudo mkdir build_rootfs
cd build_rootfs
4、Create an empty image file with a size of 3G (adjustable):
It will take about 10-15 minutes
dd if=/dev/zero of=linuxroot.img bs=1M count=3500
5、Format to ext4 file system format, and label the volume as linuxroot:
sudo mkfs.ext4 -F -L linuxroot linuxroot.img
6、Mount an empty image file:
sudo mount -o loop linuxroot.img /opt
7、Mount the Ubuntu system partition:
sudo mount /dev/mmcblk2p7 /mnt
sudo mount /dev/mmcblk1p8 /mnt
8、Copy the Ubuntu root file system to an empty image file:
sudo cp -a /mnt/* /opt
9、Create a startup tag file:
touch /opt/firstboot
10、Finally, umount drops all the points mounted by itself:
sudo umount /opt
sudo umount /mnt
11、Check and repair the file system
sudo e2fsck -p -f linuxroot.img
12、Reduce file system mirror size
sudo resize2fs -M linuxroot.img
13、The final file is linuxroot.img
Unplug the USB flash disk and copy it to the computer. Use the tool to burn it. The packaged image is the same as the previous one
14.Update firmware steps
Press and hold, then plug the main board into the power supply, click the run button on the RKDevTool tool, and it will start automatically after brushing