如果关闭过流过温功能,可能会导致设备损坏,请谨慎配置。
apt-get install -y python3 make gcc unzip pigz bison flex libncurses-dev squashfs-tools bc device-tree-compiler libssl-dev cmake rpm2cpio
su - root
cd /opt
tar -xzvf Ascend310B-source.tar.gz
cd Ascend310B-source
如果需要使能userBaseConfig相关功能,请执行此步骤。
<item name="version"><!--版本号--> <param version="20000"/> </item> <item name="product_strategy_info"><!--产品板策略ID--> <!--30150 对应十六进制75c6--> <param board_id ="75c6" phy_num = "1" chip0_strategy="1" max_power="0" equal="0"/> </item> <item name="evb_strategy_info"> </item>
详细的配置说明,请参见自定义配置user_base_config.xml文件参数说明。
弹性配置中的serdes复用关系参数必须与实际硬件单板保持一致,Serdes错误配置可能导致启动挂死,功能不可用。
user_base_config.xml文件示例如下回显加粗字体。
<item name="strategy_info_array"><!--启动策略矩阵--> <subitem subname="sub_strategy0"> <module class="serdes"> <submodule subclass="serdes_info"> <param lan_index="0" serdes_type="SATA" ssc_enable="1" polarity_tx = "0" polarity_rx = "0" lan_order = "0" bandwidth="ff" align_mode="0" frequency="SATA3.0" port_index = "0"/> <param lan_index="1" serdes_type="SATA" ssc_enable="1" polarity_tx = "0" polarity_rx = "0" lan_order = "0" bandwidth="ff" align_mode="0" frequency="SATA3.0" port_index = "0"/> <param lan_index="2" serdes_type="SATA" ssc_enable="1" polarity_tx = "0" polarity_rx = "0" lan_order = "0" bandwidth="ff" align_mode="0" frequency="SATA3.0" port_index = "0"/> <param lan_index="3" serdes_type="PCIE" ssc_enable="0" polarity_tx = "0" polarity_rx = "0" lan_order = "0" bandwidth="1" align_mode="0" frequency="PCIE_GEN2" port_index = "0"/> <param lan_index="4" serdes_type="PCIE" ssc_enable="0" polarity_tx = "0" polarity_rx = "0" lan_order = "0" bandwidth="1" align_mode="0" frequency="PCIE_GEN3" port_index = "0"/> <param lan_index="5" serdes_type="USB" ssc_enable="0" polarity_tx = "0" polarity_rx = "0" lan_order = "0" bandwidth="ff" align_mode="0" frequency="USB3.0" port_index = "0"/> <param lan_index="6" serdes_type="USB" ssc_enable="0" polarity_tx = "0" polarity_rx = "0" lan_order = "0" bandwidth="ff" align_mode="0" frequency="USB3.0" port_index = "0"/> <param lan_index="7" serdes_type="USB" ssc_enable="0" polarity_tx = "0" polarity_rx = "0" lan_order = "0" bandwidth="ff" align_mode="0" frequency="USB3.0" port_index = "0"/> </submodule> </module> <module class="recovery"> <submodule subclass="recovery_info"> <param recovery_enable="0" gpio_index="1"/> </submodule> </module> </subitem> <subitem subname="sub_strategy1"> <module class="serdes"> <submodule subclass="serdes_info"> <param lan_index="0" serdes_type="PCIE" ssc_enable="0" polarity_tx = "0" polarity_rx = "0" lan_order = "0" bandwidth="4" align_mode="0" frequency="PCIE_GEN3" port_index = "0"/> <param lan_index="1" serdes_type="PCIE" ssc_enable="0" polarity_tx = "0" polarity_rx = "0" lan_order = "0" bandwidth="ff" align_mode="0" frequency="PCIE_GEN3" port_index = "0"/> <param lan_index="2" serdes_type="PCIE" ssc_enable="0" polarity_tx = "0" polarity_rx = "0" lan_order = "0" bandwidth="ff" align_mode="0" frequency="PCIE_GEN3" port_index = "0"/> <param lan_index="3" serdes_type="PCIE" ssc_enable="0" polarity_tx = "0" polarity_rx = "0" lan_order = "0" bandwidth="ff" align_mode="0" frequency="PCIE_GEN3" port_index = "0"/> <param lan_index="4" serdes_type="PCIE" ssc_enable="0" polarity_tx = "0" polarity_rx = "0" lan_order = "0" bandwidth="1" align_mode="0" frequency="PCIE_GEN3" port_index = "0"/> <param lan_index="5" serdes_type="USB" ssc_enable="0" polarity_tx = "0" polarity_rx = "0" lan_order = "0" bandwidth="ff" align_mode="0" frequency="USB3.0" port_index = "0"/> <param lan_index="6" serdes_type="USB" ssc_enable="0" polarity_tx = "0" polarity_rx = "0" lan_order = "0" bandwidth="ff" align_mode="0" frequency="USB3.0" port_index = "0"/> <param lan_index="7" serdes_type="USB" ssc_enable="0" polarity_tx = "0" polarity_rx = "0" lan_order = "0" bandwidth="ff" align_mode="0" frequency="USB3.0" port_index = "0"/> </submodule> </module> <module class="recovery"> <submodule subclass="recovery_info"> <param recovery_enable="0" gpio_index="4"/> </submodule> </module>
如果关闭过流过温功能,可能会导致设备损坏,请谨慎配置。
配置过温过流功能示例如下。
<!--LP低功耗配置,无特殊说明数字为10进制, feature/edp/tdp各节点均支持缺省,配置定义与sysbaeconfig相同--> <module class="lp"> <!--特性开关--> <submodule subclass="feature"> <!--功能开关: 16进制掩码定义, 每比特位0为关闭1为使能--> <!-- 各项开关均为可选配置,默认不关闭,默认全1配置"--> <!--过流保护功能开关, bit0-过流硬件降频,bit1-过流告警, bit2-过流软件降频,以下为功能全使能 --> <param edp="0x7"/> <!--过温保护功能开关, bit0-超高温下电, bit1-高温告警, bit2-过温降频,以下为功能全使能 --> <param tdp="0x7"/> </submodule> <!--edp过流保护--> <submodule subclass="edp"> <!--acg降频等级0(10%), 1(18%) 2(25%),其它不支持--> <param acg_drop="2"/> <!--mask(适用档位掩码, 16进制)--> <!--hardware(单位0.1A, ina226硬件过流阈值)--> <!--alarm (单位0.1A, 软件监测过流告警阈值)--> <!--ave (单位0.1A, 软件监测过流降频阈值)--> <!--示例:mask(适用0/1/2/3档) ina226阈值5A,软件告警3A, 降频5A--> <param mask="0xF" hardware="50" alarm="30" ave="50"/> </submodule> <!--tdp过温保护--> <submodule subclass="tdp"> <!--ctrl_temp (单位0.1℃, 软件监测过温降频阈值)--> <!--ultra_high (单位0.1℃, tsensor超高温下电阈值,需大于60度(600),建议不超过105度)--> <!--alarm_high (单位0.1℃, 软件监测高温告警阈值)--> <!--alarm_low (单位0.1℃, 软件监测低温告警阈值(保留))--> <!--示例:过温降频95, 告警92度, 超温下电105度, 低温告警-20度(保留)--> <param ctrl_temp="950" ultra_high="1050" alarm_high="920" alarm_low="-200"/> </submodule> </module>
cd /opt/Ascend310B-source
bash build.sh usrBaseConfig
出现如下回显,表示编译内核userBaseConfig文件成功。
generate /opt/Ascend310B-source/output/userBaseConfig.bin success! sign /opt/Ascend310B-source/output/userBaseConfig.bin success!
编译后的userBaseConfig.bin文件会自动存放于“Ascend310B-source/output”目录下。
su - root
cd /run
/var/davinci/driver/upgrade-tool --device_index -1 --component Usr_Base_Config --path userBaseConfig.bin
出现如下回显,表示升级userBaseConfig.bin文件成功。
{"device": 0, "succeed"}
reboot