-
Notifications
You must be signed in to change notification settings - Fork 79
HowTo Linux on Pano Logic G2
This how-to guide is for people who want to run Linux on Pano Logic G2 devices using LiteX BuildEnv.
You will need:
-
A PC running Linux natively or in a VM.
-
Xilinx ISE with support for the XC6SLX100/XC6SLX150 chip, there are three ways to obtain it (all of them involve a valid Xilinx account):
- download a VM image from the Xilinx website
- get the Xilinx ISE for Windows 10 with the free Webpack license
- get the Xilinx ISE for Linux with a regular (non-free) Xilinx license
All of these options should come with a valid license for the FPGA part on the Pano Logic G2. Note that a standard Webpack ISE download for Linux will most probably not support this part (please use the VM instead). Note the large download size (e.g. the VM is 6.9 GB).
-
USB-UART adapter.
All shell commands in this guide use bash
.
To build Gateware for the board you need to use the pano_logic_g2
platform and the base
target of LiteX BuildEnv.
On top of that you should use VexRiscv Soft CPU with CPU_VARIANT=linux
and BUILD_BUILDROOT=1
exported.
After building the Gateware you can use ./scripts/build-linux.sh
to build a custom RootFS and Linux kernel for the board.
That should generate the following files:
<build_dir>/software/linux/firmware.bin
<build_dir>/software/linux/riscv32-rootfs.cpio
<build_dir>/software/linux/rv32.dtb
<build_dir>/emulator/emulator.bin
To access the serial console and upload the Linux image you will need to use a USB-UART adapter. UART can be accessed via 2 DDC pins on the DVI connector, RX is attached to DDC Data and TX is on DDC Clock.
You can load files generated by build-linux.sh
by creating an image.json
file similar to this one:
{
"build/pano_logic_g2_base_vexriscv.linux/software/linux/firmware.bin": "0xc0000000",
"build/pano_logic_g2_base_vexriscv.linux/software/linux/riscv32-rootfs.cpio": "0xc0800000",
"build/pano_logic_g2_base_vexriscv.linux/software/linux/rv32.dtb": "0xc1000000",
"build/pano_logic_g2_base_vexriscv.linux/emulator/emulator.bin": "0x50000000"
}
And then using lxterm --speed <configured_baud_rate> /dev/ttyUSB0 --images <path_to_created_image_json_file>
you should be able to load the Linux kernel and the RootFS image into the DDR memory, and shortly after it finishes uploading, a Linux prompt should appear.