diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68c0beb8..49dd2654 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,14 +30,18 @@ jobs: restore-keys: | ${{ runner.os }}-cxx- - - name: Setup Environment for Gradle & Ninja Build & CMake + - name: Install Ninja Build run: | - chmod +x gradlew sudo apt-get install -y ninja-build - echo "yes" | $ANDROID_HOME/tools/bin/sdkmanager "cmake;3.18.1" --channel=3 + ln -s /usr/bin/ninja . + + - name: Install CMake & Android NDK + run: echo "yes" | $ANDROID_HOME/tools/bin/sdkmanager "cmake;3.18.1" "ndk;24.0.7856742" --channel=3 | grep -v = || true - name: Android Lint - run: ./gradlew --stacktrace lint + run: | + chmod +x gradlew + ./gradlew --stacktrace lint - name: Upload Lint Report uses: actions/upload-artifact@v2 diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 71a2716c..6c13aa30 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -54,6 +54,7 @@ set(ENABLE_PROGRAMS OFF CACHE BOOL "Build mbed TLS programs." FORCE) set(UNSAFE_BUILD ON CACHE BOOL "Allow unsafe builds. These builds ARE NOT SECURE." FORCE) add_subdirectory("libraries/mbedtls") include_directories(SYSTEM "libraries/mbedtls/include") +target_compile_options(mbedcrypto PRIVATE -Wno-everything) # Opus include_directories(SYSTEM "libraries/opus/include") diff --git a/app/build.gradle b/app/build.gradle index 7bce3024..e3db3172 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -63,7 +63,7 @@ android { } /* NDK */ - ndkVersion '23.1.7779620' + ndkVersion '24.0.7856742' externalNativeBuild { cmake { version '3.18.1+' diff --git a/app/libraries/mbedtls b/app/libraries/mbedtls index 8df2f8e7..d8956683 160000 --- a/app/libraries/mbedtls +++ b/app/libraries/mbedtls @@ -1 +1 @@ -Subproject commit 8df2f8e7b9c7bb9390ac74bb7bace27edca81a2b +Subproject commit d895668359eb8ba7536a04f5e2be1e5268c86b33 diff --git a/app/src/main/cpp/skyline/common.h b/app/src/main/cpp/skyline/common.h index 6df6dad3..99ab9fb8 100644 --- a/app/src/main/cpp/skyline/common.h +++ b/app/src/main/cpp/skyline/common.h @@ -3,6 +3,7 @@ #pragma once +#include #include #include #include diff --git a/app/src/main/cpp/skyline/services/am/controller/IApplicationFunctions.cpp b/app/src/main/cpp/skyline/services/am/controller/IApplicationFunctions.cpp index b6c7d686..69acaaf4 100644 --- a/app/src/main/cpp/skyline/services/am/controller/IApplicationFunctions.cpp +++ b/app/src/main/cpp/skyline/services/am/controller/IApplicationFunctions.cpp @@ -76,7 +76,7 @@ namespace skyline::service::am { // On HOS the seed from control.ncap is hashed together with the device specific device ID seed // for us it's enough to just hash the seed from control.nacp as it provides the same guarantees - if (int err{mbedtls_sha1(seedForPseudoDeviceId.data(), seedForPseudoDeviceId.size(), hashBuf.data())}; err < 0) + if (int err{mbedtls_sha1_ret(seedForPseudoDeviceId.data(), seedForPseudoDeviceId.size(), hashBuf.data())}; err < 0) throw exception("Failed to hash device ID, err: {}", err); response.Push(UUID::GenerateUuidV5(hashBuf)); diff --git a/app/src/main/cpp/skyline/vfs/nacp.cpp b/app/src/main/cpp/skyline/vfs/nacp.cpp index 15772b99..b498d0ee 100644 --- a/app/src/main/cpp/skyline/vfs/nacp.cpp +++ b/app/src/main/cpp/skyline/vfs/nacp.cpp @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MPL-2.0 // Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/) -#include #include "nacp.h" namespace skyline::vfs { diff --git a/app/src/main/cpp/skyline/vfs/npdm.cpp b/app/src/main/cpp/skyline/vfs/npdm.cpp index 8888047d..9f73100f 100644 --- a/app/src/main/cpp/skyline/vfs/npdm.cpp +++ b/app/src/main/cpp/skyline/vfs/npdm.cpp @@ -12,7 +12,7 @@ namespace skyline::vfs { constexpr i8 DefaultCore{0}; // The default core for an HOS process constexpr u64 DefaultStackSize{0x200000}; //!< The default amount of stack: 2 MiB constexpr u64 DefaultSystemResourceSize{0x1FE00000}; //!< The amount of memory reserved for system resources, it's the maximum at 510 MiB - meta = { + meta = NpdmMeta{ .magic = MetaMagic, .flags = { { diff --git a/build.gradle b/build.gradle index a09a6b74..e4765c95 100644 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.0.2' + classpath 'com.android.tools.build:gradle:7.1.0-beta01' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"