Once I noticed that cheap Zynq modules can be had for a few dollars I immediately bought one, then started asking questions. Apparently, the first modules in circulation were more populated than the later ones: They have optocouplers and a crystal driving the network interface.
The crystal-less modules are cheaper, but I had trouble evaluating and leveraging my Zync-board capabilities. The following posts will detail my steps to install Petalinux OS and boot it from SD card, and and then to install and run PYNQ. This enables to interface the FPGA logic from python code running on the Zynq processor, without needing to use a JTAG programmer.
The crystal-less modules are cheaper, but I had trouble evaluating and leveraging my Zync-board capabilities. The following posts will detail my steps to install Petalinux OS and boot it from SD card, and and then to install and run PYNQ. This enables to interface the FPGA logic from python code running on the Zynq processor, without needing to use a JTAG programmer.
Order of posts
- Introduction. Board definitions.
- Build and install Petalinux 2019.1 on crystal-less EBAZ4205 module.
- Build and install PYNQ 2.5.4 on crystal-less EBAZ4205 module.
- PYNQ overlay example for verification of functionality.
References (for part #1)
[1] GitHub - xjtuecho/EBAZ4205: A 5$ Xilinx ZYNQ development board. The most extensive information aggregated outside Chinese-speaking closed forums.
[2] EBAZ4205 - "Recycle" a cheap crypto-miner (Part 1) - embed-me (embed-me.com). Excellent writeup about the hardware and software side of the board.
[3] EBAZ4205 | 0xFE. Details about the hardware differences of the crystal-less EBAZ4205.
Prerequisites
- Read [1].
- EBAZ4205 module.
- USB to Serial Converter (e.g. CP2102, CH340, FT232RL module etc).
- 5V-12V power supply
- Some clips, DuPont jumper wires and headers.
Hardware description
This is the board that is most commonly sent to buyers nowadays. It usually comes with JTAG/UART headers, micro-SD socket and an unexplained single Dupont wire.
I've made small additions to my board to make it more evaluation-friendly. I moved the SD/ NAND boot selection resistor to a 2x2 50mil female header which is especially helpful. If soldering the small male header is too delicate you can achieve the same result by using thin wires fanned out to larger pins. I also mounted two new 470uF capacitors since the ones on the board that I got were marked with a line across them. This probably was not required.
Verification of functionality
This was done without SD card (NAND boot). I fused the procedures described in [1] and [2].
1. Connect the board to PC using a USB to serial converter, open a serial port (I use MobaXterm).
2. Reset the root password of the on-flash linux (Each box is one command) (from [1])
setenv nandboot "echo Copying Linux from NAND flash to RAM... && nand info && run nandroot;nand read 0x100000 0x2220000 0x300000 && fpga loadb 0 0x100000 0x300000 && nand read ${kernel_load_address} 0x300000 ${kernel_size} && nand read ${devicetree_load_address} 0x800000 ${devicetree_size}"
run nandboot
setenv bootargs 'console=ttyPS0,115200 root=/dev/mtdblock6 rootfstype=jffs2 noinitrd rw rootwait reboot=cold,hard emergency init=/bin/sh'
bootm ${kernel_load_address} - ${devicetree_load_address} init=/bin/sh
passwd
At this point you will be required to type a new root password.
3. Log in to linux and shut down the mining software (from [1])
mv /etc/rcS.d/S95cgminer.sh /etc/rcS.d/K95cgminer.sh
reboot
4. Connect an ethernet cable. For me DHCP worked just fine. See that ethernet assigns port, test it (from [2]):
ifconfig
ping 8.8.8.8
If all went well it's a good indication that your hardware is fine. The EBAZ4205 has its ethernet wired through the FPGA logic fabric pins (PL, more about that later), so booting with a working network means that we already tested bitstream upload in this case.
It is amazing and wonderful to visit your site.
ReplyDeleteJTAG