From: Alex Ionescu Date: Wed, 9 Sep 2015 18:43:09 +0000 (+0000) Subject: [EFI] X-Git-Tag: ReactOS-0.4.0~891 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=28b4a595d35bcc2af54c9c6b3714feec1f93d5b8 [EFI] - Add BCD creation. - Add BCD to bootcd, and also to EFISYS.BIN. Verified the BCD is now present on the EFI partition. svn path=/trunk/; revision=69156 --- diff --git a/reactos/boot/CMakeLists.txt b/reactos/boot/CMakeLists.txt index 6f5b5836f9f..c30ddd91ed9 100644 --- a/reactos/boot/CMakeLists.txt +++ b/reactos/boot/CMakeLists.txt @@ -16,7 +16,7 @@ else() endif() add_custom_target(efisys - COMMAND native-fatten ${CMAKE_CURRENT_BINARY_DIR}/efisys.bin -format 2880 EFIBOOT -boot ${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/fat.bin -mkdir EFI -mkdir EFI/BOOT -add $ EFI/BOOT/boot${EFI_PLATFORM_ID}.efi + COMMAND native-fatten ${CMAKE_CURRENT_BINARY_DIR}/efisys.bin -format 2880 EFIBOOT -boot ${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/fat.bin -mkdir EFI -mkdir EFI/BOOT -add $ EFI/BOOT/boot${EFI_PLATFORM_ID}.efi -add ${CMAKE_BINARY_DIR}/boot/bootdata/BCD EFI/BOOT/BCD DEPENDS native-fatten bootmgfw fat VERBATIM) diff --git a/reactos/boot/bootdata/CMakeLists.txt b/reactos/boot/bootdata/CMakeLists.txt index 1966b2e221d..893abea9c83 100644 --- a/reactos/boot/bootdata/CMakeLists.txt +++ b/reactos/boot/bootdata/CMakeLists.txt @@ -10,7 +10,8 @@ add_registry_inf( hivecls.inf hivedef.inf hivesft.inf - hivesys.inf) + hivesys.inf + hivebcd.inf) #regtest diff --git a/reactos/boot/bootdata/hivebcd.inf b/reactos/boot/bootdata/hivebcd.inf new file mode 100644 index 00000000000..42178b20372 --- /dev/null +++ b/reactos/boot/bootdata/hivebcd.inf @@ -0,0 +1,11 @@ +[Version] +Signature = "$ReactOS$" + +[AddReg] + +HKLM,"BCD00000000\Description\Control","System",0x00010003,1 +HKLM,"BCD00000000\Description\Control","TreatAtSystem",0x00010003,1 +HKLM,"BCD00000000\Description\Control","KeyName",2,"BCD00000000" +HKLM,"BCD00000000\Description\Objects",,0x00000012 + +; EOF diff --git a/reactos/cmake/CMakeMacros.cmake b/reactos/cmake/CMakeMacros.cmake index 68ab5a685ac..d1edafa360d 100644 --- a/reactos/cmake/CMakeMacros.cmake +++ b/reactos/cmake/CMakeMacros.cmake @@ -793,6 +793,22 @@ function(create_registry_hives) DESTINATION reactos/system32/config FOR livecd) + # BCD Hive + add_custom_command( + OUTPUT ${CMAKE_BINARY_DIR}/boot/bootdata/BCD + COMMAND native-mkhive ${CMAKE_BINARY_DIR}/boot/bootdata/ ${CMAKE_BINARY_DIR}/boot/bootdata/hivebcd_utf16.inf + DEPENDS native-mkhive ${CMAKE_SOURCE_DIR}/boot/bootdata/hivebcd.inf) + + add_custom_target(bcd_hive + DEPENDS ${CMAKE_BINARY_DIR}/boot/bootdata/BCD) + + add_cd_file( + FILE ${CMAKE_BINARY_DIR}/boot/bootdata/BCD + TARGET bcd_hive + DESTINATION efi/boot + NO_CAB + FOR bootcd regtest livecd) + endfunction() if(KDBG) diff --git a/reactos/tools/mkhive/mkhive.c b/reactos/tools/mkhive/mkhive.c index 3579df7429d..c5ccfe3b177 100644 --- a/reactos/tools/mkhive/mkhive.c +++ b/reactos/tools/mkhive/mkhive.c @@ -143,6 +143,14 @@ int main (int argc, char *argv[]) return 1; } + convert_path (FileName, argv[1]); + strcat (FileName, DIR_SEPARATOR_STRING); + strcat (FileName, "bcd"); + if (!ExportBinaryHive (FileName, &SystemHive)) + { + return 1; + } + RegShutdownRegistry (); printf (" Done.\n");