1.通过rsync打包的rootfs再写入板子后,经常出现一些文件提示Structure needs cleaning
2.不写oem.img和userdata.img,在parameter.txt中将rootfs改为 -@xx(rootfs:grow),但是使用df 显示的这个分区大小不对,只有3G多(应该是我打包时的img大小),在rv1126-firefly-jd4.dts中已经添加chosen {
bootargs = “earlycon=uart8250,mmio32,0xff570000 console=ttyFIQ0 root=PARTLABEL=rootfs rootfstype=ext4 rootwait snd_aloop.index=7”;
};
在系统中使用resize2fs /dev/disk/by-partlabel/rootfs 会提示Filesystem at /dev/disk/by-partlabel/rootfs is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
resize2fs: Read-only file system While checking for on-line resizing support
3.使用软件的时候 kernel总是输出 xxx : unhandled page fault (11) at 0xa6fbb000, code 0x017,使用什么软件都会有这样的提示.这个提示是哪里出了问题吗?
出现Structure needs cleaning的情况大多数刚修改完文件
我知道kernel有page cache, 如何更改这个机制的参数 达到可以避免这种情况?
或者不是因为page cache引起的?
上面的问题都是 rsync 导出根文件系统之后发生的?我们这里没有出现这种现象
你是基于哪个固件修改导出的?
怎么到出的?
板蓝根 发表于 2021-12-2 18:03
上面的问题都是 rsync 导出根文件系统之后发生的?我们这里没有出现这种现象
你是基于哪个固件修改导出的 …
都是rsync导出出现的
基于firefly发布的debian10
导出之前没有做过这种测试,不清楚是否会出现这种问题
导出脚本
rsync -avx root@$1:/ $imgDirName
dd if=/dev/zero of=$imgFileName.img bs=1M count=4000
sudo mkfs.ext4 -F -L linuxroot $imgFileName.img
sudo mount $imgFileName.img ubuntuMount
sudo cp -rfp $imgDirName/* ubuntuMount
sudo umount ubuntuMount
e2fsck -p -f $imgFileName.img
resize2fs -M $imgFileName.img
刚才使用firefly官方提供的Debian10+修改后的parameter.txt和bootargs
df -h显示
Filesystem Size Used Avail Use% Mounted on
udev 362M 0 362M 0% /dev
tmpfs 74M 4.2M 70M 6% /run
/dev/mmcblk0p6 981M 830M 83M 91% /
tmpfs 367M 0 367M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 367M 0 367M 0% /sys/fs/cgroup
tmpfs 74M 0 74M 0% /run/user/0
tmpfs 74M 0 74M 0% /run/user/1000
root@firefly:/home/firefly# resize2fs /dev/mmcblk0p6
resize2fs 1.44.5 (15-Dec-2018)
Filesystem at /dev/mmcblk0p6 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
resize2fs: Read-only file system While checking for on-line resizing support
本帖最后由 z499920262 于 2021-12-3 14:42 编辑
这是parameter.txt
FIRMWARE_VER: 8.1
MACHINE_MODEL: RV1126
MACHINE_ID: 007
MANUFACTURER: RV1126
MAGIC: 0x5041524B
ATAG: 0x00200800
MACHINE: 0xffffffff
CHECK_MASK: 0x80
PWR_HLD: 0,0,A,0,1
TYPE: GPT
CMDLINE: mtdparts=rk29xxnand:0x00002000@0x00004000(uboot),0x00002000@0x00006000(misc),0x00010000@0x00008000(boot),0x00010000@0x00018000(recovery),0x00010000@0x00028000(backup),-@0x00038000(rootfs:grow)
uuid:rootfs=614e0000-0000-4b53-8000-1d28000054a9
Kernel command line: user_debug=31 storagemedia=emmc androidboot.storagemedia=emmc androidboot.mode=normal ro rootwait earlycon=uart8250,mmio32,0xff570000 console=ttyFIQ0 root=PARTLABEL=rootfs rootfstype=ext4 snd_aloop.index=7
mount显示
/dev/mmcblk0p6 on / type ext4 (ro,relatime)
使用 mount -o rw,remount / 后可以正常resize2fs了,容量也正常
不过为什么根目录会被挂载成ro?
这是 kernel 设备树属性配置的 Kernel command line: user_debug=31 storagemedia=emmc androidboot.storagemedia=emmc androidboot.mode=normal ro rootwait earlycon=uart8250,mmio32,0xff570000 console=ttyFIQ0 root=PARTLABEL=rootfs rootfstype=ext4 snd_aloop.index=7
请修改你自身用到的 dts
如rv1126-firefly-jd4.dtsi,
chosen {
-
bootargs = "earlycon=uart8250,mmio32,0xff570000 console=ttyFIQ0 ro root=PARTLABEL=rootfs rootfstype=ext4 rootwait overlayroot=device:dev=PARTLABEL=userdata,fstype=ext4,mkfs=1 cgroup_enable=memory swapaccount=1 snd_aloop.index=7";
};
板蓝根 发表于 2021-12-6 09:21
这是 kernel 设备树属性配置的 Kernel command line: user_debug=31 storagemedia=emmc androidboot.storag …
我发的这个kernel command line 就是想说已经吧overlay去掉了
但是现在的问题是根目录被挂载成了readonly
这个readonly是从哪里设置的?
z499920262 发表于 2021-12-6 09:34
我发的这个kernel command line 就是想说已经吧overlay去掉了
但是现在的问题是根目录被挂载成了readonl …
我们代码中只有这一处把根文件系统分区设置成 readonly (因为 overlay 使用),其他地方都没有,除非是您同步的时候某先文件的权限出了问题。
bootargs = “earlycon=uart8250,mmio32,0xff570000 console=ttyFIQ0 ro root=PARTLABEL=rootfs rootfstype=ext4 rootwait overlayroot=device:dev=PARTLABEL=userdata,fstype=ext4,mkfs=1 cgroup_enable=memory swapaccount=1 snd_aloop.index=7”;
这里的 ”ro“ 就是设置成了 readonly
板蓝根 发表于 2021-12-6 15:57
我们代码中只有这一处把根文件系统分区设置成 readonly (因为 overlay 使用),其他地方都没有,除非是 …
bootargs = “earlycon=uart8250,mmio32,0xff570000 console=ttyFIQ0 root=PARTUUID=614e0000-0000 rootfstype=ext4 rootwait snd_aloop.index=7”;
按照这个设置后 用firefly提供的Debian 根目录还是ro
z499920262 发表于 2021-12-7 09:57
bootargs = "earlycon=uart8250,mmio32,0xff570000 console=ttyFIQ0 root=PARTUUID=614e0000-0000 rootfs …
你这种状态下,直接烧一个官方的 rootfs.img 。如果可以跑起来那么肯定和底层没有关系,还是你同步的时候某些文件权限或者链接被改变了吧
板蓝根 发表于 2021-12-7 11:13
你这种状态下,直接烧一个官方的 rootfs.img 。如果可以跑起来那么肯定和底层没有关系,还是你同步的时候 …
对 烧的就是firefly官方提供的Debian10 rootfs.img
原版的
不是我rsync同步下来的