我找到之所以编译后会识别不到主板sata接口的原因了,采用llm1978的改版镜像编译时,代码会根据机器实际安装的硬盘个数及位置自动生成ds920p.dts文件,理论上六块硬盘插满再编译,就不会出现这样的问题,也有别的解决办法,就是在编译前 删除rploader.sh 脚本中的以下下代码 代码: echo "Collecting disk paths" for disk in $localdisks; do diskpath=$(udevadm info --query path --name $disk | awk -F "\/" '{print $4 ":" $5 }' | awk -F ":" '{print $2 ":" $3 "," $6}' | sed 's/,*$//') diskport=$(udevadm info --query path --name $disk | sed -n '/target/{s/.*target//;p;}' | awk -F: '{print $1}') echo "Found local disk $disk with path $diskpath, adding into internal_slot $diskslot with portnumber $diskport" if [ "${dtbfile}" == "ds920p" ]; then sed -i "/internal_slot\@${diskslot} {/!b;n;n;n;n;n;n;n;cpcie_root = \"$diskpath\";" ${dtbfile}.dts sed -i "/internal_slot\@${diskslot} {/!b;n;n;n;n;n;n;n;n;cata_port = <0x$diskport>;" ${dtbfile}.dts let diskslot=$diskslot+1 else sed -i "/internal_slot\@${diskslot} {/!b;n;n;n;n;n;cpcie_root = \"$diskpath\";" ${dtbfile}.dts sed -i "/internal_slot\@${diskslot} {/!b;n;n;n;n;n;n;cata_port = <0x$diskport>;" ${dtbfile}.dts let diskslot=$diskslot+1 fi done 这一步操作完成后就会根据自定义的dts文件来指向硬盘