Skip to contentSkip to conversation

README.socfpga: Add readme update from Stefan Roese patch

PATCH New Stephen Arnold 2 participants 3 messages Mar 7, 2017 – Mar 10, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 README.socfpga: Add readme update from Stefan Roese patch

From v2-U-Boot-arm-socfpga-Add-SoCFPGA-SR1500-board limbo patch series describing SR1500 SPL generation (updates in following patch).

---
 doc/README.socfpga | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 86 insertions(+), 3 deletions(-)
doc/README.socfpga +86 -3
index cb805cfd3a..63733a986e 100644
@@ -1,4 +1,3 @@
-
 --------------------------------------------
 SOCFPGA Documentation for U-Boot and SPL
 --------------------------------------------
@@ -11,8 +10,92 @@ www.altera.com.
 --------------------------------------------
 socfpga_dw_mmc
 --------------------------------------------
-Here are macro and detailed configuration required to enable DesignWare SDMMC
+Here are macro and detailed configuration required to enable DesignWare SDMMC   
 controller support within SOCFPGA
 
-#define CONFIG_SYS_MMC_MAX_BLK_COUNT	256
+#define CONFIG_SYS_MMC_MAX_BLK_COUNT    256
 -> Using smaller max blk cnt to avoid flooding the limited stack in OCRAM
+
+-------------------------------------------------------------------------
+Generating the header files for SPL intergration as a replacement for the
+Preloader
+-------------------------------------------------------------------------
+This text assumes the use of Quartus 14.0.200
+
+I) Rebuilding the MCVEVK Quartus project
+----------------------------------------
+ 1) Navigate to DENX_MCV_reference_* directory
+ 2) Run Quartus II
+ 3) Open Project (Ctrl+J), select DENX_MCV_reference.qpf
+ 4) Run QSys [Tools->QSys]
+    4.1) In the Open dialog, select 'mcv_hps.qsys'
+    4.2) In the Open System dialog, wait until completion and press 'Close'
+    4.3) In the Qsys window, click on 'Generate HDL...' in bottom right corner
+         4.3.1) In the 'Generation' window, click 'Generate'
+	 4.3.2) In the 'Generate' dialog, wait until completion and click 'Close'
+    4.4) In the QSys window, click 'Finish'
+         4.4.1) In the 'Quartus II' pop up window, click 'OK'
+ 5) Back in Quartus II main window, do the following
+    5.1) Use Processing -> Start -> Start Analysis & Synthesis (Ctrl+K)
+    5.2) Use Processing -> Start Compilation (Ctrl+L)
+    ... have lunch, coffee, play games ...
+
+ [
+   NOTE: Steps 2-5 above can be also done using a convenience scripts
+         from the command line:
+	 $ ./qsys.sh && ./anal.sh && ./build.sh
+ ]
+
+ 6) Launch a separate terminal window
+    6.1) Change directory to 'software/spl_bsp'
+    6.2) Export path to embedded command shell and friends
+         $ export PATH=/work/DENX/Altera/Quartus/14.0/embedded/:$PATH
+    6.3) Start embedded command shell (ECS)
+         $ embedded_command_shell.sh
+    6.4) Prepare BSP by launching the BSP editor from ECS
+         => bsp-editor
+    6.5) In BSP editor
+         6.5.1) Use File -> Open
+	 6.5.2) Select 'settings.bsp' file
+	 6.5.4) Click Generate
+	 6.5.5) Click Exit
+
+Now the necessary files are generated. And U-Boot can be used to generate 
+the SPL header files. For this, please use the following script from the
+u-boot source tree::
+
+  $ ./arch/arm/mach-socfpga/qts-filter.sh [soc_type] [input_qts_dir] [input_bsp_dir] [output_dir]
+  
+  Process QTS-generated headers into U-Boot compatible ones.
+  
+    soc_type      - Type of SoC, either 'cyclone5' or 'arria5'.
+    input_qts_dir - Directory with compiled Quartus project
+                    and containing the Quartus project file (QPF).
+    input_bsp_dir - Directory with generated bsp containing
+                    the settings.bsp file.
+    output_dir    - Directory to store the U-Boot compatible
+                    headers.
+
+This will generate the following 4 files:
+
+iocsr_config.h
+pinmux_config.h
+pll_config.h
+sdram_config.h
+
+These files need to be copied into "qts" directory in the board directory
+(see output arg of script command above).
+
+Here the example for the DENX MCVEVK:
+
+$ ll board/denx/mcvevk/qts/
+total 44
+drwxrwxr-x 2 stefan stefan 4096 Okt 20 07:07 ./
+drwxrwxr-x 3 stefan stefan 4096 Okt 21 13:06 ../
+-rw-rw-r-- 1 stefan stefan 8826 Okt 20 07:07 iocsr_config.h
+-rw-rw-r-- 1 stefan stefan 4398 Okt 20 07:07 pinmux_config.h
+-rw-rw-r-- 1 stefan stefan 3192 Okt 20 07:07 pll_config.h
+-rw-rw-r-- 1 stefan stefan 9031 Okt 20 07:07 sdram_config.h
+
+Now your board is ready for full mainline support including
+U-Boot SPL. The Preloader will not be needed any more.
Signature · 1 line
2.11.1
#1 lore raw

PATCH 2/2 README.socfpg: update qts script arguments for 16.1

---
 doc/README.socfpga | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
doc/README.socfpga +6 -4
index 63733a986e..3110161753 100644
@@ -20,7 +20,9 @@ controller support within SOCFPGA
 Generating the header files for SPL intergration as a replacement for the
 Preloader
 -------------------------------------------------------------------------
-This text assumes the use of Quartus 14.0.200
+This text has been updated based on testing with Quartus Lite 16.1 and a fixed
+DE1_SOC_Linux_FB demo project (https://github.com/VCTLabs/DE1_SOC_Linux_FB).
+FB project can be built manually (as below) or with the project Makefile.
 
 I) Rebuilding the MCVEVK Quartus project
 ----------------------------------------
@@ -60,14 +62,14 @@ I) Rebuilding the MCVEVK Quartus project
 	 6.5.4) Click Generate
 	 6.5.5) Click Exit
 
-Now the necessary files are generated. And U-Boot can be used to generate 
+Now the necessary files are generated. And U-Boot can be used to generate
 the SPL header files. For this, please use the following script from the
 u-boot source tree::
 
   $ ./arch/arm/mach-socfpga/qts-filter.sh [soc_type] [input_qts_dir] [input_bsp_dir] [output_dir]
-  
+
   Process QTS-generated headers into U-Boot compatible ones.
-  
+
     soc_type      - Type of SoC, either 'cyclone5' or 'arria5'.
     input_qts_dir - Directory with compiled Quartus project
                     and containing the Quartus project file (QPF).
Signature · 1 line
2.11.1
#2 lore raw

PATCH 1/2 README.socfpga: Add readme update from Stefan Roese patch

In reply to Stephen Arnold

On 03/07/2017 10:47 PM, Stephen Arnold wrote:

Where is 2/2 patch ?

The commit message should say "socfpga: Update README with handoff generation instructions", the rest is just fluff . And btw. those instructions came from my internal notes ;-)

Quoted 2 lines

From v2-U-Boot-arm-socfpga-Add-SoCFPGA-SR1500-board limbo patch series describing SR1500 SPL generation (updates in following patch).

The body should contain a description of what this patch adds, not where this came from.

Quoted 2 lines

I think the address is mangled, it's missing the @ ...

Quoted 15 lines
Cc Marek Vasut <[email protected]>
---
 doc/README.socfpga | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 86 insertions(+), 3 deletions(-)
doc/README.socfpga +0 -1
index cb805cfd3a..63733a986e 100644
@@ -1,4 +1,3 @@
-
 --------------------------------------------
 SOCFPGA Documentation for U-Boot and SPL
 --------------------------------------------

doc/README.socfpga www.altera.com. · line 13

Quoted 5 lines
doc/README.socfpga +1 -1
@@ -11,8 +10,92 @@ www.altera.com.
 --------------------------------------------
 socfpga_dw_mmc
 --------------------------------------------
-Here are macro and detailed configuration required to enable DesignWare SDMMC
+Here are macro and detailed configuration required to enable DesignWare SDMMC   

Extra spaces at the end not needed, drop this hunk.

doc/README.socfpga www.altera.com. · line 16

Quoted 4 lines
doc/README.socfpga +1 -1
 controller support within SOCFPGA
 
-#define CONFIG_SYS_MMC_MAX_BLK_COUNT	256
+#define CONFIG_SYS_MMC_MAX_BLK_COUNT    256

DTTO

doc/README.socfpga www.altera.com. · line 23

Quoted 7 lines
doc/README.socfpga +6 -0
 -> Using smaller max blk cnt to avoid flooding the limited stack in OCRAM
+
+-------------------------------------------------------------------------
+Generating the header files for SPL intergration as a replacement for the
+Preloader
+-------------------------------------------------------------------------
+This text assumes the use of Quartus 14.0.200

Works in Quartus 16.1 too, so we can reword this as "Altera Quartus 14.0 or newer" .

doc/README.socfpga www.altera.com. · line 27

Quoted 3 lines
doc/README.socfpga +3 -0
+I) Rebuilding the MCVEVK Quartus project
+----------------------------------------
+ 1) Navigate to DENX_MCV_reference_* directory

You should replace all the DENX_MCV_reference_ stuff with "Quartus project direcory"

doc/README.socfpga www.altera.com. · line 29

Quoted 2 lines
doc/README.socfpga +2 -0
+ 2) Run Quartus II
+ 3) Open Project (Ctrl+J), select DENX_MCV_reference.qpf

Select the Quartus project .qpf file ...

doc/README.socfpga www.altera.com. · line 31

Quoted 2 lines
doc/README.socfpga +2 -0
+ 4) Run QSys [Tools->QSys]
+    4.1) In the Open dialog, select 'mcv_hps.qsys'

Open the qsys system file .qsys ...

doc/README.socfpga www.altera.com. · line 40

Quoted 9 lines
doc/README.socfpga +9 -0
+    4.2) In the Open System dialog, wait until completion and press 'Close'
+    4.3) In the Qsys window, click on 'Generate HDL...' in bottom right corner
+         4.3.1) In the 'Generation' window, click 'Generate'
+	 4.3.2) In the 'Generate' dialog, wait until completion and click 'Close'
+    4.4) In the QSys window, click 'Finish'
+         4.4.1) In the 'Quartus II' pop up window, click 'OK'
+ 5) Back in Quartus II main window, do the following
+    5.1) Use Processing -> Start -> Start Analysis & Synthesis (Ctrl+K)
+    5.2) Use Processing -> Start Compilation (Ctrl+L)

This may take a while, so wait.

doc/README.socfpga www.altera.com. · line 47

Quoted 7 lines
doc/README.socfpga +7 -0
+    ... have lunch, coffee, play games ...
+
+ [
+   NOTE: Steps 2-5 above can be also done using a convenience scripts
+         from the command line:
+	 $ ./qsys.sh && ./anal.sh && ./build.sh
+ ]

Drop this, the scripts are not available.

doc/README.socfpga www.altera.com. · line 52

Quoted 4 lines
doc/README.socfpga +4 -0
+ 6) Launch a separate terminal window
+    6.1) Change directory to 'software/spl_bsp'
+    6.2) Export path to embedded command shell and friends
+         $ export PATH=/work/DENX/Altera/Quartus/14.0/embedded/:$PATH

This path points to Quartus embedded command shell directory, so update it to PATH=/path/to/Altera/Quartus/14.0/embedded/ or something.

doc/README.socfpga www.altera.com. · line 65

Quoted 13 lines
doc/README.socfpga +13 -0
+    6.3) Start embedded command shell (ECS)
+         $ embedded_command_shell.sh
+    6.4) Prepare BSP by launching the BSP editor from ECS
+         => bsp-editor
+    6.5) In BSP editor
+         6.5.1) Use File -> Open
+	 6.5.2) Select 'settings.bsp' file
+	 6.5.4) Click Generate
+	 6.5.5) Click Exit
+
+Now the necessary files are generated. And U-Boot can be used to generate 
+the SPL header files. For this, please use the following script from the
+u-boot source tree::

Extra colon, drop it. Also, I think qts-filter was update to support more options....

Quoted 11 lines
doc/README.socfpga +11 -0
+  $ ./arch/arm/mach-socfpga/qts-filter.sh [soc_type] [input_qts_dir] [input_bsp_dir] [output_dir]
+  
+  Process QTS-generated headers into U-Boot compatible ones.
+  
+    soc_type      - Type of SoC, either 'cyclone5' or 'arria5'.
+    input_qts_dir - Directory with compiled Quartus project
+                    and containing the Quartus project file (QPF).
+    input_bsp_dir - Directory with generated bsp containing
+                    the settings.bsp file.
+    output_dir    - Directory to store the U-Boot compatible
+                    headers.

doc/README.socfpga www.altera.com. · line 87

Quoted 10 lines
doc/README.socfpga +10 -0
+
+This will generate the following 4 files:
+
+iocsr_config.h
+pinmux_config.h
+pll_config.h
+sdram_config.h
+
+These files need to be copied into "qts" directory in the board directory
+(see output arg of script command above).

argument instead of arg?

doc/README.socfpga www.altera.com. · line 89

Quoted 1 line
doc/README.socfpga +1 -0
+Here the example for the DENX MCVEVK:

This example should use some more generic board, like CV SoCDK

Quoted 12 lines
doc/README.socfpga +11 -0
+$ ll board/denx/mcvevk/qts/
+total 44
+drwxrwxr-x 2 stefan stefan 4096 Okt 20 07:07 ./
+drwxrwxr-x 3 stefan stefan 4096 Okt 21 13:06 ../
+-rw-rw-r-- 1 stefan stefan 8826 Okt 20 07:07 iocsr_config.h
+-rw-rw-r-- 1 stefan stefan 4398 Okt 20 07:07 pinmux_config.h
+-rw-rw-r-- 1 stefan stefan 3192 Okt 20 07:07 pll_config.h
+-rw-rw-r-- 1 stefan stefan 9031 Okt 20 07:07 sdram_config.h
+
+Now your board is ready for full mainline support including
+U-Boot SPL. The Preloader will not be needed any more.
Signature · 2 lines
Best regards,
Marek Vasut