# 入门指南

Source: [https://docs.qualcomm.com/doc/80-70014-26Y/topic/get_started.html](https://docs.qualcomm.com/doc/80-70014-26Y/topic/get_started.html)

### 开发人员工作流程

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by Microsoft Visio, SVG Export eth-dev-workflow.svg Page-1 -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" width="9.67187in" height="3.16753in" viewbox="0 0 696.375 228.062" xml:space="preserve" color-interpolation-filters="sRGB" class="st12"><style>.svg-1 .st1 { fill: #ffffff; stroke: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.75 }
.svg-1 .st2 { stroke: #000000; stroke-dasharray: 7, 5; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1 }
.svg-1 .st3 { fill: #3253dc; stroke: #3253dc; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.75 }
.svg-1 .st4 { fill: #ffffff; font-family: Arial; font-size: 1.00001em }
.svg-1 .st5 { font-size: 1em }
.svg-1 .st6 { marker-end: url("#mrkr4-22"); stroke: #000000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.75 }
.svg-1 .st7 { fill: #000000; fill-opacity: 1; stroke: #000000; stroke-opacity: 1; stroke-width: 0.22935779816514 }
.svg-1 .st8 { fill: #82cbd7; stroke: #82cbd7; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.75 }
.svg-1 .st9 { fill: #000000; font-family: Arial; font-size: 1.00001em }
.svg-1 .st10 { fill: none; stroke: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.75 }
.svg-1 .st11 { fill: #000000; font-family: Arial; font-size: 1.33333em }
.svg-1 .st12 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
<defs id="Markers">	<g id="lend4">		<path d="M 2 1 L 0 0 L 2 -1 L 2 1 " style="stroke:none"></path>	</g>	<marker id="mrkr4-22" class="st7" refx="-8.72" orient="auto" markerunits="strokeWidth" overflow="visible">		<use xlink:href="#lend4" transform="scale(-4.36,-4.36) "></use>	</marker></defs><g>	<title>Page-1</title>	<g id="shape1009-1" transform="translate(-0.4375,0)">		<title>Sheet.1009</title>		<rect x="0" y="-1.43752" width="697.5" height="229.5" class="st1"></rect>	</g>	<g id="shape1-3" transform="translate(25.875,-148.875)">		<title>Sheet.1</title>		<path d="M0 228.06 L640.12 228.06" class="st2"></path>	</g>	<g id="shape2-6" transform="translate(131.33,-167.813)">		<title>Sheet.2</title>		<desc>Set up SSH connection</desc>		<rect x="0" y="186.188" width="92.25" height="41.875" rx="9" ry="9" class="st3"></rect>		<text x="14.77" y="203.53" class="st4">设置 SSH <tspan x="17.1" dy="1.2em" class="st5">连接</tspan></text>		</g>	<g id="shape3-10" transform="translate(268.375,-167.813)">		<title>Sheet.3</title>		<desc>Verify MAC address</desc>		<rect x="0" y="186.188" width="92.25" height="41.875" rx="9" ry="9" class="st3"></rect>		<text x="15.79" y="203.53" class="st4">验证 MAC <tspan x="24.78" dy="1.2em" class="st5">地址</tspan></text>		</g>	<g id="shape4-14" transform="translate(552.625,-166.875)">		<title>Sheet.4</title>		<desc>Bring up Ethernet</desc>		<rect x="0" y="186.188" width="108" height="41.875" rx="9" ry="9" class="st3"></rect>		<text x="7.3" y="210.73" class="st4">调通以太网</text>		</g>	<g id="shape5-17" transform="translate(224.775,-189.039) rotate(0.111778)">		<title>Sheet.5</title>		<path d="M0 228.06 L37.5 228.06" class="st6"></path>	</g>	<g id="shape6-23" transform="translate(360.625,-189.375)">		<title>Sheet.6</title>		<path d="M0 228.06 L185.46 228.06" class="st6"></path>	</g>	<g id="shape7-28" transform="translate(389.875,-88.75)">		<title>Sheet.7</title>		<desc>Bring up alternate hardware enablement</desc>		<rect x="0" y="186.188" width="133.5" height="41.875" rx="9" ry="9" class="st8"></rect>		<text x="19.39" y="203.53" class="st9">调通启用替代<tspan x="8.71" dy="1.2em" class="st5">硬件</tspan></text>		</g>	<g id="shape8-32" transform="translate(263.875,-88.9375)">		<title>Sheet.8</title>		<desc>Retain and store MAC address</desc>		<rect x="0" y="186.188" width="99" height="41.875" rx="9" ry="9" class="st8"></rect>		<text x="5.47" y="203.53" class="st9">保留并存储 <tspan x="13.15" dy="1.2em" class="st5">MAC 地址</tspan></text>		</g>	<g id="shape10-36" transform="translate(552.475,-88.75)">		<title>Sheet.10</title>		<desc>Configure Ethernet features</desc>		<rect x="0" y="186.188" width="108" height="41.875" rx="9" ry="9" class="st8"></rect>		<text x="27.98" y="203.53" class="st9">配置<tspan x="7.97" dy="1.2em" class="st5">以太网功能</tspan></text>		</g>	<g id="shape18-40" transform="translate(18.375,-109.813)">		<title>Sheet.18</title>		<desc>Explore more</desc>		<rect x="0" y="196.562" width="108" height="31.5" class="st10"></rect>		<text x="6.43" y="217.11" class="st11">探索更多</text>		</g>	<g id="shape20-43" transform="translate(18.625,-155.25)">		<title>Sheet.20</title>		<desc>Get started</desc>		<rect x="0" y="196.562" width="92.25" height="31.5" class="st10"></rect>		<text x="6.55" y="217.11" class="st11">入门</text>		</g>	<g id="shape1000-46" transform="translate(552.475,-18.375)">		<title>Sheet.1000</title>		<desc>Log and debug issues</desc>		<rect x="0" y="186.188" width="108" height="41.875" rx="9" ry="9" class="st8"></rect>		<text x="13.96" y="203.53" class="st9">日志和调试<tspan x="36.99" dy="1.2em" class="st5">问题</tspan></text>		</g>	<g id="shape1005-50" transform="translate(541.437,60.6352) rotate(90.0968)">		<title>Sheet.1005</title>		<path d="M0 228.06 L30.46 228.06" class="st6"></path>	</g>	<g id="shape1006-55" transform="translate(834.437,61.6855) rotate(90.0498)">		<title>Sheet.1006</title>		<path d="M0 228.06 L29.46 228.06" class="st6"></path>	</g>	<g id="shape1007-60" transform="translate(834.537,140) rotate(90)">		<title>Sheet.1007</title>		<path d="M0 228.06 L21.3 228.06" class="st6"></path>	</g>	<g id="shape1008-65" transform="translate(523.375,-110.125)">		<title>Sheet.1008</title>		<path d="M0 228.06 L22.56 228.06" class="st6"></path>	</g></g>
</svg>

在开始之前，要了解常见基础架构设置和编译工作流，参见 [Qualcomm Linux 编译指南](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-254Y)。

有关以太网接口的更多信息，参见[以太网](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-251Y/rb3_hardware_overview.html#sub$rb3_gen2_ethernet)。

## 设置 SSH 连接

Source: [https://docs.qualcomm.com/doc/80-70014-26Y/topic/get_started.html](https://docs.qualcomm.com/doc/80-70014-26Y/topic/get_started.html)

### About this task

要启用 SSH 并连接到设备，可执行以下操作：

### Procedure

1. 通过执行 [SSH 使用指南](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-254Y/how_to.html#how-to-ssh-)中所述的步骤，可在 Permissive 模式下启用 SSH。
2. 运行以下命令连接到设备：
                
ssh root@<device_IP_address>Copy to clipboard

例如，如果设备的 IP 地址是 10.92.160.222，则运行以下命令：

        ssh root@10.92.160.222Copy to clipboard
3. 输入以下密码连接到 SSH shell：
                
oelinux123Copy to clipboard

## 验证预配置的 MAC 地址

Source: [https://docs.qualcomm.com/doc/80-70014-26Y/topic/get_started.html](https://docs.qualcomm.com/doc/80-70014-26Y/topic/get_started.html)

### About this task

QPS615 是 RB3 Gen 2 设备上的 PCIe 交换机。它没有可用于固定存储 MAC 地址的电可擦编程只读存储器 (EEPROM)。但是，MAC 地址已编程并存储到设备的固定路径中。

要验证预配置的 MAC 地址，可执行以下操作：

### Procedure

1. 运行以下命令验证预配置的 MAC 地址：
                
ifconfigCopy to clipboard

示例输出如下：

        ifconfig
        enP1p5s0f0 Link encap:Ethernet  HWaddr EC:21:E5:10:4F:EA
                  inet addr:169.254.227.235  Bcast:169.254.255.255  Mask:255.255.0.0
                  inet6 addr: fe80::533c:8ed6:557:3860/64 Scope:Link
                  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                  RX packets:19 errors:0 dropped:0 overruns:0 frame:0
                  TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
                  collisions:0 txqueuelen:1000
                  RX bytes:3416 (3.3 KiB)  TX bytes:5559 (5.4 KiB)
                  Interrupt:249
        Copy to clipboard

MAC 地址存储在 config.ini 文件中，并且位于设备的 /var/persist 中。
2. 运行以下命令验证文件是否位于设备上：
                
ls /var/persist/Copy to clipboard
3. 运行以下命令验证 config.ini 文件的内容：
                
cat /var/persist/config.iniCopy to clipboard

示例输出如下：

        #MAC ID configuration, For Test purpose only
        MDIOBUSID1: 1: MAC_ID01: EC:21:E5:10:4F:EACopy to clipboard

## 保留并存储 MAC 地址

Source: [https://docs.qualcomm.com/doc/80-70014-26Y/topic/get_started.html](https://docs.qualcomm.com/doc/80-70014-26Y/topic/get_started.html)

### About this task

每当设备重启时，固定路径 /var/persist/config.ini 中的 MAC 地址配置文件将保留。但是，在升级软件版本时，如果选择了 Erase all before download 选项，则会将将配置文件从设备中删除。在这种情况下，软件将分配一个随机的 MAC 地址。

### Procedure

1. 要保留 config.ini 文件，可执行以下操作：
    1. 运行以下命令将文件备份到本地路径：
                        
scp  root@<device_ip_address>:/var/persist/config.ini .Copy to clipboard
    2. 升级软件版本后，运行以下命令恢复备份的文件：
                        
scp config.ini root@<device_ip_address>:/var/persit/Copy to clipboard

Note: 提示输入密码时，输入 `oelinux123` 以通过安全复制协议 (SCP) 对文件传输进行鉴权。
2. 要将 MAC 地址存储在 /var/persist 以外的位置，可在以下源代码中使用新路径更新 EMAC 驱动程序软件：
                
sources/data-eth/drivers/qps615/src/tc956xmac_main.c
        ret = kernel_read_file_from_path("/var/persist/config.ini", &data, &size, 1000, READING_POLICY);
        Copy to clipboard

Last Published: Aug 06, 2024

[Previous Topic
概述](https://docs.qualcomm.com/bundle/publicresource/80-70014-26Y/topics/overview.md) [Next Topic
功能](https://docs.qualcomm.com/bundle/publicresource/80-70014-26Y/topics/features.md)