diff options
author | Brian Horton <brianh@linux.ibm.com> | 2012-04-16 16:29:40 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-04-20 11:01:56 -0500 |
commit | e05ad05f666ae5b46078f0b02f7c2439eae08f39 (patch) | |
tree | 7a134488dfc109f084b3ebaf4e3c6a913ecce978 /src/build/hwpf | |
parent | beaff423dadb53490f0f3c4dc603c5d8248e3701 (diff) | |
download | talos-hostboot-e05ad05f666ae5b46078f0b02f7c2439eae08f39.tar.gz talos-hostboot-e05ad05f666ae5b46078f0b02f7c2439eae08f39.zip |
fix bugs in prcd_compile tool
update prcd_server.tcl to output better error messages, and messages that
the prcd_compile script will receive and handle properly. update the list
of files that are returned on a build to be all that are in the cpfiles.pl
script. also, clarify help/usage in prcd_compile.tcl output
defect SW135271 "prcd_compile.tcl fails to create the host boot image" was
opened for this.
Change-Id: Ia283c4c54cabd80bc8c4c460f3ef987c37b00a06
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/904
Tested-by: Jenkins Server
Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/build/hwpf')
-rwxr-xr-x | src/build/hwpf/prcd_compile.tcl | 4 | ||||
-rwxr-xr-x | src/build/hwpf/prcd_server.tcl | 26 |
2 files changed, 16 insertions, 14 deletions
diff --git a/src/build/hwpf/prcd_compile.tcl b/src/build/hwpf/prcd_compile.tcl index fa4f8859c..61695a27c 100755 --- a/src/build/hwpf/prcd_compile.tcl +++ b/src/build/hwpf/prcd_compile.tcl @@ -287,7 +287,7 @@ foreach arg $argv { -n { set newfiles 1 } -*h* { puts {prcd_compile.tcl [--help] [-d <drivername>] [-o <ouput dir> ] [-n] <filename> } puts {} - puts {Note this tool only supports *.{c,C,h,H,initfile,xml} files in the following directory trees: } + puts {Note this tool only supports *.{c,C,h,H,initfile,xml} files in the following hostboot directory trees: } puts { src/usr/hwpf/hwp } puts { src/include/usr/hwpf/hwp } puts {} @@ -298,7 +298,7 @@ foreach arg $argv { puts {> prcd_compile.tcl -d b0218a_2012_Sprint9 -o ./output/ proc_cen_framelock.C } puts {> prcd_compile.tcl -d b0218a_2012_Sprint9 -o output dmi_training/proc_cen_framelock/proc_cen_framelock.H } puts {} - puts {Without the -n parameter, the file are assumed to be existing files in the hostboot sandbox.} + puts {Without the -n parameter, the file MUST be existing files in the hostboot sandbox.} puts {If they are not found in the sandbox, an error will be returned.} puts {} puts {On success, files from the img/ directory (*.bin *.syms and hbotStringFile) } diff --git a/src/build/hwpf/prcd_server.tcl b/src/build/hwpf/prcd_server.tcl index c3249691a..e62a0ba85 100755 --- a/src/build/hwpf/prcd_server.tcl +++ b/src/build/hwpf/prcd_server.tcl @@ -97,8 +97,8 @@ proc AquireData { sock } { # Make sure sandbox dir exists if {[catch {file mkdir "$sb_dir/$sbname($sock)"} res ] } { - puts $sock "ERROR: Could not extract code\n" - puts $log "$sock: Could not extract code\n)" + puts $sock "ERROR: sandbox mkdir failed\n" + puts $log "$sock: sandbox mkdir failed\n)" CloseOut $sock } else { set git_sh($sock) [open "|bash" r+] @@ -438,7 +438,7 @@ proc SendSandbox { sock git_sh} { if { [string compare $sandbox($sbname($sock)) "crashed"] == 0 } { if { [catch {close $git_sh} res]} { puts $sock "Fail: $res\n" - puts $log "$sock: Fail: $res\n" + puts $log "$sock: Fail: $res\n" } set sandbox($sbname($sock)) idle } else { @@ -516,7 +516,7 @@ proc SendSandboxNew { sock git_sh} { # client. Note: Everything from stderr gets returned ################################################################## -set explist [list {ERROR:.*} {^IfScrub..E>.*} {^Parse Error.*} ] +set explist [list {^make.*Error.*} {ERROR:.*} {error:.*} {^IfScrub..E>.*} {^Parse Error.*} {^Error.*} ] ################################################################## ## This event catches the output of the sandbox when the pipe become readable @@ -533,8 +533,8 @@ proc IfResult { git_sh sock sbname_sock } { puts $log "$sock: compile unexpectedly terminated. sandbox $sbname_sock" if { [catch {close $git_sh} res] } { - puts $sock "Error is $res\n" - puts $log "$sock: Error is $res\n" + puts $sock "error is $res\n" + puts $log "$sock: error is $res\n" } set sandbox($sbname_sock) "idle" } else { @@ -551,9 +551,11 @@ proc IfResult { git_sh sock sbname_sock } { set rlines [split $res "\n"] foreach rline $rlines { # weed out the errors from mk - if {[regexp {.*error.*} $rline ->] } { - puts $sock "$rline - ERROR" - puts $log "$sock: $rline" + foreach exp $explist { + if {[regexp $exp $rline a] } { + puts $sock "error: $rline" + puts $log "$sock: error: $rline" + } } } } @@ -566,8 +568,8 @@ proc IfResult { git_sh sock sbname_sock } { } else { foreach exp $explist { if {[regexp $exp $line a]} { - puts $sock $line - puts $log "$sock: $line" + puts $sock "error: $line" + puts $log "$sock: error: $line" } } } @@ -586,7 +588,7 @@ proc SendObjFiles { sock obj_dir } { set hbi_files {} # Send the image files - if {[catch {set hbi_files [glob -dir $obj_dir simics*.bin vbu*bin hbicore*.bin *.syms hbotStringFile]} res]} { + if {[catch {set hbi_files [glob -dir $obj_dir hbi*syms hbi*bin hbi*list hbi*modinfo *pnor *dat hbotStringFile errlparser isteplist.csv]} res]} { puts $sock "ERROR: Needed image files not found in $obj_dir" puts $log "$sock: Needed image files not found in $obj_dir" } else { |