summaryrefslogtreecommitdiffstats
path: root/src/build/hwpf
diff options
context:
space:
mode:
authorBrian Horton <brianh@linux.ibm.com>2013-09-30 13:26:12 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-10-07 10:33:00 -0500
commit381c2442d8df3b1d382f3bcba8d2daa83b6a42b2 (patch)
tree50adf4241fa23c154473831b2277f4e15dbc4faa /src/build/hwpf
parenta064ba91e031a41f26fae7390a3795e141e7d440 (diff)
downloadtalos-hostboot-381c2442d8df3b1d382f3bcba8d2daa83b6a42b2.tar.gz
talos-hostboot-381c2442d8df3b1d382f3bcba8d2daa83b6a42b2.zip
fix issues with prcd_compile.tcl script
. allow .c files . error nicely if input file not found . local path does not have to be hostboot path for build Change-Id: Ifed1c6b26611dabd4de54c78a68bab862d172011 RTC: 72716 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/6405 Tested-by: Jenkins Server Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/build/hwpf')
-rwxr-xr-xsrc/build/hwpf/prcd_compile.tcl21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/build/hwpf/prcd_compile.tcl b/src/build/hwpf/prcd_compile.tcl
index a53972972..e5b8ecda3 100755
--- a/src/build/hwpf/prcd_compile.tcl
+++ b/src/build/hwpf/prcd_compile.tcl
@@ -261,7 +261,7 @@ proc start_patch_server_on_fsp { fspip fsppassword } {
# MAIN
# ------------------------
set userid $::env(USER)
-set version "1.5"
+set version "1.6"
set files [list]
set directories [list]
@@ -294,7 +294,7 @@ foreach arg $argv {
puts { src/usr/hwpf/hwp }
puts { src/include/usr/hwpf/hwp }
puts {}
- puts {The files can either be in the local current working directory, or in a local sub-directory mirroring the hostboot tree. }
+ puts {The files can either be in the local current working directory, or in some other directory. }
puts {}
puts {Without the -n parameter, the file MUST be an existing files in the hostboot sandbox.}
puts {If they are not found in the sandbox, an error will be returned.}
@@ -319,7 +319,8 @@ foreach arg $argv {
puts {examples }
puts {> prcd_compile.tcl -d hb0216a_1307.810 -o ./output fapiTestHwp.C fapiTestHwp.C sample.initfile}
puts {> prcd_compile.tcl -d hb0216a_1307.810 -o ./output/ proc_cen_framelock.C }
- puts {> prcd_compile.tcl -f b0211a_1307.810 -o output dmi_training/proc_cen_framelock/proc_cen_framelock.H }
+ puts {> prcd_compile.tcl -f b0211a_1307.810 -o output chips/p8/working/procedures/ipl/fapi/proc_cen_framelock.H }
+ puts {> prcd_compile.tcl -O chips/p8/working/procedures/ipl/fapi/proc_cen_framelock.* }
puts {}
puts "Version: $version"
puts {}
@@ -327,6 +328,7 @@ foreach arg $argv {
}
*\.initfile { lappend files $arg }
*\.C { lappend files $arg }
+ *\.c { lappend files $arg }
*\.H { lappend files $arg }
*\.h { lappend files $arg }
*\.xml { lappend files $arg }
@@ -457,6 +459,10 @@ if {[info exists directory]} {
# Generate command to send each input file
##########################################################
foreach filen $files {
+ if {![file exists $filen]} {
+ puts "File not found: $filen "
+ exit
+ }
set file_size [file size $filen]
set filesource($filen) $filen
lappend cmds "$hwp_file_cmd $filen $file_size"
@@ -523,9 +529,12 @@ if {[llength $cmds] > 0 } {
if {[string compare $cmd {quit}] == 0 } {
puts $sockid {quit}
break
- } elseif {[regexp {^:HWP_FILE.* +(.+) +(.+)} $cmd a hwpfilename filesize]} {
- puts $sockid $cmd
- set hwpfile [open $filesource($hwpfilename) r]
+ } elseif {[regexp {^:HWP_FILE*} $cmd a ]} {
+ regexp {^(.+) +(.+) +(.+)} $cmd a hwpcmd filename filesize
+ set basename [file tail $filename]
+ set newcmd "$hwpcmd $basename $filesize"
+ puts $sockid $newcmd
+ set hwpfile [open $filesource($filename) r]
fconfigure $sockid -translation binary
fconfigure $hwpfile -translation binary
fcopy $hwpfile $sockid -size $filesize
OpenPOWER on IntegriCloud