当前位置:网站首页>onie支持pice硬盘
onie支持pice硬盘
2022-07-06 07:39:00 【菜菜的阿庄】
文章目录
引言
我们知道,SATA硬盘和pcie硬盘的dev设备名不一样:
SATA设备名一般是是sd*,例如sda sdb,分区后设备名为sda1,sda2等;
而pcie接口硬盘设备名一般是nvme0n*,分区后设备名为nvme0n1p1 nvme0n1p2等。
onie中怎么支持将onie安装到指定硬盘上的呢?
onie支持pice类型硬盘
在 installer/grub-arch/install-arch 中的 install_image 接口中,将 $onie_dev 变量作为onie安装位置,从 echo "Installing ONIE on: $onie_dev"也可以看出这点。onie_dev 变量是在 init_onie_install 接口中,通过 [ -b "$onie_dev" ] || onie_dev="$(install_device_platform)" 定义了的。
因此,需要支持指定的硬盘,只需要在自己的vendor_modules下重载 install_device_platform 接口,并返回相应的硬盘设备名。例如支持nvme硬盘:
install_device_platform()
{
mass_bus="nvme0"
for i in 1 2 3 4 ; do
if $(ls -l /sys/block/nvme0n$i/device 2>/dev/null | grep -q "$mass_bus") ; then
echo "/dev/nvme0n$i"
return 0
fi
done
echo "storage-not-found"
return 1
}
接口只要返回/dev/nvme0n1即可。
同样如果需要将onie安装到SATA硬盘或U盘,接口返回/dev/sda /dev/sdb等即可.
边栏推荐
- qt颜色与字符串、uint相互转换
- Solution: intelligent site intelligent inspection scheme video monitoring system
- TypeScript 接口属性
- Sharing of source code anti disclosure scheme under burning scenario
- 杰理之开发板上电开机,就可以手机打开 NRF 的 APP【篇】
- QT color is converted to string and uint
- word中把带有某个符号的行全部选中,更改为标题
- 位运算异或
- DataX self check error /datax/plugin/reader/_ drdsreader/plugin. Json] does not exist
- Get the path of edge browser
猜你喜欢

qt颜色与字符串、uint相互转换

数字IC设计笔试题汇总(一)

Basics of reptile - Scratch reptile

NiO programming introduction

杰理之BLE【篇】

The way to learn go (I) the basic introduction of go to the first HelloWorld

The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
![[MySQL learning notes 30] lock (non tutorial)](/img/9b/1e27575d83ff40bebde118b925f609.png)
[MySQL learning notes 30] lock (non tutorial)

Force buckle day31

Google可能在春节后回归中国市场。
随机推荐
Launch APS system to break the problem of decoupling material procurement plan from production practice
Apache middleware vulnerability recurrence
【mysql学习笔记30】锁(非教程)
2022年Instagram运营小技巧简单讲解
leecode-C語言實現-15. 三數之和------思路待改進版
Do you really think binary search is easy
Google may return to the Chinese market after the Spring Festival.
Ble of Jerry [chapter]
Luogu p1836 number page solution
Word setting directory
杰理之蓝牙设备想要发送数据给手机,需要手机先打开 notify 通道【篇】
Mise en œuvre du langage leecode - C - 15. Somme des trois chiffres - - - - - idées à améliorer
Database addition, deletion, modification and query
解决方案:智慧工地智能巡檢方案視頻監控系統
TS 类型体操 之 循环中的键值判断,as 关键字使用
软件开发的一点随记
If Jerry needs to send a large package, he needs to modify the MTU on the mobile terminal [article]
Excel的相关操作
Is the super browser a fingerprint browser? How to choose a good super browser?
Set picture annotation in markdown