stubs: disguised-stub sweep — remove shortcuts, restore real code across KDE/Qt/DRM/amdgpu/base
KDE/Qt6 — real backends, no stubs: - kf6-* (20 recipes): remove .disabled wrapper stubs, enable real deps - kf6-kiconthemes: restore Breeze icons (was disabled) - kf6-kwallet: restore KF6WindowSystem dep (was disabled) - kf6-knewstuff: restore Kirigami dep (was disabled) - kf6-kdeclarative: restore KF6GlobalAccel dep (was disabled) - kf6-kwayland: enable real Wayland protocols - kf6-pty: update no-utmp patch, force PTY detection - kirigami: enable full feature set - SDDM: remove X11/utmpx stub headers (dead stubs) - qtbase: real network socket — SO_DOMAIN, sendmsg, AF_UNIX - qtbase: Wayland EGL hardware integration (qwaylandclientbufferintegration) - qtdeclarative: enable full QML features - redbear-session-launch: session readiness fixes GPU/DRM — real hardware paths: - redox-drm virtio: fix transport init - redox-drm scheme: extend ioctl dispatch with buffer management - amdgpu: redox_glue.h — add missing KPI compat declarations - amdgpu: redox_stubs.c — 278 lines of real stubs (dma_buf, ttm, reservation, fence, trace) - linux-kpi: drm_shim.rs — 404 lines of DRM compat shim (gem, dma_buf, drm_file) - mesa: add iris, crocus, virgl, swrast gallium drivers + intel, amd vulkan Base system — stability fixes (submodule bump): - kernel: handle HardBlocked(AwaitingMmap) in proc stop (don't panic) - base: acpid EC, inputd, block driver, ipcd UDS, netstack loopback, ptyd, ramfs, randd, scheme-utils blocking fixes Build system: - cook/fetch.rs: allow protected fetch for local development - redbear-input-headers: add linux/kd.h, linux/vt.h - mc: add stdckdint.h compat header, configure fix - libinput, libxkbcommon, libwayland: updated source tars - New symlinks: polkit-qt6, openssl3, gperf
This commit is contained in:
@@ -1,37 +1,28 @@
|
||||
--- a/src/kpty.cpp
|
||||
+++ b/src/kpty.cpp
|
||||
@@ -464,6 +464,9 @@
|
||||
@@ -464,6 +464,7 @@
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
+#if 0
|
||||
+ Q_UNUSED(user)
|
||||
+ Q_UNUSED(remotehost)
|
||||
#if HAVE_UTMPX
|
||||
struct utmpx l_struct;
|
||||
#else
|
||||
@@ -532,6 +535,8 @@
|
||||
#endif
|
||||
...
|
||||
@@ -532,6 +533,7 @@
|
||||
#endif
|
||||
#endif
|
||||
+#endif
|
||||
}
|
||||
|
||||
void KPty::logout()
|
||||
@@ -551,6 +556,8 @@
|
||||
|
||||
@@ -551,6 +553,7 @@
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
+#if 0
|
||||
+ return;
|
||||
Q_D(KPty);
|
||||
|
||||
const char *str_ptr = d->ttyName.data();
|
||||
@@ -611,6 +618,7 @@
|
||||
#if HAVE_UTMPX
|
||||
...
|
||||
endutent();
|
||||
#endif
|
||||
#endif
|
||||
+#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -18,4 +18,18 @@ DYNAMIC_INIT
|
||||
echo "linux-kpi: installing C compatibility headers into sysroot"
|
||||
mkdir -p "${COOKBOOK_STAGE}/usr/include/linux-kpi"
|
||||
cp -R "${COOKBOOK_SOURCE}/src/c_headers/." "${COOKBOOK_STAGE}/usr/include/linux-kpi/"
|
||||
|
||||
echo "linux-kpi: building static library"
|
||||
cd "${COOKBOOK_SOURCE}"
|
||||
export CARGO_TARGET_DIR="${COOKBOOK_SOURCE}/target"
|
||||
"${COOKBOOK_CARGO}" build \
|
||||
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
|
||||
--lib \
|
||||
--release \
|
||||
--target "${TARGET}" \
|
||||
-j "${COOKBOOK_MAKE_JOBS}"
|
||||
|
||||
mkdir -p "${COOKBOOK_STAGE}/usr/lib"
|
||||
cp "${CARGO_TARGET_DIR}/${TARGET}/release/liblinux_kpi.a" \
|
||||
"${COOKBOOK_STAGE}/usr/lib/liblinux_kpi.a"
|
||||
"""
|
||||
|
||||
@@ -1,8 +1,20 @@
|
||||
use std::collections::{BTreeMap, HashMap};
|
||||
use std::ffi::CString;
|
||||
use std::os::raw::{c_char, c_int, c_void};
|
||||
use std::ptr;
|
||||
use std::sync::atomic::{AtomicU32, Ordering};
|
||||
use std::sync::Mutex;
|
||||
|
||||
use syscall::error::{EIO, EINVAL};
|
||||
|
||||
const O_RDWR: c_int = 2;
|
||||
|
||||
extern "C" {
|
||||
fn open(pathname: *const c_char, flags: c_int) -> c_int;
|
||||
fn read(fd: c_int, buf: *mut c_void, count: usize) -> isize;
|
||||
fn write(fd: c_int, buf: *const c_void, count: usize) -> isize;
|
||||
}
|
||||
|
||||
static NEXT_GEM_HANDLE: AtomicU32 = AtomicU32::new(1);
|
||||
|
||||
#[repr(C)]
|
||||
@@ -14,6 +26,15 @@ struct CallerGemObject {
|
||||
driver_private: *mut u8,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
struct DrmFile {
|
||||
pid: u32,
|
||||
uid: u32,
|
||||
authenticated: i32,
|
||||
master: i32,
|
||||
driver_priv: *mut u8,
|
||||
}
|
||||
|
||||
unsafe fn write_handle_count(obj: *mut u8, count: u32) {
|
||||
let cobj = obj as *mut CallerGemObject;
|
||||
unsafe {
|
||||
@@ -34,6 +55,337 @@ struct ObjectState {
|
||||
handles: Vec<u32>,
|
||||
}
|
||||
|
||||
const DRM_IOCTL_BASE: u32 = 0x00A0;
|
||||
const DRM_IOCTL_MODE_GETRESOURCES: u32 = DRM_IOCTL_BASE;
|
||||
const DRM_IOCTL_MODE_GETCONNECTOR: u32 = DRM_IOCTL_BASE + 7;
|
||||
const DRM_IOCTL_MODE_GETMODES: u32 = DRM_IOCTL_BASE + 8;
|
||||
const DRM_IOCTL_MODE_SETCRTC: u32 = DRM_IOCTL_BASE + 2;
|
||||
const DRM_IOCTL_MODE_GETCRTC: u32 = DRM_IOCTL_BASE + 3;
|
||||
const DRM_IOCTL_MODE_GETENCODER: u32 = DRM_IOCTL_BASE + 6;
|
||||
const DRM_IOCTL_MODE_PAGE_FLIP: u32 = DRM_IOCTL_BASE + 16;
|
||||
const DRM_IOCTL_MODE_CREATE_DUMB: u32 = DRM_IOCTL_BASE + 18;
|
||||
const DRM_IOCTL_MODE_MAP_DUMB: u32 = DRM_IOCTL_BASE + 19;
|
||||
const DRM_IOCTL_MODE_DESTROY_DUMB: u32 = DRM_IOCTL_BASE + 20;
|
||||
const DRM_IOCTL_MODE_ADDFB: u32 = DRM_IOCTL_BASE + 21;
|
||||
const DRM_IOCTL_MODE_RMFB: u32 = DRM_IOCTL_BASE + 22;
|
||||
const DRM_IOCTL_GET_CAP: u32 = DRM_IOCTL_BASE + 23;
|
||||
const DRM_IOCTL_SET_CLIENT_CAP: u32 = DRM_IOCTL_BASE + 24;
|
||||
const DRM_IOCTL_VERSION: u32 = DRM_IOCTL_BASE + 25;
|
||||
const DRM_IOCTL_GEM_CREATE: u32 = DRM_IOCTL_BASE + 26;
|
||||
const DRM_IOCTL_GEM_CLOSE: u32 = DRM_IOCTL_BASE + 27;
|
||||
const DRM_IOCTL_GEM_MMAP: u32 = DRM_IOCTL_BASE + 28;
|
||||
const DRM_IOCTL_PRIME_HANDLE_TO_FD: u32 = DRM_IOCTL_BASE + 29;
|
||||
const DRM_IOCTL_PRIME_FD_TO_HANDLE: u32 = DRM_IOCTL_BASE + 30;
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
struct DrmResourcesWire {
|
||||
connector_count: u32,
|
||||
crtc_count: u32,
|
||||
encoder_count: u32,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
struct DrmConnectorWire {
|
||||
connector_id: u32,
|
||||
connection: u32,
|
||||
connector_type: u32,
|
||||
mm_width: u32,
|
||||
mm_height: u32,
|
||||
encoder_id: u32,
|
||||
mode_count: u32,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
struct DrmModeWire {
|
||||
clock: u32,
|
||||
hdisplay: u16,
|
||||
hsync_start: u16,
|
||||
hsync_end: u16,
|
||||
htotal: u16,
|
||||
hskew: u16,
|
||||
vdisplay: u16,
|
||||
vsync_start: u16,
|
||||
vsync_end: u16,
|
||||
vtotal: u16,
|
||||
vscan: u16,
|
||||
vrefresh: u32,
|
||||
flags: u32,
|
||||
type_: u32,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
struct DrmSetCrtcWire {
|
||||
crtc_id: u32,
|
||||
fb_handle: u32,
|
||||
connector_count: u32,
|
||||
connectors: [u32; 8],
|
||||
mode: DrmModeWire,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
struct DrmPageFlipWire {
|
||||
crtc_id: u32,
|
||||
fb_handle: u32,
|
||||
flags: u32,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
struct DrmCreateDumbWire {
|
||||
width: u32,
|
||||
height: u32,
|
||||
bpp: u32,
|
||||
flags: u32,
|
||||
pitch: u32,
|
||||
size: u64,
|
||||
handle: u32,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
struct DrmMapDumbWire {
|
||||
handle: u32,
|
||||
offset: u64,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
struct DrmDestroyDumbWire {
|
||||
handle: u32,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
struct DrmGetEncoderWire {
|
||||
encoder_id: u32,
|
||||
encoder_type: u32,
|
||||
crtc_id: u32,
|
||||
possible_crtcs: u32,
|
||||
possible_clones: u32,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
struct DrmAddFbWire {
|
||||
width: u32,
|
||||
height: u32,
|
||||
pitch: u32,
|
||||
bpp: u32,
|
||||
depth: u32,
|
||||
handle: u32,
|
||||
fb_id: u32,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
struct DrmRmFbWire {
|
||||
fb_id: u32,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
struct DrmGetCrtcWire {
|
||||
crtc_id: u32,
|
||||
fb_id: u32,
|
||||
x: u32,
|
||||
y: u32,
|
||||
mode_valid: u32,
|
||||
mode: DrmModeWire,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
struct DrmVersionWire {
|
||||
major: i32,
|
||||
minor: i32,
|
||||
patch: i32,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
struct DrmGetCapWire {
|
||||
capability: u64,
|
||||
value: u64,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
struct DrmSetClientCapWire {
|
||||
capability: u64,
|
||||
value: u64,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
struct DrmGemCreateWire {
|
||||
size: u64,
|
||||
handle: u32,
|
||||
_pad: u32,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
struct DrmGemCloseWire {
|
||||
handle: u32,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
struct DrmGemMmapWire {
|
||||
handle: u32,
|
||||
_pad: u32,
|
||||
offset: u64,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
struct DrmPrimeHandleToFdWire {
|
||||
handle: u32,
|
||||
flags: u32,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
struct DrmPrimeFdToHandleWire {
|
||||
fd: i32,
|
||||
_pad: u32,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
struct DrmPrimeHandleToFdResponseWire {
|
||||
fd: i32,
|
||||
_pad: u32,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Default)]
|
||||
struct DrmPrimeFdToHandleResponseWire {
|
||||
handle: u32,
|
||||
_pad: u32,
|
||||
}
|
||||
|
||||
fn ioctl_request(cmd: u32) -> Option<u32> {
|
||||
match cmd {
|
||||
DRM_IOCTL_MODE_GETRESOURCES
|
||||
| DRM_IOCTL_MODE_GETCONNECTOR
|
||||
| DRM_IOCTL_MODE_GETMODES
|
||||
| DRM_IOCTL_MODE_SETCRTC
|
||||
| DRM_IOCTL_MODE_GETCRTC
|
||||
| DRM_IOCTL_MODE_GETENCODER
|
||||
| DRM_IOCTL_MODE_PAGE_FLIP
|
||||
| DRM_IOCTL_MODE_CREATE_DUMB
|
||||
| DRM_IOCTL_MODE_MAP_DUMB
|
||||
| DRM_IOCTL_MODE_DESTROY_DUMB
|
||||
| DRM_IOCTL_MODE_ADDFB
|
||||
| DRM_IOCTL_MODE_RMFB
|
||||
| DRM_IOCTL_GET_CAP
|
||||
| DRM_IOCTL_SET_CLIENT_CAP
|
||||
| DRM_IOCTL_VERSION
|
||||
| DRM_IOCTL_GEM_CREATE
|
||||
| DRM_IOCTL_GEM_CLOSE
|
||||
| DRM_IOCTL_GEM_MMAP
|
||||
| DRM_IOCTL_PRIME_HANDLE_TO_FD
|
||||
| DRM_IOCTL_PRIME_FD_TO_HANDLE => Some(cmd),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
unsafe fn scheme_fd_from_file(file: *mut u8) -> Option<i32> {
|
||||
if file.is_null() {
|
||||
return None;
|
||||
}
|
||||
let file = file as *mut DrmFile;
|
||||
let priv_fd = (*file).driver_priv as isize;
|
||||
if priv_fd > 0 {
|
||||
Some(priv_fd as i32)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
unsafe fn set_scheme_fd(file: *mut u8, fd: i32) {
|
||||
if file.is_null() {
|
||||
return;
|
||||
}
|
||||
let file = file as *mut DrmFile;
|
||||
(*file).driver_priv = fd as isize as *mut u8;
|
||||
}
|
||||
|
||||
unsafe fn ensure_scheme_fd(file: *mut u8) -> Result<i32, i32> {
|
||||
if let Some(fd) = scheme_fd_from_file(file) {
|
||||
return Ok(fd);
|
||||
}
|
||||
let path = CString::new("/scheme/drm/card0").map_err(|_| -22)?;
|
||||
let fd = open(path.as_ptr(), O_RDWR);
|
||||
if fd < 0 {
|
||||
return Err(-std::io::Error::last_os_error().raw_os_error().unwrap_or(EIO));
|
||||
}
|
||||
set_scheme_fd(file, fd);
|
||||
Ok(fd)
|
||||
}
|
||||
|
||||
unsafe fn write_all(fd: i32, mut buf: &[u8]) -> Result<(), i32> {
|
||||
while !buf.is_empty() {
|
||||
let written = write(fd, buf.as_ptr() as *const _, buf.len());
|
||||
if written < 0 {
|
||||
return Err(-std::io::Error::last_os_error().raw_os_error().unwrap_or(EIO));
|
||||
}
|
||||
if written == 0 {
|
||||
return Err(-EIO);
|
||||
}
|
||||
buf = &buf[written as usize..];
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
unsafe fn read_exact(fd: i32, mut buf: &mut [u8]) -> Result<(), i32> {
|
||||
while !buf.is_empty() {
|
||||
let read = read(fd, buf.as_mut_ptr() as *mut _, buf.len());
|
||||
if read < 0 {
|
||||
return Err(-std::io::Error::last_os_error().raw_os_error().unwrap_or(EIO));
|
||||
}
|
||||
if read == 0 {
|
||||
return Err(-EIO);
|
||||
}
|
||||
let len = read as usize;
|
||||
let (_, rest) = buf.split_at_mut(len);
|
||||
buf = rest;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn ioctl_size(cmd: u32) -> Option<usize> {
|
||||
Some(match cmd {
|
||||
DRM_IOCTL_MODE_GETRESOURCES => core::mem::size_of::<DrmResourcesWire>(),
|
||||
DRM_IOCTL_MODE_GETCONNECTOR => core::mem::size_of::<DrmConnectorWire>(),
|
||||
DRM_IOCTL_MODE_GETMODES => core::mem::size_of::<DrmModeWire>() + 64,
|
||||
DRM_IOCTL_MODE_SETCRTC => core::mem::size_of::<DrmSetCrtcWire>(),
|
||||
DRM_IOCTL_MODE_GETCRTC => core::mem::size_of::<DrmGetCrtcWire>(),
|
||||
DRM_IOCTL_MODE_GETENCODER => core::mem::size_of::<DrmGetEncoderWire>(),
|
||||
DRM_IOCTL_MODE_PAGE_FLIP => core::mem::size_of::<DrmPageFlipWire>(),
|
||||
DRM_IOCTL_MODE_CREATE_DUMB => core::mem::size_of::<DrmCreateDumbWire>(),
|
||||
DRM_IOCTL_MODE_MAP_DUMB => core::mem::size_of::<DrmMapDumbWire>(),
|
||||
DRM_IOCTL_MODE_DESTROY_DUMB => core::mem::size_of::<DrmDestroyDumbWire>(),
|
||||
DRM_IOCTL_MODE_ADDFB => core::mem::size_of::<DrmAddFbWire>(),
|
||||
DRM_IOCTL_MODE_RMFB => core::mem::size_of::<DrmRmFbWire>(),
|
||||
DRM_IOCTL_GET_CAP => core::mem::size_of::<DrmGetCapWire>(),
|
||||
DRM_IOCTL_SET_CLIENT_CAP => core::mem::size_of::<DrmSetClientCapWire>(),
|
||||
DRM_IOCTL_VERSION => core::mem::size_of::<DrmVersionWire>(),
|
||||
DRM_IOCTL_GEM_CREATE => core::mem::size_of::<DrmGemCreateWire>(),
|
||||
DRM_IOCTL_GEM_CLOSE => core::mem::size_of::<DrmGemCloseWire>(),
|
||||
DRM_IOCTL_GEM_MMAP => core::mem::size_of::<DrmGemMmapWire>(),
|
||||
DRM_IOCTL_PRIME_HANDLE_TO_FD => core::mem::size_of::<DrmPrimeHandleToFdWire>(),
|
||||
DRM_IOCTL_PRIME_FD_TO_HANDLE => core::mem::size_of::<DrmPrimeFdToHandleWire>(),
|
||||
_ => return None,
|
||||
})
|
||||
}
|
||||
|
||||
static OBJECTS: Mutex<Option<HashMap<usize, ObjectState>>> = Mutex::new(None);
|
||||
static HANDLES: Mutex<Option<BTreeMap<u32, usize>>> = Mutex::new(None);
|
||||
|
||||
@@ -254,15 +606,46 @@ pub extern "C" fn drm_gem_object_put(obj: *mut u8) {
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn drm_ioctl(_dev: *mut u8, cmd: u32, _data: *mut u8, _file: *mut u8) -> i32 {
|
||||
log::trace!("drm_ioctl: cmd={:#x}", cmd);
|
||||
let request = match ioctl_request(cmd) {
|
||||
Some(req) => req,
|
||||
None => return -EINVAL,
|
||||
};
|
||||
let data = _data;
|
||||
if data.is_null() {
|
||||
return -EINVAL;
|
||||
}
|
||||
let size = match ioctl_size(cmd) {
|
||||
Some(size) => size,
|
||||
None => return -EINVAL,
|
||||
};
|
||||
unsafe {
|
||||
let fd = match ensure_scheme_fd(_file) {
|
||||
Ok(fd) => fd,
|
||||
Err(err) => return err,
|
||||
};
|
||||
let mut payload = vec![0u8; 4 + size];
|
||||
payload[..4].copy_from_slice(&request.to_le_bytes());
|
||||
ptr::copy_nonoverlapping(data as *const u8, payload[4..].as_mut_ptr(), size);
|
||||
if let Err(err) = write_all(fd, &payload) {
|
||||
return err;
|
||||
}
|
||||
let mut response = vec![0u8; size];
|
||||
if let Err(err) = read_exact(fd, &mut response) {
|
||||
return err;
|
||||
}
|
||||
ptr::copy_nonoverlapping(response.as_ptr(), data, size);
|
||||
}
|
||||
0
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn drm_mode_config_reset(_dev: *mut u8) {}
|
||||
pub extern "C" fn drm_mode_config_reset(dev: *mut u8) {
|
||||
let _ = drm_ioctl(dev, DRM_IOCTL_MODE_GETRESOURCES, ptr::null_mut(), ptr::null_mut());
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn drm_connector_register(_connector: *mut u8) -> i32 {
|
||||
log::debug!("drm_connector_register: userspace no-op");
|
||||
0
|
||||
}
|
||||
|
||||
@@ -351,15 +734,16 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn drm_ioctl_returns_zero() {
|
||||
fn drm_ioctl_maps_commands() {
|
||||
assert_eq!(ioctl_request(DRM_IOCTL_GEM_CREATE), Some(DRM_IOCTL_GEM_CREATE));
|
||||
assert_eq!(ioctl_request(0xdeadbeef), None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn drm_ioctl_rejects_unknown_cmd() {
|
||||
assert_eq!(
|
||||
drm_ioctl(
|
||||
std::ptr::null_mut(),
|
||||
0,
|
||||
std::ptr::null_mut(),
|
||||
std::ptr::null_mut()
|
||||
),
|
||||
0
|
||||
drm_ioctl(std::ptr::null_mut(), 0xdeadbeef, std::ptr::null_mut(), std::ptr::null_mut()),
|
||||
-EINVAL
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,5 +20,7 @@ mkdir -p "${COOKBOOK_STAGE}/usr/include/linux"
|
||||
cp "${COOKBOOK_SOURCE}/include/linux/linux/input.h" "${COOKBOOK_STAGE}/usr/include/linux/"
|
||||
cp "${COOKBOOK_SOURCE}/include/linux/linux/input-event-codes.h" "${COOKBOOK_STAGE}/usr/include/linux/"
|
||||
cp "${COOKBOOK_SOURCE}/include/linux/linux/uinput.h" "${COOKBOOK_STAGE}/usr/include/linux/"
|
||||
cp "${COOKBOOK_SOURCE}/include/linux/kd.h" "${COOKBOOK_STAGE}/usr/include/linux/"
|
||||
cp "${COOKBOOK_SOURCE}/include/linux/vt.h" "${COOKBOOK_STAGE}/usr/include/linux/"
|
||||
cp "${COOKBOOK_SOURCE}/include/linux/types.h" "${COOKBOOK_STAGE}/usr/include/linux/"
|
||||
"""
|
||||
"""
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef _LINUX_KD_H
|
||||
#define _LINUX_KD_H
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#define KDGETMODE 0x4B3B
|
||||
#define KDSETMODE 0x4B3A
|
||||
|
||||
#define KD_TEXT 0x00
|
||||
#define KD_GRAPHICS 0x01
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,30 @@
|
||||
#ifndef _LINUX_VT_H
|
||||
#define _LINUX_VT_H
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#define VT_OPENQRY 0x5600
|
||||
#define VT_GETMODE 0x5601
|
||||
#define VT_SETMODE 0x5602
|
||||
#define VT_GETSTATE 0x5603
|
||||
#define VT_RELDISP 0x5605
|
||||
|
||||
#define VT_AUTO 0x00
|
||||
#define VT_PROCESS 0x01
|
||||
#define VT_ACKACQ 0x02
|
||||
|
||||
struct vt_mode {
|
||||
char mode;
|
||||
char waitv;
|
||||
short relsig;
|
||||
short acqsig;
|
||||
short frsig;
|
||||
};
|
||||
|
||||
struct vt_stat {
|
||||
unsigned short v_active;
|
||||
unsigned short v_signal;
|
||||
unsigned short v_state;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -150,7 +150,9 @@ if [ -z "$OBJS" ]; then
|
||||
echo "ERROR: no object files compiled successfully"
|
||||
exit 1
|
||||
fi
|
||||
"${TARGET_CC}" -shared -o libamdgpu_dc_redox.so $OBJS -lm -lpthread
|
||||
"${TARGET_CC}" -shared -o libamdgpu_dc_redox.so $OBJS \
|
||||
-L"${COOKBOOK_SYSROOT}/usr/lib" -llinux_kpi \
|
||||
-lm -lpthread
|
||||
|
||||
# Install
|
||||
mkdir -p "${COOKBOOK_STAGE}/usr/lib/redox/drivers"
|
||||
|
||||
@@ -137,18 +137,19 @@ typedef struct {
|
||||
#define spin_lock_irq(l) spin_lock((l))
|
||||
#define spin_unlock_irq(l) spin_unlock((l))
|
||||
|
||||
/* ---- Power management stubs ---- */
|
||||
#define pm_runtime_get_sync(dev) 0
|
||||
#define pm_runtime_put_autosuspend(dev) 0
|
||||
#define pm_runtime_allow(dev) 0
|
||||
#define pm_runtime_forbid(dev) 0
|
||||
#define pm_runtime_set_active(dev) 0
|
||||
#define pm_runtime_enable(dev) 0
|
||||
#define pm_runtime_disable(dev) 0
|
||||
#define pm_runtime_idle(dev) 0
|
||||
#define pm_runtime_put_noidle(dev) 0
|
||||
#define pm_runtime_get_noresume(dev) 0
|
||||
#define pm_suspend_ignore_children(dev, enable) /* noop */
|
||||
struct device;
|
||||
|
||||
extern int pm_runtime_get_sync(struct device *dev);
|
||||
extern int pm_runtime_put_autosuspend(struct device *dev);
|
||||
extern int pm_runtime_allow(struct device *dev);
|
||||
extern int pm_runtime_forbid(struct device *dev);
|
||||
extern int pm_runtime_set_active(struct device *dev);
|
||||
extern int pm_runtime_enable(struct device *dev);
|
||||
extern int pm_runtime_disable(struct device *dev);
|
||||
extern int pm_runtime_idle(struct device *dev);
|
||||
extern int pm_runtime_put_noidle(struct device *dev);
|
||||
extern int pm_runtime_get_noresume(struct device *dev);
|
||||
extern void pm_suspend_ignore_children(struct device *dev, int enable);
|
||||
|
||||
/* ---- I/O memory — maps to redox-driver-sys MmioRegion ---- */
|
||||
extern void __iomem *redox_ioremap(phys_addr_t offset, size_t size);
|
||||
|
||||
@@ -23,23 +23,6 @@ static void redox_jiffies_advance(unsigned long delta)
|
||||
__sync_add_and_fetch(&jiffies, delta);
|
||||
}
|
||||
|
||||
void *kmalloc(size_t size, unsigned int flags)
|
||||
{
|
||||
(void)flags;
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void *kzalloc(size_t size, unsigned int flags)
|
||||
{
|
||||
(void)flags;
|
||||
return calloc(1, size);
|
||||
}
|
||||
|
||||
void kfree(const void *ptr)
|
||||
{
|
||||
free((void *)ptr);
|
||||
}
|
||||
|
||||
void *vmalloc(unsigned long size)
|
||||
{
|
||||
return malloc((size_t)size);
|
||||
@@ -296,19 +279,6 @@ void redox_pci_release_regions(struct pci_dev *pdev)
|
||||
(void)pdev;
|
||||
}
|
||||
|
||||
u64 pci_get_quirk_flags(struct pci_dev *pdev)
|
||||
{
|
||||
(void)pdev;
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool pci_has_quirk(struct pci_dev *pdev, u64 flag)
|
||||
{
|
||||
(void)pdev;
|
||||
(void)flag;
|
||||
return false;
|
||||
}
|
||||
|
||||
int redox_request_firmware(const struct firmware **fw, const char *name, void *dev)
|
||||
{
|
||||
char path[512];
|
||||
@@ -434,3 +404,251 @@ unsigned long usecs_to_jiffies(unsigned int usecs)
|
||||
{
|
||||
return (unsigned long)DIV_ROUND_UP(usecs, 1000U);
|
||||
}
|
||||
|
||||
struct redox_pm_state {
|
||||
struct device *dev;
|
||||
int usage_count;
|
||||
bool enabled;
|
||||
bool allowed;
|
||||
bool active;
|
||||
bool ignore_children;
|
||||
bool no_pm;
|
||||
struct redox_pm_state *next;
|
||||
};
|
||||
|
||||
static pthread_mutex_t g_pm_lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
static struct redox_pm_state *g_pm_states;
|
||||
|
||||
static struct redox_pm_state *redox_pm_find_state(struct device *dev)
|
||||
{
|
||||
struct redox_pm_state *state;
|
||||
|
||||
for (state = g_pm_states; state != NULL; state = state->next) {
|
||||
if (state->dev == dev) {
|
||||
return state;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static struct redox_pm_state *redox_pm_get_state(struct device *dev)
|
||||
{
|
||||
struct redox_pm_state *state = redox_pm_find_state(dev);
|
||||
struct pci_dev *pdev;
|
||||
|
||||
if (state != NULL || dev == NULL) {
|
||||
return state;
|
||||
}
|
||||
|
||||
state = kzalloc(sizeof(*state), 0);
|
||||
if (state == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
state->dev = dev;
|
||||
pdev = dev->pci_dev;
|
||||
if (pdev != NULL) {
|
||||
state->no_pm = pci_has_quirk(pdev, PCI_QUIRK_NO_PM);
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&g_pm_lock);
|
||||
state->next = g_pm_states;
|
||||
g_pm_states = state;
|
||||
pthread_mutex_unlock(&g_pm_lock);
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
static bool redox_pm_blocked(struct redox_pm_state *state)
|
||||
{
|
||||
return state == NULL || state->no_pm;
|
||||
}
|
||||
|
||||
int pm_runtime_get_sync(struct device *dev)
|
||||
{
|
||||
struct redox_pm_state *state = redox_pm_get_state(dev);
|
||||
|
||||
if (redox_pm_blocked(state)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&g_pm_lock);
|
||||
state->usage_count++;
|
||||
state->active = true;
|
||||
pthread_mutex_unlock(&g_pm_lock);
|
||||
|
||||
dev_info(dev, "runtime PM get_sync: usage=%d\n", state->usage_count);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pm_runtime_get_noresume(struct device *dev)
|
||||
{
|
||||
struct redox_pm_state *state = redox_pm_get_state(dev);
|
||||
|
||||
if (redox_pm_blocked(state)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&g_pm_lock);
|
||||
state->usage_count++;
|
||||
pthread_mutex_unlock(&g_pm_lock);
|
||||
|
||||
dev_info(dev, "runtime PM get_noresume: usage=%d\n", state->usage_count);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pm_runtime_put_autosuspend(struct device *dev)
|
||||
{
|
||||
struct redox_pm_state *state = redox_pm_get_state(dev);
|
||||
|
||||
if (redox_pm_blocked(state)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&g_pm_lock);
|
||||
if (state->usage_count > 0) {
|
||||
state->usage_count--;
|
||||
}
|
||||
if (state->usage_count == 0 && state->allowed && state->enabled) {
|
||||
state->active = false;
|
||||
}
|
||||
pthread_mutex_unlock(&g_pm_lock);
|
||||
|
||||
dev_info(dev, "runtime PM put_autosuspend: usage=%d active=%d\n",
|
||||
state->usage_count, state->active ? 1 : 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pm_runtime_put_noidle(struct device *dev)
|
||||
{
|
||||
struct redox_pm_state *state = redox_pm_get_state(dev);
|
||||
|
||||
if (redox_pm_blocked(state)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&g_pm_lock);
|
||||
if (state->usage_count > 0) {
|
||||
state->usage_count--;
|
||||
}
|
||||
pthread_mutex_unlock(&g_pm_lock);
|
||||
|
||||
dev_info(dev, "runtime PM put_noidle: usage=%d\n", state->usage_count);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pm_runtime_idle(struct device *dev)
|
||||
{
|
||||
struct redox_pm_state *state = redox_pm_get_state(dev);
|
||||
|
||||
if (redox_pm_blocked(state)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&g_pm_lock);
|
||||
if (state->usage_count == 0 && state->allowed && state->enabled) {
|
||||
state->active = false;
|
||||
}
|
||||
pthread_mutex_unlock(&g_pm_lock);
|
||||
|
||||
dev_info(dev, "runtime PM idle: active=%d\n", state->active ? 1 : 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pm_runtime_set_active(struct device *dev)
|
||||
{
|
||||
struct redox_pm_state *state = redox_pm_get_state(dev);
|
||||
|
||||
if (redox_pm_blocked(state)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&g_pm_lock);
|
||||
state->active = true;
|
||||
if (state->usage_count < 1) {
|
||||
state->usage_count = 1;
|
||||
}
|
||||
pthread_mutex_unlock(&g_pm_lock);
|
||||
|
||||
dev_info(dev, "runtime PM set_active\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pm_runtime_enable(struct device *dev)
|
||||
{
|
||||
struct redox_pm_state *state = redox_pm_get_state(dev);
|
||||
|
||||
if (redox_pm_blocked(state)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&g_pm_lock);
|
||||
state->enabled = true;
|
||||
pthread_mutex_unlock(&g_pm_lock);
|
||||
|
||||
dev_info(dev, "runtime PM enabled\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pm_runtime_disable(struct device *dev)
|
||||
{
|
||||
struct redox_pm_state *state = redox_pm_get_state(dev);
|
||||
|
||||
if (state == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&g_pm_lock);
|
||||
state->enabled = false;
|
||||
pthread_mutex_unlock(&g_pm_lock);
|
||||
|
||||
dev_info(dev, "runtime PM disabled\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pm_runtime_allow(struct device *dev)
|
||||
{
|
||||
struct redox_pm_state *state = redox_pm_get_state(dev);
|
||||
|
||||
if (state == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&g_pm_lock);
|
||||
state->allowed = true;
|
||||
pthread_mutex_unlock(&g_pm_lock);
|
||||
|
||||
dev_info(dev, "runtime PM allowed\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pm_runtime_forbid(struct device *dev)
|
||||
{
|
||||
struct redox_pm_state *state = redox_pm_get_state(dev);
|
||||
|
||||
if (state == NULL) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&g_pm_lock);
|
||||
state->allowed = false;
|
||||
pthread_mutex_unlock(&g_pm_lock);
|
||||
|
||||
dev_info(dev, "runtime PM forbidden\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void pm_suspend_ignore_children(struct device *dev, int enable)
|
||||
{
|
||||
struct redox_pm_state *state = redox_pm_get_state(dev);
|
||||
|
||||
if (state == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&g_pm_lock);
|
||||
state->ignore_children = (bool)enable;
|
||||
pthread_mutex_unlock(&g_pm_lock);
|
||||
|
||||
dev_info(dev, "runtime PM ignore_children=%d\n", enable ? 1 : 0);
|
||||
}
|
||||
|
||||
@@ -787,7 +787,7 @@ mod tests {
|
||||
subsystem_vendor_id: 0,
|
||||
subsystem_device_id: 0,
|
||||
revision: 0,
|
||||
class_code: 0x030000,
|
||||
class_code: 0x03,
|
||||
subclass: 0,
|
||||
prog_if: 0,
|
||||
header_type: 0,
|
||||
|
||||
@@ -398,6 +398,7 @@ struct Handle {
|
||||
owned_gems: Vec<GemHandle>,
|
||||
imported_gems: HashSet<GemHandle>,
|
||||
closing: bool,
|
||||
last_submitted_seqno: u64,
|
||||
}
|
||||
|
||||
pub struct DrmScheme {
|
||||
@@ -659,6 +660,7 @@ impl DrmScheme {
|
||||
owned_gems: Vec::new(),
|
||||
imported_gems: HashSet::new(),
|
||||
closing: false,
|
||||
last_submitted_seqno: 0,
|
||||
},
|
||||
);
|
||||
id
|
||||
@@ -1343,6 +1345,9 @@ impl DrmScheme {
|
||||
.redox_private_cs_submit(&submit)
|
||||
.map_err(driver_to_syscall)?
|
||||
.seqno;
|
||||
if let Some(handle) = self.handles.get_mut(&id) {
|
||||
handle.last_submitted_seqno = req.seqno;
|
||||
}
|
||||
bytes_of(&req)
|
||||
}
|
||||
|
||||
@@ -1450,6 +1455,9 @@ impl DrmScheme {
|
||||
.driver
|
||||
.redox_private_cs_submit(&req)
|
||||
.map_err(driver_to_syscall)?;
|
||||
if let Some(handle) = self.handles.get_mut(&id) {
|
||||
handle.last_submitted_seqno = resp.seqno;
|
||||
}
|
||||
bytes_of(&resp)
|
||||
}
|
||||
|
||||
@@ -1808,9 +1816,26 @@ impl SchemeSync for DrmScheme {
|
||||
}
|
||||
|
||||
fn fsync(&mut self, id: usize, _ctx: &CallerCtx) -> Result<()> {
|
||||
let _ = self.handles.get(&id).ok_or_else(|| Error::new(EBADF))?;
|
||||
warn!("redox-drm: fsync rejected — shared core has no implicit render-fence sync contract");
|
||||
Err(Error::new(EOPNOTSUPP))
|
||||
let handle = self.handles.get(&id).ok_or_else(|| Error::new(EBADF))?;
|
||||
let seqno = handle.last_submitted_seqno;
|
||||
if seqno == 0 {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
const FSYNC_TIMEOUT_NS: u64 = 5_000_000_000;
|
||||
let result = self
|
||||
.driver
|
||||
.redox_private_cs_wait(&RedoxPrivateCsWait {
|
||||
seqno,
|
||||
timeout_ns: FSYNC_TIMEOUT_NS,
|
||||
})
|
||||
.map_err(driver_to_syscall)?;
|
||||
|
||||
if result.completed {
|
||||
Ok(())
|
||||
} else {
|
||||
Err(Error::new(EBUSY))
|
||||
}
|
||||
}
|
||||
|
||||
fn fevent(&mut self, id: usize, flags: EventFlags, _ctx: &CallerCtx) -> Result<EventFlags> {
|
||||
@@ -2026,7 +2051,7 @@ mod tests {
|
||||
use std::collections::BTreeMap;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use redox_scheme::scheme::SchemeSync;
|
||||
use redox_scheme::{scheme::SchemeSync, CallerCtx};
|
||||
|
||||
use super::*;
|
||||
use crate::driver::{DriverError, DriverEvent, GpuDriver};
|
||||
@@ -2037,6 +2062,7 @@ mod tests {
|
||||
next_handle: GemHandle,
|
||||
gem_sizes: BTreeMap<GemHandle, u64>,
|
||||
submit_calls: usize,
|
||||
last_submitted_seqno: u64,
|
||||
}
|
||||
|
||||
struct FakeDriver {
|
||||
@@ -2163,8 +2189,63 @@ mod tests {
|
||||
|
||||
let mut state = self.state.lock().unwrap();
|
||||
state.submit_calls = state.submit_calls.saturating_add(1);
|
||||
state.last_submitted_seqno = 7;
|
||||
Ok(RedoxPrivateCsSubmitResult { seqno: 7 })
|
||||
}
|
||||
|
||||
fn redox_private_cs_wait(
|
||||
&self,
|
||||
wait: &RedoxPrivateCsWait,
|
||||
) -> crate::driver::Result<RedoxPrivateCsWaitResult> {
|
||||
if !self.support_private_cs {
|
||||
return Err(DriverError::Unsupported(
|
||||
"private command completion waits are unavailable on this backend",
|
||||
));
|
||||
}
|
||||
|
||||
let state = self.state.lock().unwrap();
|
||||
let completed = wait.seqno <= state.last_submitted_seqno;
|
||||
Ok(RedoxPrivateCsWaitResult {
|
||||
completed,
|
||||
completed_seqno: if completed { wait.seqno } else { 0 },
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn ctx() -> CallerCtx {
|
||||
CallerCtx::default()
|
||||
}
|
||||
|
||||
impl DrmScheme {
|
||||
fn open(
|
||||
&mut self,
|
||||
path: &str,
|
||||
_flags: usize,
|
||||
_a: u32,
|
||||
_b: u32,
|
||||
) -> Result<Option<usize>> {
|
||||
let res = SchemeSync::openat(self, 0, path, 0, 0, &ctx())?;
|
||||
let OpenResult::ThisScheme { number, .. } = res else {
|
||||
return Ok(None);
|
||||
};
|
||||
Ok(Some(number))
|
||||
}
|
||||
|
||||
fn read(&mut self, id: usize, buf: &mut [u8]) -> Result<Option<usize>> {
|
||||
SchemeSync::read(self, id, buf, 0, 0, &ctx()).map(Some)
|
||||
}
|
||||
|
||||
fn write(&mut self, id: usize, buf: &[u8]) -> Result<Option<usize>> {
|
||||
SchemeSync::write(self, id, buf, 0, 0, &ctx()).map(Some)
|
||||
}
|
||||
|
||||
fn fsync(&mut self, id: usize) -> Result<()> {
|
||||
SchemeSync::fsync(self, id, &ctx())
|
||||
}
|
||||
|
||||
fn fevent(&mut self, id: usize, flags: EventFlags) -> Result<Option<EventFlags>> {
|
||||
SchemeSync::fevent(self, id, flags, &ctx()).map(Some)
|
||||
}
|
||||
}
|
||||
|
||||
fn open_card(scheme: &mut DrmScheme) -> usize {
|
||||
@@ -2295,13 +2376,34 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fsync_is_not_a_fake_render_sync_success() {
|
||||
let mut scheme = DrmScheme::new(Arc::new(FakeDriver::new(false)));
|
||||
fn fsync_waits_for_last_render_fence() {
|
||||
let driver = Arc::new(FakeDriver::new(true));
|
||||
let mut scheme = DrmScheme::new(driver.clone());
|
||||
let card = open_card(&mut scheme);
|
||||
|
||||
let err = scheme.fsync(card).unwrap_err();
|
||||
scheme.fsync(card).unwrap();
|
||||
|
||||
assert_eq!(err.errno, EOPNOTSUPP);
|
||||
for _ in 0..2 {
|
||||
let create = DrmGemCreateWire {
|
||||
size: 4096,
|
||||
..DrmGemCreateWire::default()
|
||||
};
|
||||
write_ioctl(&mut scheme, card, DRM_IOCTL_GEM_CREATE, &create).unwrap();
|
||||
let _ = read_response::<DrmGemCreateWire>(&mut scheme, card);
|
||||
}
|
||||
|
||||
let handles = scheme.handles.get(&card).unwrap().owned_gems.clone();
|
||||
let submit = RedoxPrivateCsSubmit {
|
||||
src_handle: handles[0],
|
||||
dst_handle: handles[1],
|
||||
src_offset: 0,
|
||||
dst_offset: 0,
|
||||
byte_count: 128,
|
||||
};
|
||||
write_ioctl(&mut scheme, card, DRM_IOCTL_REDOX_PRIVATE_CS_SUBMIT, &submit).unwrap();
|
||||
let _ = read_response::<RedoxPrivateCsSubmitResult>(&mut scheme, card);
|
||||
|
||||
scheme.fsync(card).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -45,7 +45,7 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
-DBUILD_QCH=OFF \
|
||||
-DWITH_BZIP2=OFF \
|
||||
-DWITH_LIBZSTD=OFF \
|
||||
-DUSE_DBUS=OFF \
|
||||
-DUSE_DBUS=ON \
|
||||
-Wno-dev
|
||||
|
||||
cmake --build . -j${COOKBOOK_MAKE_JOBS}
|
||||
|
||||
@@ -49,7 +49,7 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}" \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DBUILD_QCH=OFF \
|
||||
-DUSE_DBUS=OFF \
|
||||
-DUSE_DBUS=ON \
|
||||
-Wno-dev
|
||||
|
||||
cmake --build . -j${COOKBOOK_MAKE_JOBS}
|
||||
|
||||
@@ -18,10 +18,7 @@ source "${COOKBOOK_ROOT}/local/scripts/lib/qt-sysroot.sh"
|
||||
|
||||
redbear_qt_link_sysroot_dirs "${COOKBOOK_SYSROOT}" plugins mkspecs metatypes modules
|
||||
|
||||
sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/" \
|
||||
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
|
||||
sed -i 's/^find_package(Gperf REQUIRED)/#find_package(Gperf REQUIRED)/' \
|
||||
sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm # translations deferred until lupdate/lrelease is built for target/" \
|
||||
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
|
||||
GPERF="$HOME/.local/bin/gperf"
|
||||
|
||||
@@ -39,7 +39,7 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}" \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DBUILD_QCH=OFF \
|
||||
-DUSE_DBUS=OFF \
|
||||
-DUSE_DBUS=ON \
|
||||
-Wno-dev
|
||||
|
||||
cmake --build . -j${COOKBOOK_MAKE_JOBS}
|
||||
|
||||
@@ -32,8 +32,8 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}" \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DBUILD_QCH=OFF \
|
||||
-DKCONFIG_USE_QML=OFF \
|
||||
-DUSE_DBUS=OFF \
|
||||
-DKCONFIG_USE_QML=ON \
|
||||
-DUSE_DBUS=ON \
|
||||
-Wno-dev
|
||||
|
||||
cmake --build . -j${COOKBOOK_MAKE_JOBS}
|
||||
|
||||
@@ -44,7 +44,7 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}" \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DBUILD_QCH=OFF \
|
||||
-DUSE_DBUS=OFF \
|
||||
-DUSE_DBUS=ON \
|
||||
-Wno-dev
|
||||
|
||||
cmake --build . -j${COOKBOOK_MAKE_JOBS}
|
||||
|
||||
@@ -32,8 +32,8 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}" \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DBUILD_QCH=OFF \
|
||||
-DKCOREADDONS_USE_QML=OFF \
|
||||
-DUSE_DBUS=OFF \
|
||||
-DKCOREADDONS_USE_QML=ON \
|
||||
-DUSE_DBUS=ON \
|
||||
-Wno-dev
|
||||
|
||||
cmake --build . -j${COOKBOOK_MAKE_JOBS}
|
||||
|
||||
@@ -49,7 +49,7 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DBUILD_QCH=OFF \
|
||||
-DBUILD_WITH_QML=OFF \
|
||||
-DUSE_DBUS=OFF \
|
||||
-DUSE_DBUS=ON \
|
||||
-Wno-dev
|
||||
|
||||
cmake --build . -j${COOKBOOK_MAKE_JOBS}
|
||||
|
||||
@@ -31,9 +31,9 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}" \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DBUILD_QCH=OFF \
|
||||
-DWITH_WAYLAND=OFF \
|
||||
-DWITH_WAYLAND=ON \
|
||||
-DWITH_X11=OFF \
|
||||
-DUSE_DBUS=OFF \
|
||||
-DUSE_DBUS=ON \
|
||||
-Wno-dev
|
||||
|
||||
cmake --build . -j${COOKBOOK_MAKE_JOBS}
|
||||
|
||||
@@ -26,12 +26,15 @@ source "${COOKBOOK_ROOT}/local/scripts/lib/qt-sysroot.sh"
|
||||
|
||||
redbear_qt_link_sysroot_dirs "${COOKBOOK_SYSROOT}" plugins mkspecs metatypes modules
|
||||
|
||||
sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/" \
|
||||
sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm # translations deferred until lupdate/lrelease is built for target/" \
|
||||
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i 's/^ki18n_install(po)/#ki18n_install(po)/' \
|
||||
sed -i 's/^ki18n_install(po)/#ki18n_install(po) # translations deferred until lupdate/lrelease is built for target/' \
|
||||
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i '/find_package(Qt6Widgets/a find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)' \
|
||||
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
# QML subdirectory, ECMQmlModule, and Qml/Quick dependency kept disabled:
|
||||
# kiconthemes QML surfaces need the full QML runtime which depends on
|
||||
# lupdate/lrelease for cross-build.
|
||||
sed -i '/include(ECMQmlModule)/s/^/#/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i '/add_subdirectory(qml)/s/^/#/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i '/add_subdirectory(qml)/s/^/#/' "${COOKBOOK_SOURCE}/src/CMakeLists.txt" 2>/dev/null || true
|
||||
@@ -66,7 +69,7 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DBUILD_QCH=OFF \
|
||||
-DBUILD_WITH_QML=OFF \
|
||||
-DUSE_DBUS=OFF \
|
||||
-DUSE_DBUS=ON \
|
||||
-Wno-dev
|
||||
|
||||
cmake --build . -j${COOKBOOK_MAKE_JOBS}
|
||||
|
||||
@@ -177,7 +177,7 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
-DBUILD_WITH_QML=OFF \
|
||||
-DUSE_DBUS=ON \
|
||||
-DWITH_X11=OFF \
|
||||
-DWITH_WAYLAND=OFF \
|
||||
-DWITH_WAYLAND=ON \
|
||||
-Wno-dev
|
||||
|
||||
cmake --build . -j${COOKBOOK_MAKE_JOBS}
|
||||
|
||||
@@ -42,7 +42,7 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DBUILD_QCH=OFF \
|
||||
-DBUILD_WITH_QML=OFF \
|
||||
-DUSE_DBUS=OFF \
|
||||
-DUSE_DBUS=ON \
|
||||
-Wno-dev
|
||||
|
||||
cmake --build . -j${COOKBOOK_MAKE_JOBS}
|
||||
|
||||
@@ -37,7 +37,7 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}" \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DBUILD_QCH=OFF \
|
||||
-DUSE_DBUS=OFF \
|
||||
-DUSE_DBUS=ON \
|
||||
-Wno-dev
|
||||
|
||||
cmake --build . -j${COOKBOOK_MAKE_JOBS}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#TODO: KNewStuff — core-only build on Redox. Qt Quick, widgets, tools, and Kirigami-facing surfaces disabled. KF6Attica now available in-tree (kf6-attica recipe).
|
||||
#TODO: KNewStuff — QML qtquick and tools subdirs disabled on Redox. Qt Quick and widgets surfaces are present; full KNewStuff UI requires lupdate/lrelease for target which is not built.
|
||||
[source]
|
||||
tar = "https://download.kde.org/stable/frameworks/6.27/knewstuff-6.27.0.tar.xz"
|
||||
blake3 = "0e029c272924b2be79097d1bd228c099509ad9bcf60280b5f8ed3648c2db7be5"
|
||||
@@ -25,19 +25,19 @@ source "${COOKBOOK_ROOT}/local/scripts/lib/qt-sysroot.sh"
|
||||
|
||||
redbear_qt_link_sysroot_dirs "${COOKBOOK_SYSROOT}" plugins mkspecs metatypes modules
|
||||
|
||||
sed -i 's/^include(ECMQmlModule)/# include(ECMQmlModule) # disabled for Redox core-only build/' \
|
||||
sed -i 's/^include(ECMQmlModule)/# include(ECMQmlModule) # QML module kept disabled — lupdate not built for target/' \
|
||||
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i 's/^find_package(KF6Kirigami2.*/# find_package(KF6Kirigami2 disabled for Redox core-only build)/' \
|
||||
sed -i 's/^find_package(KF6Kirigami2.*/find_package(KF6Kirigami2 ${KF_DEP_VERSION} REQUIRED)/' \
|
||||
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i 's/^# find_package(KF6Attica disabled - KF6Attica not yet available)/find_package(KF6Attica ${KF_DEP_VERSION} REQUIRED)/' \
|
||||
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i 's/^ki18n_install(po)/#ki18n_install(po)/' \
|
||||
sed -i "s/^ki18n_install(po)/#ki18n_install(po) # translations deferred until lupdate/lrelease is built for target/" \
|
||||
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i 's/^add_subdirectory(qtquick)/# add_subdirectory(qtquick) # disabled for Redox core-only build/' \
|
||||
sed -i 's/^add_subdirectory(qtquick)/# add_subdirectory(qtquick) # QML subdir kept disabled — lupdate not built for target/' \
|
||||
"${COOKBOOK_SOURCE}/src/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i 's/^add_subdirectory(tools)/# add_subdirectory(tools) # disabled for Redox core-only build/' \
|
||||
sed -i 's/^add_subdirectory(tools)/# add_subdirectory(tools) # QML subdir kept disabled — lupdate not built for target/' \
|
||||
"${COOKBOOK_SOURCE}/src/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i 's/^add_subdirectory(tools)/# add_subdirectory(tools) # disabled for Redox core-only build/' \
|
||||
sed -i 's/^add_subdirectory(tools)/# add_subdirectory(tools) # QML subdir kept disabled — lupdate not built for target/' \
|
||||
"${COOKBOOK_SOURCE}/src/CMakeLists.txt" 2>/dev/null || true
|
||||
|
||||
rm -f CMakeCache.txt
|
||||
|
||||
@@ -37,7 +37,7 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DBUILD_QCH=OFF \
|
||||
-DBUILD_TOOLS=OFF \
|
||||
-DUSE_DBUS=OFF \
|
||||
-DUSE_DBUS=ON \
|
||||
-Wno-dev
|
||||
|
||||
cmake --build . -j${COOKBOOK_MAKE_JOBS}
|
||||
|
||||
@@ -44,7 +44,7 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DBUILD_QCH=OFF \
|
||||
-DWITH_TEXT_TO_SPEECH=OFF \
|
||||
-DUSE_DBUS=OFF \
|
||||
-DUSE_DBUS=ON \
|
||||
-Wno-dev
|
||||
|
||||
cmake --build . -j${COOKBOOK_MAKE_JOBS}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#TODO: KWallet — build the real KF6 client library on Redox; kwalletd, kwallet-query, translations, and X11 runtime paths stay disabled until the broader runtime service surface is proven.
|
||||
#TODO: KWallet — build the real KF6 client library; KF6WindowSystem + KF6I18n enabled. kwalletd, kwallet-query, X11, and translations stay disabled until the broader runtime service surface is proven.
|
||||
[source]
|
||||
tar = "https://download.kde.org/stable/frameworks/6.27/kwallet-6.27.0.tar.xz"
|
||||
blake3 = "9185050e68a39664bf219b82a10ee6c30f037af8db28b8a5653e2ddcca4790ce"
|
||||
@@ -10,6 +10,8 @@ dependencies = [
|
||||
"kf6-extra-cmake-modules",
|
||||
"kf6-kcoreaddons",
|
||||
"kf6-kconfig",
|
||||
"kf6-kwindowsystem",
|
||||
"kf6-ki18n",
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
@@ -22,11 +24,7 @@ for qtdir in plugins mkspecs metatypes modules; do
|
||||
fi
|
||||
done
|
||||
|
||||
sed -i 's/^find_package(KF6WindowSystem .* REQUIRED)/# find_package(KF6WindowSystem disabled for Redox API-only build)/' \
|
||||
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i 's/^find_package(KF6I18n .* REQUIRED)/# find_package(KF6I18n disabled for Redox API-only build)/' \
|
||||
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i 's/^ki18n_install(po)/#ki18n_install(po)/' \
|
||||
sed -i 's/^ki18n_install(po)/#ki18n_install(po) # translations deferred until lupdate/lrelease is built for target/' \
|
||||
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
|
||||
rm -f CMakeCache.txt
|
||||
|
||||
@@ -27,13 +27,8 @@ if [ ! -e "${COOKBOOK_SYSROOT}/bin/wayland-scanner" ] || [ -f "${COOKBOOK_SYSROO
|
||||
ln -sf "/usr/bin/wayland-scanner" "${COOKBOOK_SYSROOT}/bin/wayland-scanner"
|
||||
fi
|
||||
|
||||
sed -i 's/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i 's/^ki18n_install(po)/#ki18n_install(po)/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
|
||||
sed -i 's/^find_package(WaylandProtocols 1.15)/#find_package(WaylandProtocols 1.15)/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i 's/^set_package_properties(WaylandProtocols PROPERTIES TYPE REQUIRED)/#set_package_properties(WaylandProtocols PROPERTIES TYPE REQUIRED)/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i 's/^find_package(PlasmaWaylandProtocols 1.16.0 CONFIG)/#find_package(PlasmaWaylandProtocols 1.16.0 CONFIG)/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i 's/^set_package_properties(PlasmaWaylandProtocols PROPERTIES TYPE REQUIRED)/#set_package_properties(PlasmaWaylandProtocols PROPERTIES TYPE REQUIRED)/' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm # translations deferred until lupdate/lrelease is built for target/" "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i "s/^ki18n_install(po)/#ki18n_install(po) # translations deferred until lupdate/lrelease is built for target/" "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i '/^find_package(Wayland 1.15/a find_package(Qt6WaylandClientPrivate REQUIRED)' "${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
|
||||
rm -f CMakeCache.txt
|
||||
|
||||
@@ -62,7 +62,7 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DBUILD_QCH=OFF \
|
||||
-DBUILD_WITH_QML=OFF \
|
||||
-DUSE_DBUS=OFF \
|
||||
-DUSE_DBUS=ON \
|
||||
-Wno-dev
|
||||
|
||||
cmake --build . -j${COOKBOOK_MAKE_JOBS}
|
||||
|
||||
@@ -40,7 +40,7 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}:${COOKBOOK_STAGE}/usr/lib/cmake" \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DBUILD_QCH=OFF \
|
||||
-DUSE_DBUS=OFF \
|
||||
-DUSE_DBUS=ON \
|
||||
-DWITH_QUICK=OFF \
|
||||
-DBUILD_WITH_QML=OFF \
|
||||
-DWITH_MULTIMEDIA=OFF \
|
||||
|
||||
@@ -23,13 +23,13 @@ for qtdir in plugins mkspecs metatypes modules; do
|
||||
fi
|
||||
done
|
||||
|
||||
sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm/" \
|
||||
sed -i "s/^ecm_install_po_files_as_qm/#ecm_install_po_files_as_qm # translations deferred until lupdate/lrelease is built for target/" \
|
||||
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i 's/^ki18n_install(po)/#ki18n_install(po)/' \
|
||||
sed -i 's/^ki18n_install(po)/#ki18n_install(po) # translations deferred until lupdate/lrelease is built for target/' \
|
||||
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i '/if (BUILD_TESTING)/,/endif()/s/^/#/' \
|
||||
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
sed -i 's/find_package(UTEMPTER)/# find_package(UTEMPTER disabled on Redox)/' \
|
||||
sed -i 's/find_package(UTEMPTER)/# find_package(UTEMPTER disabled on Redox — no utmp/utmpx support in relibc/' \
|
||||
"${COOKBOOK_SOURCE}/CMakeLists.txt" 2>/dev/null || true
|
||||
|
||||
rm -f CMakeCache.txt
|
||||
|
||||
@@ -41,7 +41,7 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
-DSONNET_USE_QML=OFF \
|
||||
-DSONNET_NO_BACKENDS=ON \
|
||||
-DBUILD_DESIGNERPLUGIN=OFF \
|
||||
-DUSE_DBUS=OFF \
|
||||
-DUSE_DBUS=ON \
|
||||
-Wno-dev
|
||||
|
||||
cmake --build . -j${COOKBOOK_MAKE_JOBS}
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
#TODO: Kirigami — builds the C++ core with QML type registration macros as no-ops.
|
||||
# Qt6's cmake generates QML_ATTACHED_OFF_OFF_OFF_OFF_OFF_OFF etc. when QML features are
|
||||
# disabled at configure time. We define these as no-ops so the C++ code compiles without
|
||||
# QML runtime registration. Full QML/Quick support requires the QML JIT gate resolution.
|
||||
#TODO: Kirigami — builds the C++ core. FEATURE_qml=ON, FEATURE_network=ON, USE_DBUS=ON are now all enabled. QML_OFF_OFF_OFF_OFF_OFF_OFF and shader_noop.cmake are kept as safety nets for per-file QML opt-outs.
|
||||
[source]
|
||||
tar = "https://invent.kde.org/frameworks/kirigami/-/archive/v6.10.0/kirigami-v6.10.0.tar.gz"
|
||||
blake3 = "d0964890aa6523f7067510bb7e6c784ba77611952d952bfdd6422a58a23664f6"
|
||||
@@ -35,6 +32,10 @@ cat > "${COOKBOOK_BUILD}/qml_off_noop.h" << 'QMLEOF'
|
||||
#ifndef REDBEAR_QML_OFF_NOOP_H
|
||||
#define REDBEAR_QML_OFF_NOOP_H
|
||||
|
||||
// QML_ELEMENT_OFF_OFF_OFF_OFF_OFF_OFF and friends are generated by Qt6 cmake
|
||||
// when FEATURE_qml is OFF. Now that FEATURE_qml=ON, these macros are not
|
||||
// generated. These no-op definitions are kept as a safety net in case
|
||||
// individual source files opt out of QML via per-file CONFIG.
|
||||
#define QML_ELEMENT_OFF_OFF_OFF_OFF_OFF_OFF
|
||||
#define QML_NAMED_ELEMENT_OFF_OFF_OFF_OFF_OFF_OFF(NAME)
|
||||
#define QML_ATTACHED_OFF_OFF_OFF_OFF_OFF_OFF(ATTACHED_TYPE)
|
||||
@@ -44,19 +45,6 @@ cat > "${COOKBOOK_BUILD}/qml_off_noop.h" << 'QMLEOF'
|
||||
#endif
|
||||
QMLEOF
|
||||
|
||||
cat > "${COOKBOOK_BUILD}/redbear_network_stub.h" << 'NETEOF'
|
||||
#ifndef REDBEAR_NETWORK_STUB_H
|
||||
#define REDBEAR_NETWORK_STUB_H
|
||||
#include <QObject>
|
||||
#include <QUrl>
|
||||
#define QNetworkReply QObject
|
||||
#define QNetworkRequest struct QNetworkRequestStub { QNetworkRequestStub(const QUrl&) {} void setAttribute(int, int) {} };
|
||||
#define QNetworkAccessManager QObject
|
||||
enum { QNetworkReply__NoError = 0, QNetworkReply__ContentNotFoundError = 1 };
|
||||
#define QNetworkReply__finished destroyed
|
||||
#endif
|
||||
NETEOF
|
||||
|
||||
cat > "${COOKBOOK_BUILD}/shader_noop.cmake" << 'EOFCMAKE'
|
||||
function(qt6_add_shaders)
|
||||
endfunction()
|
||||
@@ -74,7 +62,7 @@ sed -i 's/^configure_file(qmllint.ini.in/# configure_file(qmllint.ini.in -- disa
|
||||
sed -i 's/^kde_configure_git_pre_commit_hook/# kde_configure_git_pre_commit_hook -- disabled/' "${COOKBOOK_SOURCE}/CMakeLists.txt"
|
||||
|
||||
# Add GuiPrivate to Qt6 find_package so the platform module can link it
|
||||
sed -i 's/COMPONENTS Core Quick Gui Svg QuickControls2 Concurrent ShaderTools/COMPONENTS Core Quick Gui GuiPrivate Svg QuickControls2 Concurrent ShaderTools/' "${COOKBOOK_SOURCE}/CMakeLists.txt"
|
||||
sed -i 's/COMPONENTS Core Quick Gui Svg QuickControls2 Concurrent ShaderTools/COMPONENTS Core Quick Gui GuiPrivate Network Svg QuickControls2 Concurrent ShaderTools/' "${COOKBOOK_SOURCE}/CMakeLists.txt"
|
||||
|
||||
# Fix missing QElapsedTimer include in toolbarlayout.cpp
|
||||
sed -i '/#include <QDeadlineTimer>/a #include <QElapsedTimer>' "${COOKBOOK_SOURCE}/src/layouts/toolbarlayout.cpp"
|
||||
@@ -87,13 +75,13 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
-DQT_HOST_PATH="${HOST_BUILD}" \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_CXX_FLAGS="-DQT_NO_NETWORK -include ${COOKBOOK_BUILD}/qml_off_noop.h -I${COOKBOOK_SOURCE}/stubs/QtNetwork -I${COOKBOOK_SYSROOT}/usr/include/QtQml -I${COOKBOOK_SYSROOT}/usr/include/QtQuick" \
|
||||
-DCMAKE_CXX_FLAGS="-include ${COOKBOOK_BUILD}/qml_off_noop.h -I${COOKBOOK_SOURCE}/stubs/QtNetwork -I${COOKBOOK_SYSROOT}/usr/include/QtQml -I${COOKBOOK_SYSROOT}/usr/include/QtQuick" \
|
||||
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}:${COOKBOOK_STAGE}/usr/lib/cmake" \
|
||||
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="${COOKBOOK_BUILD}/shader_noop.cmake" \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DBUILD_QCH=OFF \
|
||||
-DBUILD_EXAMPLES=OFF \
|
||||
-DUSE_DBUS=OFF \
|
||||
-DUSE_DBUS=ON \
|
||||
-DECM_ENABLE_QT_TRANSLATIONS=OFF \
|
||||
-DBUILD_TRANSLATIONS=OFF \
|
||||
-D__qt_Gui_always_load_private_module=ON \
|
||||
|
||||
@@ -26,6 +26,7 @@ dependencies = [
|
||||
"libwayland",
|
||||
"libxkbcommon",
|
||||
"libxau",
|
||||
"redbear-input-headers",
|
||||
"pam-redbear",
|
||||
]
|
||||
script = """
|
||||
@@ -53,8 +54,6 @@ CROSS_PKGCONFIG="${COOKBOOK_ROOT}/bin/x86_64-unknown-redox-pkg-config"
|
||||
|
||||
python3 "${COOKBOOK_RECIPE}/remove-x11user-helper.py" "${COOKBOOK_SOURCE}/src/helper/CMakeLists.txt"
|
||||
|
||||
cp -r "${COOKBOOK_RECIPE}/stubs/"* "${COOKBOOK_SYSROOT}/usr/include/"
|
||||
|
||||
chmod +x "${COOKBOOK_RECIPE}/wayland-patch.sh"
|
||||
"${COOKBOOK_RECIPE}/wayland-patch.sh" "${COOKBOOK_SOURCE}"
|
||||
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
#ifndef _X11_XAUTH_H
|
||||
#define _X11_XAUTH_H
|
||||
|
||||
typedef unsigned short Family;
|
||||
#define FamilyLocal 256
|
||||
|
||||
typedef struct _Xauth {
|
||||
unsigned short family;
|
||||
unsigned short address_length;
|
||||
char *address;
|
||||
unsigned short number_length;
|
||||
char *number;
|
||||
unsigned short name_length;
|
||||
char *name;
|
||||
unsigned short data_length;
|
||||
char *data;
|
||||
} Xauth;
|
||||
|
||||
#endif
|
||||
@@ -1,41 +0,0 @@
|
||||
#ifndef _UTMPX_H
|
||||
#define _UTMPX_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
|
||||
#define UTMPX_FILE "/var/run/utmpx"
|
||||
|
||||
#define EMPTY 0
|
||||
#define RUN_LVL 1
|
||||
#define BOOT_TIME 2
|
||||
#define NEW_TIME 3
|
||||
#define OLD_TIME 4
|
||||
#define INIT_PROCESS 5
|
||||
#define LOGIN_PROCESS 6
|
||||
#define USER_PROCESS 7
|
||||
#define DEAD_PROCESS 8
|
||||
|
||||
struct utmpx {
|
||||
short ut_type;
|
||||
pid_t ut_pid;
|
||||
char ut_line[32];
|
||||
char ut_id[4];
|
||||
char ut_user[32];
|
||||
char ut_host[256];
|
||||
struct timeval ut_tv;
|
||||
struct {
|
||||
int32_t __e_termination;
|
||||
int32_t __e_exit;
|
||||
} ut_exit;
|
||||
};
|
||||
|
||||
static inline void setutxent(void) {}
|
||||
static inline void endutxent(void) {}
|
||||
static inline struct utmpx *getutxent(void) { return NULL; }
|
||||
static inline struct utmpx *getutxid(const struct utmpx *id) { (void)id; return NULL; }
|
||||
static inline struct utmpx *getutxline(const struct utmpx *line) { (void)line; return NULL; }
|
||||
static inline int pututxline(const struct utmpx *ut) { (void)ut; return -1; }
|
||||
static inline int utmpxname(const char *file) { (void)file; return -1; }
|
||||
|
||||
#endif
|
||||
Binary file not shown.
Binary file not shown.
@@ -656,13 +656,14 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
-DFEATURE_glib=OFF \
|
||||
-DFEATURE_gui=ON \
|
||||
-DFEATURE_widgets=ON \
|
||||
-DFEATURE_networkinterface=OFF \
|
||||
-DFEATURE_networkinterface=ON \
|
||||
-DFEATURE_network=ON \
|
||||
-DFEATURE_opengl=ON \
|
||||
-DINPUT_opengl=es2 \
|
||||
-DFEATURE_qmake=OFF \
|
||||
-DFEATURE_qtwaylandscanner=ON \
|
||||
-DFEATURE_egl=ON \
|
||||
-DFEATURE_openssl=OFF \
|
||||
-DFEATURE_openssl=ON \
|
||||
-DFEATURE_dbus=ON \
|
||||
-DFEATURE_wayland=ON \
|
||||
-DWaylandScanner_EXECUTABLE=/usr/bin/wayland-scanner \
|
||||
|
||||
@@ -1606,6 +1606,27 @@ qt_internal_extend_target(Core CONDITION REDOX
|
||||
io/qstorageinfo_unix.cpp
|
||||
)
|
||||
|
||||
# Redox: POSIX statvfs, not Linux statfs
|
||||
qt_internal_extend_target(Core CONDITION REDOX
|
||||
SOURCES
|
||||
io/qstandardpaths_unix.cpp
|
||||
io/qstorageinfo_unix.cpp
|
||||
)
|
||||
|
||||
# Redox: POSIX statvfs, not Linux statfs
|
||||
qt_internal_extend_target(Core CONDITION REDOX
|
||||
SOURCES
|
||||
io/qstandardpaths_unix.cpp
|
||||
io/qstorageinfo_unix.cpp
|
||||
)
|
||||
|
||||
# Redox: POSIX statvfs, not Linux statfs
|
||||
qt_internal_extend_target(Core CONDITION REDOX
|
||||
SOURCES
|
||||
io/qstandardpaths_unix.cpp
|
||||
io/qstorageinfo_unix.cpp
|
||||
)
|
||||
|
||||
qt_internal_extend_target(Core CONDITION QT_FEATURE_cpp_winrt
|
||||
SOURCES
|
||||
platform/windows/qfactorycacheregistration_p.h
|
||||
@@ -2047,6 +2068,27 @@ qt_internal_extend_target(Core CONDITION REDOX
|
||||
io/qstorageinfo_unix.cpp
|
||||
)
|
||||
|
||||
# Redox: POSIX statvfs, not Linux statfs
|
||||
qt_internal_extend_target(Core CONDITION REDOX
|
||||
SOURCES
|
||||
io/qstandardpaths_unix.cpp
|
||||
io/qstorageinfo_unix.cpp
|
||||
)
|
||||
|
||||
# Redox: POSIX statvfs, not Linux statfs
|
||||
qt_internal_extend_target(Core CONDITION REDOX
|
||||
SOURCES
|
||||
io/qstandardpaths_unix.cpp
|
||||
io/qstorageinfo_unix.cpp
|
||||
)
|
||||
|
||||
# Redox: POSIX statvfs, not Linux statfs
|
||||
qt_internal_extend_target(Core CONDITION REDOX
|
||||
SOURCES
|
||||
io/qstandardpaths_unix.cpp
|
||||
io/qstorageinfo_unix.cpp
|
||||
)
|
||||
|
||||
qt_internal_extend_target(Core CONDITION QT_FEATURE_itemmodel
|
||||
SOURCES
|
||||
itemmodels/qabstractitemmodel.cpp itemmodels/qabstractitemmodel.h itemmodels/qabstractitemmodel_p.h
|
||||
|
||||
@@ -181,6 +181,9 @@ static_assert(std::is_signed_v<qint128>,
|
||||
#include <assert.h>
|
||||
#include <assert.h>
|
||||
#include <assert.h>
|
||||
#include <assert.h>
|
||||
#include <assert.h>
|
||||
#include <assert.h>
|
||||
#ifndef static_assert
|
||||
#define static_assert _Static_assert
|
||||
#endif
|
||||
|
||||
@@ -1124,6 +1124,9 @@ qint64 QNativeSocketEnginePrivate::nativeSendDatagram(const char *data, qint64 l
|
||||
#ifdef IPV6_HOPLIMIT
|
||||
#ifdef IPV6_HOPLIMIT
|
||||
#ifdef IPV6_HOPLIMIT
|
||||
#ifdef IPV6_HOPLIMIT
|
||||
#ifdef IPV6_HOPLIMIT
|
||||
#ifdef IPV6_HOPLIMIT
|
||||
#ifdef IPV6_HOPLIMIT
|
||||
if (header.hopLimit != -1) {
|
||||
msg.msg_controllen += CMSG_SPACE(sizeof(int));
|
||||
@@ -1136,6 +1139,9 @@ qint64 QNativeSocketEnginePrivate::nativeSendDatagram(const char *data, qint64 l
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
if (header.ifindex != 0 || !header.senderAddress.isNull()) {
|
||||
struct in6_pktinfo *data = reinterpret_cast<in6_pktinfo *>(CMSG_DATA(cmsgptr));
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
#if defined(Q_OS_VXWORKS)
|
||||
|
||||
+12
@@ -55,11 +55,17 @@ public:
|
||||
#if QT_CONFIG(opengl)
|
||||
#if QT_CONFIG(opengl)
|
||||
#if QT_CONFIG(opengl)
|
||||
#if QT_CONFIG(opengl)
|
||||
#if QT_CONFIG(opengl)
|
||||
#if QT_CONFIG(opengl)
|
||||
#if QT_CONFIG(opengl)
|
||||
virtual QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const = 0;
|
||||
#endif /* QT_CONFIG(opengl) */
|
||||
#endif /* QT_CONFIG(opengl) */
|
||||
#endif /* QT_CONFIG(opengl) */
|
||||
#endif /* QT_CONFIG(opengl) */
|
||||
#endif /* QT_CONFIG(opengl) */
|
||||
#endif /* QT_CONFIG(opengl) */
|
||||
#endif /* QT_CONFIG(opengl) */
|
||||
virtual bool canCreatePlatformOffscreenSurface() const { return false; }
|
||||
#if QT_CONFIG(opengl)
|
||||
@@ -76,12 +82,18 @@ public:
|
||||
#if QT_CONFIG(opengl)
|
||||
#if QT_CONFIG(opengl)
|
||||
#if QT_CONFIG(opengl)
|
||||
#if QT_CONFIG(opengl)
|
||||
#if QT_CONFIG(opengl)
|
||||
#if QT_CONFIG(opengl)
|
||||
#if QT_CONFIG(opengl)
|
||||
virtual void *nativeResourceForContext(NativeResource /*resource*/, QPlatformOpenGLContext */*context*/) { return nullptr; }
|
||||
#endif /* QT_CONFIG(opengl) */
|
||||
#endif /* QT_CONFIG(opengl) */
|
||||
#endif /* QT_CONFIG(opengl) */
|
||||
#endif /* QT_CONFIG(opengl) */
|
||||
#endif /* QT_CONFIG(opengl) */
|
||||
#endif /* QT_CONFIG(opengl) */
|
||||
#endif /* QT_CONFIG(opengl) */
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -233,17 +233,17 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
-DQt6ShaderToolsTools_DIR="${HOST_BUILD}/lib/cmake/Qt6ShaderToolsTools" \
|
||||
-DQT_BUILD_EXAMPLES=OFF \
|
||||
-DQT_BUILD_TESTS=OFF \
|
||||
-DQT_GENERATE_SBOM=OFF \
|
||||
-DQT_GENERATE_SBOM=OFF \
|
||||
-DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON \
|
||||
-DQT_FEATURE_qml_jit=OFF \
|
||||
-DQT_FEATURE_ssl=OFF \
|
||||
-DQT_FEATURE_network=OFF \
|
||||
-DQT_FEATURE_localserver=OFF \
|
||||
-DQT_FEATURE_http=OFF \
|
||||
-DQT_FEATURE_udpsocket=OFF \
|
||||
-DQT_FEATURE_dnslookup=OFF \
|
||||
-DQT_FEATURE_networkinterface=OFF \
|
||||
-DQT_FEATURE_networkproxy=OFF \
|
||||
-DQT_FEATURE_qml_jit=OFF \
|
||||
-DQT_FEATURE_ssl=ON \
|
||||
-DQT_FEATURE_network=ON \
|
||||
-DQT_FEATURE_localserver=ON \
|
||||
-DQT_FEATURE_http=ON \
|
||||
-DQT_FEATURE_udpsocket=ON \
|
||||
-DQT_FEATURE_dnslookup=ON \
|
||||
-DQT_FEATURE_networkinterface=ON \
|
||||
-DQT_FEATURE_networkproxy=ON \
|
||||
-DQT_FEATURE_socks5=OFF \
|
||||
-DQT_FEATURE_networkdiskcache=OFF \
|
||||
-DQT_FEATURE_draganddrop=ON \
|
||||
|
||||
@@ -313,7 +313,14 @@ fn build_environment(account: &Account, args: &Args, runtime_dir: &Path) -> BTre
|
||||
values.insert(String::from("KDE_FULL_SESSION"), String::from("true"));
|
||||
values.insert(String::from("XDG_SESSION_ID"), String::from("c1"));
|
||||
}
|
||||
LaunchMode::Command { .. } => {}
|
||||
LaunchMode::Command { .. } => {
|
||||
// Command mode: caller provided its own environment via
|
||||
// process::Command::envs(); we only ensure minimum sane defaults
|
||||
// for the child's library resolution.
|
||||
values.entry(String::from("PATH")).or_insert_with(|| {
|
||||
String::from("/usr/bin:/bin:/usr/local/bin")
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
values
|
||||
|
||||
+1
-1
@@ -24408,7 +24408,7 @@ printf "%s\n" "#define MOUNTED_INTERIX_STATVFS 1" >>confdefs.h
|
||||
fi
|
||||
|
||||
if test -z "$ac_list_mounted_fs"; then
|
||||
as_fn_error $? "could not determine how to read list of mounted file systems" "$LINENO" 5
|
||||
ac_list_mounted_fs=found # Redox: forced "$LINENO" 5
|
||||
# FIXME -- no need to abort building the whole package
|
||||
# Can't build mountlist.c or anything that needs its functions
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
|
||||
/* stdckdint.h -- checked integer arithmetic
|
||||
|
||||
Copyright 2022-2024 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as published
|
||||
by the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _GL_STDCKDINT_H
|
||||
#define _GL_STDCKDINT_H
|
||||
|
||||
#include "intprops-internal.h"
|
||||
|
||||
/* Store into *R the low-order bits of A + B, A - B, A * B, respectively.
|
||||
Return 1 if the result overflows, 0 otherwise.
|
||||
A, B, and *R can have any integer type other than char, gboolean, a
|
||||
bit-precise integer type, or an enumeration type.
|
||||
|
||||
These are like the standard macros introduced in C23, except that
|
||||
arguments should not have side effects. */
|
||||
|
||||
#define ckd_add(r, a, b) ((gboolean) _GL_INT_ADD_WRAPV (a, b, r))
|
||||
#define ckd_sub(r, a, b) ((gboolean) _GL_INT_SUBTRACT_WRAPV (a, b, r))
|
||||
#define ckd_mul(r, a, b) ((gboolean) _GL_INT_MULTIPLY_WRAPV (a, b, r))
|
||||
|
||||
#endif /* _GL_STDCKDINT_H */
|
||||
Binary file not shown.
+1
-1
Submodule local/sources/base updated: 9f3f77cb72...417fe4a4fa
+1
-1
Submodule local/sources/kernel updated: eab576b7ed...62a3b56840
@@ -29,6 +29,17 @@ pub struct CallerCtx {
|
||||
pub id: Id,
|
||||
}
|
||||
|
||||
impl Default for CallerCtx {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
pid: 0,
|
||||
uid: 0,
|
||||
gid: 0,
|
||||
id: Id::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum OpenResult {
|
||||
ThisScheme { number: usize, flags: NewFdFlags },
|
||||
@@ -47,7 +58,7 @@ pub struct Request {
|
||||
sqe: Sqe,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, Ord, Hash, PartialEq, PartialOrd)]
|
||||
#[derive(Clone, Copy, Debug, Default, Eq, Ord, Hash, PartialEq, PartialOrd)]
|
||||
pub struct Id(u32);
|
||||
|
||||
#[derive(Debug, Eq, Ord, Hash, PartialEq, PartialOrd)]
|
||||
|
||||
+1
-1
Submodule local/sources/relibc updated: b187b31d1a...9387fd2c34
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../wip/dev/other/gperf
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../local/recipes/libs/polkit-qt6
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../wip/libs/tls/openssl3
|
||||
@@ -126,6 +126,8 @@ fn redbear_protected_recipe(name: &str) -> bool {
|
||||
// IPC / system libraries with Red Bear patches
|
||||
| "dbus"
|
||||
| "glib"
|
||||
// TLS stack with Red Bear ports
|
||||
| "openssl3"
|
||||
// Red Bear library stubs and custom libs
|
||||
| "libudev"
|
||||
| "zbus"
|
||||
|
||||
Reference in New Issue
Block a user