mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +00:00
Meta+LibEDID: Download and generate the PNP ID database
This downloads the UEFI's published PNP ID database and generates a lookup table for use in LibEDID. The lookup table isn't optimized at all, but this can be easily done at a later point if needed.
This commit is contained in:
parent
ab1075e296
commit
869c20b05d
8 changed files with 359 additions and 0 deletions
31
Meta/CMake/pnp_ids.cmake
Normal file
31
Meta/CMake/pnp_ids.cmake
Normal file
|
@ -0,0 +1,31 @@
|
|||
include(${CMAKE_CURRENT_LIST_DIR}/utils.cmake)
|
||||
|
||||
set(PNP_IDS_FILE pnp.ids)
|
||||
set(PNP_IDS_URL http://www.uefi.org/uefi-pnp-export)
|
||||
set(PNP_IDS_EXPORT_PATH ${CMAKE_BINARY_DIR}/pnp.ids.html)
|
||||
set(PNP_IDS_INSTALL_PATH ${CMAKE_INSTALL_DATAROOTDIR}/${PNP_IDS_FILE})
|
||||
|
||||
if(ENABLE_PNP_IDS_DOWNLOAD AND NOT EXISTS ${PNP_IDS_PATH})
|
||||
message(STATUS "Downloading PNP ID database from ${PNP_IDS_URL}...")
|
||||
file(MAKE_DIRECTORY ${CMAKE_INSTALL_DATAROOTDIR})
|
||||
file(DOWNLOAD ${PNP_IDS_URL} ${PNP_IDS_EXPORT_PATH} INACTIVITY_TIMEOUT 10)
|
||||
|
||||
set(PNP_IDS_HEADER LibEDID/PnpIDs.h)
|
||||
set(PNP_IDS_IMPLEMENTATION LibEDID/PnpIDs.cpp)
|
||||
set(PNP_IDS_TARGET_PREFIX LibEDID_)
|
||||
|
||||
invoke_generator(
|
||||
"PnpIDsData"
|
||||
Lagom::GeneratePnpIDsData
|
||||
"${PNP_IDS_EXPORT_PATH}"
|
||||
"${PNP_IDS_TARGET_PREFIX}"
|
||||
"${PNP_IDS_HEADER}"
|
||||
"${PNP_IDS_IMPLEMENTATION}"
|
||||
arguments -p "${PNP_IDS_EXPORT_PATH}"
|
||||
)
|
||||
|
||||
set(PNP_IDS_SOURCES
|
||||
${PNP_IDS_HEADER}
|
||||
${PNP_IDS_IMPLEMENTATION}
|
||||
)
|
||||
endif()
|
|
@ -6,6 +6,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/common_options.cmake)
|
|||
|
||||
serenity_option(ENABLE_PCI_IDS_DOWNLOAD ON CACHE BOOL "Enable download of the pci.ids database at build time")
|
||||
serenity_option(ENABLE_USB_IDS_DOWNLOAD ON CACHE BOOL "Enable download of the usb.ids database at build time")
|
||||
serenity_option(ENABLE_PNP_IDS_DOWNLOAD ON CACHE BOOL "Enable download of the pnp.ids database at build time")
|
||||
serenity_option(ENABLE_KERNEL_ADDRESS_SANITIZER OFF CACHE BOOL "Enable kernel address sanitizer testing in gcc/clang")
|
||||
serenity_option(ENABLE_KERNEL_COVERAGE_COLLECTION OFF CACHE BOOL "Enable KCOV and kernel coverage instrumentation in gcc/clang")
|
||||
serenity_option(ENABLE_KERNEL_LTO OFF CACHE BOOL "Build the kernel with link-time optimization")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue