Compare commits

...

10 Commits

Author SHA1 Message Date
lizzie 1328b3004d revert to master head 2026-08-20 23:15:39 +00:00
lizzie 4270d7134a add license 2026-08-20 23:15:34 +00:00
lizzie 1dce1d4b25 smaller qt fixups 2026-08-20 23:15:34 +00:00
lizzie fdc1548f38 ok fix for realsies 2026-08-20 23:15:33 +00:00
lizzie a5eaac0629 managarm fixed their memfd 2026-08-20 23:15:33 +00:00
lizzie 145b8dceab revert 2026-08-20 23:15:32 +00:00
lizzie 5abf245ab5 script not needed, use xbps 2026-08-20 23:15:10 +00:00
lizzie 08162bc607 manaleg fixes for dynarmic common context 2026-08-20 23:15:08 +00:00
lizzie 7d1aee1b69 fix strerror_r on managarm 2026-08-20 23:14:46 +00:00
lizzie 4ad13c4091 fixups 2026-08-20 23:14:46 +00:00
8 changed files with 52 additions and 14 deletions
+10
View File
@@ -373,6 +373,16 @@ RedoxOS currently does not support SDL3. You will have to compile it yourself an
[Caveats](./Caveats.md#redoxos). [Caveats](./Caveats.md#redoxos).
</details> </details>
<details>
<summary>managarm</summary>
```sh
xbps-install -Syu git cmake patch lz4 opus openssl mesa zstd zlib mlibc vulkan-loader qtbase6 qtdeclarative6 qtmultimedia6 boost
```
[Caveats](./Caveats.md#managarm)
</dtails>
## All Done ## All Done
+3 -3
View File
@@ -173,11 +173,11 @@ if (OPENORBIS)
--extra-libs="${FFmpeg_CROSS_COMPILE_LIBS}" --extra-libs="${FFmpeg_CROSS_COMPILE_LIBS}"
) )
elseif (MANAGARM) elseif (MANAGARM)
# Required for proper stuff # Required for proper stuff, otherwise truncf and cosf won't get detected
list(APPEND FFmpeg_CROSS_COMPILE_LIBS -lm)
list(APPEND FFmpeg_CROSS_COMPILE_FLAGS list(APPEND FFmpeg_CROSS_COMPILE_FLAGS
--disable-pthreads --disable-pthreads
--extra-libs="${FFmpeg_CROSS_COMPILE_LIBS}" --extra-libs="${FFmpeg_CROSS_COMPILE_LIBS}")
)
endif() endif()
if (YUZU_USE_BUNDLED_FFMPEG) if (YUZU_USE_BUNDLED_FFMPEG)
+1 -1
View File
@@ -33,7 +33,7 @@ std::string NativeErrorToString(int e) {
return ret; return ret;
#else #else
char err_str[255]; char err_str[255];
#if defined(__ANDROID__) || \ #if defined(__managarm__) || defined(__ANDROID__) || \
(defined(__GLIBC__) && (_GNU_SOURCE || (_POSIX_C_SOURCE < 200112L && _XOPEN_SOURCE < 600))) (defined(__GLIBC__) && (_GNU_SOURCE || (_POSIX_C_SOURCE < 200112L && _XOPEN_SOURCE < 600)))
// Thread safe (GNU-specific) // Thread safe (GNU-specific)
const char* str = strerror_r(e, err_str, sizeof(err_str)); const char* str = strerror_r(e, err_str, sizeof(err_str));
+7 -7
View File
@@ -394,7 +394,7 @@ private:
ankerl::unordered_dense::map<size_t, size_t> placeholder_host_pointers; ///< Placeholder backing offset ankerl::unordered_dense::map<size_t, size_t> placeholder_host_pointers; ///< Placeholder backing offset
}; };
#elif defined(__OPENORBIS__) || defined(__managarm__) #elif defined(__OPENORBIS__)
// None of the luxuries of POSIX, all of the suffering // None of the luxuries of POSIX, all of the suffering
// For managarm: see https://github.com/managarm/managarm/issues/1370 // For managarm: see https://github.com/managarm/managarm/issues/1370
#else // ^^^ Windows ^^^ vvv POSIX vvv #else // ^^^ Windows ^^^ vvv POSIX vvv
@@ -516,7 +516,7 @@ public:
fd = shm_open_anon(O_RDWR | O_CREAT | O_EXCL | O_NOFOLLOW, 0600); fd = shm_open_anon(O_RDWR | O_CREAT | O_EXCL | O_NOFOLLOW, 0600);
#elif defined(__FreeBSD__) #elif defined(__FreeBSD__)
fd = shm_open(SHM_ANON, O_RDWR, 0600); fd = shm_open(SHM_ANON, O_RDWR, 0600);
#elif defined(__APPLE__) || defined(__managarm__) #elif defined(__APPLE__)
// macOS doesn't have memfd_create, use anonymous temporary file // macOS doesn't have memfd_create, use anonymous temporary file
char template_path[] = "/tmp/eden_mem_XXXXXX"; char template_path[] = "/tmp/eden_mem_XXXXXX";
fd = mkstemp(template_path); fd = mkstemp(template_path);
@@ -689,7 +689,7 @@ HostMemory::HostMemory(size_t backing_size_, size_t virtual_size_)
: backing_size(backing_size_) : backing_size(backing_size_)
, virtual_size(virtual_size_) , virtual_size(virtual_size_)
{ {
#if defined(__OPENORBIS__) || defined(__managarm__) #if defined(__OPENORBIS__)
LOG_WARNING(HW_Memory, "Platform doesn't support fastmem"); LOG_WARNING(HW_Memory, "Platform doesn't support fastmem");
fallback_buffer.emplace(backing_size); fallback_buffer.emplace(backing_size);
backing_base = fallback_buffer->data(); backing_base = fallback_buffer->data();
@@ -723,7 +723,7 @@ HostMemory::HostMemory(HostMemory&&) noexcept = default;
HostMemory& HostMemory::operator=(HostMemory&&) noexcept = default; HostMemory& HostMemory::operator=(HostMemory&&) noexcept = default;
void HostMemory::Map(size_t virtual_offset, size_t host_offset, size_t length, MemoryPermission perms, bool separate_heap) { void HostMemory::Map(size_t virtual_offset, size_t host_offset, size_t length, MemoryPermission perms, bool separate_heap) {
#if !(defined(__OPENORBIS__) || defined(__managarm__)) #if !defined(__OPENORBIS__)
ASSERT(virtual_offset % PageAlignment == 0); ASSERT(virtual_offset % PageAlignment == 0);
ASSERT(host_offset % PageAlignment == 0); ASSERT(host_offset % PageAlignment == 0);
ASSERT(length % PageAlignment == 0); ASSERT(length % PageAlignment == 0);
@@ -737,7 +737,7 @@ void HostMemory::Map(size_t virtual_offset, size_t host_offset, size_t length, M
} }
void HostMemory::Unmap(size_t virtual_offset, size_t length, bool separate_heap) { void HostMemory::Unmap(size_t virtual_offset, size_t length, bool separate_heap) {
#if !(defined(__OPENORBIS__) || defined(__managarm__)) #if !defined(__OPENORBIS__)
ASSERT(virtual_offset % PageAlignment == 0); ASSERT(virtual_offset % PageAlignment == 0);
ASSERT(length % PageAlignment == 0); ASSERT(length % PageAlignment == 0);
ASSERT(virtual_offset + length <= virtual_size); ASSERT(virtual_offset + length <= virtual_size);
@@ -749,7 +749,7 @@ void HostMemory::Unmap(size_t virtual_offset, size_t length, bool separate_heap)
} }
void HostMemory::Protect(size_t virtual_offset, size_t length, MemoryPermission perm) { void HostMemory::Protect(size_t virtual_offset, size_t length, MemoryPermission perm) {
#if !(defined(__OPENORBIS__) || defined(__managarm__)) #if !defined(__OPENORBIS__)
ASSERT(virtual_offset % PageAlignment == 0); ASSERT(virtual_offset % PageAlignment == 0);
ASSERT(length % PageAlignment == 0); ASSERT(length % PageAlignment == 0);
ASSERT(virtual_offset + length <= virtual_size); ASSERT(virtual_offset + length <= virtual_size);
@@ -768,7 +768,7 @@ void HostMemory::ClearBackingRegion(size_t physical_offset, size_t length, u32 f
} }
void HostMemory::EnableDirectMappedAddress() { void HostMemory::EnableDirectMappedAddress() {
#if !(defined(__OPENORBIS__) || defined(__managarm__)) #if !defined(__OPENORBIS__)
if (impl) { if (impl) {
impl->EnableDirectMappedAddress(); impl->EnableDirectMappedAddress();
virtual_size += reinterpret_cast<uintptr_t>(virtual_base); virtual_size += reinterpret_cast<uintptr_t>(virtual_base);
+1 -1
View File
@@ -77,7 +77,7 @@ private:
size_t backing_size{}; size_t backing_size{};
size_t virtual_size{}; size_t virtual_size{};
#if !(defined(__OPENORBIS__) || defined(__managarm__)) #if !defined(__OPENORBIS__)
// Low level handler for the platform dependent memory routines // Low level handler for the platform dependent memory routines
class Impl; class Impl;
std::unique_ptr<Impl> impl; std::unique_ptr<Impl> impl;
+1 -1
View File
@@ -92,7 +92,7 @@ if (ENABLE_OPENGL)
target_compile_definitions(qt_common PUBLIC HAS_OPENGL) target_compile_definitions(qt_common PUBLIC HAS_OPENGL)
endif() endif()
if (UNIX AND NOT APPLE) if (UNIX AND NOT APPLE AND NOT PLATFORM_MANAGARM)
if (DEFINED Qt6Gui_PRIVATE_INCLUDE_DIRS) if (DEFINED Qt6Gui_PRIVATE_INCLUDE_DIRS)
target_include_directories(qt_common PRIVATE ${Qt6Gui_PRIVATE_INCLUDE_DIRS}) target_include_directories(qt_common PRIVATE ${Qt6Gui_PRIVATE_INCLUDE_DIRS})
else() else()
+1
View File
@@ -30,6 +30,7 @@ Tools for Eden and other subprojects. When adding new scripts please use `#!/bin
- `find-unused-strings.sh`: Find any unused strings in the Android app (XML -> Kotlin). - `find-unused-strings.sh`: Find any unused strings in the Android app (XML -> Kotlin).
- `cpp-lint.sh`: Homemade dumb C++ linter. - `cpp-lint.sh`: Homemade dumb C++ linter.
- `fuzzsettings.cpp`: Fuzz settings files. - `fuzzsettings.cpp`: Fuzz settings files.
- `sysvpatch.c`: Patches ELF files so their OS/ABI is SYSV (managarm workaround).
## Android ## Android
It's recommended to run these scritps after almost any Android change, as they are relatively fast and important both for APK bloat and CI. It's recommended to run these scritps after almost any Android change, as they are relatively fast and important both for APK bloat and CI.
+27
View File
@@ -0,0 +1,27 @@
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
#include <stdio.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char *argv[]) {
char s[BUFSIZ];
snprintf(s, sizeof s, "strip %s", argv[1]);
system(s);
struct stat st;
int fd = open(argv[1], O_RDONLY);
if (fd) {
fstat(fd, &st);
char *buf = malloc(st.st_size);
write(fd, buf, st.st_size);
close(fd);
/* set elf type to 0 = SYSV */
buf[7] = 0;
write(fileno(stdout), buf, st.st_size);
free(buf);
return EXIT_SUCCESS;
}
return EXIT_FAILURE;
}