mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] scripts: socfgpa_import_preloader: simplify procedure
Date: Wed,  3 Jul 2019 08:40:04 +0200	[thread overview]
Message-ID: <20190703064004.24169-1-s.trumtrar@pengutronix.de> (raw)

Instead of jumping through hoops using the bsp-editor gui, just use the
underlying python script for importing.
---
 Documentation/boards/socfpga.rst |  9 +--------
 scripts/socfpga_import_preloader | 11 ++++++++---
 2 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/Documentation/boards/socfpga.rst b/Documentation/boards/socfpga.rst
index d73237491d77..19d606030003 100644
--- a/Documentation/boards/socfpga.rst
+++ b/Documentation/boards/socfpga.rst
@@ -116,19 +116,12 @@ To update the handoff files, the following procedure is necessary:
 
 1. Regenerate the project with Qsys
 2. Load up your project in Quartus II and assemble the design
-3. Go to the SoCEDS installation and run
-   ``./embedded_command_shell.sh``
-4. Now run ``bsp-editor``
-5. Create a new BSP
-6. Select the directory `hps_isw_handoff/soc_system_hps_0` under the
-   preloader settings directory
-7. Click ``Ok`` than ``Generate``
 
 Now run the command:
 
 .. code-block:: sh
 
-  scripts/socfpga_import_preloader <SPL_GENERATED_DIR> <ISW_HANDOFF> <BOARD_DIRECTORY>
+  scripts/socfpga_import_preloader <EMBEDDED_SDK> <ISW_HANDOFF> <BOARD_DIRECTORY>
 
 where `<SPL_GENERATED_DIR>` is the directory where the bsp-editor generated the files,
 `<ISW_HANDOFF>` is the directory where Quartus generated the handoff files, and
diff --git a/scripts/socfpga_import_preloader b/scripts/socfpga_import_preloader
index 63ff30ec2a21..6c748fadb814 100755
--- a/scripts/socfpga_import_preloader
+++ b/scripts/socfpga_import_preloader
@@ -2,12 +2,13 @@
 
 if [ "$#" -lt "2" ]
 then
-	echo "USAGE: $0 <SPL_GENERATED_DIR> <ISW_HANDOFF> <BOARD_DIRECTORY>"
-	echo "EXAMPLE: $0 ~/cv_soc_devkit_ghrd/software/spl_bsp/generated ~/cv_soc_devkit_ghrd/hps_isw_handoff/soc_system_hps_0/ arch/arm/boards/altera-socdk"
+	echo "USAGE: $0 <EMBEDDED_SDK> <ISW_HANDOFF> <BOARD_DIRECTORY>"
+	echo "EXAMPLE: $0 ~/altera-embedded-sdk/ ~/cv_soc_devkit_ghrd/hps_isw_handoff/soc_system_hps_0/ arch/arm/boards/altera-socdk"
 	exit 1
 fi
 
-splroot=$1
+splroot="$(mktemp -d)"
+embeddedsw=$1
 handoff=$2
 boardroot=$3
 bareboxsrc=.
@@ -56,6 +57,8 @@ copy_source() {
 	sed -i 's/ $//g' $tgt
 }
 
+python2.7 ${embeddedsw}/embedded/ip/altera/preloader/scripts/iswgen.py -i ${handoff} -o ${splroot}/
+
 copy_source ${splroot}/iocsr_config_cyclone5.c ${boardroot}/iocsr_config_cyclone5.c
 copy_source ${splroot}/pinmux_config_cyclone5.c ${boardroot}/pinmux_config.c
 copy_source ${splroot}/pll_config.h ${boardroot}/pll_config.h
@@ -66,4 +69,6 @@ copy_source ${handoff}/sequencer_auto_ac_init.c ${boardroot}/sequencer_auto_ac_i
 copy_source ${handoff}/sequencer_auto_inst_init.c ${boardroot}/sequencer_auto_inst_init.c
 copy_source ${handoff}/sequencer_defines.h ${boardroot}/sequencer_defines.h
 
+rm -r ${splroot}
+
 echo "DONE"
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2019-07-03  6:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-03  6:40 Steffen Trumtrar [this message]
2019-07-04  6:57 ` Sascha Hauer

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=20190703064004.24169-1-s.trumtrar@pengutronix.de \
    --to=s.trumtrar@pengutronix.de \
    --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