USRP E312 烧录官方镜像到SD卡
E312采用Xilinx Zynq为核心,其为异构计算架构,即ARM+FPGA。在ARM上可以运行操作系统,极大程度的方便了软件开发,同时由FPGA提供硬件计算的加速支持,使得SDR设备得以在低配置的处理器上实现。
1 镜像获取
镜像有两种方式可以获取:一是通过PC上的uhd驱动获取对应版本的sd镜像,二是在官方的网站上下载任意release版本对应的镜像文件。
1.1 从UHD驱动中获取对应版本的镜像
对于E312来说,应该下载sg3版本的镜像
sudo uhd_images_downloader -t sdimg -t e310 -t sg3
下载完成后,镜像将被下载到 <PATH-to-UHD>/share/uhd/images/usrp_e320_fs.sdimg
1.2 在官方的网站上下载任意release版本对应的镜像
https://files.ettus.com/binaries/cache/e3xx/可以获取到uhd-3.13之后的release版本对应的镜像了。
如这里下载uhd-v4.1.0.5
正式版所对应的e312镜像
进入后这里将包含sg1
与sg3
版本对应的镜像以及交叉编译工具(SDK)的下载。
2 镜像写入到SD卡中
2.1 Linux下使用dd写入镜像文件到sd卡
首先需要获取sd卡的设备地址
lsblk
在上图中,可以看到一张14.9G的SD卡被挂载到了sda
中。
之后用dd
写入镜像文件到sd卡中
sudo dd if=/home/lilacsat/Downloads/usrp_e310_fs.sdimg of=/dev/sda bs=1M
其中if后接sdimg文件对应的路径,of后接sd卡设备路径。事成之后如下显示:
7352+0 records in
7352+0 records out
7709130752 bytes (7.7 GB, 7.2 GiB) copied, 391.369 s, 19.7 MB/s
输入同步命令,同步移动磁盘数据。
sync
2.2 Windows下使用Win32DiskImager写入镜像文件到sd卡
下载地址Win32DiskImager。操作很简单,只需要选择好镜像文件和SD卡路径即可。同时该软件可以用来备份SD卡。
3 SD卡结构
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 1 14.9G 0 disk
├─sdb1 8:17 1 16M 0 part /media/user/boot
├─sdb2 8:18 1 1.9G 0 part /media/user/primary
├─sdb3 8:19 1 1.9G 0 part /media/user/secondary
└─sdb4 8:20 1 11G 0 part /media/user/data
4 测试
烧录好sd卡之后,将SD卡插入E312 并且用USB线连接到E312的串口,启动电源后,等待linux系统启动。
输入用户root
之后,登录用户。
4.1 测试UHD版本和连接情况
root@ni-e31x-30CD168:~# uhd_usrp_probe
[INFO] [UHD] linux; GNU C++ version 9.2.0; Boost_107100; UHD_4.1.0.5-0-g6bd0be9c
[INFO] [MPMD] Initializing 1 device(s) in parallel with args: mgmt_addr=127.0.0.1,type=e3xx,product=e310_sg3,serial=30CD168,fpga=n/a,claimed=False
[ 1895.281395] fpga_manager fpga0: writing e310_sg3.bin to Xilinx Zynq FPGA Manager
[ 1895.353021] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/firmware-name
[ 1895.363228] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /amba/spi@e0006000/status
[ 1895.373474] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /amba/spi@e0006000/cs-gpios
[ 1895.384047] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/spidev0
[ 1895.393864] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/devctrl
[ 1895.403672] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/charger
[ 1895.413480] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/battery
[ 1895.423287] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/nixge_internal
[ 1895.451200] e31x-pmu fpga-full:pmu: Found firmware version 2.2
[ 1895.496949] nixge 40020000.ethernet int0: renamed from eth1
[ 1895.655269] nixge 40020000.ethernet int0: Link is Up - 10Mbps/Half - flow control off
[INFO] [MPM.PeriphManager] Found 1 daughterboard(s).
[INFO] [MPM.PeriphManager] init() called with device args `fpga=n/a,mgmt_addr=127.0.0.1,product=e310_sg3'.
[INFO] [0/Radio#0] Performing CODEC loopback test on channel 0 ...
[INFO] [0/Radio#0] CODEC loopback test passed
[INFO] [0/Radio#0] Performing CODEC loopback test on channel 1 ...
[INFO] [0/Radio#0] CODEC loopback test passed
_____________________________________________________
/
| Device: E300-Series Device
| _____________________________________________________
| /
| | Mboard: ni-e31x-30CD168
| | dboard_0_pid: 272
| | dboard_0_serial: 30CBB68
| | fs_version: 20211215135438
| | mender_artifact: v4.1.0.5_e310_sg3
| | mpm_sw_version: 4.1.0.5-g6bd0be9c
| | pid: 30675
| | product: e310_sg3
| | rev: 6
| | rpc_connection: local
| | serial: 30CD168
| | type: e3xx
| | MPM Version: 4.0
| | FPGA Version: 6.0
| | FPGA git hash: 26793b8.clean
| |
| | Time sources: internal, external, gpsdo
| | Clock sources: internal
| | Sensors: ref_locked, gps_locked, temp_fpga, temp_mb, gps_gpgga, gps_sky, gps_time, gps_tpv
| _____________________________________________________
| /
| | RFNoC blocks on this device:
| |
| | * 0/Radio#0
| _____________________________________________________
| /
| | Static connections on this device:
| |
| | * 0/SEP#0:0==>0/Radio#0:0
| | * 0/SEP#1:0==>0/Radio#0:1
| | * 0/Radio#0:0==>0/SEP#0:0
| | * 0/Radio#0:1==>0/SEP#1:0
| _____________________________________________________
| /
| | TX Dboard: 0/Radio#0
| | _____________________________________________________
| | /
| | | TX Frontend: 0
| | | Name: E3xx
| | | Antennas: TX/RX
| | | Freq range: 47.000 to 6000.000 MHz
| | | Gain range PGA: 0.0 to 89.8 step 0.2 dB
| | | Bandwidth range: 20000000.0 to 40000000.0 step 0.0 Hz
| | | Connection Type: IQ
| | | Uses LO offset: No
| | _____________________________________________________
| | /
| | | TX Frontend: 1
| | | Name: E3xx
| | | Antennas: TX/RX
| | | Freq range: 47.000 to 6000.000 MHz
| | | Gain range PGA: 0.0 to 89.8 step 0.2 dB
| | | Bandwidth range: 20000000.0 to 40000000.0 step 0.0 Hz
| | | Connection Type: IQ
| | | Uses LO offset: No
| _____________________________________________________
| /
| | RX Dboard: 0/Radio#0
| | _____________________________________________________
| | /
| | | RX Frontend: 0
| | | Name: E3xx
| | | Antennas: RX2, TX/RX
| | | Freq range: 70.000 to 6000.000 MHz
| | | Gain range PGA: 0.0 to 76.0 step 1.0 dB
| | | Bandwidth range: 20000000.0 to 40000000.0 step 0.0 Hz
| | | Connection Type: IQ
| | | Uses LO offset: No
| | _____________________________________________________
| | /
| | | RX Frontend: 1
| | | Name: E3xx
| | | Antennas: RX2, TX/RX
| | | Freq range: 70.000 to 6000.000 MHz
| | | Gain range PGA: 0.0 to 76.0 step 1.0 dB
| | | Bandwidth range: 20000000.0 to 40000000.0 step 0.0 Hz
| | | Connection Type: IQ
| | | Uses LO offset: No
[ 1902.256737] nixge 40020000.ethernet int0: Link is Down
[ 1902.379709] fpga_manager fpga0: writing e310_sg3_idle.bin to Xilinx Zynq FPGA Manager
[ 1902.453710] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/firmware-name
[ 1902.463975] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/devctrl
[ 1902.473825] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/charger
[ 1902.483641] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/battery
[ 1902.508425] e31x-pmu fpga-full:pmu: Found firmware version 2.2
4.2 查看GNURadio版本和安装情况
root@ni-e31x-30CD168:~# gnuradio-config-info -v
3.8.0.0