cmake: add support for cd-rom booting via Bochs
This commit is contained in:
18
arch/x86_64/Bochs.cmake
Normal file
18
arch/x86_64/Bochs.cmake
Normal file
@@ -0,0 +1,18 @@
|
||||
find_program(BOCHS bochs)
|
||||
|
||||
if (NOT BOCHS)
|
||||
message(STATUS "Bochs: cannot find bochs")
|
||||
return()
|
||||
endif ()
|
||||
|
||||
if (NOT TARGET cdrom)
|
||||
message(STATUS "Bochs: CD-ROM image creation is unavailable. Cannot use bochs")
|
||||
return()
|
||||
endif ()
|
||||
|
||||
message(STATUS "Bochs: Enable CD-ROM boot")
|
||||
add_custom_target(run-cdrom-bochs
|
||||
COMMAND ${BOCHS} -q -f ${CMAKE_SOURCE_DIR}/arch/${CMAKE_SYSTEM_PROCESSOR}/bochsrc.bxrc
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
USES_TERMINAL
|
||||
DEPENDS cdrom)
|
||||
Reference in New Issue
Block a user