This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
resources:tools-software:linux-drivers:platforms:microblaze [19 Jan 2018 10:11] – rename xcomm_zynq -> master Alexandru Ardelean | resources:tools-software:linux-drivers:platforms:microblaze [11 Nov 2022 13:41] (current) – [Get Microblaze Little Endian Toolchain from Xilinx] Raluca Chis | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Linux on the Xilinx FPGA development Board ====== | ====== Linux on the Xilinx FPGA development Board ====== | ||
+ | |||
+ | <WRAP info> | ||
+ | This content is purely informational, | ||
+ | </ | ||
This guide provides some step-by-step instructions on how to build a Microblaze Linux Kernel image for the FMC board connected to an | This guide provides some step-by-step instructions on how to build a Microblaze Linux Kernel image for the FMC board connected to an | ||
Line 5: | Line 9: | ||
* [[xilinx> | * [[xilinx> | ||
* [[xilinx> | * [[xilinx> | ||
+ | * [[xilinx> | ||
+ | * [[xilinx> | ||
===== Required Software ===== | ===== Required Software ===== | ||
* [[http:// | * [[http:// | ||
- | * {{: | + | * [[https:// |
- | * [[xilinx> | + | * [[xilinx> |
* [[http:// | * [[http:// | ||
- | Microblaze gnu toolchain from Xilinx is no longer available on git. Please use gnu tools from SDK installation as below: | + | Microblaze gnu toolchain from Xilinx is no longer available on git. Please use gnu tools from Vitis installation as below: |
+ | |||
+ | Dave@HAL9000: | ||
+ | Dave@HAL9000: | ||
+ | Dave@HAL9000: | ||
- | Dave@HAL9000:~/fmcomms1/linux$ export PATH=/ | + | <note tip> |
- | Dave@HAL9000:~/ | + | Latest released files can be downloaded from [[: |
- | Dave@HAL9000: | + | </note> |
===== Build Linux - Step by Step instructions ===== | ===== Build Linux - Step by Step instructions ===== | ||
Line 23: | Line 33: | ||
==== Get Microblaze Little Endian Toolchain from Xilinx ==== | ==== Get Microblaze Little Endian Toolchain from Xilinx ==== | ||
- | Download the Vivado | + | Download the Vivado |
And make sure you followed the instructions for [[http:// | And make sure you followed the instructions for [[http:// | ||
Line 56: | Line 66: | ||
<WRAP box>< | <WRAP box>< | ||
< | < | ||
- | Dave@HAL9000: | + | Dave@HAL9000: |
Dave@HAL9000: | Dave@HAL9000: | ||
Dave@HAL9000: | Dave@HAL9000: | ||
</ | </ | ||
+ | <note tip> | ||
+ | Instead of sourcing the Vivado settings64.sh script you can alternatively add your microblaze gcc toolchain directly to your PATH variable:\\ | ||
+ | < | ||
+ | Dave@HAL9000: | ||
+ | </ | ||
+ | </ | ||
==== Configure Kernel ==== | ==== Configure Kernel ==== | ||
Line 74: | Line 90: | ||
==== Get Root File-System ==== | ==== Get Root File-System ==== | ||
- | {{: | + | The root file system or rootfs contains everything (besides the Linux kernel itself) needed to support a full Linux system. It contains all the (user) applications, |
- | + | You can either just download the pre-build image or build it yourself. Instructions can be found here: [[resources: | |
+ | [[https:// | ||
<WRAP box bgblue>< | <WRAP box bgblue>< | ||
< | < | ||
- | Dave@HAL9000: | + | Dave@HAL9000: |
- | --2014-11-21 14:27:54-- | + | --2022-01-18 09:52:08-- |
- | Resolving | + | Resolving |
- | Connecting to wiki.analog.com (wiki.analog.com)|195.170.124.184|:80... connected. | + | Connecting to swdownloads.analog.com (swdownloads.analog.com)|23.63.205.142|:443... connected. |
HTTP request sent, awaiting response... 200 OK | HTTP request sent, awaiting response... 200 OK | ||
- | Length: | + | Length: |
- | Saving to: `rootfs.cpio.gz' | + | Saving to: ‘rootfs.cpio.gz’ |
- | 100%[===================================================================================================================================================================> | + | rootfs.cpio.gz |
- | + | ||
- | 2014-11-21 14:28:32 (79.2 KB/s) - `rootfs.cpio.gz' | + | |
+ | 2022-01-18 09:52:12 (3,32 MB/s) - ‘rootfs.cpio.gz’ saved [6772207/ | ||
Dave@HAL9000: | Dave@HAL9000: | ||
</ | </ | ||
+ | |||
+ | |||
==== Build kernel ==== | ==== Build kernel ==== | ||
Line 116: | Line 133: | ||
<WRAP box bgblue>< | <WRAP box bgblue>< | ||
< | < | ||
- | Dave@HAL9000: | + | Dave@HAL9000: |
- | scripts/ | + | |
- | | + | |
- | CHK | + | |
- | HOSTCC | + | |
CC scripts/ | CC scripts/ | ||
+ | CC scripts/ | ||
+ | MKELF | ||
+ | HOSTCC | ||
+ | HOSTCC | ||
+ | HOSTCC | ||
[ --snip-- ] | [ --snip-- ] | ||
- | | + | |
- | CC net/ | + | |
- | LD net/ | + | |
- | LD net/built-in.o | + | |
- | LINK vmlinux | + | |
LD vmlinux.o | LD vmlinux.o | ||
- | MODPOST vmlinux.o | + | MODPOST vmlinux.symvers |
- | GEN .version | + | MODINFO modules.builtin.modinfo |
- | | + | GEN modules.builtin |
- | | + | |
- | | + | |
- | LD | + | |
- | | + | LD .tmp_vmlinux.kallsyms2 |
- | | + | |
+ | | ||
LD vmlinux | LD vmlinux | ||
- | | + | |
SYSMAP | SYSMAP | ||
- | | + | |
- | | + | SHIPPED arch/ |
- | UIMAGE | + | |
- | Image Name: | + | UIMAGE |
- | Created: | + | Image Name: |
+ | Created: | ||
Image Type: | Image Type: | ||
- | Data Size: | + | Data Size: |
Load Address: 80000000 | Load Address: 80000000 | ||
Entry Point: | Entry Point: | ||
- | STRIP | + | Kernel: arch/ |
- | Kernel: arch/ | + | |
Dave@HAL9000: | Dave@HAL9000: | ||
</ | </ | ||
+ | |||
+ | <note tip> | ||
+ | The STRIP image found under arch/ | ||
+ | </ | ||
==== Boot Kernel on FPGA Microblaze ==== | ==== Boot Kernel on FPGA Microblaze ==== | ||
- | Then one method to load the kernel onto the already built and running FPGA which has the Microblaze processor is to launch | + | Then one method to load the kernel onto the already built and running FPGA which has the Microblaze processor is to launch |
+ | <note important> | ||
+ | |||
+ | For XMD: | ||
< | < | ||
+ | xmd> fpga -f system_top.bit | ||
xmd> connect mb mdm | xmd> connect mb mdm | ||
xmd> dow simpleImage.vc707_fmcomms2-3 | xmd> dow simpleImage.vc707_fmcomms2-3 | ||
xmd> run | xmd> run | ||
+ | </ | ||
+ | |||
+ | For XSDB or XSCT: | ||
+ | < | ||
+ | xsdb> connect | ||
+ | xsdb> fpga -f system_top.bit | ||
+ | xsdb> targets | ||
+ | 1 xcku040 | ||
+ | | ||
+ | 3 MicroBlaze #0 (Running) | ||
+ | xsdb> targets 3 | ||
+ | xsdb> dow simpleImage.kcu105_fmcdaq2 | ||
+ | xsdb> con | ||
+ | </ | ||
+ | |||
+ | === Configure and loading using a TCL script === | ||
+ | |||
+ | Example TCL script: | ||
+ | |||
+ | <code c run.tcl> | ||
+ | run.vcu118_quad_ad9081_204c_txmode_23_rxmode_25_onchip_pll_revc_nz1.tcl | ||
+ | connect | ||
+ | fpga -f system_top.vcu118_quad_ad9081_204c_txmode_23_rxmode_25_revc.bit | ||
+ | after 1000 | ||
+ | target 3 | ||
+ | dow simpleImage.vcu118_quad_ad9081_204c_txmode_23_rxmode_25_onchip_pll_revc_nz1.strip | ||
+ | after 1000 | ||
+ | con | ||
+ | disconnect | ||
+ | </ | ||
+ | |||
+ | From XSDB or XSCT: | ||
+ | |||
+ | < | ||
+ | xsdb> source run.tcl | ||
</ | </ | ||
(more details, methods of how to get bit file and kernel on flash and/or boot off SD Card is appreciated) | (more details, methods of how to get bit file and kernel on flash and/or boot off SD Card is appreciated) | ||