mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Ian Abbott <abbotti@mev.co.uk>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] scripts: socfpga_import_preloader: Use SDK-supplied Python
Date: Wed, 21 Jun 2023 10:31:34 +0200	[thread overview]
Message-ID: <20230621083134.GB18491@pengutronix.de> (raw)
In-Reply-To: <20230615123020.25927-1-abbotti@mev.co.uk>

On Thu, Jun 15, 2023 at 01:30:20PM +0100, Ian Abbott wrote:
> Change `generate_spl()` to use the `python` bundled with the SDK (SoC
> EDS) instead of using `python2.7`.  In version 20.1 of SoC EDS, the
> `iswgen.py` script was updated to work with Python 3.8 and no longer
> works with Python 2.7, leading to an error similar to this when
> generating the SPL:
> 
> ```
> Generating file: /tmp/tmp.0xSiyYqAU2//sdram//sdram_config.h...
> Traceback (most recent call last):
>   File "/opt/intelFPGA/20.1/embedded/ip/altera/preloader/scripts/iswgen.py", line 63, in <module>
>     hps = hps.HPSGrokker(inputDir, outputDir)
>   File "/opt/intelFPGA/20.1/embedded/ip/altera/preloader/scripts/hps.py", line 54, in __init__
>     self.createFilesFromHPS()
>   File "/opt/intelFPGA/20.1/embedded/ip/altera/preloader/scripts/hps.py", line 546, in createFilesFromHPS
>     self.handleHPSPeripheralsNode(childNode)
>   File "/opt/intelFPGA/20.1/embedded/ip/altera/preloader/scripts/hps.py", line 413, in handleHPSPeripheralsNode
>     self.pinmuxHeaderBuffer.write("#define " + name + ' ' + '(' + str(used) + ')' + '\n')
> TypeError: unicode argument expected, got 'str'
> ```
> 
> Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
> ---
>  scripts/socfpga_import_preloader | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Applied, thanks

Sascha

> 
> diff --git a/scripts/socfpga_import_preloader b/scripts/socfpga_import_preloader
> index bd54e1b913..a555c9174b 100755
> --- a/scripts/socfpga_import_preloader
> +++ b/scripts/socfpga_import_preloader
> @@ -112,7 +112,10 @@ copy_source() {
>  }
>  
>  generate_spl() {
> -	python2.7 ${embeddedsw}/embedded/ip/altera/preloader/scripts/iswgen.py -i ${handoff} -o ${splroot}/
> +	USE_SOCEDS_PYTHON=1 SOCEDS_DESTROY_PATH=1 \
> +		${embeddedsw}/embedded/embedded_command_shell.sh python \
> +		${embeddedsw}/embedded/ip/altera/preloader/scripts/iswgen.py \
> +		-i ${handoff} -o ${splroot}/
>  }
>  
>  if [ -z $splroot ] || [ -z $boardroot ] || [ -z $handoff ]; then
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



      reply	other threads:[~2023-06-21  8:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-15 12:30 Ian Abbott
2023-06-21  8:31 ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230621083134.GB18491@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=abbotti@mev.co.uk \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox