本文主要是介绍rk3399添加自定义分区,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
目的是在系统添加新分区,供上层使用
环境:rk3399-jd4
ubuntu18.04
- 在parameter.txt文件修改分区:
改前
CMDLINE: mtdparts=rk29xxnand:0x00002000@0x00004000(uboot),0x00002000@0x00006000(trust),0x00002000@0x00008000(misc),0x00020000@0x0000a000(boot),0x00020000@0x0002a000(recovery),0x00010000@0x0004a000(backup),0x00600000@0x0005a000(rootfs),-@0x0065a000(userdata:grow)
uuid:rootfs=614e0000-0000-4b53-8000-1d28000054a9
改后:
CMDLINE: mtdparts=rk29xxnand:0x00002000@0x00004000(uboot),0x00002000@0x00006000(trust),0x00002000@0x00008000(misc),0x00020000@0x0000a000(boot),0x00020000@0x0002a000(recovery),0x00010000@0x0004a000(backup),0x00600000@0x0005a000(rootfs),0x00200000@0x0065a000(logfs),-@0x0085a000(userdata:grow)
差别,添加logfs 分区 ,大小1G :
0x00200000@0x0065a000(logfs)
2.改后重新烧尽系统:
root@firefly:~# ll /dev/block/by-name/
total 0
drwxr-xr-x 2 root root 220 Feb 19 03:20 ./
drwxr-xr-x 3 root root 560 Feb 19 03:20 ../
lrwxrwxrwx 1 root root 15 Feb 19 03:20 backup -> ../../mmcblk1p6
lrwxrwxrwx 1 root root 15 Feb 19 03:20 boot -> ../../mmcblk1p4
lrwxrwxrwx 1 root root 15 Feb 19 03:20 logfs -> ../../mmcblk1p8
lrwxrwxrwx 1 root root 15 Feb 19 03:20 misc -> ../../mmcblk1p3
lrwxrwxrwx 1 root root 15 Feb 19 03:20 recovery -> ../../mmcblk1p5
lrwxrwxrwx 1 root root 15 Feb 19 03:20 rootfs -> ../../mmcblk1p7
lrwxrwxrwx 1 root root 15 Feb 19 03:20 trust -> ../../mmcblk1p2
lrwxrwxrwx 1 root root 15 Feb 19 03:20 uboot -> ../../mmcblk1p1
lrwxrwxrwx 1 root root 15 Feb 19 03:20 userdata -> ../../mmcblk1p9
应该是成功的,系统会自动挂载到 /media/firefly/uuid下,想设置系统自动挂载到指定路径:
root@firefly:~# nl /etc/fstab1 # UNCONFIGURED FSTAB FOR BASE SYSTEM2 /dev/mmcblk1p8 /logblk ext4 defaults 1 1
root@firefly:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.9G 8.0K 1.9G 1% /dev
tmpfs 385M 900K 384M 1% /run
/dev/mmcblk1p7 1.6G 1.3G 180M 88% /root-ro
/dev/mmcblk1p9 27G 359M 27G 2% /userdata
overlayroot 27G 359M 27G 2% /
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/mmcblk1p8 976M 2.6M 907M 1% /logblk
tmpfs 385M 16K 385M 1% /run/user/1000
/dev/sda1 58G 9.0G 49G 16% /media/firefly/KINGSTON1
tmpfs 385M 0 385M 0% /run/user/0
可以挂载了。
设置自启动程序:
root@firefly:/home/firefly/.config/lxsession/Lubuntu# ls
autostart desktop.conf
设置内容:
@/bin/mkdir /home/firefly/ssddd
@sudo /bin/umount /dev/mmcblk1p8
@sudo /bin/mount /dev/mmcblk1p8 /logblk
切记,烧录完系统记得重新烧录分区文件,否则会出现分区重叠现象;
最新笔记,参考https://blog.csdn.net/u013021855/article/details/126960156?spm=1001.2014.3001.5502
这篇关于rk3399添加自定义分区的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!