From 5b5fa693bd94de95f3e23ffc7c486b75da1cc116 Mon Sep 17 00:00:00 2001 From: David Quintana Date: Tue, 8 Sep 2015 15:26:34 +0000 Subject: [PATCH] [EFISYS][BOOTMGFW] * Compute and use a "platform short name" in the EFI filenames. svn path=/trunk/; revision=69119 --- reactos/boot/CMakeLists.txt | 20 ++++++++++++++++++-- reactos/boot/environ/CMakeLists.txt | 2 +- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/reactos/boot/CMakeLists.txt b/reactos/boot/CMakeLists.txt index 2ebc6eaf817..aa03a9958a5 100644 --- a/reactos/boot/CMakeLists.txt +++ b/reactos/boot/CMakeLists.txt @@ -1,7 +1,22 @@ ## efisys.bin +# EFI platform ID, used in environ/CMakelists.txt for bootmgfw filename naming also. +if(ARCH STREQUAL "amd64") + set(EFI_PLATFORM_ID "x64") +elseif(ARCH STREQUAL "i386") + set(EFI_PLATFORM_ID "ia32") +elseif(ARCH STREQUAL "ia64") + set(EFI_PLATFORM_ID "ia64") +elseif(ARCH STREQUAL "arm") + set(EFI_PLATFORM_ID "arm") +elseif(ARCH STREQUAL "aarch64") + set(EFI_PLATFORM_ID "aa64") +else() + message(FATAL_ERROR "Unknown ARCH, can't generate a valid UEFI boot filename.") +endif() + add_custom_target(efisys - COMMAND native-fatten ${CMAKE_CURRENT_BINARY_DIR}/efisys.bin -format 2880 -mkdir efi -mkdir efi/boot -add $ efi/boot/bootia32.efi + COMMAND native-fatten ${CMAKE_CURRENT_BINARY_DIR}/efisys.bin -format 2880 -mkdir EFI -mkdir EFI/BOOT -add $ EFI/BOOT/boot${EFI_PLATFORM_ID}.EFI DEPENDS native-fatten bootmgfw VERBATIM) @@ -10,8 +25,9 @@ add_custom_target(efisys file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/bootcd.lst "") add_custom_target(bootcd +# COMMAND native-cdmake -j -m -bootdata:2\#p0,e,b${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/isoboot.bin\#pEF,e,b${CMAKE_CURRENT_BINARY_DIR}/efisys.bin @${CMAKE_CURRENT_BINARY_DIR}/bootcd.lst REACTOS ${REACTOS_BINARY_DIR}/bootcd.iso COMMAND native-cdmake -j -m -b ${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/isoboot.bin @${CMAKE_CURRENT_BINARY_DIR}/bootcd.lst REACTOS ${REACTOS_BINARY_DIR}/bootcd.iso - DEPENDS native-cdmake + DEPENDS native-cdmake efisys VERBATIM) ##bootcdregtest diff --git a/reactos/boot/environ/CMakeLists.txt b/reactos/boot/environ/CMakeLists.txt index c0f8858f1eb..557bfff0c3c 100644 --- a/reactos/boot/environ/CMakeLists.txt +++ b/reactos/boot/environ/CMakeLists.txt @@ -91,5 +91,5 @@ endif() add_dependencies(bootmgfw asm bugcodes) -add_cd_file(TARGET bootmgfw FILE ${_bootmgfw_output_file} DESTINATION efi/boot NO_CAB FOR bootcd regtest NAME_ON_CD bootia32.efi) +add_cd_file(TARGET bootmgfw FILE ${_bootmgfw_output_file} DESTINATION efi/boot NO_CAB FOR bootcd regtest NAME_ON_CD boot${EFI_PLATFORM_ID}.efi)