Skip to content

Commit 01875b0

Browse files
committed
rootcanal: Add link_layer_packets_rs.
Bug: 402294843
1 parent 281bf75 commit 01875b0

File tree

5 files changed

+44
-6
lines changed

5 files changed

+44
-6
lines changed

base/cvd/MODULE.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ git_override(
8989
"@//build_external/rootcanal:0001-Use-our-local_repository.patch",
9090
"@//build_external/rootcanal:0002-Use-pdlc-from-pdl-compiler-crate.patch",
9191
"@//build_external/rootcanal:0003-Make-rootcanal_proto-public.patch",
92+
"@//build_external/rootcanal:0004-Add-link_layer_packets_rs.patch",
9293
],
9394
)
9495

base/cvd/build_external/rootcanal/0001-Use-our-local_repository.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From a17bc08456664b526fb3cb6da80a6f75a0fd8a70 Mon Sep 17 00:00:00 2001
22
From: HONG Yifan <elsk@google.com>
33
Date: Fri, 18 Jul 2025 22:58:54 +0000
4-
Subject: [PATCH 1/3] Use our local_repository.
4+
Subject: [PATCH 1/4] Use our local_repository.
55

66
https://github.com/bazelbuild/bazel/issues/26578
77
---
@@ -24,5 +24,5 @@ index c888365..2d203d4 100644
2424
new_local_repository(
2525
name = "fmtlib",
2626
--
27-
2.50.1.552.g942d659e1b-goog
27+
2.51.0.rc1.163.g2494970778-goog
2828

base/cvd/build_external/rootcanal/0002-Use-pdlc-from-pdl-compiler-crate.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 86ccd4891af81c6e6b4a572d9eee04fb8a8590b9 Mon Sep 17 00:00:00 2001
22
From: HONG Yifan <elsk@google.com>
33
Date: Fri, 18 Jul 2025 23:19:24 +0000
4-
Subject: [PATCH 2/3] Use pdlc from pdl-compiler crate.
4+
Subject: [PATCH 2/4] Use pdlc from pdl-compiler crate.
55

66
pdlc might not be installed on the host system.
77
---
@@ -93,5 +93,5 @@ index 58285d6..14d1db5 100644
9393

9494
run_binary(
9595
--
96-
2.50.1.552.g942d659e1b-goog
96+
2.51.0.rc1.163.g2494970778-goog
9797

base/cvd/build_external/rootcanal/0003-Make-rootcanal_proto-public.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 45a57e95175e6a6a0cc1994355b82a2c1178b1f7 Mon Sep 17 00:00:00 2001
22
From: HONG Yifan <elsk@google.com>
33
Date: Thu, 31 Jul 2025 01:09:02 +0000
4-
Subject: [PATCH 3/3] Make rootcanal_proto public.
4+
Subject: [PATCH 3/4] Make rootcanal_proto public.
55

66
Used by netsim.
77
---
@@ -21,5 +21,5 @@ index 93ab013..f4a3aeb 100644
2121

2222
cc_proto_library(
2323
--
24-
2.50.1.552.g942d659e1b-goog
24+
2.51.0.rc1.163.g2494970778-goog
2525

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
From b9d49fae3b1f3a011de9591b03559d23eb9e18cc Mon Sep 17 00:00:00 2001
2+
From: HONG Yifan <elsk@google.com>
3+
Date: Fri, 15 Aug 2025 22:32:07 +0000
4+
Subject: [PATCH 4/4] Add link_layer_packets_rs.
5+
6+
Unlike in Android.bp, we use rust_legacy here to match other pdl
7+
files, and to also create the *Builder classes.
8+
9+
Bug: b/402294843
10+
---
11+
packets/BUILD | 9 +++++++++
12+
1 file changed, 9 insertions(+)
13+
14+
diff --git a/packets/BUILD b/packets/BUILD
15+
index 14d1db5..10d4c74 100644
16+
--- a/packets/BUILD
17+
+++ b/packets/BUILD
18+
@@ -29,6 +29,15 @@ genrule(
19+
tools = ["@crates//:pdl-compiler__pdlc"],
20+
)
21+
22+
+genrule(
23+
+ name = "link_layer_packets_rs",
24+
+ cmd = "$(execpath @crates//:pdl-compiler__pdlc) --output-format rust_legacy $(location link_layer_packets.pdl) > $(location link_layer_packets.rs)",
25+
+ outs = ["link_layer_packets.rs"],
26+
+ srcs = ["link_layer_packets.pdl"],
27+
+ tools = ["@crates//:pdl-compiler__pdlc"],
28+
+ visibility = ["//visibility:public"],
29+
+)
30+
+
31+
run_binary(
32+
name = "hci_packets_h",
33+
args = [
34+
--
35+
2.51.0.rc1.163.g2494970778-goog
36+
37+

0 commit comments

Comments
 (0)