ARM技术论坛
直播中

h1654155861.7375

9年用户 529经验值
擅长:嵌入式技术 处理器/DSP EDA/IC设计
私信 关注
[经验]

RK3399 android7.1 SSD固态硬盘调式过程

一、硬件平台
RK3399+NVME固态硬盘


二、软件调式过程
1、在dev/block下有识别到nvme

2、格式化 挂载之后 下df-h 看到已经识别到硬盘容量
格式化命令:mkdosfs /dev/block/nvme0n1p1
挂载命令:busybox mount /dev/block/nvme0n1p1 /data/nvme


加log分析
void VolumeManager::handleBlockEvent(NetlinkEvent *evt) {
std::lock_guard lock(mLock);
if (mDebug) {
        LOG(VERBOSE) << "----------------";
        LOG(VERBOSE) << "handleBlockEvent with action " << (int) evt->getAction();
        evt->dump();
    }std::string eventPath(evt->findParam("DEVPATH")?evt->findParam("DEVPATH"):"");
    std::string devType(evt->findParam("DEVTYPE")?evt->findParam("DEVTYPE"):"");
+ LOG << "handleBlockEvent with eventPath " << eventPath;
if (devType != "disk") return;
加入补丁
1. if (isVirtioBlkDevice(majorId)) {
LOG << "Recognized experimental block major ID " << majorId
<< " as virtio-blk (emulator's virtual SD card device)";
mLabel = "Virtual";
break;
}
if(majorId==259) {
LOG << "majorID==259 major11 type " << majorId;
mLabel = "Pcie";
break;
}
LOG << "Unsupported block major11 type " << majorId;
return -ENOTSUP;
2: if (isVirtioBlkDevice(majorId)) {
// drivers/block/virtio_blk.c has "#define PART_BITS 4", so max is
// 2^4 - 1 = 15
return 15;
}
if(majorId==259) {
LOG << "majorID==259 major22 type " << majorId;
return 15;
}

结果可以识别到了 识别成USB移动设备

更多回帖

发帖
×
20
完善资料,
赚取积分