Skip to main content

Yet another EBAZ4205 writeup
#1: The Crystal-Less Variant

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.

Order of posts

  1. Introduction. Board definitions.
  2. Build and install Petalinux 2019.1 on crystal-less EBAZ4205 module.
  3. Build and install PYNQ 2.5.4 on crystal-less EBAZ4205 module.
  4. 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.

Comments

Post a Comment

Popular posts from this blog

Yet another EBAZ4205 writeup
#2: Petalinux 2019.1 Walkthrough

In order to leverage the capabilities of the EBAZ4205 I want it to run Linux. There are a couple of guides online which didn't work for me, because I have the board variant without a Y3 crystal at the ethernet IC. I'm also not an experienced FPGA developer, so some of the implicit steps were non-trivial for me at all. This was an excellent opportunity to pick up the glove and learn how to build Petalinux myself. So lets get to work! This guide uses 2019.1 toolchain, for two main reasons: It is the last version before Xilinx's migration to Vitis so there is more data online from other users. While the hardware flow is identical to the Vivado 2020.X editions, the Petalinux u-boot build process is different (see  Tux Engineering, Inc. - Home ), and has resulted errors for me, which I currently don't know how to solve. Refences The full writeup puts together bits and pieces are from the following sources: [1]  zynq[1] 矿板helloworld | hhuysqt  (using Google-Translate) [2]  EB

Yet another EBAZ4205 writeup
#3: PYNQ!

In this post we will leverage our basic Petalinux build to install PYNQ on our EBAZ4205 evaluation board. PYNQ is a framework being developed by Xilinx to interface all of a Zynq boards' capabilities (i.e. custom logic, processing, and peripherals) via a Python environment. It is enabled thanks to the Zynq's unique feature compared to other FPGAs, in which the logic fabric (PL) is actually programmed by the processor (PS) on boot. As a result, running PYNQ enables to use custom logic without the need of an external JTAG programmer . References : [1]  PYNQ for Cora-Z7-07S  and  GitHub PYNQ-Cora-Z7-07S . Great walkthrough. I modified it to apply to EBAZ4205 board. [2] Quick Porting of PYNQ . A general purpose introduction to PYNQ porting. Some useful replies. [3]  Load a PYNQ 2.5 bitstream during power-up . The last nail in the coffin: how to make ethernet work. Pre-requisites : Software tools installed and conf