This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
university:tools:pluto:building_the_image [27 Apr 2017 14:09] – [Build u-boot] Michael Hennerich | university:tools:pluto:building_the_image [25 May 2023 23:21] (current) – [Prerequisites] Charles Armer | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Building the Firmware Image ====== | ====== Building the Firmware Image ====== | ||
+ | |||
+ | <WRAP important> | ||
+ | It is recommenced to use the pre-build images, which can be found at [[https:// | ||
+ | </ | ||
===== Prerequisites ===== | ===== Prerequisites ===== | ||
- | - [[university: | + | - Make sure to download, or upgrade your [[university: |
- | - Xilinx Vivado Design Suite | + | * Make sure you have the recommended/ |
- | - Xilinx Vivado | + | rgetz@brain: |
+ | set required_vivado_version " | ||
+ | </ | ||
+ | - You need [[xilinx> | ||
+ | - You need [[xilinx> | ||
+ | * If you are using very old versions of Xilinx tools, you need to make sure that you have the 32-bit libraries (the Xilinx tools are distributed as 32-bit binaries). | ||
+ | <WRAP box bggreen> | ||
+ | <wrap info> | ||
+ | < | ||
+ | rgetz@brain: | ||
+ | / | ||
+ | </ | ||
+ | If it reports as a 32-bit binary (which the above did not), and you are running on a 64-bit system, do: | ||
+ | < | ||
+ | michael@HAL9000: | ||
+ | michael@HAL9000: | ||
+ | michael@HAL9000: | ||
+ | </ | ||
+ | </ | ||
There are a few other tools that are necessary in order to build your own Firmware Image. | There are a few other tools that are necessary in order to build your own Firmware Image. | ||
Line 12: | Line 33: | ||
<wrap info> | <wrap info> | ||
< | < | ||
- | michael@HAL9000: | + | michael@HAL9000: |
</ | </ | ||
</ | </ | ||
===== Building ===== | ===== Building ===== | ||
+ | <WRAP tip> | ||
+ | It is recommended that if you are building in a Virtual Machine (which is totally fine), the Base Memory be set to at least 4096 MBytes. The Xilinx [[xilinx> | ||
+ | </ | ||
Starting the build process is just a matter of typing '' | Starting the build process is just a matter of typing '' | ||
The Makefile requires a few environmental variables being set, and of course the ARM GCC toolchain in the PATH. | The Makefile requires a few environmental variables being set, and of course the ARM GCC toolchain in the PATH. | ||
- | Some paths maybe adjusted to match your Xilinx Vivado and SDK install folders. | + | Some paths maybe adjusted to match your Xilinx Vivado and Vitis install folders. |
<WRAP box bggreen> | <WRAP box bggreen> | ||
Line 26: | Line 50: | ||
< | < | ||
michael@HAL9000: | michael@HAL9000: | ||
- | michael@HAL9000: | + | michael@HAL9000: |
- | michael@HAL9000: | + | michael@HAL9000: |
- | michael@HAL9000: | + | michael@HAL9000: |
michael@HAL9000: | michael@HAL9000: | ||
</ | </ | ||
Line 34: | Line 58: | ||
The initial build takes some time to complete, and also requires an INTERNET connection, since [[https:// | The initial build takes some time to complete, and also requires an INTERNET connection, since [[https:// | ||
+ | |||
+ | <WRAP tip> | ||
+ | Depending on your distribution, | ||
+ | <WRAP box bggreen> | ||
+ | <wrap info> | ||
+ | < | ||
+ | michael@HAL9000: | ||
+ | </ | ||
+ | </ | ||
+ | before you type '' | ||
+ | </ | ||
==== Build Artifacts ==== | ==== Build Artifacts ==== | ||
Line 65: | Line 100: | ||
</ | </ | ||
</ | </ | ||
- | |||
- | ==== Main targets ==== | ||
+ | ==== Testing on the target ==== | ||
+ | |||
+ | There is a script in the [[github> | ||
+ | |||
+ | <WRAP box bggreen> | ||
+ | <wrap info> | ||
+ | < | ||
+ | rgetz@brain: | ||
+ | Found Pluto SDR at IP 192.168.3.1, | ||
+ | Linux pluto 5.4.0-00535-g9c04de11ae53 #1 SMP PREEMPT Fri Aug 20 13:01:03 CEST 2021 armv7l GNU/Linux | ||
+ | Found Pluto SDR in dfu mode and downloading ./ | ||
+ | successfully downloaded | ||
+ | Found new PlutoSDR at 192.168.3.1, | ||
+ | Linux pluto 5.4.0-00535-g9c04de11ae53 #1 SMP PREEMPT Tue Feb 15 16:17:50 EST 2022 armv7l GNU/Linux | ||
+ | rgetz@brain: | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ==== Main targets ==== | ||
^ File ^ Comment ^ | ^ File ^ Comment ^ | ||
Line 105: | Line 157: | ||
^ Function ^ File ^ | ^ Function ^ File ^ | ||
- | | PlutoSDR Linux Kernel Config | [[linux.github> | + | | PlutoSDR Linux Kernel Config | [[linux.github> |
| zynq_pluto_defconfig]] | | | zynq_pluto_defconfig]] | | ||
Line 114: | Line 166: | ||
</ | </ | ||
+ | ==== Making custom kernel changes ==== | ||
+ | |||
+ | <WRAP alert> | ||
+ | |||
+ | The command | ||
+ | < | ||
+ | make -C linux ARCH=arm zynq_pluto_defconfig | ||
+ | </ | ||
+ | copies the file from '' | ||
+ | < | ||
+ | make -C linux -j 8 ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi- zImage UIMAGE_LOADADDR=0x8000 | ||
+ | </ | ||
+ | builds it. | ||
+ | |||
+ | If you want to make a custom kernel, the easiest thing to do, is modify the '' | ||
+ | |||
+ | < | ||
+ | make -C linux ARCH=arm zynq_pluto_defconfig | ||
+ | make -C linux ARCH=arm menuconfig | ||
+ | </ | ||
+ | |||
+ | and then make changes, save them, and then create the '' | ||
+ | |||
+ | < | ||
+ | make -C linux ARCH=arm savedefconfig | ||
+ | </ | ||
+ | |||
+ | Check your changes against the default image | ||
+ | |||
+ | < | ||
+ | diff -u ./ | ||
+ | </ | ||
+ | |||
+ | And if you are sure things are what you want, store them to the default file. | ||
+ | |||
+ | < | ||
+ | cp ./ | ||
+ | </ | ||
+ | |||
+ | then this will work next time you type '' | ||
===== Build Devicetrees | ===== Build Devicetrees | ||
^ Function ^ File ^ | ^ Function ^ File ^ | ||
- | | PlutoSDR Rev.A Device Tree | [[linux.github> | + | | PlutoSDR Rev.A Device Tree | [[linux.github> |
| zynq-pluto-sdr.dts]] | | | zynq-pluto-sdr.dts]] | | ||
- | | PlutoSDR Rev.B Device Tree | [[linux.github> | + | | PlutoSDR Rev.B Device Tree | [[linux.github> |
| zynq-pluto-sdr-revb.dts]] | | | zynq-pluto-sdr-revb.dts]] | | ||
Line 142: | Line 234: | ||
</ | </ | ||
+ | ==== Configuring Buildroot ==== | ||
+ | |||
+ | You need to copy over the correct file, to the '' | ||
+ | < | ||
+ | make -C buildroot ARCH=arm zynq_pluto_defconfig | ||
+ | make -C buildroot ARCH=arm menuconfig | ||
+ | make -C buildroot ARCH=arm savedefconfig | ||
+ | make | ||
+ | </ | ||
===== Build FPGA Hardware Description File ===== | ===== Build FPGA Hardware Description File ===== | ||
Line 148: | Line 249: | ||
< | < | ||
- | source / | + | source / |
make -C hdl/ | make -C hdl/ | ||
cp hdl/ | cp hdl/ | ||
Line 154: | Line 255: | ||
===== Build FPGA First Stage Bootloader (FSBL) | ===== Build FPGA First Stage Bootloader (FSBL) | ||
+ | |||
+ | ^ Function ^ File ^ | ||
+ | | Create FSBL TCL script | [[github> | ||
+ | | create_fsbl_project.tcl]] | | ||
< | < | ||
- | source / | + | source / |
xsdk -batch -source scripts/ | xsdk -batch -source scripts/ | ||
cp build/ | cp build/ | ||
Line 204: | Line 309: | ||
< | < | ||
echo img: | echo img: | ||
- | source / | + | source / |
bootgen -image build/ | bootgen -image build/ | ||
</ | </ |