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

Commit b849e8c9 authored by Henri Chataing's avatar Henri Chataing Committed by Automerger Merge Worker
Browse files

Merge "RootCanal: Make own copy of hci_packets.pdl" am: b1467fd5 am: ed0fa93f

parents 17808e69 ed0fa93f
Loading
Loading
Loading
Loading
+0 −22
Original line number Diff line number Diff line
@@ -667,28 +667,6 @@ rust_library {
    min_sdk_version: "30",
}

rust_library {
    name: "libbt_packets_nonapex",
    defaults: ["gd_rust_defaults"],
    crate_name: "bt_packets",
    srcs: [
        "rust/packets/lib.rs",

        ":BluetoothGeneratedPackets_rust",
    ],
    edition: "2018",
    vendor_available: true,
    host_supported: true,
    proc_macros: ["libnum_derive"],
    rustlibs: [
        "libbytes",
        "libnum_traits",
        "libthiserror",
        "liblog_rust",
    ],
    min_sdk_version: "30",
}

rust_test_host {
    name: "libbt_packets_test",
    defaults: [
+0 −4
Original line number Diff line number Diff line
@@ -54,8 +54,6 @@ cc_binary {
        "-fvisibility=hidden",
    ],
    generated_headers: [
        "BluetoothGeneratedPackets_h",
        "RootCanalGeneratedPackets_h",
        "libbt_init_flags_bridge_header",
    ],
    whole_static_libs: [
@@ -102,8 +100,6 @@ cc_library_shared {
        "libutils",
    ],
    generated_headers: [
        "BluetoothGeneratedPackets_h",
        "RootCanalGeneratedPackets_h",
        "libbt_init_flags_bridge_header",
    ],
    whole_static_libs: [
+34 −12
Original line number Diff line number Diff line
@@ -47,9 +47,9 @@ cc_defaults {
        "libbase_headers",
    ],
    generated_headers: [
        "BluetoothGeneratedPackets_h",
        "RootCanalBrEdrBBGeneratedPackets_h",
        "RootCanalGeneratedPackets_h",
        "rootcanal_bredr_bb_packets_cxx_gen",
        "rootcanal_hci_packets_cxx_gen",
        "rootcanal_link_layer_packets_cxx_gen",
    ],
}

@@ -113,7 +113,8 @@ cc_library_static {
        "include",
    ],
    export_generated_headers: [
        "BluetoothGeneratedPackets_h",
        "rootcanal_hci_packets_cxx_gen",
        "rootcanal_link_layer_packets_cxx_gen",
    ],
    whole_static_libs: [
        "liblmp",
@@ -195,7 +196,7 @@ genrule {
        " $(location :pdl_python_generator)" +
        " --output $(out) --custom-type-location py.bluetooth",
    srcs: [
        ":BluetoothHciPackets",
        "packets/hci/hci_packets.pdl",
    ],
    out: [
        "hci_packets.py",
@@ -376,28 +377,35 @@ cc_binary_host {
}

genrule {
    name: "RootCanalGeneratedPackets_h",
    name: "rootcanal_hci_packets_cxx_gen",
    tools: [
        "bluetooth_packetgen",
    ],
    cmd: "$(location bluetooth_packetgen) --root_namespace=model --include=packages/modules/Bluetooth/tools/rootcanal --out=$(genDir) $(in)",
    cmd: "$(location bluetooth_packetgen) --include=packages/modules/Bluetooth/tools/rootcanal/packets --out=$(genDir) $(in)",
    srcs: [
        "packets/link_layer_packets.pdl",
        "packets/hci/hci_packets.pdl",
    ],
    out: [
        "packets/link_layer_packets.h",
        "hci/hci_packets.h",
    ],
}

filegroup {
    name: "RootCanalLinkLayerPackets",
genrule {
    name: "rootcanal_link_layer_packets_cxx_gen",
    tools: [
        "bluetooth_packetgen",
    ],
    cmd: "$(location bluetooth_packetgen) --root_namespace=model --include=packages/modules/Bluetooth/tools/rootcanal --out=$(genDir) $(in)",
    srcs: [
        "packets/link_layer_packets.pdl",
    ],
    out: [
        "packets/link_layer_packets.h",
    ],
}

genrule {
    name: "RootCanalBrEdrBBGeneratedPackets_h",
    name: "rootcanal_bredr_bb_packets_cxx_gen",
    tools: [
        "bluetooth_packetgen",
    ],
@@ -410,6 +418,20 @@ genrule {
    ],
}

genrule {
    name: "rootcanal_hci_packets_rust_gen",
    tools: [
        "bluetooth_packetgen",
    ],
    cmd: "$(location bluetooth_packetgen) --include=packages/modules/Bluetooth/tools/rootcanal/packets --out=$(genDir) $(in) --rust",
    srcs: [
        "packets/hci/hci_packets.pdl",
    ],
    out: [
        "hci/hci_packets.rs",
    ],
}

// bt_vhci_forwarder in cuttlefish depends on this H4Packetizer implementation.
cc_library_static {
    name: "h4_packetizer_lib",
+2 −1
Original line number Diff line number Diff line
@@ -16,11 +16,11 @@ rust_ffi {
        "src/lib.rs",

        ":LmpGeneratedPackets_rust",
        ":rootcanal_hci_packets_rust_gen",
    ],
    edition: "2018",
    proc_macros: ["libnum_derive"],
    rustlibs: [
        "libbt_packets_nonapex",
        "libbytes",
        "libnum_bigint",
        "libnum_integer",
@@ -53,6 +53,7 @@ rust_test_host {
        "src/lib.rs",

        ":LmpGeneratedPackets_rust",
        ":rootcanal_hci_packets_rust_gen",
    ],
    auto_gen_config: true,
    edition: "2018",
+0 −1
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ paste = "1.0.4"
pin-utils = "0.1.0"
rand = "0.8.3"
thiserror = "1.0.23"
bt_packets = { path = "../../../system/gd/rust/packets/" }

[lib]
path="src/lib.rs"
Loading