We now have 6.9 kernel headers in master which means
busybox builds with CONFIG_TC will fail to build due
to CBQ being dropped in kernel 6.8+

Apply a fix which is reported upstream

Signed-off-by: Khem Raj <raj.k...@gmail.com>
---
 .../busybox/busybox-1.36.1-no-cbq.patch       | 61 +++++++++++++++++++
 meta/recipes-core/busybox/busybox_1.36.1.bb   |  1 +
 2 files changed, 62 insertions(+)
 create mode 100644 
meta/recipes-core/busybox/busybox/busybox-1.36.1-no-cbq.patch

diff --git a/meta/recipes-core/busybox/busybox/busybox-1.36.1-no-cbq.patch 
b/meta/recipes-core/busybox/busybox/busybox-1.36.1-no-cbq.patch
new file mode 100644
index 00000000000..80cbc73fc41
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/busybox-1.36.1-no-cbq.patch
@@ -0,0 +1,61 @@
+Remove CBQ functionality from tc
+
+6.8+ kernel has dropped CBQ support [1], Now that OE uses 6.9 for
+kernel-headers means we are hitting the undefined symbol
+TCA_CBQ_MAX [2]  
+
+[1] 
https://github.com/torvalds/linux/commit/33241dca486264193ed68167c8eeae1fb197f3df
+[2] https://bugs.busybox.net/show_bug.cgi?id=15934
+
+Upstream-Status: Submitted [https://bugs.busybox.net/show_bug.cgi?id=15931]
+Signed-off-by: Khem Raj <raj.k...@gmail.com>
+
+diff -up busybox-1.36.1/networking/tc.c.no-cbq busybox-1.36.1/networking/tc.c
+--- busybox-1.36.1/networking/tc.c.no-cbq      2024-01-29 10:24:09.135082923 
-0500
++++ busybox-1.36.1/networking/tc.c     2024-01-29 10:28:12.009502552 -0500
+@@ -31,7 +31,7 @@
+ //usage:      "qdisc [handle QHANDLE] 
[root|"IF_FEATURE_TC_INGRESS("ingress|")"parent CLASSID]\n"
+ /* //usage: "[estimator INTERVAL TIME_CONSTANT]\n" */
+ //usage:      "       [[QDISC_KIND] [help|OPTIONS]]\n"
+-//usage:      "       QDISC_KIND := [p|b]fifo|tbf|prio|cbq|red|etc.\n"
++//usage:      "       QDISC_KIND := [p|b]fifo|tbf|prio|red|etc.\n"
+ //usage:      "qdisc show [dev STRING]"IF_FEATURE_TC_INGRESS(" [ingress]")"\n"
+ //usage:      "class [classid CLASSID] [root|parent CLASSID]\n"
+ //usage:      "       [[QDISC_KIND] [help|OPTIONS] ]\n"
+@@ -230,7 +230,7 @@ static int cbq_parse_opt(int argc, char
+ {
+       return 0;
+ }
+-#endif
++
+ static int cbq_print_opt(struct rtattr *opt)
+ {
+       struct rtattr *tb[TCA_CBQ_MAX+1];
+@@ -322,6 +322,7 @@ static int cbq_print_opt(struct rtattr *
+  done:
+       return 0;
+ }
++#endif
+ 
+ static FAST_FUNC int print_qdisc(
+               const struct sockaddr_nl *who UNUSED_PARAM,
+@@ -373,7 +374,8 @@ static FAST_FUNC int print_qdisc(
+               if (qqq == 0) { /* pfifo_fast aka prio */
+                       prio_print_opt(tb[TCA_OPTIONS]);
+               } else if (qqq == 1) { /* class based queuing */
+-                      cbq_print_opt(tb[TCA_OPTIONS]);
++                      /* cbq_print_opt(tb[TCA_OPTIONS]); */
++                      printf("cbq not supported");
+               } else {
+                       /* don't know how to print options for this qdisc */
+                       printf("(options for %s)", name);
+@@ -444,7 +446,8 @@ static FAST_FUNC int print_class(
+                       /* nothing. */ /*prio_print_opt(tb[TCA_OPTIONS]);*/
+               } else if (qqq == 1) { /* class based queuing */
+                       /* cbq_print_copt() is identical to cbq_print_opt(). */
+-                      cbq_print_opt(tb[TCA_OPTIONS]);
++                      /* cbq_print_opt(tb[TCA_OPTIONS]); */
++                      printf("cbq not supported");
+               } else {
+                       /* don't know how to print options for this class */
+                       printf("(options for %s)", name);
diff --git a/meta/recipes-core/busybox/busybox_1.36.1.bb 
b/meta/recipes-core/busybox/busybox_1.36.1.bb
index 373a6b7781b..327bea0d017 100644
--- a/meta/recipes-core/busybox/busybox_1.36.1.bb
+++ b/meta/recipes-core/busybox/busybox_1.36.1.bb
@@ -49,6 +49,7 @@ SRC_URI = 
"https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            
file://0001-libbb-sockaddr2str-ensure-only-printable-characters-.patch \
            
file://0002-nslookup-sanitize-all-printed-strings-with-printable.patch \
            file://start-stop-false.patch \
+           file://busybox-1.36.1-no-cbq.patch \
            "
 SRC_URI:append:libc-musl = " file://musl.cfg "
 # TODO http://lists.busybox.net/pipermail/busybox/2023-January/090078.html
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#201449): 
https://lists.openembedded.org/g/openembedded-core/message/201449
Mute This Topic: https://lists.openembedded.org/mt/107013721/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to