HiSilicon352 android9.0 emmc添加新分区

添加新分区

从emmc中单独划分出一个分区,用来存储相关数据(可用于存储照片,视频,音乐和文档等)或者系统日志log,从而不影响到其他分区。


实现方法:
  1. device/hisilicon/Hi3751V350/etc/Hi3751V350-slaveboot-emmc.xml中添加分区配置:
<?xml version="1.0" encoding="GB2312" ?>
<Partition_Info>
<Part Sel="1" PartitionName="fastboot" FlashType="emmc" FileSystem="none" Start="0" Length="1M" SelectFile="fastboot.bin"/>
<Part Sel="1" PartitionName="bootargs" FlashType="emmc" FileSystem="none" Start="1M" Length="1M" SelectFile="bootargs.bin"/>
<Part Sel="1" PartitionName="bootargsbak" FlashType="emmc" FileSystem="none" Start="2M" Length="1M" SelectFile="bootargs.bin"/>
<Part Sel="1" PartitionName="slaveboot" FlashType="emmc" FileSystem="none" Start="3M" Length="2M" SelectFile="slaveboot.bin"/>
<Part Sel="1" PartitionName="recovery" FlashType="emmc" FileSystem="none" Start="5M" Length="40M" SelectFile="recovery.img"/>
<Part Sel="1" PartitionName="panelparam" FlashType="emmc" FileSystem="none" Start="45M" Length="8M" SelectFile="panel.img"/>
<Part Sel="1" PartitionName="deviceinfo" FlashType="emmc" FileSystem="none" Start="53M" Length="2M" SelectFile="deviceinfo.img"/>
<Part Sel="1" PartitionName="logo" FlashType="emmc" FileSystem="none" Start="55M" Length="40M" SelectFile="logo.img"/>
<Part Sel="1" PartitionName="boot" FlashType="emmc" FileSystem="none" Start="95M" Length="40M" SelectFile="boot.img"/>
<Part Sel="1" PartitionName="dtbo" FlashType="emmc" FileSystem="none" Start="135M" Length="1M" SelectFile="dtbo.img"/>
<Part Sel="1" PartitionName="atf" FlashType="emmc" FileSystem="none" Start="136M" Length="2M" SelectFile="atf.bin"/>
<Part Sel="0" PartitionName="trustedcore" FlashType="emmc" FileSystem="none" Start="138M" Length="8M" SelectFile="trustedcore.img"/>
<Part Sel="1" PartitionName="securestore" FlashType="emmc" FileSystem="ext3/4" Start="146M" Length="10M" SelectFile="securestore.ext4"/>
<Part Sel="0" PartitionName="versioninfo" FlashType="emmc" FileSystem="none" Start="156M" Length="1M" SelectFile=""/>
<Part Sel="1" PartitionName="misc" FlashType="emmc" FileSystem="none" Start="157M" Length="1M" SelectFile="misc.img"/>
<Part Sel="1" PartitionName="bootmusic" FlashType="emmc" FileSystem="none" Start="158M" Length="10M" SelectFile="bootmusic.img"/>
<Part Sel="1" PartitionName="bootmusicsec" FlashType="emmc" FileSystem="none" Start="168M" Length="10M" SelectFile="bootmusicsec.img"/>
<Part Sel="1" PartitionName="tcon" FlashType="emmc" FileSystem="none" Start="178M" Length="80M" SelectFile="tcon.bin"/>
<Part Sel="0" PartitionName="demura" FlashType="emmc" FileSystem="none" Start="258M" Length="4M" SelectFile=""/>
<Part Sel="1" PartitionName="system" FlashType="emmc" FileSystem="ext3/4" Start="266M" Length="2000M" SelectFile="system.ext4"/>
<Part Sel="1" PartitionName="vendor" FlashType="emmc" FileSystem="ext3/4" Start="2266M" Length="300M" SelectFile="vendor.ext4"/>
<Part Sel="1" PartitionName="atv" FlashType="emmc" FileSystem="ext3/4" Start="2566M" Length="50M" SelectFile="atv.ext4"/>
<Part Sel="1" PartitionName="log" FlashType="emmc" FileSystem="ext3/4" Start="2616M" Length="60M" SelectFile="log.ext4"/>
<Part Sel="1" PartitionName="cache" FlashType="emmc" FileSystem="ext3/4" Start="2676M" Length="100M" SelectFile="cache.ext4"/>
<Part Sel="1" PartitionName="userdata" FlashType="emmc" FileSystem="ext3/4" Start="2776M" Length="4491M" SelectFile="userdata.ext4"/>
</Partition_Info>

添加如下配置进去:

<Part Sel="0" PartitionName="abc" FlashType="emmc" FileSystem="none" Start="262M" Length="4M" SelectFile=""/>

这行代码指定了以下内容:

  • Sel="0":表示这是一个选定的分区,即被选中用于后续的操作。
  • PartitionName="abc":表示分区的名称为“smdt”,即这个分区被命名为“abc”。
  • FlashType="emmc":表示这个分区所在的存储介质类型是 eMMC。
  • FileSystem="none":表示这个分区还没有被格式化为任何文件系统类型。
  • Start="2148M":表示这个分区在存储介质上的起始位置是 2148MB。
  • Length="4M":表示这个分区的长度是 4MB。
  1. device/hisilicon/Hi3751V350/etc/bootargs_Hi3751V352F-32bit-1024m-emmc.txt中添加abc分区:
bootdelay=0
baudrate=115200
ipaddr=192.168.1.10
serverip=192.168.1.1
netmask=255.255.255.0
bootfile=uImage
phyintf=mii,rgmii
phymdio=0,1
phyaddr=3,1
phygpio=none,none
gmac_debug=0
mem_512M=mem=512M androidboot.mem.size=512M
mem_1G=mem=1024M androidboot.mem.size=1024M
mem_2G=mem=2048M androidboot.mem.size=2048M
bootargs=androidboot.hardware=bigfish selinux=1 androidboot.selinux=permissive androidboot.serialno=0123456789 firmware_class.path=/vendor/firmware/ console=ttyAMA0,115200 loglevel=7 no_console_suspend blkdevparts=mmcblk0:1M(fastboot),1M(bootargs),1M(bootargsbak),2M(slaveboot),40M(recovery),8M(panelparam),2M(deviceinfo),40M(logo),40M(boot),1M(dtbo),2M(atf),8M(trustedcore),10M(securestore),1M(versioninfo),1M(misc),10M(bootmusic),10M(bootmusicsec),80M(tconparam),4M(demura),4M(abc),2000M(system)ro,300M(vendor)ro,50M(atv),60M(log),100M(cache),-(userdata) skip_initramfs init=/init root=/dev/mmcblk0p21 rootwait mtdparts=hi_sfc:-(hi_sfc) pci=nomsi mmz=ddr,0,0,8M vmalloc=400M irqflood=20000 cgroup.memory=nokmem swapaccount=0
recoverybootargs=androidboot.hardware=bigfish selinux=1 androidboot.selinux=permissive firmware_class.path=/vendor/firmware/ console=ttyAMA0,115200 loglevel=7 no_console_suspend blkdevparts=mmcblk0:1M(fastboot),1M(bootargs),1M(bootargsbak),2M(slaveboot),40M(recovery),8M(panelparam),2M(deviceinfo),40M(logo),40M(boot),1M(dtbo),2M(atf),8M(trustedcore),10M(securestore),1M(versioninfo),1M(misc),10M(bootmusic),10M(bootmusicsec),80M(tconparam),4M(demura),4M(abc),2000M(system),300M(vendor),50M(atv),60M(log),100M(cache),-(userdata) mmz=ddr,0,0,8M init=/init mtdparts=hi_sfc:-(hi_sfc) pci=nomsi mmz=ddr,0,0,8M vmalloc=400M
flashArgs=bootargs=64K,panelparam=512K,deviceinfo=2M,logo=512K,tconparam=1536K
reserveMemArgs=tconparam=1M,panelparam=512K,gfx_zme_coef=384,VDP_STT=1792,SR_ZME_COEF=7488,ampinfo=8,GRAPHIC_HIFB_HD=8100K
debugstatus=1
stdin=serial
stdout=serial
stderr=serial

如上文件将4M(abc)添加到blkdevparts=中,编译烧录eMMC分区表中就会显示abc分区。

猜你喜欢

转载自blog.csdn.net/weixin_45639314/article/details/133774623
今日推荐