BeagleBoardPkg: The FDF file does not reserve any more the area for the OMAP35xxx header

It is the tool BeagleBoardPkg/Tools/generate_image which will add a CH header to a the
BeagleBoard FD file.

The build macro EDK2_SECOND_STAGE_BOOTOLADER is not required any more.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12433 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
oliviermartin 2011-09-22 23:25:39 +00:00
parent 3d15d6c424
commit 0641c5405c
4 changed files with 9 additions and 32 deletions

View File

@ -48,14 +48,7 @@ NumBlocks = 0x80000
# RegionType <FV, DATA, or FILE> # RegionType <FV, DATA, or FILE>
# #
################################################################################ ################################################################################
!if $(EDK2_SECOND_STAGE_BOOTOLADER) == 1
0x00000000|0x00080000 0x00000000|0x00080000
!else
# 512 bytes of configuration header & 8 bytes of image header
0x00000000|0x00000208
0x00000208|0x0007FDF8
!endif
gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvBaseSize gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvBaseSize
FV = FVMAIN_COMPACT FV = FVMAIN_COMPACT
@ -182,7 +175,6 @@ READ_LOCK_STATUS = TRUE
INF ArmPlatformPkg/Bds/Bds.inf INF ArmPlatformPkg/Bds/Bds.inf
[FV.FVMAIN_COMPACT] [FV.FVMAIN_COMPACT]
FvAlignment = 8 FvAlignment = 8
ERASE_POLARITY = 1 ERASE_POLARITY = 1

View File

@ -27,7 +27,6 @@
[FD.BeagleBoard_EFI] [FD.BeagleBoard_EFI]
####BaseAddress = 0x80208000|gEmbeddedTokenSpaceGuid.PcdEmbeddedFdBaseAddress #The base address of the FLASH Device.
BaseAddress = 0x80008000|gEmbeddedTokenSpaceGuid.PcdEmbeddedFdBaseAddress #The base address of the FLASH Device. BaseAddress = 0x80008000|gEmbeddedTokenSpaceGuid.PcdEmbeddedFdBaseAddress #The base address of the FLASH Device.
Size = 0x00080000|gEmbeddedTokenSpaceGuid.PcdEmbeddedFdSize #The size in bytes of the FLASH Device Size = 0x00080000|gEmbeddedTokenSpaceGuid.PcdEmbeddedFdSize #The size in bytes of the FLASH Device
ErasePolarity = 1 ErasePolarity = 1
@ -49,15 +48,8 @@ NumBlocks = 0x80000
# RegionType <FV, DATA, or FILE> # RegionType <FV, DATA, or FILE>
# #
################################################################################ ################################################################################
!if $(EDK2_SECOND_STAGE_BOOTOLADER) == 1
0x00000000|0x00080000 0x00000000|0x00080000
!else gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvBaseSize
# 512 bytes of configuration header & 8 bytes of image header
0x00000000|0x00000208
0x00000208|0x0007FDF8
!endif
gEmbeddedTokenSpaceGuid.PcdFlashFvMainBase|gEmbeddedTokenSpaceGuid.PcdFlashFvMainSize
FV = FVMAIN_COMPACT FV = FVMAIN_COMPACT
################################################################################ ################################################################################

View File

@ -316,7 +316,6 @@ ConstructImage (
FILE *InputFile; FILE *InputFile;
FILE *OutputFile; FILE *OutputFile;
unsigned int InputImageFileSize; unsigned int InputImageFileSize;
unsigned int NewImageFileSize;
struct stat FileStat; struct stat FileStat;
char Ch; char Ch;
unsigned int i; unsigned int i;
@ -327,31 +326,25 @@ ConstructImage (
exit(0); exit(0);
} }
//Get the size of the input image. // Get the size of the input image.
fstat(fileno(InputFile), &FileStat); fstat(fileno(InputFile), &FileStat);
InputImageFileSize = FileStat.st_size; InputImageFileSize = FileStat.st_size;
//Calculate new file size
NewImageFileSize = InputImageFileSize - 520;
OutputFile = fopen(gOutputImageFile, "wb"); OutputFile = fopen(gOutputImageFile, "wb");
if (OutputFile == NULL) { if (OutputFile == NULL) {
fprintf(stderr, "Can't open output file %s.\n", gOutputImageFile); fprintf(stderr, "Can't open output file %s.\n", gOutputImageFile);
exit(0); exit(0);
} }
//Write Configuration header // Write Configuration header
fwrite(gConfigurationHeader, 1, sizeof(gConfigurationHeader), OutputFile); fwrite(gConfigurationHeader, 1, sizeof(gConfigurationHeader), OutputFile);
//Write image header (Input image size, execution address) // Write image header (Input image size, execution address)
fwrite(&NewImageFileSize, 1, 4, OutputFile); fwrite(&InputImageFileSize, 1, 4, OutputFile);
fwrite(&gImageExecutionAddress, 1, 4, OutputFile); fwrite(&gImageExecutionAddress, 1, 4, OutputFile);
//Skip first 0x207 bytes // Copy input image to the output file.
fseek(InputFile, 520, SEEK_SET); for (i = 0; i < InputImageFileSize; i++) {
//Copy input image to the output file.
for (i = 0; i < NewImageFileSize; i++) {
fread(&Ch, 1, 1, InputFile); fread(&Ch, 1, 1, InputFile);
fwrite(&Ch, 1, 1, OutputFile); fwrite(&Ch, 1, 1, OutputFile);
} }

View File

@ -132,12 +132,12 @@ rm -f $FLASH_BOOT
# #
# Ram starts at 0x80000000 # Ram starts at 0x80000000
# OMAP 3530 TRM defines 0x80008208 as the entry point # OMAP 3530 TRM defines 0x80008000 as the entry point
# The reset vector is caught by the mask ROM in the OMAP 3530 so that is why this entry # The reset vector is caught by the mask ROM in the OMAP 3530 so that is why this entry
# point looks so strange. # point looks so strange.
# OMAP 3430 TRM section 26.4.8 has Image header information. (missing in OMAP 3530 TRM) # OMAP 3430 TRM section 26.4.8 has Image header information. (missing in OMAP 3530 TRM)
# #
$GENERATE_IMAGE -D $WORKSPACE/BeagleBoardPkg/ConfigurationHeader.dat -E 0x80008208 -I $BUILD_ROOT/FV/BEAGLEBOARD_EFI.fd -O $FLASH_BOOT $GENERATE_IMAGE -D $WORKSPACE/BeagleBoardPkg/ConfigurationHeader.dat -E 0x80008000 -I $BUILD_ROOT/FV/BEAGLEBOARD_EFI.fd -O $FLASH_BOOT
echo Creating debugger scripts echo Creating debugger scripts
process_debug_scripts $WORKSPACE/BeagleBoardPkg/Debugger_scripts process_debug_scripts $WORKSPACE/BeagleBoardPkg/Debugger_scripts