Project

General

Profile

Building the MitySOM-5CSX

Added by John Iannuzzi 13 days ago

Hi,
I have been going thru the build sequence with the makefile and got the following error:

software/preloader/u-boot-socfpga/arch/arm/mach-socfpga/cv_bsp_generator/cv_bsp_generator.py -i hps_isw_handoff/dev_5cs_hps_0 -o software/preloader/u-boot-socfpga/board/cl/mitysom-5cs/qts
/usr/bin/env: ‘python’: No such file or directory
make: *** [Makefile:596: u-boot-socfpga/u-boot-with-spl.sfp] Error 127

I believe this is because its looking for python 2. The original version of the cv_bsp_generator.py script was written in python2 (right from Rocketboards). They never updated it to python3. I found this out a few months ago after pulling my hair out.
Anyway, do you folks have a fix or should I just do the conversion myself? If there is a fix in place already, I would rather use that to keep aligned with your stuff.

Thanks,
John


Replies (4)

RE: Building the MitySOM-5CSX - Added by Seth Graber 12 days ago

Hi John,

The scripts appears to work fine with python3, below is the output of me running the command manually with python3:

$ python3 software/preloader/u-boot-socfpga/arch/arm/mach-socfpga/cv_bsp_generator/cv_bsp_generator.py -i hps_isw_handoff/dev_5cs_hps_0 -o software/preloader/u-boot-socfpga/board/cl/mitysom-5cs/qts 
/home/sgraber/work/projects/mitysom-5csx-ref/dev_5cse_l2_3y8/software/preloader/u-boot-socfpga/arch/arm/mach-socfpga/cv_bsp_generator/emif.py:91: SyntaxWarning: invalid escape sequence '\w'
  if re.match("^#define (\w+_)", line):
/home/sgraber/work/projects/mitysom-5csx-ref/dev_5cse_l2_3y8/software/preloader/u-boot-socfpga/arch/arm/mach-socfpga/cv_bsp_generator/emif.py:101: SyntaxWarning: invalid escape sequence '\['
  if re.match("^const.*\[", line) or arrayMatchStart:
/home/sgraber/work/projects/mitysom-5csx-ref/dev_5cse_l2_3y8/software/preloader/u-boot-socfpga/arch/arm/mach-socfpga/cv_bsp_generator/emif.py:110: SyntaxWarning: invalid escape sequence '\['
  self.seqAutoAcTemplateList.append(re.sub("\[.*\]", "[]", line))
/home/sgraber/work/projects/mitysom-5csx-ref/dev_5cse_l2_3y8/software/preloader/u-boot-socfpga/arch/arm/mach-socfpga/cv_bsp_generator/emif.py:116: SyntaxWarning: invalid escape sequence '\['
  if re.match("^const.*\[", line) or arrayMatchStart:
/home/sgraber/work/projects/mitysom-5csx-ref/dev_5cse_l2_3y8/software/preloader/u-boot-socfpga/arch/arm/mach-socfpga/cv_bsp_generator/emif.py:125: SyntaxWarning: invalid escape sequence '\['
  self.seqAutoInstTemplateList.append(re.sub("\[.*\]", "[]", line))
/home/sgraber/work/projects/mitysom-5csx-ref/dev_5cse_l2_3y8/software/preloader/u-boot-socfpga/arch/arm/mach-socfpga/cv_bsp_generator/hps.py:370: SyntaxWarning: invalid escape sequence '\w'
  p = re.compile('^(\w+)\s+(\w+)$')
Generating file: software/preloader/u-boot-socfpga/board/cl/mitysom-5cs/qts/sdram_config.h...
Generating file: software/preloader/u-boot-socfpga/board/cl/mitysom-5cs/qts/pinmux_config.h...
Generating file: software/preloader/u-boot-socfpga/board/cl/mitysom-5cs/qts/pll_config.h
Reading file: hps_isw_handoff/dev_5cs_hps_0/dev_5cs_hps_0.hiof...
Generating file: software/preloader/u-boot-socfpga/board/cl/mitysom-5cs/qts/iocsr_config.h...

The Makefile is looking for the PYTHON environment variable to be set up by your system. For example, on my Ubuntu 24.04 this is not set by default. Running export PYTHON=python3 before using the Makefile should resolve your issue.

- Seth

RE: Building the MitySOM-5CSX - Added by John Iannuzzi 12 days ago

Hi Seth,
Thanks. I’ll give it a shot later on.
Best regards,
John

RE: Building the MitySOM-5CSX - Added by John Iannuzzi 1 day ago

Hi Seth,
Thanks, I got u-boot to build. At this point, I have a basic question: If I continue to follow thru the guide for Quartus 23.1, going thru all the steps and build the SD card, what will I have?, i.e. At the end of all this, will I have manually built the stock version of the SD card that was supplied with the dev kit?
Over the last year, I have been lead thru endless tutorials (mostly from rocketboards) only to end up at dead ends...very frustrating. This was the subject of a conversation I had with Tom C. and what has lead me to the Critical Link Dev board. I am looking to have a reference design that I have gone thru all of the steps to build, study it, and use it as a spring board for other projects.
Can you please comment on this?

Thank you for your help on this.
Best regards,
John

RE: Building the MitySOM-5CSX - Added by Seth Graber 1 day ago

Hi John,

You're welcome, glad to hear you were able to get u-boot to build. If you continue following our Getting Started Guides for the Quartus 23.1 project, then yes, you will end up having manually built the SD card supplied with the dev kit. The goal of these guides is to set you up with the knowledge and tools to get started and then branch out into your own projects, just as you said. We hope they will be a great resource for you and of course we are here to answer any questions and help along the way. The standard build flow would be to build the FPGA, build u-boot, build the filesystem with Yocto, and then build the SD card image. If you have any further questions feel free to let us know and myself or someone else will get back to you as soon as possible.

All the best, Seth

    (1-4/4)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)