[PATCH] scripts: socfgpa_import_preloader: simplify procedure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux