Author: hbelusca
Date: Sun Jan 18 13:55:23 2015
New Revision: 66051
URL:
http://svn.reactos.org/svn/reactos?rev=66051&view=rev
Log:
[REACTOS]
Add basic Hybrid-CD generation to our build system.
Few changes were needed, especially in how we deal with the CD target "all":
it's only for all the CD targets *BUT* the hybridcd. For the hybridcd you need to
always specify the target manually (like in "... FOR all hybridcd" or "...
FOR bootcd hybridcd" for example).
Since at the moment we cannot have the bootcd in RAMDISK, and I want to be able to either
have the hybridcd booting livecd from within the CD (i.e. read/writes from the CD) or in
RAMDISK, I need to also add the files that are going to be copied into the bootcd or
livecd into the hybridcd.
CORE-9069 #resolve
Added:
trunk/reactos/boot/bootdata/hybridcd.ini (with props)
Modified:
trunk/reactos/boot/CMakeLists.txt
trunk/reactos/boot/bootdata/CMakeLists.txt
trunk/reactos/boot/freeldr/bootsect/CMakeLists.txt
trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt
trunk/reactos/cmake/CMakeMacros.cmake
Modified: trunk/reactos/boot/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/CMakeLists.txt?rev=66…
==============================================================================
--- trunk/reactos/boot/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/boot/CMakeLists.txt [iso-8859-1] Sun Jan 18 13:55:23 2015
@@ -25,5 +25,14 @@
DEPENDS native-cdmake
VERBATIM)
+##hybridcd
+#clear it out
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/hybridcd.lst "")
+
+add_custom_target(hybridcd
+ COMMAND native-cdmake -j -m -b
${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/isoboot.bin
@${CMAKE_CURRENT_BINARY_DIR}/hybridcd.lst REACTOS ${REACTOS_BINARY_DIR}/hybridcd.iso
+ DEPENDS native-cdmake livecd
+ VERBATIM)
+
add_subdirectory(freeldr)
add_subdirectory(bootdata)
Modified: trunk/reactos/boot/bootdata/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/CMakeLists.t…
==============================================================================
--- trunk/reactos/boot/bootdata/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/boot/bootdata/CMakeLists.txt [iso-8859-1] Sun Jan 18 13:55:23 2015
@@ -63,13 +63,13 @@
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/bootcdregtest/regtest.cmd DESTINATION
reactos/bin FOR all)
#autorun.inf
-add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/autorun.inf DESTINATION root NO_CAB FOR
all)
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/autorun.inf DESTINATION root NO_CAB FOR all
hybridcd)
#icon.ico
-add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/icon.ico DESTINATION root NO_CAB FOR all)
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/icon.ico DESTINATION root NO_CAB FOR all
hybridcd)
#readme.txt
-add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/readme.txt DESTINATION root NO_CAB FOR all)
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/readme.txt DESTINATION root NO_CAB FOR all
hybridcd)
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/readme.txt DESTINATION reactos FOR all)
#system.ini
@@ -78,6 +78,7 @@
#freeldr.ini
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/bootcd.ini DESTINATION root NO_CAB
NAME_ON_CD freeldr.ini FOR bootcd regtest)
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/livecd.ini DESTINATION root NAME_ON_CD
freeldr.ini FOR livecd)
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/hybridcd.ini DESTINATION root NAME_ON_CD
freeldr.ini FOR hybridcd)
#unattend
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/bootcdregtest/unattend.inf DESTINATION
reactos NO_CAB FOR regtest)
Added: trunk/reactos/boot/bootdata/hybridcd.ini
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hybridcd.ini…
==============================================================================
--- trunk/reactos/boot/bootdata/hybridcd.ini (added)
+++ trunk/reactos/boot/bootdata/hybridcd.ini [iso-8859-1] Sun Jan 18 13:55:23 2015
@@ -0,0 +1,74 @@
+[FREELOADER]
+DefaultOS=Setup
+TimeOut=5
+
+[Display]
+TitleText=ReactOS Hybrid-CD
+StatusBarColor=Cyan
+StatusBarTextColor=Black
+BackdropTextColor=White
+BackdropColor=Blue
+BackdropFillStyle=Medium
+TitleBoxTextColor=White
+TitleBoxColor=Red
+MessageBoxTextColor=White
+MessageBoxColor=Blue
+MenuTextColor=Gray
+MenuColor=Black
+TextColor=Gray
+SelectedTextColor=Black
+SelectedColor=Gray
+ShowTime=No
+MenuBox=No
+CenterMenu=No
+MinimalUI=Yes
+TimeText=Seconds until highlighted choice will be started automatically:
+
+[Operating Systems]
+Setup="Setup"
+LiveCD="LiveCD"
+LiveCD_Debug="LiveCD (Debug)"
+LiveCD_Screen="LiveCD (Screen)"
+LiveCD_LogFile="LiveCD (Log file)"
+LiveCD_RamDisk="LiveCD in RAM"
+LiveCD_RamDisk_Debug="LiveCD in RAM (Debug)"
+LiveCD_RamDisk_Screen="LiveCD in RAM (Screen)"
+
+[Setup]
+BootType=ReactOSSetup
+SystemPath=\bootcd
+
+[LiveCD]
+BootType=Windows2003
+SystemPath=\livecd\reactos
+Options=/MININT
+
+[LiveCD_Debug]
+BootType=Windows2003
+SystemPath=\livecd\reactos
+Options=/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /MININT
+
+[LiveCD_Screen]
+BootType=Windows2003
+SystemPath=\livecd\reactos
+Options=/DEBUG /DEBUGPORT=SCREEN /SOS /MININT
+
+[LiveCD_LogFile]
+BootType=Windows2003
+SystemPath=\livecd\reactos
+Options=/DEBUG /DEBUGPORT=FILE:\Device\HarddiskX\PartitionY\debug.log /SOS /MININT
+
+[LiveCD_RamDisk]
+BootType=Windows2003
+SystemPath=ramdisk(0)\reactos
+Options=/MININT /RDPATH=livecd.iso /RDEXPORTASCD
+
+[LiveCD_RamDisk_Debug]
+BootType=Windows2003
+SystemPath=ramdisk(0)\reactos
+Options=/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /MININT /RDPATH=livecd.iso
/RDEXPORTASCD
+
+[LiveCD_RamDisk_Screen]
+BootType=Windows2003
+SystemPath=ramdisk(0)\reactos
+Options=/DEBUG /DEBUGPORT=SCREEN /SOS /MININT /RDPATH=livecd.iso /RDEXPORTASCD
Propchange: trunk/reactos/boot/bootdata/hybridcd.ini
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/boot/freeldr/bootsect/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/bootsect/CMak…
==============================================================================
--- trunk/reactos/boot/freeldr/bootsect/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/bootsect/CMakeLists.txt [iso-8859-1] Sun Jan 18 13:55:23
2015
@@ -11,7 +11,7 @@
add_cd_file(TARGET dosmbr DESTINATION loader NO_CAB FILE
${CMAKE_CURRENT_BINARY_DIR}/dosmbr.bin FOR all)
add_cd_file(TARGET fat32 DESTINATION loader NO_CAB FILE
${CMAKE_CURRENT_BINARY_DIR}/fat32.bin FOR all)
add_cd_file(TARGET fat DESTINATION loader NO_CAB FILE
${CMAKE_CURRENT_BINARY_DIR}/fat.bin FOR all)
- add_cd_file(TARGET isoboot DESTINATION loader NO_CAB FILE
${CMAKE_CURRENT_BINARY_DIR}/isoboot.bin FOR all)
+ add_cd_file(TARGET isoboot DESTINATION loader NO_CAB FILE
${CMAKE_CURRENT_BINARY_DIR}/isoboot.bin FOR all hybridcd)
add_cd_file(TARGET isobtrt DESTINATION loader NO_CAB FILE
${CMAKE_CURRENT_BINARY_DIR}/isobtrt.bin FOR all)
add_cd_file(TARGET ext2 DESTINATION loader NO_CAB FILE
${CMAKE_CURRENT_BINARY_DIR}/ext2.bin FOR all)
Modified: trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/CMake…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt [iso-8859-1] Sun Jan 18 13:55:23
2015
@@ -236,7 +236,7 @@
# rename freeldr on livecd to setupldr.sys because isoboot.bin looks for setupldr.sys
add_cd_file(TARGET freeldr FILE ${CMAKE_CURRENT_BINARY_DIR}/freeldr.sys DESTINATION
loader NO_CAB FOR bootcd regtest)
-add_cd_file(TARGET freeldr FILE ${CMAKE_CURRENT_BINARY_DIR}/freeldr.sys DESTINATION
loader NO_CAB FOR livecd NAME_ON_CD setupldr.sys)
+add_cd_file(TARGET freeldr FILE ${CMAKE_CURRENT_BINARY_DIR}/freeldr.sys DESTINATION
loader NO_CAB FOR livecd hybridcd NAME_ON_CD setupldr.sys)
concatenate_files(
${CMAKE_CURRENT_BINARY_DIR}/frldr16.bin
Modified: trunk/reactos/cmake/CMakeMacros.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/CMakeMacros.cmake?re…
==============================================================================
--- trunk/reactos/cmake/CMakeMacros.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/CMakeMacros.cmake [iso-8859-1] Sun Jan 18 13:55:23 2015
@@ -286,8 +286,10 @@
endif()
#do we add it to all CDs?
- if(_CD_FOR STREQUAL all)
- set(_CD_FOR "bootcd;livecd;regtest")
+ list(FIND _CD_FOR all __cd)
+ if(NOT __cd EQUAL -1)
+ list(REMOVE_AT _CD_FOR __cd)
+ list(INSERT _CD_FOR __cd "bootcd;livecd;regtest")
endif()
#do we add it to bootcd?
@@ -304,6 +306,8 @@
get_filename_component(__file ${item} NAME)
endif()
set_property(GLOBAL APPEND PROPERTY BOOTCD_FILE_LIST
"${_CD_DESTINATION}/${__file}=${item}")
+ #add it also into the hybridcd
+ set_property(GLOBAL APPEND PROPERTY HYBRIDCD_FILE_LIST
"bootcd/${_CD_DESTINATION}/${__file}=${item}")
endforeach()
if(_CD_TARGET)
#manage dependency
@@ -339,8 +343,24 @@
get_filename_component(__file ${item} NAME)
endif()
set_property(GLOBAL APPEND PROPERTY LIVECD_FILE_LIST
"${_CD_DESTINATION}/${__file}=${item}")
+ #add it also into the hybridcd
+ set_property(GLOBAL APPEND PROPERTY HYBRIDCD_FILE_LIST
"livecd/${_CD_DESTINATION}/${__file}=${item}")
endforeach()
endif() #end livecd
+
+ #do we need also to add it to hybridcd?
+ list(FIND _CD_FOR hybridcd __cd)
+ if(NOT __cd EQUAL -1)
+ foreach(item ${_CD_FILE})
+ if(_CD_NAME_ON_CD)
+ #rename it in the cd tree
+ set(__file ${_CD_NAME_ON_CD})
+ else()
+ get_filename_component(__file ${item} NAME)
+ endif()
+ set_property(GLOBAL APPEND PROPERTY HYBRIDCD_FILE_LIST
"${_CD_DESTINATION}/${__file}=${item}")
+ endforeach()
+ endif() #end hybridcd
#do we add it to regtest?
list(FIND _CD_FOR regtest __cd)
@@ -397,6 +417,11 @@
DESTINATION reactos
NO_CAB FOR bootcd regtest)
+ add_cd_file(
+ FILE ${CMAKE_CURRENT_BINARY_DIR}/livecd.iso
+ DESTINATION root
+ FOR hybridcd)
+
get_property(_filelist GLOBAL PROPERTY BOOTCD_FILE_LIST)
string(REPLACE ";" "\n" _filelist "${_filelist}")
file(APPEND ${REACTOS_BINARY_DIR}/boot/bootcd.lst "${_filelist}")
@@ -405,6 +430,11 @@
get_property(_filelist GLOBAL PROPERTY LIVECD_FILE_LIST)
string(REPLACE ";" "\n" _filelist "${_filelist}")
file(APPEND ${REACTOS_BINARY_DIR}/boot/livecd.lst "${_filelist}")
+ unset(_filelist)
+
+ get_property(_filelist GLOBAL PROPERTY HYBRIDCD_FILE_LIST)
+ string(REPLACE ";" "\n" _filelist "${_filelist}")
+ file(APPEND ${REACTOS_BINARY_DIR}/boot/hybridcd.lst "${_filelist}")
unset(_filelist)
get_property(_filelist GLOBAL PROPERTY BOOTCDREGTEST_FILE_LIST)