1.下载plutosdr-fw和相关的源码包,参考plutosdr-fw-0.27 的.gitmodules里面的路径和 branch下载,之前由于下载的源码branch不对,折腾了一周编译也没有通过:
我这里用的plutosdr-fw-0.27 的版本,.gitmodules源码路径和branch如下,不同的版本对应的branch不同。
[submodule "u-boot-xlnx"]
path = u-boot-xlnx
url = https://github.com/analogdevicesinc/u-boot-xlnx.git
branch = pluto
[submodule "buildroot"]
path = buildroot
url = https://github.com/analogdevicesinc/buildroot.git
branch = pluto
[submodule "linux"]
path = linux
url = https://github.com/analogdevicesinc/linux
branch = xcomm_zynq
[submodule "hdl"]
path = hdl
url = https://github.com/analogdevicesinc/hdl
branch = hdl_2017_r1
2.把几个源码包解压,放入plutosdr-fw-0.27目录下的buildroot,hdl,linux,u-boot-xlnx目录。注意文件夹的名字。
3.参考Readne.md文件顺序执行命令,安装相应的工具和配置编译器的路径,我这里的用的Vivado2015.4
* Build Instructions
```bash
sudo apt-get install git build-essential fakeroot libncurses5-dev libssl-dev ccache
sudo apt-get install dfu-util u-boot-tools device-tree-compiler libssl1.0-dev mtools
git clone --recursive https://github.com/analogdevicesinc/plutosdr-fw.git
cd plutosdr-fw
export CROSS_COMPILE=arm-xilinx-linux-gnueabi-
export PATH=$PATH:/home/chris/pluto/Xilinx/SDK/2015.4/gnu/arm/lin/bin
export VIVADO_SETTINGS=/home/chris/pluto/Xilinx/Vivado/2015.4/settings65.sh
make
```
sudo apt-get install dfu-util u-boot-tools device-tree-compiler libssl1.0-dev mtools 报错
chris@chris-ubuntu:~/pluto/source/plutosdr-fw-master$
chris@chris-ubuntu:~/pluto/source/plutosdr-fw-master$ sudo apt-get install dfu-util u-boot-tools device-tree-compiler libssl1.0-dev mtools
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libssl1.0-dev
E: Couldn't find any package by glob 'libssl1.0-dev'
E: Couldn't find any package by regex 'libssl1.0-dev'
chris@chris-ubuntu:~/pluto/source/plutosdr-fw-master$
暂时没管继续。
配置环境变量,注意Vivado的安装路径和版本
export CROSS_COMPILE=arm-xilinx-linux-gnueabi-
export PATH=$PATH:/home/chris/pluto/Xilinx/SDK/2015.4/gnu/arm/lin/bin
export VIVADO_SETTINGS=/home/chris/pluto/Xilinx/Vivado/2015.4/settings64.sh
4.make,编译u-boot和kernel和buildroot等等。
4.1 u-boot正常编译通过;
4.2 kernel编译的时候提示文件找不到,进入相应的目录下查看确实没有相关文件,但是在压缩包里面是有的,直接把压缩包里面的再copy一份到相应的目录即可。
4.3编译buildroot,