mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] scripts: socfgpa_import_preloader: simplify procedure
@ 2019-07-03  6:40 Steffen Trumtrar
  2019-07-04  6:57 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Steffen Trumtrar @ 2019-07-03  6:40 UTC (permalink / raw)
  To: Barebox List

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] scripts: socfgpa_import_preloader: simplify procedure
  2019-07-03  6:40 [PATCH] scripts: socfgpa_import_preloader: simplify procedure Steffen Trumtrar
@ 2019-07-04  6:57 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2019-07-04  6:57 UTC (permalink / raw)
  To: Steffen Trumtrar; +Cc: Barebox List

On Wed, Jul 03, 2019 at 08:40:04AM +0200, Steffen Trumtrar wrote:
> 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(-)

08:55 < sha> str: Kann ich dein Signed-off-by für "scripts: socfgpa_import_preloader: simplify procedure" bekommen ;)
08:55 < str> sha: huppala, schreibst du's drunter? :)

Yes. Applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-04  6:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-03  6:40 [PATCH] scripts: socfgpa_import_preloader: simplify procedure Steffen Trumtrar
2019-07-04  6:57 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox