Skip to content

Commit

Permalink
Fix BPM script to put temp files into obj tree
Browse files Browse the repository at this point in the history
Depending on where the input files and scripts live and if we are
compiling in a backing build or a sandbox, the temporary (.crc)
files can sometimes be created inside a readonly tree.  This change
will place the temp files in the same (writeable) output directory
as the final binary images.

Change-Id: Ib5e6ed5ffeb825d46681eda89d93311931365663
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/81787
Reviewed-by: Matthew Raybuck <matthew.raybuck@ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com>
  • Loading branch information
dcrowell77 committed Aug 7, 2019
1 parent 256d3e0 commit b4b84d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/build/buildpnor/buildBpmFlashImages.pl
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ sub generateFirmwareImage
my ($i_fileName, $i_outputDir) = @_;
my $this_func = (caller(0))[3];

my $intermediateFileName = generateIntermediateImage($i_fileName);
my $intermediateFileName = generateIntermediateImage($i_fileName,$i_outputDir);

open my $inputFileHandle, '<:encoding(UTF-8)', $intermediateFileName
or die "Failed to open $intermediateFileName";
Expand Down Expand Up @@ -745,15 +745,15 @@ sub generateOutputNameAndVersion
################################################################################
sub generateIntermediateImage
{
my $i_fileName = shift;
my ($i_fileName, $i_outputDir) = @_;

# Parse the file name into its filename, path, and suffix.
my ($name, $path, $suffix) = fileparse($i_fileName, ".txt");

# Parse the file name into its filename, path, and suffix.
my ($utilName, $utilPath, $utilSuffix) = fileparse($bpmUtilScript, ".txt");

my $intermediateFileName = $utilPath . $name . ".crc";
my $intermediateFileName = $i_outputDir . $name . ".crc";

# Call the python script which will insert the CRC
my $pythonReturn = system($bpmUtilScript,
Expand Down

0 comments on commit b4b84d1

Please sign in to comment.