mkbootfs: revert 'cpp-application'

use legacy 'c' and 'cpp' plugin for MacOS comapatibility
pull/31/head
cfig 6 years ago
parent 30fe87357b
commit bcf3c2e2b4
No known key found for this signature in database
GPG Key ID: B104C307F0FDABB7

@ -0,0 +1,18 @@
apply plugin: 'cpp'
apply plugin: 'c'
model {
buildTypes {
release
}
components {
mkbootfs(NativeExecutableSpec) {
binaries.all {
cppCompiler.define "__ANDROID_VNDK__"
//cppCompiler.define 'CFIG_NO_FIX_STAT'
cppCompiler.args << '-std=gnu++11' << "-Wno-write-strings"
}
}
}
}

@ -1,14 +0,0 @@
plugins {
`cpp-application`
}
application {
targetMachines.set(listOf(machines.linux.x86_64, machines.macOS.x86_64))
}
tasks.withType(CppCompile::class.java).configureEach {
macros.put("__ANDROID_VNDK__", null)
//macros.put("CFIG_NO_FIX_STAT", 1)
compilerArgs.add("-std=c++17")
compilerArgs.add("-Wno-write-strings")
}

@ -88,7 +88,7 @@ static void fix_stat(const char *path, struct stat *s)
unsigned st_mode = s->st_mode;
int is_dir = S_ISDIR(s->st_mode) || strcmp(path, TRAILER) == 0;
fs_config(path, is_dir, target_out_path, &s->st_uid, &s->st_gid, &st_mode, &capabilities);
s->st_mode = (decltype(s->st_mode)) st_mode;
s->st_mode = (typeof(s->st_mode)) st_mode;
}
}

@ -45,8 +45,7 @@ class BootImgParser : IPackable {
}
override fun pack(fileName: String) {
val osSuffix = if (EnvironmentVerifier().isMacOS) "macos" else "linux"
Packer().pack(mkbootfsBin = "./aosp/mkbootfs/build/install/main/release/$osSuffix/mkbootfs")
Packer().pack(mkbootfsBin = "./aosp/mkbootfs/build/exe/mkbootfs/mkbootfs")
Signer.sign(avbtool = "avb/avbtool", bootSigner = "aosp/boot_signer/build/libs/boot_signer.jar")
}

@ -59,14 +59,14 @@ tasks {
flashTask.dependsOn("bbootimg:jar")
//sparse image dependencies
packTask.dependsOn("aosp:mkbootfs:mkbootfsExecutable")
unpackTask.dependsOn("aosp:mkbootfs:mkbootfsExecutable")
if (System.getProperty("os.name").contains("Mac")) {
unpackTask.dependsOn("aosp:libsparse:simg2img:installReleaseMacos")
packTask.dependsOn("aosp:libsparse:img2simg:installReleaseMacos")
packTask.dependsOn("aosp:mkbootfs:installReleaseMacos")
} else {
unpackTask.dependsOn("aosp:libsparse:simg2img:installReleaseLinux")
packTask.dependsOn("aosp:libsparse:img2simg:installReleaseLinux")
packTask.dependsOn("aosp:mkbootfs:installReleaseLinux")
}
}

@ -10,7 +10,7 @@
###2. 先解开boot.img, 然后做修改如下
修改**prop.default**,打开debuggable
修改**prop.default**,打开debuggable, 注意ro.debuggable出现两次得全改了, 或者删一个
```diff
-ro.debuggable=0
+ro.debuggable=1

Loading…
Cancel
Save