Work continues.
This commit is contained in:
parent
12b6e30fd0
commit
781d22291d
21 changed files with 692 additions and 66 deletions
|
@ -62,7 +62,7 @@
|
|||
OPENVPN_SUPPORT="no"
|
||||
|
||||
# build and install WireGuard support (yes / no)
|
||||
WIREGUARD_SUPPORT="no"
|
||||
WIREGUARD_SUPPORT="yes"
|
||||
|
||||
# build and install diskmounter support (udevil)
|
||||
# this service provide auto mounting support for external drives in the
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2020-present Fewtarius
|
||||
|
||||
PKG_NAME="vulkan-headers"
|
||||
PKG_VERSION="ec2db85225ab410bc6829251bef6c578aaed5868"
|
||||
#PKG_SHA256=""
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="apache-2.0"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_SITE="https://github.com/KhronosGroup/Vulkan-Headers"
|
||||
PKG_URL="${PKG_SITE}/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_LONGDESC="Vulkan header files and API registry"
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2020-present Fewtarius
|
||||
|
||||
PKG_NAME="vulkan-loader"
|
||||
PKG_VERSION="6fcd515be5b305d9a68ba94b911f84c76a30887e"
|
||||
#PKG_SHA256=""
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="apache-2.0"
|
||||
PKG_DEPENDS_TARGET="toolchain vulkan-headers"
|
||||
PKG_SITE="https://github.com/KhronosGroup/Vulkan-Loader"
|
||||
PKG_URL="${PKG_SITE}/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_LONGDESC="Khronos official Vulkan ICD desktop loader for Windows, Linux, and MacOS."
|
||||
|
||||
PKG_CMAKE_OPTS_TARGET="-DBUILD_WSI_XCB_SUPPORT=OFF \
|
||||
-DBUILD_WSI_XLIB_SUPPORT=OFF \
|
||||
-DBUILD_WSI_WAYLAND_SUPPORT=OFF"
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2020-present Fewtarius
|
||||
|
||||
PKG_NAME="vulkan-tools"
|
||||
PKG_VERSION="a03938051ff67dac3e13dd011238fccc529e1fa5"
|
||||
#PKG_SHA256=""
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="apache-2.0"
|
||||
PKG_DEPENDS_TARGET="toolchain vulkan-headers"
|
||||
PKG_SITE="https://github.com/KhronosGroup/Vulkan-Tools"
|
||||
PKG_URL="${PKG_SITE}/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_LONGDESC="Khronos official Vulkan Tools and Utilities for Windows, Linux, Android, and MacOS."
|
||||
|
||||
PKG_CMAKE_OPTS_TARGET="-DBUILD_WSI_XCB_SUPPORT=OFF \
|
||||
-DBUILD_WSI_XLIB_SUPPORT=OFF \
|
||||
-DBUILD_WSI_WAYLAND_SUPPORT=OFF \
|
||||
-DBUILD_CUBE=OFF"
|
||||
|
33
packages/graphics/vulkan/glslang/package.mk
Normal file
33
packages/graphics/vulkan/glslang/package.mk
Normal file
|
@ -0,0 +1,33 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2021-present Frank Hartung (supervisedthinking (@) gmail.com)
|
||||
# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="glslang"
|
||||
# The SPIRV-Tools & SPIRV-Headers have to be specific versions matching the pkg version
|
||||
# https://raw.githubusercontent.com/KhronosGroup/glslang/${PKG_VERSION}/known_good.json
|
||||
# if you update glslang make sure spirv-tools & spirv-headers versions a known good
|
||||
PKG_VERSION="11.10.0"
|
||||
PKG_SHA256="8ffc19c435232d09299dd2c91e247292b3508c1b826a3497c60682e4bbf2d602"
|
||||
PKG_LICENSE="Apache-2.0"
|
||||
PKG_SITE="https://github.com/KhronosGroup/glslang"
|
||||
PKG_URL="https://github.com/KhronosGroup/glslang/archive/${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_HOST="toolchain:host Python3:host spirv-tools:host spirv-headers:host"
|
||||
PKG_LONGDESC="Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator."
|
||||
|
||||
pre_configure_host() {
|
||||
PKG_CMAKE_OPTS_HOST="-DBUILD_SHARED_LIBS=OFF \
|
||||
-DBUILD_EXTERNAL=ON \
|
||||
-DENABLE_SPVREMAPPER=OFF \
|
||||
-DENABLE_GLSLANG_JS=OFF \
|
||||
-DENABLE_RTTI=OFF \
|
||||
-DENABLE_EXCEPTIONS=OFF \
|
||||
-DENABLE_OPT=ON \
|
||||
-DENABLE_PCH=ON \
|
||||
-DENABLE_CTEST=OFF \
|
||||
-DENABLE_RTTI=OFF \
|
||||
-Wno-dev"
|
||||
|
||||
mkdir -p ${PKG_BUILD}/External/spirv-tools/external/spirv-headers
|
||||
cp -R $(get_build_dir spirv-tools)/* ${PKG_BUILD}/External/spirv-tools
|
||||
cp -R $(get_build_dir spirv-headers)/* ${PKG_BUILD}/External/spirv-tools/external/spirv-headers
|
||||
}
|
16
packages/graphics/vulkan/spirv-headers/package.mk
Normal file
16
packages/graphics/vulkan/spirv-headers/package.mk
Normal file
|
@ -0,0 +1,16 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2021-present Frank Hartung (supervisedthinking (@) gmail.com)
|
||||
# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="spirv-headers"
|
||||
# The SPIRV-Headers have to be specific versions matching the glslang pkg version
|
||||
# https://github.com/KhronosGroup/glslang/blob/11.10.0/known_good.json
|
||||
# if you update glslang make sure spirv-tools & spirv-headers versions a known good
|
||||
PKG_VERSION="5a121866927a16ab9d49bed4788b532c7fcea766"
|
||||
PKG_SHA256="ec8ecb471a62672697846c436501638ab25447ae9d4a6761e0bfe8a9a839502a"
|
||||
PKG_LICENSE="Apache-2.0"
|
||||
PKG_SITE="https://github.com/KhronosGroup/SPIRV-headers"
|
||||
PKG_URL="https://github.com/KhronosGroup/SPIRV-headers/archive/${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_HOST=""
|
||||
PKG_LONGDESC="SPIRV-Headers"
|
||||
PKG_TOOLCHAIN="manual"
|
16
packages/graphics/vulkan/spirv-tools/package.mk
Normal file
16
packages/graphics/vulkan/spirv-tools/package.mk
Normal file
|
@ -0,0 +1,16 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2021-present Frank Hartung (supervisedthinking (@) gmail.com)
|
||||
# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="spirv-tools"
|
||||
# The SPIRV-Tools have to be specific versions matching the glslang pkg version
|
||||
# https://github.com/KhronosGroup/glslang/blob/11.10.0/known_good.json
|
||||
# if you update glslang make sure spirv-tools & spirv-headers versions a known good
|
||||
PKG_VERSION="b930e734ea198b7aabbbf04ee1562cf6f57962f0"
|
||||
PKG_SHA256="9cddc845f99d7daa65940ff9deb6754cd71b67987ec9860bb0ef2af8a8732c84"
|
||||
PKG_LICENSE="Apache-2.0"
|
||||
PKG_SITE="https://github.com/KhronosGroup/SPIRV-Tools"
|
||||
PKG_URL="https://github.com/KhronosGroup/SPIRV-Tools/archive/${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_HOST=""
|
||||
PKG_LONGDESC="The SPIR-V Tools project provides an API and commands for processing SPIR-V modules."
|
||||
PKG_TOOLCHAIN="manual"
|
27
packages/graphics/vulkan/vkmark/package.mk
Normal file
27
packages/graphics/vulkan/vkmark/package.mk
Normal file
|
@ -0,0 +1,27 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="vkmark"
|
||||
PKG_VERSION="d872846e2e7c47010c11227eb713d00ccfdd35c6"
|
||||
PKG_SHA256="3b03785c9952d5f1ebad6c08349d8697814ad6724f81c05891afabb59f54bf22"
|
||||
PKG_LICENSE="LGPL-2.1-or-later"
|
||||
PKG_SITE="https://github.com/vkmark/vkmark"
|
||||
PKG_URL="https://github.com/vkmark/vkmark/archive/${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain glm assimp vulkan-loader"
|
||||
PKG_LONGDESC="Vulkan benchmark"
|
||||
PKG_BUILD_FLAGS="-parallel +speed"
|
||||
|
||||
case ${DISPLAYSERVER} in
|
||||
wl)
|
||||
PKG_DEPENDS_TARGET+=" wayland wayland-protocols"
|
||||
PKG_MESON_OPTS_TARGET="-Dwayland=true"
|
||||
;;
|
||||
x11)
|
||||
PKG_DEPENDS_TARGET+=" libxcb xcb-util-wm"
|
||||
PKG_MESON_OPTS_TARGET="-Dxcb=true"
|
||||
;;
|
||||
*)
|
||||
PKG_DEPENDS_TARGET+=" systemd libdrm mesa"
|
||||
PKG_MESON_OPTS_TARGET="-Dkms=true"
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1,273 @@
|
|||
From 0dd62e9adff82d51ed67c625a4f456a8e5f1a2e2 Mon Sep 17 00:00:00 2001
|
||||
From: Jeffy Chen <jeffy.chen@rock-chips.com>
|
||||
Date: Mon, 23 May 2022 10:57:27 +0800
|
||||
Subject: [PATCH] kms: Drop dependency on vkCreateDmaBufImageINTEL
|
||||
|
||||
Based on chromium's gpu/vulkan/vulkan_image{_linux,}.cc
|
||||
|
||||
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
|
||||
---
|
||||
meson.build | 7 +-
|
||||
src/ws/kms_window_system.cpp | 172 ++++++++++++++++++++++++++---------
|
||||
src/ws/kms_window_system.h | 1 -
|
||||
3 files changed, 130 insertions(+), 50 deletions(-)
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 7d305dc..0d83918 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -32,16 +32,11 @@ wayland_protocols_dep = dependency('wayland-protocols', version : '>= 1.12',
|
||||
wayland_scanner_dep = dependency('wayland-scanner', required : get_option('wayland') == 'true')
|
||||
libdrm_dep = dependency('libdrm', required : get_option('kms') == 'true')
|
||||
gbm_dep = dependency('gbm', required : get_option('kms') == 'true')
|
||||
-has_vulkan_intel_header = cpp.has_header('vulkan/vulkan_intel.h', dependencies: vulkan_dep)
|
||||
-
|
||||
-if get_option('kms') == 'true' and not has_vulkan_intel_header
|
||||
- error('KMS plugin needs the vulkan_intel.h header, but it couldn\'t be found')
|
||||
-endif
|
||||
|
||||
build_xcb_ws = xcb_dep.found() and xcb_icccm_dep.found() and get_option('xcb') != 'false'
|
||||
build_wayland_ws = (wayland_client_dep.found() and wayland_protocols_dep.found() and
|
||||
wayland_scanner_dep.found() and get_option('wayland') != 'false')
|
||||
-build_kms_ws = libdrm_dep.found() and gbm_dep.found() and has_vulkan_intel_header and get_option('kms') != 'false'
|
||||
+build_kms_ws = libdrm_dep.found() and gbm_dep.found() and get_option('kms') != 'false'
|
||||
|
||||
if not build_xcb_ws and not build_wayland_ws and not build_kms_ws
|
||||
error('vkmark needs at least one winsys to work - xcb, wayland or kms')
|
||||
diff --git a/src/ws/kms_window_system.cpp b/src/ws/kms_window_system.cpp
|
||||
index ca8220f..18c5384 100644
|
||||
--- a/src/ws/kms_window_system.cpp
|
||||
+++ b/src/ws/kms_window_system.cpp
|
||||
@@ -29,7 +29,6 @@
|
||||
|
||||
#include <xf86drm.h>
|
||||
#include <drm_fourcc.h>
|
||||
-#include <vulkan/vulkan_intel.h>
|
||||
|
||||
#include <system_error>
|
||||
#include <fcntl.h>
|
||||
@@ -352,7 +351,6 @@ void KMSWindowSystem::init_vulkan(VulkanState& vulkan_)
|
||||
|
||||
vk_image_format = vk::Format::eB8G8R8A8Srgb;
|
||||
create_gbm_bos();
|
||||
- create_drm_fbs();
|
||||
create_vk_images();
|
||||
}
|
||||
|
||||
@@ -428,68 +426,122 @@ void KMSWindowSystem::create_gbm_bos()
|
||||
}
|
||||
}
|
||||
|
||||
-void KMSWindowSystem::create_drm_fbs()
|
||||
-{
|
||||
- for (auto const& gbm_bo : gbm_bos)
|
||||
- {
|
||||
- uint32_t fb = 0;
|
||||
-
|
||||
- uint32_t handles[4] = {gbm_bo_get_handle(gbm_bo).u32, 0, 0, 0};
|
||||
- uint32_t strides[4] = {gbm_bo_get_stride(gbm_bo), 0, 0, 0};
|
||||
- uint32_t offsets[4] = {0, 0, 0, 0};
|
||||
-
|
||||
- auto const ret = drmModeAddFB2(
|
||||
- drm_fd, vk_extent.width, vk_extent.height,
|
||||
- DRM_FORMAT_XRGB8888,
|
||||
- handles, strides, offsets, &fb, 0);
|
||||
-
|
||||
- if (ret < 0)
|
||||
- throw std::system_error{-ret, std::system_category(), "Failed to add drm fb"};
|
||||
+// TODO: Use an official extension to create the VkImages when it becomes
|
||||
+// available (e.g. VK_MESAX_external_image_dma_buf)
|
||||
|
||||
- drm_fbs.push_back(
|
||||
- ManagedResource<uint32_t>{
|
||||
- std::move(fb),
|
||||
- [this] (auto& fb) { drmModeRmFB(drm_fd, fb); }});
|
||||
+static int find_memory_type_index(VkPhysicalDevice physical_device,
|
||||
+ const VkMemoryRequirements* requirements,
|
||||
+ VkMemoryPropertyFlags flags) {
|
||||
+ VkPhysicalDeviceMemoryProperties properties;
|
||||
+ vkGetPhysicalDeviceMemoryProperties(physical_device, &properties);
|
||||
+ for (int i = 0; i <= 31; i++) {
|
||||
+ if (((1u << i) & requirements->memoryTypeBits) == 0)
|
||||
+ continue;
|
||||
+ if ((properties.memoryTypes[i].propertyFlags & flags) != flags)
|
||||
+ continue;
|
||||
+ return i;
|
||||
}
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
-// TODO: Use an official extension to create the VkImages when it becomes
|
||||
-// available (e.g. VK_MESAX_external_image_dma_buf)
|
||||
void KMSWindowSystem::create_vk_images()
|
||||
{
|
||||
- auto const create_dma_buf_image =
|
||||
- reinterpret_cast<PFN_vkCreateDmaBufImageINTEL>(
|
||||
- vulkan->device().getProcAddr("vkCreateDmaBufImageINTEL"));
|
||||
-
|
||||
- if (!create_dma_buf_image)
|
||||
- throw std::runtime_error{"Failed to get vkCreateDmaBufImageINTEL function pointer"};
|
||||
-
|
||||
for (auto const& gbm_bo : gbm_bos)
|
||||
{
|
||||
auto const fd = ManagedResource<int>{gbm_bo_get_fd(gbm_bo), close};
|
||||
- auto const stride = gbm_bo_get_stride(gbm_bo);
|
||||
|
||||
- VkDmaBufImageCreateInfo create_info{};
|
||||
- create_info.sType = static_cast<VkStructureType>(VK_STRUCTURE_TYPE_DMA_BUF_IMAGE_CREATE_INFO_INTEL);
|
||||
- create_info.fd = fd;
|
||||
- create_info.format = static_cast<VkFormat>(vk_image_format);
|
||||
- create_info.extent = {vk_extent.width, vk_extent.height, 1};
|
||||
- create_info.strideInBytes = stride;
|
||||
+ VkExternalMemoryImageCreateInfoKHR external_image_create_info = {
|
||||
+ .sType = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR,
|
||||
+ .handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT,
|
||||
+ };
|
||||
+
|
||||
+ uint64_t modifier = DRM_FORMAT_MOD_LINEAR;
|
||||
+ VkImageDrmFormatModifierListCreateInfoEXT modifier_info = {
|
||||
+ .sType = VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT,
|
||||
+ .drmFormatModifierCount = 1,
|
||||
+ .pDrmFormatModifiers = &modifier,
|
||||
+ };
|
||||
+ external_image_create_info.pNext = &modifier_info;
|
||||
+
|
||||
+ VkImportMemoryFdInfoKHR import_memory_fd_info = {
|
||||
+ .sType = VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR,
|
||||
+ .handleType = VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT,
|
||||
+ .fd = fd,
|
||||
+ };
|
||||
+
|
||||
+ VkImageCreateInfo create_info{};
|
||||
+ create_info = {
|
||||
+ .sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,
|
||||
+ .pNext = &external_image_create_info,
|
||||
+ .flags = 0,
|
||||
+ .imageType = VK_IMAGE_TYPE_2D,
|
||||
+ .format = static_cast<VkFormat>(vk_image_format),
|
||||
+ .extent = {vk_extent.width, vk_extent.height, 1},
|
||||
+ .mipLevels = 1,
|
||||
+ .arrayLayers = 1,
|
||||
+ .samples = VK_SAMPLE_COUNT_1_BIT,
|
||||
+ .tiling = VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT,
|
||||
+ .usage = 0,
|
||||
+ .sharingMode = VK_SHARING_MODE_EXCLUSIVE,
|
||||
+ .queueFamilyIndexCount = 0,
|
||||
+ .pQueueFamilyIndices = nullptr,
|
||||
+ .initialLayout = VK_IMAGE_LAYOUT_UNDEFINED,
|
||||
+ };
|
||||
|
||||
VkImage image;
|
||||
- VkDeviceMemory device_memory;
|
||||
|
||||
- VkResult result = create_dma_buf_image(
|
||||
+ VkResult result = vkCreateImage(
|
||||
vulkan->device(),
|
||||
&create_info,
|
||||
nullptr,
|
||||
- &device_memory,
|
||||
&image);
|
||||
+ if (result != VK_SUCCESS)
|
||||
+ {
|
||||
+ vk::throwResultException(static_cast<vk::Result>(result),
|
||||
+ "vkCreateImage");
|
||||
+ }
|
||||
+
|
||||
+ VkMemoryDedicatedAllocateInfoKHR dedicated_memory_info = {
|
||||
+ .sType = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR,
|
||||
+ .pNext = &import_memory_fd_info,
|
||||
+ .image = image,
|
||||
+ };
|
||||
+
|
||||
+ VkMemoryRequirements requirements;
|
||||
+ vkGetImageMemoryRequirements(vulkan->device(), image, &requirements);
|
||||
+ if (!requirements.memoryTypeBits) {
|
||||
+ throw std::runtime_error{"Failed in vkGetImageMemoryRequirements"};
|
||||
+ }
|
||||
+
|
||||
+ int index = find_memory_type_index(vulkan->physical_device(),
|
||||
+ &requirements,
|
||||
+ VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT);
|
||||
+ if (index < 0) {
|
||||
+ throw std::runtime_error{"Failed to get memoryTypeIndex"};
|
||||
+ }
|
||||
+
|
||||
+ VkMemoryAllocateInfo memory_allocate_info = {
|
||||
+ .sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
|
||||
+ .pNext = &dedicated_memory_info,
|
||||
+ .allocationSize = requirements.size,
|
||||
+ .memoryTypeIndex = (uint32_t)index,
|
||||
+ };
|
||||
+
|
||||
+ VkDeviceMemory device_memory = VK_NULL_HANDLE;
|
||||
+ result = vkAllocateMemory(vulkan->device(), &memory_allocate_info,
|
||||
+ nullptr /* pAllocator */, &device_memory);
|
||||
|
||||
if (result != VK_SUCCESS)
|
||||
{
|
||||
vk::throwResultException(static_cast<vk::Result>(result),
|
||||
- "vkCreateDmbBufImageINTEL");
|
||||
+ "vkAllocateMemory");
|
||||
+ }
|
||||
+
|
||||
+ result = vkBindImageMemory(vulkan->device(), image, device_memory,
|
||||
+ 0 /* memoryOffset */);
|
||||
+ if (result != VK_SUCCESS) {
|
||||
+ vk::throwResultException(static_cast<vk::Result>(result),
|
||||
+ "vkBindImageMemory");
|
||||
}
|
||||
|
||||
vk_images.push_back(
|
||||
@@ -500,6 +552,40 @@ void KMSWindowSystem::create_vk_images()
|
||||
vptr->device().destroyImage(image);
|
||||
vptr->device().freeMemory(device_memory);
|
||||
}});
|
||||
+
|
||||
+ std::array<VkSubresourceLayout, 4> layouts = {};
|
||||
+ const VkImageSubresource image_subresource = {
|
||||
+ .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
|
||||
+ .mipLevel = 0,
|
||||
+ .arrayLayer = 0,
|
||||
+ };
|
||||
+ vkGetImageSubresourceLayout(vulkan->device(), image,
|
||||
+ &image_subresource, &layouts[0]);
|
||||
+
|
||||
+ uint32_t fb = 0;
|
||||
+
|
||||
+ uint32_t handles[4] = {0,};
|
||||
+ uint32_t strides[4] = {0,};
|
||||
+ uint32_t offsets[4] = {0,};
|
||||
+
|
||||
+ for (auto i = 0; i < gbm_bo_get_plane_count(gbm_bo); i++) {
|
||||
+ handles[i] = gbm_bo_get_handle(gbm_bo).u32;
|
||||
+ offsets[i] = layouts[i].offset;
|
||||
+ strides[i] = layouts[i].rowPitch;
|
||||
+ }
|
||||
+
|
||||
+ auto const ret = drmModeAddFB2(
|
||||
+ drm_fd, vk_extent.width, vk_extent.height,
|
||||
+ DRM_FORMAT_XRGB8888,
|
||||
+ handles, strides, offsets, &fb, 0);
|
||||
+
|
||||
+ if (ret < 0)
|
||||
+ throw std::system_error{-ret, std::system_category(), "Failed to add drm fb"};
|
||||
+
|
||||
+ drm_fbs.push_back(
|
||||
+ ManagedResource<uint32_t>{
|
||||
+ std::move(fb),
|
||||
+ [this] (auto& fb) { drmModeRmFB(drm_fd, fb); }});
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/ws/kms_window_system.h b/src/ws/kms_window_system.h
|
||||
index 4389ef7..ca304c0 100644
|
||||
--- a/src/ws/kms_window_system.h
|
||||
+++ b/src/ws/kms_window_system.h
|
||||
@@ -68,7 +68,6 @@ class KMSWindowSystem : public WindowSystem, public VulkanWSI
|
||||
|
||||
protected:
|
||||
void create_gbm_bos();
|
||||
- void create_drm_fbs();
|
||||
void create_vk_images();
|
||||
void wait_for_drm_page_flip_event();
|
||||
|
13
packages/graphics/vulkan/vulkan-headers/package.mk
Normal file
13
packages/graphics/vulkan/vulkan-headers/package.mk
Normal file
|
@ -0,0 +1,13 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2018-present Frank Hartung (supervisedthinking (@) gmail.com)
|
||||
# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="vulkan-headers"
|
||||
PKG_VERSION="1.3.217"
|
||||
PKG_SHA256="004b4f7841bd912d1cc3f5ac5694d5dea2f944f10053451233b533874368df87"
|
||||
PKG_LICENSE="Apache-2.0"
|
||||
PKG_SITE="https://github.com/KhronosGroup/Vulkan-Headers"
|
||||
PKG_URL="https://github.com/KhronosGroup/Vulkan-Headers/archive/v${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_HOST="toolchain:host"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_LONGDESC="Vulkan Header files and API registry"
|
68
packages/graphics/vulkan/vulkan-loader/package.mk
Normal file
68
packages/graphics/vulkan/vulkan-loader/package.mk
Normal file
|
@ -0,0 +1,68 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2018-present Frank Hartung (supervisedthinking (@) gmail.com)
|
||||
# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="vulkan-loader"
|
||||
PKG_VERSION="1.3.217"
|
||||
PKG_SHA256="59c0e4934fca328366bbb50b3a8d2dfc3daeab7589fdadd7a29b8a79fe242a7f"
|
||||
PKG_LICENSE="Apache-2.0"
|
||||
PKG_SITE="https://github.com/KhronosGroup/Vulkan-Loader"
|
||||
PKG_URL="https://github.com/KhronosGroup/Vulkan-Loader/archive/v${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_HOST="toolchain:host vulkan-headers:host"
|
||||
PKG_DEPENDS_TARGET="toolchain vulkan-headers"
|
||||
PKG_LONGDESC="Vulkan Installable Client Driver (ICD) Loader."
|
||||
|
||||
configure_package() {
|
||||
# Builds asm_offset binary for GAS / GNU Assembler
|
||||
if [ "${ARCH}" != "arm" ]; then
|
||||
PKG_DEPENDS_TARGET+=" vulkan-loader:host"
|
||||
fi
|
||||
|
||||
# Displayserver Support
|
||||
if [ "${DISPLAYSERVER}" = "x11" ]; then
|
||||
PKG_DEPENDS_TARGET+=" libxcb libX11"
|
||||
elif [ "${DISPLAYSERVER}" = "wl" ]; then
|
||||
PKG_DEPENDS_TARGET+=" wayland"
|
||||
fi
|
||||
}
|
||||
|
||||
pre_configure_host() {
|
||||
PKG_CMAKE_OPTS_HOST="-DBUILD_WSI_XCB_SUPPORT=OFF \
|
||||
-DBUILD_WSI_XLIB_SUPPORT=OFF \
|
||||
-DBUILD_WSI_WAYLAND_SUPPORT=OFF \
|
||||
-DBUILD_TESTS=OFF"
|
||||
|
||||
# Hack to workaround missing options to build a standalone asm_offset binary,
|
||||
# if the glibc version of the host & target system differs build will fail otherwise.
|
||||
sed -e 's|COMMAND asm_offset GAS|COMMAND ./asm_offset GAS|g' -i ${PKG_BUILD}/loader/CMakeLists.txt
|
||||
}
|
||||
|
||||
makeinstall_host() {
|
||||
cp ${PKG_BUILD}/.${HOST_NAME}/loader/asm_offset ${TOOLCHAIN}/bin/
|
||||
}
|
||||
|
||||
pre_configure_target() {
|
||||
PKG_CMAKE_OPTS_TARGET="-DBUILD_TESTS=OFF"
|
||||
|
||||
# GAS / GNU Assembler is only supported by aarch64 & x86_64
|
||||
if [ "${ARCH}" = "arm" ]; then
|
||||
PKG_CMAKE_OPTS_TARGET+=" -DUSE_GAS=OFF"
|
||||
fi
|
||||
|
||||
if [ "${DISPLAYSERVER}" = "x11" ]; then
|
||||
PKG_CMAKE_OPTS_TARGET+=" -DBUILD_WSI_XCB_SUPPORT=ON \
|
||||
-DBUILD_WSI_XLIB_SUPPORT=ON \
|
||||
-DBUILD_WSI_WAYLAND_SUPPORT=OFF"
|
||||
elif [ "${DISPLAYSERVER}" = "wl" ]; then
|
||||
PKG_CMAKE_OPTS_TARGET+=" -DBUILD_WSI_XCB_SUPPORT=OFF \
|
||||
-DBUILD_WSI_XLIB_SUPPORT=OFF \
|
||||
-DBUILD_WSI_WAYLAND_SUPPORT=ON"
|
||||
else
|
||||
PKG_CMAKE_OPTS_TARGET+=" -DBUILD_WSI_XCB_SUPPORT=OFF \
|
||||
-DBUILD_WSI_XLIB_SUPPORT=OFF \
|
||||
-DBUILD_WSI_WAYLAND_SUPPORT=OFF"
|
||||
fi
|
||||
|
||||
# Hack to run asm_offset located at toolchain path
|
||||
sed -e 's|COMMAND ./asm_offset GAS|COMMAND asm_offset GAS|g' -i ${PKG_BUILD}/loader/CMakeLists.txt
|
||||
}
|
60
packages/graphics/vulkan/vulkan-tools/package.mk
Normal file
60
packages/graphics/vulkan/vulkan-tools/package.mk
Normal file
|
@ -0,0 +1,60 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2018-present Frank Hartung (supervisedthinking (@) gmail.com)
|
||||
# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="vulkan-tools"
|
||||
PKG_VERSION="1.3.217"
|
||||
PKG_SHA256="09e1ae38c4546ca709dae788562f25f2bdd9ed7f401bd9e03abc29233a552a0f"
|
||||
PKG_LICENSE="Apache-2.0"
|
||||
PKG_SITE="https://github.com/KhronosGroup/Vulkan-Tools"
|
||||
PKG_URL="https://github.com/KhronosGroup/Vulkan-tools/archive/v${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain vulkan-loader glslang:host"
|
||||
PKG_LONGDESC="This project provides Khronos official Vulkan Tools and Utilities."
|
||||
|
||||
configure_package() {
|
||||
# Displayserver Support
|
||||
if [ "${DISPLAYSERVER}" = "x11" ]; then
|
||||
PKG_DEPENDS_TARGET+=" libxcb libX11"
|
||||
elif [ "${DISPLAYSERVER}" = "wl" ]; then
|
||||
PKG_DEPENDS_TARGET+=" wayland"
|
||||
fi
|
||||
}
|
||||
|
||||
pre_configure_target() {
|
||||
PKG_CMAKE_OPTS_TARGET="-DBUILD_VULKANINFO=ON \
|
||||
-DBUILD_ICD=OFF \
|
||||
-DINSTALL_ICD=OFF \
|
||||
-DBUILD_WSI_DIRECTFB_SUPPORT=OFF \
|
||||
-Wno-dev"
|
||||
|
||||
if [ "${DISPLAYSERVER}" = "x11" ]; then
|
||||
PKG_CMAKE_OPTS_TARGET+=" -DBUILD_CUBE=ON \
|
||||
-DBUILD_WSI_XCB_SUPPORT=ON \
|
||||
-DBUILD_WSI_XLIB_SUPPORT=ON \
|
||||
-DBUILD_WSI_WAYLAND_SUPPORT=OFF \
|
||||
-DCUBE_WSI_SELECTION=XCB"
|
||||
elif [ "${DISPLAYSERVER}" = "wl" ]; then
|
||||
PKG_CMAKE_OPTS_TARGET+=" -DBUILD_CUBE=ON \
|
||||
-DBUILD_WSI_XCB_SUPPORT=OFF \
|
||||
-DBUILD_WSI_XLIB_SUPPORT=OFF \
|
||||
-DBUILD_WSI_WAYLAND_SUPPORT=ON
|
||||
-DCUBE_WSI_SELECTION=WAYLAND"
|
||||
else
|
||||
PKG_CMAKE_OPTS_TARGET+=" -DBUILD_CUBE=ON \
|
||||
-DBUILD_WSI_XCB_SUPPORT=OFF \
|
||||
-DBUILD_WSI_XLIB_SUPPORT=OFF \
|
||||
-DBUILD_WSI_WAYLAND_SUPPORT=OFF \
|
||||
-DCUBE_WSI_SELECTION=DISPLAY"
|
||||
fi
|
||||
}
|
||||
|
||||
pre_make_target() {
|
||||
# Fix cross compiling
|
||||
find ${PKG_BUILD} -name flags.make -exec sed -i "s:isystem :I:g" \{} \;
|
||||
find ${PKG_BUILD} -name build.ninja -exec sed -i "s:isystem :I:g" \{} \;
|
||||
}
|
||||
|
||||
post_makeinstall_target() {
|
||||
# Clean up - two graphic test tools are superflous
|
||||
safe_remove ${INSTALL}/usr/bin/vkcubepp
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
From c9c7423f2d0ecfc7ab354d2a3d9ea9c2e4998416 Mon Sep 17 00:00:00 2001
|
||||
From: SupervisedThinking <supervisedthinking@gmail.com>
|
||||
Date: Thu, 18 Nov 2021 15:02:55 +0100
|
||||
Subject: [PATCH] CMakeLists: add CMake options for cube & vulkaninfo
|
||||
|
||||
---
|
||||
CMakeLists.txt | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 422b7d2cc..d123c9dc5 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -41,6 +41,12 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
option(BUILD_CUBE "Build cube" ON)
|
||||
option(BUILD_VULKANINFO "Build vulkaninfo" ON)
|
||||
option(BUILD_ICD "Build icd" ON)
|
||||
+option(BUILD_WSI_XCB_SUPPORT "Build XCB WSI support" ON)
|
||||
+option(BUILD_WSI_XLIB_SUPPORT "Build Xlib WSI support" ON)
|
||||
+option(BUILD_WSI_WAYLAND_SUPPORT "Build Wayland WSI support" ON)
|
||||
+option(BUILD_WSI_DIRECTFB_SUPPORT "Build DirectFB WSI support" OFF)
|
||||
+set(CUBE_WSI_SELECTION "XCB" CACHE STRING "Select WSI target for vkcube (XCB, XLIB, WAYLAND, DIRECTFB, DISPLAY)")
|
||||
+
|
||||
# Installing the Mock ICD to system directories is probably not desired since this ICD is not a very complete implementation.
|
||||
# Require the user to ask that it be installed if they really want it.
|
||||
option(INSTALL_ICD "Install icd" OFF)
|
|
@ -0,0 +1,61 @@
|
|||
From 8770458f74f4df71bb8450d0adcdd31f3eac7168 Mon Sep 17 00:00:00 2001
|
||||
From: SupervisedThinking <supervisedthinking@gmail.com>
|
||||
Date: Wed, 9 Mar 2022 20:58:53 +0100
|
||||
Subject: [PATCH] cube: allow cross compile
|
||||
|
||||
---
|
||||
cube/CMakeLists.txt | 6 ------
|
||||
1 file changed, 6 deletions(-)
|
||||
|
||||
diff --git a/cube/CMakeLists.txt b/cube/CMakeLists.txt
|
||||
index 616fbc96a..fa6f8d4fa 100644
|
||||
--- a/cube/CMakeLists.txt
|
||||
+++ b/cube/CMakeLists.txt
|
||||
@@ -228,7 +228,6 @@ include_directories(${CUBE_INCLUDE_DIRS})
|
||||
if(APPLE)
|
||||
include(macOS/cube/cube.cmake)
|
||||
elseif(NOT WIN32)
|
||||
- if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
|
||||
add_executable(vkcube
|
||||
cube.c
|
||||
${PROJECT_SOURCE_DIR}/cube/cube.vert
|
||||
@@ -243,7 +242,6 @@ elseif(NOT WIN32)
|
||||
if (NEED_RT)
|
||||
target_link_libraries(vkcube rt)
|
||||
endif()
|
||||
- endif()
|
||||
else()
|
||||
if(CMAKE_CL_64)
|
||||
set(LIB_DIR "Win64")
|
||||
@@ -280,7 +278,6 @@ endif()
|
||||
if(APPLE)
|
||||
include(macOS/cubepp/cubepp.cmake)
|
||||
elseif(NOT WIN32)
|
||||
- if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
|
||||
add_executable(vkcubepp
|
||||
cube.cpp
|
||||
${PROJECT_SOURCE_DIR}/cube/cube.vert
|
||||
@@ -290,7 +287,6 @@ elseif(NOT WIN32)
|
||||
${OPTIONAL_WAYLAND_DATA_FILES})
|
||||
target_link_libraries(vkcubepp Vulkan::Vulkan)
|
||||
target_compile_definitions(vkcubepp PUBLIC ${CUBE_PLATFORM})
|
||||
- endif()
|
||||
else()
|
||||
if(CMAKE_CL_64)
|
||||
set(LIB_DIR "Win64")
|
||||
@@ -334,7 +330,6 @@ if(UNIX AND NOT APPLE) # i.e. Linux
|
||||
${CMAKE_CURRENT_BINARY_DIR}/xdg-decoration-code.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/xdg-decoration-client-header.h)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
- if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
|
||||
add_executable(vkcube-wayland
|
||||
cube.c
|
||||
${PROJECT_SOURCE_DIR}/cube/cube.vert
|
||||
@@ -349,7 +344,6 @@ if(UNIX AND NOT APPLE) # i.e. Linux
|
||||
if (NEED_RT)
|
||||
target_link_libraries(vkcube-wayland rt)
|
||||
endif()
|
||||
- endif()
|
||||
install(TARGETS vkcube-wayland RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
endif()
|
||||
endif()
|
|
@ -0,0 +1,67 @@
|
|||
From a1894dc9f650ab94fb7e348e1b06ee75a1e9728b Mon Sep 17 00:00:00 2001
|
||||
From: SupervisedThinking <supervisedthinking@gmail.com>
|
||||
Date: Sat, 20 Nov 2021 18:39:04 +0100
|
||||
Subject: [PATCH] CMakeLists: updated glslangValidator logik
|
||||
|
||||
---
|
||||
cube/CMakeLists.txt | 43 +++++++++++++++++++++++++++----------------
|
||||
1 file changed, 27 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/cube/CMakeLists.txt b/cube/CMakeLists.txt
|
||||
index d59eb4366..a684fc4f0 100644
|
||||
--- a/cube/CMakeLists.txt
|
||||
+++ b/cube/CMakeLists.txt
|
||||
@@ -26,26 +26,37 @@ endif()
|
||||
if(GLSLANG_INSTALL_DIR)
|
||||
message(STATUS "Using GLSLANG_INSTALL_DIR to look for glslangValidator")
|
||||
find_program(GLSLANG_VALIDATOR names glslangValidator HINTS "${GLSLANG_INSTALL_DIR}/bin")
|
||||
+
|
||||
else()
|
||||
set(GLSLANG_VALIDATOR_NAME "glslangValidator")
|
||||
- message(STATUS "Using cmake find_program to look for glslangValidator")
|
||||
- if(WIN32)
|
||||
- execute_process(
|
||||
- COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/fetch_glslangvalidator.py glslang-master-windows-x64-Release.zip)
|
||||
- set(GLSLANG_VALIDATOR_NAME "glslangValidator.exe")
|
||||
- elseif(APPLE)
|
||||
- execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/fetch_glslangvalidator.py glslang-master-osx-Release.zip)
|
||||
- elseif(UNIX AND NOT APPLE) # i.e. Linux
|
||||
- execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/fetch_glslangvalidator.py glslang-master-linux-Release.zip)
|
||||
- endif()
|
||||
- if (WIN32)
|
||||
- set(PLATFORM_DIR "${PROJECT_SOURCE_DIR}/glslang/windows/bin")
|
||||
- elseif(APPLE)
|
||||
- set(PLATFORM_DIR "${PROJECT_SOURCE_DIR}/glslang/darwin/bin")
|
||||
+ message(CHECK_START "Looking for glslangValidator")
|
||||
+ find_program(GLSLANG_VALIDATOR NAMES ${GLSLANG_VALIDATOR_NAME} HINTS ${PLATFORM_DIR})
|
||||
+ if(GLSLANG_VALIDATOR)
|
||||
+ message(CHECK_PASS ${GLSLANG_VALIDATOR})
|
||||
else()
|
||||
- set(PLATFORM_DIR "${PROJECT_SOURCE_DIR}/glslang/linux/bin")
|
||||
+ if(WIN32)
|
||||
+ execute_process(
|
||||
+ COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/fetch_glslangvalidator.py glslang-master-windows-x64-Release.zip)
|
||||
+ set(GLSLANG_VALIDATOR_NAME "glslangValidator.exe")
|
||||
+ elseif(APPLE)
|
||||
+ execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/fetch_glslangvalidator.py glslang-master-osx-Release.zip)
|
||||
+ elseif(UNIX AND NOT APPLE) # i.e. Linux
|
||||
+ execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SCRIPTS_DIR}/fetch_glslangvalidator.py glslang-master-linux-Release.zip)
|
||||
+ endif()
|
||||
+ if (WIN32)
|
||||
+ set(PLATFORM_DIR "${PROJECT_SOURCE_DIR}/glslang/windows/bin")
|
||||
+ elseif(APPLE)
|
||||
+ set(PLATFORM_DIR "${PROJECT_SOURCE_DIR}/glslang/darwin/bin")
|
||||
+ else()
|
||||
+ set(PLATFORM_DIR "${PROJECT_SOURCE_DIR}/glslang/linux/bin")
|
||||
+ endif()
|
||||
+ find_program(GLSLANG_VALIDATOR NAMES ${GLSLANG_VALIDATOR_NAME} HINTS ${PLATFORM_DIR})
|
||||
+ if(GLSLANG_VALIDATOR)
|
||||
+ message(CHECK_PASS ${GLSLANG_VALIDATOR})
|
||||
+ else()
|
||||
+ message(FATAL_ERROR "no glslangValidator binary found")
|
||||
+ endif()
|
||||
endif()
|
||||
- find_program(GLSLANG_VALIDATOR NAMES ${GLSLANG_VALIDATOR_NAME} HINTS ${PLATFORM_DIR})
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE) # i.e. Linux
|
|
@ -50,7 +50,7 @@ PKG_MULTIMEDIA="ffmpeg mpv vlc"
|
|||
PKG_GAMESUPPORT="sixaxis jslisten evtest rg351p-js2xbox gptokeyb textviewer 351files jstest-sdl \
|
||||
gamecontrollerdb jelosaddons libgo2 rclone sdljoytest"
|
||||
|
||||
#PKG_EXPERIMENTAL="tailscale"
|
||||
PKG_EXPERIMENTAL="tailscale"
|
||||
|
||||
### Project/Device specific items
|
||||
if [ "${PROJECT}" == "Rockchip" ]
|
||||
|
|
|
@ -6,10 +6,14 @@ PKG_VERSION="1.26.1"
|
|||
PKG_ARCH="aarch64"
|
||||
PKG_SITE="https://tailscale.com/"
|
||||
PKG_URL="https://pkgs.tailscale.com/stable/tailscale_${PKG_VERSION}_arm64.tgz"
|
||||
PKG_DEPENDS_TARGET="toolchain wireguard-tools wireguard-linux-compat"
|
||||
PKG_DEPENDS_TARGET="toolchain wireguard-tools"
|
||||
PKG_SHORTDESC="Zero config VPN. Installs on any device in minutes, manages firewall rules for you, and works from anywhere."
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
if [ ! "${TARGET_ARCH}" = "x86_64" ]; then
|
||||
PKG_DEPENDS_TARGET+=" wireguard-linux-compat"
|
||||
fi
|
||||
|
||||
pre_unpack() {
|
||||
mkdir -p $PKG_BUILD
|
||||
tar --strip-components=1 -xf $SOURCES/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tgz -C $PKG_BUILD tailscale_${PKG_VERSION}_arm64
|
||||
|
|
|
@ -11,23 +11,26 @@ PKG_DEPENDS_TARGET="toolchain connman netbase ethtool openssh iw rsync"
|
|||
PKG_SECTION="virtual"
|
||||
PKG_LONGDESC="Metapackage for various packages to install network support"
|
||||
|
||||
if [ "$BLUETOOTH_SUPPORT" = "yes" ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET bluez"
|
||||
if [ "${BLUETOOTH_SUPPORT}" = "yes" ]; then
|
||||
PKG_DEPENDS_TARGET="${PKG_DEPENDS_TARGET} bluez"
|
||||
fi
|
||||
|
||||
if [ "$SAMBA_SERVER" = "yes" ] || [ "$SAMBA_SUPPORT" = "yes" ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET samba"
|
||||
if [ "${SAMBA_SERVER}" = "yes" ] || [ "$SAMBA_SUPPORT" = "yes" ]; then
|
||||
PKG_DEPENDS_TARGET="${PKG_DEPENDS_TARGET} samba"
|
||||
fi
|
||||
|
||||
if [ "$OPENVPN_SUPPORT" = "yes" ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET openvpn"
|
||||
if [ "${OPENVPN_SUPPORT}" = "yes" ]; then
|
||||
PKG_DEPENDS_TARGET="${PKG_DEPENDS_TARGET} openvpn"
|
||||
fi
|
||||
|
||||
if [ "$WIREGUARD_SUPPORT" = "yes" ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET wireguard-tools wireguard-linux-compat"
|
||||
if [ "${WIREGUARD_SUPPORT}" = "yes" ]; then
|
||||
PKG_DEPENDS_TARGET="${PKG_DEPENDS_TARGET} wireguard-tools"
|
||||
if [ ! "${TARGET_ARCH}" = "x86_64" ]; then
|
||||
PKG_DEPENDS_TARGET+=" wireguard-linux-compat"
|
||||
fi
|
||||
fi
|
||||
|
||||
# nss needed by inputstream.adaptive, chromium etc.
|
||||
if [ "$TARGET_ARCH" = "x86_64" ] || [ "$TARGET_ARCH" = "arm" ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET nss"
|
||||
if [ "${TARGET_ARCH}" = "x86_64" ] || [ "${TARGET_ARCH}" = "arm" ]; then
|
||||
PKG_DEPENDS_TARGET="${PKG_DEPENDS_TARGET} nss"
|
||||
fi
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
DEVICE_BRIGHTNESS="100"
|
||||
DISPLAY_ROTATED=true
|
||||
SPLASH_LOADER="plymouth"
|
|
@ -1,13 +1,17 @@
|
|||
# kernel command line
|
||||
EXTRA_CMDLINE="quiet console=tty0 fbcon=rotate:3 ssh consoleblank=0 systemd.show_status=0 loglevel=0 panic=20"
|
||||
|
||||
# Partition label
|
||||
PARTITION_TABLE="msdos"
|
||||
|
||||
# OpenGL(X) implementation to use (mesa / no)
|
||||
OPENGL="no"
|
||||
OPENGL="mesa"
|
||||
|
||||
# OpenGL-ES implementation to use (mesa / no)
|
||||
OPENGLES="mesa"
|
||||
|
||||
# Vulkan implementation to use (vulkan-loader / no)
|
||||
VULKAN="no"
|
||||
VULKAN="vulkan-loader"
|
||||
|
||||
# Displayserver to use (weston / x11 / no)
|
||||
DISPLAYSERVER="no"
|
||||
|
|
|
@ -128,15 +128,15 @@ PROMPT 1
|
|||
|
||||
LABEL installer
|
||||
KERNEL /${KERNEL_NAME}
|
||||
APPEND boot=UUID=${UUID_SYSTEM} installer quiet systemd.debug_shell vga=current
|
||||
APPEND boot=UUID=${UUID_SYSTEM} installer systemd.debug_shell vga=current ${EXTRA_CMDLINE}
|
||||
|
||||
LABEL live
|
||||
KERNEL /${KERNEL_NAME}
|
||||
APPEND boot=UUID=${UUID_SYSTEM} live quiet vga=current
|
||||
APPEND boot=UUID=${UUID_SYSTEM} live vga=current ${EXTRA_CMDLINE}
|
||||
|
||||
LABEL run
|
||||
KERNEL /${KERNEL_NAME}
|
||||
APPEND boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} portable quiet
|
||||
APPEND boot=UUID=${UUID_SYSTEM} disk=UUID=${UUID_STORAGE} portable ${EXTRA_CMDLINE}
|
||||
EOF
|
||||
|
||||
cat << EOF > "${LE_TMP}/grub.cfg"
|
||||
|
|
Loading…
Reference in a new issue