Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f907e6e2 authored by SzuWei Lin's avatar SzuWei Lin
Browse files

Support dynamic 64-bit drmserver

64-bit GSI requires support both 64_32-bit and 64-bit devices at
the same time. Add a new variable TARGET_DYNAMIC_64_32_DRMSERVER
to put drmserver_dynamic.rc into GSI. Which starts 64-bit
drmserver if ro.zygote is zygote64. Otherwise, it keeps the
original behavior to start 32-bit drmserver.

Bug: 282603373
Test: make gsi_arm64-user; Check system/etc/init
Test: make gsi_arm-user; Check systen/etc/init
Change-Id: I4de433ccee8fc316ce565470aa962ab62c95e60f
Merged-In: I4de433ccee8fc316ce565470aa962ab62c95e60f
parent 8cfff52b
Loading
Loading
Loading
Loading
+48 −2
Original line number Original line Diff line number Diff line
@@ -31,7 +31,33 @@ license {
    ],
    ],
}
}


cc_binary {
prebuilt_etc {
    name: "drmserver.zygote64_32.rc",
    src: "drmserver.zygote64_32.rc",
    sub_dir: "init/hw",
}

prebuilt_etc {
    name: "drmserver.zygote64.rc",
    src: "drmserver.zygote64.rc",
    sub_dir: "init/hw",
}

soong_config_module_type {
    name: "drmserver_cc_binary",
    module_type: "cc_binary",
    config_namespace: "ANDROID",
    bool_variables: ["TARGET_DYNAMIC_64_32_DRMSERVER"],
    properties: [
        "compile_multilib",
        "init_rc",
        "multilib.lib32.suffix",
        "multilib.lib64.suffix",
        "required",
    ],
}

drmserver_cc_binary {
    name: "drmserver",
    name: "drmserver",


    srcs: [
    srcs: [
@@ -61,7 +87,27 @@ cc_binary {


    compile_multilib: "prefer32",
    compile_multilib: "prefer32",


    soong_config_variables: {
        TARGET_DYNAMIC_64_32_DRMSERVER: {
            compile_multilib: "both",
            multilib: {
                lib32: {
                    suffix: "32",
                },
                lib64: {
                    suffix: "64",
                },
            },
            required: [
                "drmserver.zygote64_32.rc",
                "drmserver.zygote64.rc",
            ],
            init_rc: ["drmserver_dynamic.rc"],
            conditions_default: {
                init_rc: ["drmserver.rc"],
                init_rc: ["drmserver.rc"],
            },
        },
    },
}
}


cc_fuzz {
cc_fuzz {
+6 −0
Original line number Original line Diff line number Diff line
service drm /system/bin/drmserver64
    disabled
    class main
    user drm
    group drm system inet drmrpc readproc
    task_profiles ProcessCapacityHigh
+6 −0
Original line number Original line Diff line number Diff line
service drm /system/bin/drmserver32
    disabled
    class main
    user drm
    group drm system inet drmrpc readproc
    task_profiles ProcessCapacityHigh
+7 −0
Original line number Original line Diff line number Diff line
import /system/etc/init/hw/drmserver.${ro.zygote}.rc

on property:drm.service.enabled=true
    start drm

on property:drm.service.enabled=1
    start drm