From 6d6da3b6d1ff207e50f4e63ebac42085b66333e7 Mon Sep 17 00:00:00 2001 From: Oguz Meteer Date: Sat, 29 Dec 2018 19:30:34 +0100 Subject: [PATCH 1/3] Update README.md with individual steps and how to fix pyjson5 on Arch Signed-off-by: Oguz Meteer --- README.md | 41 ++++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 7dc53858..c219e33e 100644 --- a/README.md +++ b/README.md @@ -12,25 +12,29 @@ More documentation can be found published on [prjxray ReadTheDocs site](http://p # Quickstart Guide Instructions were originally written for Ubuntu 16.04. Please let us know if you have information on other distributions. +### Step 1: ### Install Vivado 2017.2. If you did not install to /opt/Xilinx default, then set the environment variable XRAY_VIVADO_SETTINGS to point to the settings64.sh file of the installed vivado version, ie export XRAY_VIVADO_SETTINGS=/opt/Xilinx/Vivado/2017.2/settings64.sh +### Step 2: ### Pull submodules: git submodule update --init --recursive -Install CMake and build the C++ tools: +### Step 3: ### +Install CMake: sudo apt-get install cmake # version 3.5.0 or later required, # for Ubuntu Trusty pkg is called cmake3 - mkdir build - pushd build - cmake .. - make - popd +### Step 4: ### +Build the C++ tools: + + make build + +### Step 5: ### (Option 1) - Install the Python environment locally sudo apt-get install virtualenv python3-virtualenv python3-yaml @@ -41,33 +45,52 @@ Install CMake and build the C++ tools: sudo apt-get install python3-yaml sudo pip3 install -r requirements.txt +This step is known to fail with a compiler error while building the `pyjson5` +library when using Arch Linux and Fedora. `pyjson5` needs one change to build +correctly: + + git clone https://github.com/Kijewski/pyjson5.git + cd pyjson5 + sed -i 's/char \*PyUnicode/const char \*PyUnicode/' src/_imports.pyx + sudo make + +This might give you and error about `sphinx_autodoc_typehints` but it should +correctly build and install pyjson5. After this, run either option 1 or 2 again. + +### Step 6: ### Always make sure to set the environment for the device you are working on before running any other commands: source database/artix7/settings.sh +### Step 7: ### **If you are a prjxray developer, skip this step.** But, if you just want to use the Python API with a pre-generated database, just download a current stable version and skip the rest of the instructions: # WARNING: causes git issues, overrides environment ./download-latest-db.sh +### Step 8: ### (Re-)creating the entire database (this will take a very long time!): cd fuzzers make -j$(nproc) -(Re-)creating parts of the database, for example LUT init bits: +If you want to (re-)create parts of the database, you first need to run: + + cd fuzzers/001-part-yaml + make run + +Then pick any fuzzer and run (for example LUT init bits): cd fuzzers/010-lutinit make -j$(nproc) run +### Step 9: ### Create HTML documentation: cd htmlgen python3 htmlgen.py - - # C++ Development Tests are not built by default. Setting the PRJXRAY\_BUILD\_TESTING option to From 019492c10d460aff54ca42519aea6f3da7b7a2a9 Mon Sep 17 00:00:00 2001 From: Oguz Meteer Date: Sun, 30 Dec 2018 12:00:16 +0100 Subject: [PATCH 2/3] Update README.md Rearrange steps to make sure the user always downloads a stable pre-generated database or builds everything, before working on fuzzers. Signed-off-by: Oguz Meteer --- README.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c219e33e..9274d680 100644 --- a/README.md +++ b/README.md @@ -64,23 +64,19 @@ running any other commands: source database/artix7/settings.sh ### Step 7: ### -**If you are a prjxray developer, skip this step.** But, if you just want to use the Python API with a pre-generated database, just download a current stable version and skip the rest of the instructions: +(Option 1) - Download a current stable version (you can use the Python API with +a pre-generated database) # WARNING: causes git issues, overrides environment ./download-latest-db.sh -### Step 8: ### -(Re-)creating the entire database (this will take a very long time!): +(Option 2) - (Re-)create the entire database (this will take a very long time!) cd fuzzers make -j$(nproc) -If you want to (re-)create parts of the database, you first need to run: - - cd fuzzers/001-part-yaml - make run - -Then pick any fuzzer and run (for example LUT init bits): +### Step 8: ### +Pick a fuzzer (or write your own) and run: cd fuzzers/010-lutinit make -j$(nproc) run From 832585bfea76abf5805f235cdc2bb3490537c485 Mon Sep 17 00:00:00 2001 From: Oguz Meteer Date: Mon, 31 Dec 2018 10:19:33 +0100 Subject: [PATCH 3/3] Remove unnecessary warning from README.md Signed-off-by: Oguz Meteer --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9274d680..e4821424 100644 --- a/README.md +++ b/README.md @@ -64,10 +64,9 @@ running any other commands: source database/artix7/settings.sh ### Step 7: ### -(Option 1) - Download a current stable version (you can use the Python API with -a pre-generated database) +(Option 1, recommended) - Download a current stable version (you can use the +Python API with a pre-generated database) - # WARNING: causes git issues, overrides environment ./download-latest-db.sh (Option 2) - (Re-)create the entire database (this will take a very long time!)