0
点赞
收藏
分享

微信扫一扫

uboot阶段修改rootfs根文件系统挂载参数


案例:将ext4的rootfs根文件系统类型的data模式从orderd改为jounal,

进入uboot命令控制台操作,添加如下命令

setenv setargs_mmc 'setenv  bootargs enforcing=${enforcing} earlyprintk=${earlyprintk} initcall_debug=${initcall_debug} console=${console} rootwait root=${mmc_root} rootflags=data=journal init=${init} partitions=${partitions} cma=${cma} vmalloc=${vmalloc}'

增加参数:rootflags=data=journal,用于指定journal.

查看参数

sunxi#printenv 
boot_fastboot=fastboot
boot_normal=sunxi_flash read 40007800 boot;boota 40007800
boot_recovery=sunxi_flash read 40007800 recovery;boota 40007800
bootcmd=run setargs_mmc boot_normal
bootdelay=3
cma=10M
console=ttyS0,115200
earlyprintk=sunxi-uart,0x01c28000
enforcing=0
fastboot_key_value_max=0x8
fastboot_key_value_min=0x2
filesize=1c2036
init=/init
initcall_debug=0
loglevel=4
mmc—ឲoot=/dev/mmcblk0p7
mmc_root=/dev/mmcblk0p7
nand_root=/dev/system
partitions=boot-resource@mmcblk0p2:env@mmcblk0p5:boot@mmcblk0p6:rootfs@mmcblk0p7:data@mmcblk0p8:backup@mmlog@mmcblk0p11:app@mmcblk0p12:UDISK@mmcblk0p1
recovery_key_value_max=0x13
recovery_key_value_min=0x10
setargs_mmc=setenv bootargs enforcing=${enforcing} earlyprintk=${earlyprintk} initcall_debug=${initcall_rootwait root=${mmc_root} rootflags=data=journal init=${init} partitions=${partitions} cma=${cma} vmalloc
setargs_nand=setenv bootargs enforcing=${enforcing} earlyprintk=${earlyprintk} initcall_debug=${initcall_loglevel=${loglevel} rootwait root=${nand_root} init=${init} partitions=${partitions} cma=${cma} vmalloc=emory swapaccount=1 androidboot.selinux=disable
vmalloc=384MB

Environment size: 1305/131068 bytes

保存参数

sunxi#saveenv 
Saving Environment to SUNXI...
saveenv storage_type = 2

重启设备,进入系统查看是否生效

[sysadm@buildroot ~]$ mount
/dev/mmcblk0p7 on / type ext4 (rw,relatime,nodelalloc,data=journal)

已经显示data=journal模式,完美收工。

举报

相关推荐

0 条评论