realtime kernel

Hi,

I received my BB AI yesterday, and when I arranged a proper USB-C cable and Raspberry PI adapter I was discovering the board today. Nice and snappy compared to the BB Black and co, like the X15 :slight_smile:

After playing around (coming days) I’m planing to install some programs I use on the BB Black to try out. So I’d like to know if there are there any known RT kernels to (not) work?

Thx,
Bas

This one should work, it's the same kernel as the default install but
with the RealTime patch applied and enabled..

cd /opt/scripts/tools/
sudo ./update_kernel.sh --ti-rt-channel --lts-4_14

Regards,

Hi,

I received my BB AI yesterday, and when I arranged a proper USB-C cable and Raspberry PI adapter I was discovering the board today. Nice and snappy compared to the BB Black and co, like the X15 :slight_smile:
After playing around (coming days) I'm planing to install some programs I use on the BB Black to try out. So I'd like to know if there are there any known RT kernels to (not) work?

This one should work, it's the same kernel as the default install but
with the RealTime patch applied and enabled..

cd /opt/scripts/tools/
sudo ./update_kernel.sh --ti-rt-channel --lts-4_14

Thanks Robert!

Hi,

I received my BB AI yesterday, and when I arranged a proper USB-C cable and Raspberry PI adapter I was discovering the board today. Nice and snappy compared to the BB Black and co, like the X15 :slight_smile:
After playing around (coming days) I’m planing to install some programs I use on the BB Black to try out. So I’d like to know if there are there any known RT kernels to (not) work?

This one should work, it’s the same kernel as the default install but
with the RealTime patch applied and enabled…

cd /opt/scripts/tools/
sudo ./update_kernel.sh --ti-rt-channel --lts-4_14

Hi Robert, Installing was no problem, however I have trouble connecting to the board via SSH. After a power down, Cloud9 works, connecting via the debug connector works up to a point…

When connected via cloud9 I can create new terminals, but finding out about the network (ip addr) for example hangs the (remote/debug) terminal.

I’ve got a gist here with the serial debug output during startup: serial debug output BB AI with RT kernel 4.14.108-ti-rt-r118 · GitHub
dmesg further periodically shows this:

[ 242.872671] INFO: task systemd-udevd:494 blocked for more than 120 seconds.
[ 242.880000] Tainted: G W O 4.14.108-ti-rt-r118 #1
[ 242.886639] “echo 0 > /proc/sys/kernel/hung_task_timeout_secs” disables this message.
[ 242.894547] systemd-udevd D 0 494 327 0x00000101
[ 242.894610] [] (__schedule) from [] (schedule+0x64/0x108)
[ 242.894644] [] (schedule) from [] (__rt_mutex_slowlock+0xf8/0x184)
[ 242.894678] [] (__rt_mutex_slowlock) from [] (rt_mutex_slowlock_locked+0xe4/0x2e0)
[ 242.894712] [] (rt_mutex_slowlock_locked) from [] (rt_mutex_slowlock.constprop.11+0x78/0xbc)
[ 242.894746] [] (rt_mutex_slowlock.constprop.11) from [] (__rt_mutex_lock_state+0x9c/0xc4)
[ 242.894780] [] (__rt_mutex_lock_state) from [] (_mutex_lock+0x1c/0x20)
[ 242.894810] [] (_mutex_lock) from [] (rtnl_lock+0x20/0x24)
[ 242.894841] [] (rtnl_lock) from [] (dev_ioctl+0x774/0xa28)
[ 242.894875] [] (dev_ioctl) from [] (sock_ioctl+0x180/0x300)
[ 242.894907] [] (sock_ioctl) from [] (do_vfs_ioctl+0xc0/0x94c)
[ 242.894936] [] (do_vfs_ioctl) from [] (SyS_ioctl+0x7c/0x8c)
[ 242.894968] [] (SyS_ioctl) from [] (__sys_trace_return+0x0/0x10)

Best,
Bas

This looks similar to what I see.

I encountered the same issue with both 4.14 and 4.19 kernels. During and after boot there is a continuous stream of:

------------[ cut here ]------------
 WARNING: CPU: 1 PID: 3908 at drivers/mmc/core/core.c:351 mmc_start_request+0xbc/0xc8
 Modules linked in: btsdio(+) bluetooth ecdh_generic brcmfmac brcmutil cfg80211 uio_pdrv_genirq uio 8021q garp stp mrp llc iptable_nat nf_nat_ipv4 nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptable_filter cmemk(O) spidev ip_tables x_tables
 CPU: 1 PID: 3908 Comm: irq/246-brcmf_o Tainted: G           O      4.19.79-ti-rt-r30 #1stretch
 Hardware name: Generic DRA74X (Flattened Device Tree)
 [<c0114384>] (unwind_backtrace) from [<c010e4a0>] (show_stack+0x20/0x24)
 [<c010e4a0>] (show_stack) from [<c0d6a754>] (dump_stack+0x80/0x94)
 [<c0d6a754>] (dump_stack) from [<c013d084>] (__warn+0x104/0x11c)
 [<c013d084>] (__warn) from [<c013d1d4>] (warn_slowpath_null+0x50/0x58)
 [<c013d1d4>] (warn_slowpath_null) from [<c0aed7a0>] (mmc_start_request+0xbc/0xc8)
 [<c0aed7a0>] (mmc_start_request) from [<c0aed820>] (mmc_wait_for_req+0x74/0xe0)
 [<c0aed820>] (mmc_wait_for_req) from [<c0afa5bc>] (mmc_io_rw_extended+0x26c/0x32c)
 [<c0afa5bc>] (mmc_io_rw_extended) from [<c0afbf48>] (sdio_io_rw_ext_helper+0x14c/0x1c0)
 [<c0afbf48>] (sdio_io_rw_ext_helper) from [<c0afc090>] (sdio_readl+0x40/0x60)
 [<c0afc090>] (sdio_readl) from [<bf413e9c>] (brcmf_sdiod_request_data+0x150/0x1bc [brcmfmac])
 [<bf413e9c>] (brcmf_sdiod_request_data [brcmfmac]) from [<bf414308>] (brcmf_sdiod_regrw_helper+0x8c/0x184 [brcmfmac])
 [<bf414308>] (brcmf_sdiod_regrw_helper [brcmfmac]) from [<bf415194>] (brcmf_sdiod_regrl+0x88/0x94 [brcmfmac])
 [<bf415194>] (brcmf_sdiod_regrl [brcmfmac]) from [<bf40e1c4>] (brcmf_sdio_intr_rstatus+0x50/0xe4 [brcmfmac])
 [<bf40e1c4>] (brcmf_sdio_intr_rstatus [brcmfmac]) from [<bf40fea4>] (brcmf_sdio_isr+0x80/0xec [brcmfmac])
 [<bf40fea4>] (brcmf_sdio_isr [brcmfmac]) from [<bf413d44>] (brcmf_sdiod_oob_irqhandler+0x3c/0x44 [brcmfmac])
 [<bf413d44>] (brcmf_sdiod_oob_irqhandler [brcmfmac]) from [<c01b4a20>] (irq_forced_thread_fn+0x30/0xac)
 [<c01b4a20>] (irq_forced_thread_fn) from [<c01b4e18>] (irq_thread+0x138/0x22c)
 [<c01b4e18>] (irq_thread) from [<c01624b0>] (kthread+0x140/0x170)
 [<c01624b0>] (kthread) from [<c01010f0>] (ret_from_fork+0x14/0x24)
 Exception stack(0xcd80bfb0 to 0xcd80bff8)
 bfa0:                                     00000000 00000000 00000000 00000000
 bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
 bfe0: 00000000 00000000 00000000 00000000 00000013 00000000
 ---[ end trace 0000000000000002 ]---
 ------------[ cut here ]------------

which eventually leads to the other dump reported and console lock ups. The issue seems to be caused by brcmfmac. That driver may not be claiming the host using mmc_claim_host() as required. I ran:

sudo sh -c 'echo "blacklist brcmfmac" > /etc/modprobe.d/brcmfmac-blacklist.conf'

to disable loading the brcmfmac driver and the issue went away.

HTH

Hopefully the experts will chime in, but I vaguely recall reading that
the BB AI does not support run-time pin muxing using the capemgr and
config-pin. You will have to provide a device tree overlay (ie: "cape"
definition) that defines the required pin muxing.

  Compare the /boot/uEnv.txt found on the BB AI to that on the BBB. On
mine, the BBB has a slew of lines for device tree overlays including

###Cape Universal Enable
enable_uboot_cape_universal=1

but the BB AI has NOTHING for capes or overlays. WHICH MAY MEAN YOU HAVE TO
PROVIDE A SINGLE DEVICE TREE CONFIGURED FOR THE APPLICATION.

See: https://www.elinux.org/EBC_Exercise_41_Pin_Muxing_for_the_AI

After installing https://github.com/mvduin/bbb-pin-utils on a BBB, and the
equivalent shown on
https://www.element14.com/community/community/project14/visionthing/blog/2019/11/16/beagleboard-ai-brick-recovery-procedure#jive_content_id_BBAI_SETUP_CHECKLIST

-=-=-=-=- BBB
debian@beaglebone:~$ sudo show-pins | sort
P8.03 / eMMC d6 6 fast rx up 1 mmc 1 d6 mmc@481d8000
(pinmux_emmc_pins)
P8.04 / eMMC d7 7 fast rx up 1 mmc 1 d7 mmc@481d8000
(pinmux_emmc_pins)
P8.05 / eMMC d2 2 fast rx up 1 mmc 1 d2 mmc@481d8000
(pinmux_emmc_pins)
P8.06 / eMMC d3 3 fast rx up 1 mmc 1 d3 mmc@481d8000
(pinmux_emmc_pins)
P8.07 36 fast rx up 7 gpio 2.02 << hi P8_07
(pinmux_P8_07_default_pin)
P8.08 37 fast rx up 7 gpio 2.03 << hi P8_08
(pinmux_P8_08_default_pin)
P8.09 39 fast rx up 7 gpio 2.05 << hi P8_09
(pinmux_P8_09_default_pin)
P8.10 38 fast rx up 7 gpio 2.04 << hi P8_10
(pinmux_P8_10_default_pin)
P8.11 13 fast rx down 7 gpio 1.13 << lo P8_11
(pinmux_P8_11_default_pin)
P8.12 12 fast rx down 7 gpio 1.12 << lo P8_12
(pinmux_P8_12_default_pin)
P8.13 9 fast rx down 7 gpio 0.23 << lo P8_13
(pinmux_P8_13_default_pin)
P8.14 10 fast rx down 7 gpio 0.26 << lo P8_14
(pinmux_P8_14_default_pin)
P8.15 15 fast rx down 7 gpio 1.15 << lo P8_15
(pinmux_P8_15_default_pin)
P8.16 14 fast rx down 7 gpio 1.14 << lo P8_16
(pinmux_P8_16_default_pin)
P8.17 11 fast rx down 7 gpio 0.27 << lo P8_17
(pinmux_P8_17_default_pin)
P8.18 35 fast rx down 7 gpio 2.01 << lo P8_18
(pinmux_P8_18_default_pin)
P8.19 8 fast rx down 7 gpio 0.22 << lo P8_19
(pinmux_P8_19_default_pin)
P8.20 / eMMC cmd 33 fast rx up 2 mmc 1 cmd mmc@481d8000
(pinmux_emmc_pins)
P8.21 / eMMC clk 32 fast rx up 2 mmc 1 clk mmc@481d8000
(pinmux_emmc_pins)
P8.22 / eMMC d5 5 fast rx up 1 mmc 1 d5 mmc@481d8000
(pinmux_emmc_pins)
P8.23 / eMMC d4 4 fast rx up 1 mmc 1 d4 mmc@481d8000
(pinmux_emmc_pins)
P8.24 / eMMC d1 1 fast rx up 1 mmc 1 d1 mmc@481d8000
(pinmux_emmc_pins)
P8.25 / eMMC d0 0 fast rx up 1 mmc 1 d0 mmc@481d8000
(pinmux_emmc_pins)
P8.26 31 fast rx up 7 gpio 1.29 << hi P8_26
(pinmux_P8_26_default_pin)
P8.27 / hdmi 56 fast down 0 lcd vsync 0-0070
(nxp_hdmi_bonelt_pins)
P8.28 / hdmi 58 fast down 0 lcd pclk 0-0070
(nxp_hdmi_bonelt_pins)
P8.29 / hdmi 57 fast down 0 lcd hsync 0-0070
(nxp_hdmi_bonelt_pins)
P8.30 / hdmi 59 fast down 0 lcd oe/acb 0-0070
(nxp_hdmi_bonelt_pins)
P8.31 / hdmi / sysboot 14 54 fast 0 lcd d14 0-0070
(nxp_hdmi_bonelt_pins)
P8.32 / hdmi / sysboot 15 55 fast 0 lcd d15 0-0070
(nxp_hdmi_bonelt_pins)
P8.33 / hdmi / sysboot 13 53 fast 0 lcd d13 0-0070
(nxp_hdmi_bonelt_pins)
P8.34 / hdmi / sysboot 11 51 fast 0 lcd d11 0-0070
(nxp_hdmi_bonelt_pins)
P8.35 / hdmi / sysboot 12 52 fast 0 lcd d12 0-0070
(nxp_hdmi_bonelt_pins)
P8.36 / hdmi / sysboot 10 50 fast 0 lcd d10 0-0070
(nxp_hdmi_bonelt_pins)
P8.37 / hdmi / sysboot 8 48 fast 0 lcd d8 0-0070
(nxp_hdmi_bonelt_pins)
P8.38 / hdmi / sysboot 9 49 fast 0 lcd d9 0-0070
(nxp_hdmi_bonelt_pins)
P8.39 / hdmi / sysboot 6 46 fast 0 lcd d6 0-0070
(nxp_hdmi_bonelt_pins)
P8.40 / hdmi / sysboot 7 47 fast 0 lcd d7 0-0070
(nxp_hdmi_bonelt_pins)
P8.41 / hdmi / sysboot 4 44 fast 0 lcd d4 0-0070
(nxp_hdmi_bonelt_pins)
P8.42 / hdmi / sysboot 5 45 fast 0 lcd d5 0-0070
(nxp_hdmi_bonelt_pins)
P8.43 / hdmi / sysboot 2 42 fast 0 lcd d2 0-0070
(nxp_hdmi_bonelt_pins)
P8.44 / hdmi / sysboot 3 43 fast 0 lcd d3 0-0070
(nxp_hdmi_bonelt_pins)
P8.45 / hdmi / sysboot 0 40 fast 0 lcd d0 0-0070
(nxp_hdmi_bonelt_pins)
P8.46 / hdmi / sysboot 1 41 fast 0 lcd d1 0-0070
(nxp_hdmi_bonelt_pins)
P9.11 28 fast rx up 7 gpio 0.30 << hi P9_11
(pinmux_P9_11_default_pin)
P9.12 30 fast rx up 7 gpio 1.28 << hi P9_12
(pinmux_P9_12_default_pin)
P9.13 29 fast rx up 7 gpio 0.31 << hi P9_13
(pinmux_P9_13_default_pin)
P9.14 18 fast rx down 7 gpio 1.18 << lo P9_14
(pinmux_P9_14_default_pin)
P9.15 16 fast rx down 7 gpio 1.16 << hi P9_15
(pinmux_P9_15_default_pin)
P9.15 34 fast rx up 7 gpio 2.00
P9.16 19 fast rx down 7 gpio 1.19 << lo P9_16
(pinmux_P9_16_default_pin)
P9.17 / spi boot cs 87 fast rx up 7 gpio 0.05 << hi P9_17
(pinmux_P9_17_default_pin)
P9.18 / spi boot out 86 fast rx up 7 gpio 0.04 << hi P9_18
(pinmux_P9_18_default_pin)
P9.19 / cape i²c scl 95 fast rx up 3 i²c 2 scl
ocp/P9_19_pinmux (pinmux_P9_19_default_pin)
P9.20 / cape i²c sda 94 fast rx up 3 i²c 2 sda
ocp/P9_20_pinmux (pinmux_P9_20_default_pin)
P9.21 / spi boot in 85 fast rx up 7 gpio 0.03 << hi P9_21
(pinmux_P9_21_default_pin)
P9.22 / spi boot clk 84 fast rx up 7 gpio 0.02 << hi P9_22
(pinmux_P9_22_default_pin)
P9.23 17 fast rx down 7 gpio 1.17 << lo P9_23
(pinmux_P9_23_default_pin)
P9.24 97 fast rx up 7 gpio 0.15 << hi P9_24
(pinmux_P9_24_default_pin)
P9.25 / audio osc 107 fast rx up 0 asp 0 tx hclk
mcasp@48038000 (mcasp0_pins)
P9.26 96 fast rx up 7 gpio 0.14 << hi P9_26
(pinmux_P9_26_default_pin)
P9.27 105 fast rx down 7 gpio 3.19 << lo P9_27
(pinmux_P9_27_default_pin)
P9.28 / hdmi audio data 103 fast down 2 asp 0 data 2
mcasp@48038000 (mcasp0_pins)
P9.29 / hdmi audio fs 101 fast up 0 asp 0 tx fs
mcasp@48038000 (mcasp0_pins)
P9.30 102 fast rx down 7 gpio 3.16 << lo P9_30
(pinmux_P9_30_default_pin)
P9.31 / hdmi audio clk 100 fast down 0 asp 0 tx clk
mcasp@48038000 (mcasp0_pins)
P9.41 106 fast rx down 7 gpio 3.20 << lo P9_91
(pinmux_P9_91_default_pin)
P9.41 / jtag emu3 109 fast rx down 7 gpio 0.20 << lo P9_41
(pinmux_P9_41_default_pin)
P9.42 104 fast rx down 7 gpio 3.18 << lo P9_92
(pinmux_P9_92_default_pin)
P9.42 89 fast rx down 7 gpio 0.07 << lo P9_42
(pinmux_P9_42_default_pin)
debian@beaglebone:~$

vs

-=-=-=-=- BB AI
debian@bbai:~$ sudo show-pins | sort
Caution: Uses peripheral names from <https://goo.gl/jiazTL>. See README
there for details.
P8.03 231 fast down 14 gpio 0.24
P8.04 232 fast down 14 gpio 0.25
P8.05 227 fast down 14 gpio 6.01
P8.06 228 fast down 14 gpio 6.02
P8.07 187 fast down 14 gpio 5.05
P8.08 188 fast down 14 gpio 5.06
P8.09 166 fast down 14 gpio 5.18
P8.10 186 fast down 14 gpio 5.04
P8.11 68 fast down 14 gpio 2.11
P8.12 67 fast down 14 gpio 2.10
P8.13 100 fast rx 12 pr 0 pru1 gpi7
P8.14 102 fast down 14 gpio 3.13
P8.15a 92 fast down 14 gpio 3.03
P8.15b 109 fast down 13 pr 0 pru1 gpo16
P8.16 111 fast down 13 pr 0 pru1 gpo18
P8.17 137 fast down 14 gpio 7.18
P8.18 98 fast rx 12 pr 0 pru1 gpi5
P8.19 99 fast rx 12 pr 0 pru1 gpi6
P8.20 224 fast down 14 gpio 5.30
P8.21 223 fast down 14 gpio 5.29
P8.22 230 fast down 14 gpio 0.23
P8.23 229 fast down 14 gpio 0.22
P8.24 226 fast down 14 gpio 6.00
P8.25 225 fast down 14 gpio 5.31
P8.26 110 fast down 13 pr 0 pru1 gpo17
P8.27a 118 fast down 14 gpio 3.23
P8.27b 138 fast down 14 gpio 7.19
P8.28a 114 fast down 14 gpio 3.19
P8.28b 139 fast down 14 gpio 7.20
P8.29a 117 fast down 14 gpio 3.22
P8.29b 140 fast down 14 gpio 7.21
P8.30a 115 fast down 14 gpio 3.20
P8.30b 141 fast down 14 gpio 7.22
P8.31a 133 fast down 14 gpio 7.14
P8.31b 207 fast down 14 INVALID
P8.32a 134 fast down 14 gpio 7.15
P8.32b 208 fast down 14 INVALID
P8.33a 132 fast down 14 gpio 7.13
P8.33b 58 fast down 14 gpio 2.01
P8.34a 130 fast down 14 gpio 7.11
P8.34b 89 fast down 14 gpio 3.00
P8.35a 131 fast down 14 gpio 7.12
P8.35b 57 fast down 14 gpio 2.00
P8.36a 129 fast down 14 gpio 7.10
P8.36b 90 fast down 14 gpio 3.01
P8.37a 127 fast down 14 gpio 7.08
P8.37b 206 fast down 14 INVALID
P8.38a 128 fast down 14 gpio 7.09
P8.38b 205 fast down 14 INVALID
P8.39 125 fast down 14 gpio 7.06
P8.40 126 fast down 14 gpio 7.07
P8.41 123 fast down 14 gpio 7.04
P8.42 124 fast down 14 gpio 7.05
P8.43 121 fast down 14 gpio 7.02
P8.44 122 fast down 14 gpio 7.03
P8.45a 119 fast down 14 gpio 7.00
P8.45b 135 fast down 14 gpio 7.16
P8.46a 120 fast down 14 gpio 7.01
P8.46b 142 fast down 14 gpio 7.23
P9.11a 203 fast down 14 INVALID
P9.11b 136 fast down 14 gpio 7.17
P9.12 171 fast down 14 gpio 4.00
P9.13a 204 fast down 14 INVALID
P9.13b ? 160 fast down 15 unused
P9.14 107 fast down 10 pwm 2 A
P9.15 69 fast down 14 gpio 2.12
P9.16 108 fast down 13 pr 0 pru1 gpo15
P9.17a 243 fast down 14 gpio 6.17
P9.17b 174 fast down 14 gpio 4.03
P9.18a 242 fast down 14 gpio 6.16
P9.18b 173 fast down 14 gpio 4.02
P9.19a 16 fast rx up 7 i²c 3 scl
P9.19b 95 fast rx up 12 pr 0 pru1 gpi2
P9.20a 17 fast rx up 7 i²c 3 sda
P9.20b 94 fast rx up 12 pr 0 pru1 gpi1
P9.21a 60 fast down 14 gpio 2.03
P9.21b 241 fast down 14 gpio 6.15
P9.22a 167 fast down 14 gpio 5.19
P9.22b 240 fast down 14 gpio 6.14
P9.23 237 fast down 14 gpio 6.11
P9.24 163 fast down 14 gpio 5.15
P9.25 165 fast down 14 gpio 5.17
P9.26a 162 fast down 14 gpio 5.14
P9.26b 81 fast down 14 gpio 2.24
P9.27a 104 fast down 14 gpio 3.15
P9.27b 172 fast down 14 gpio 4.01
P9.28 184 fast down 14 gpio 3.17
P9.29a 182 fast down 14 gpio 4.11
P9.29b 170 fast down 14 gpio 6.30
P9.30 183 fast down 14 gpio 4.12
P9.31a 181 fast down 14 gpio 4.10
P9.31b 169 fast down 14 gpio 6.31
P9.41a 168 fast down 14 gpio 5.20
P9.41b 96 fast down 14 gpio 3.07
P9.42a 185 fast down 14 gpio 3.18
P9.42b 103 fast down 14 gpio 3.14
debian@bbai:~$

  Not sure I fully trust that listing... The only pins shows with what I
think is pull-UP are P9-19 and P9-20, which are i2c pins. In contrast the
BBB has pins in both types.

Your question has nothing to do with the topic of this thread (kernel warnings and breakage when trying to use an RT kernel on the BBAI, caused by the brcmfmac driver). Please create a new thread instead of hijacking an old unrelated one. This clutters the original topic and will reduce the probably of getting a useful answer.

The BeagleBone AI does not really resemble other BeagleBones, it is much closer to the BeagleBoard-X15. hal_bb_gpio is written for the AM335x and is absolutely not compatible with the AM572x. It is never going to work on the BeagleBone AI. It will need a different HAL instead.

Matthijs