fork download
  1. ここでは、セキュアブートが有効の状態において、Realtek社のBluetoothデバイスを読み込む手順を記載する。
  2. SUSE Enterprise Linux 15 SP3 と openSUSE Leap 15.3で動作確認している。
  3.  
  4. 該当モジュールは/lib/modules/$(uname -r)/kernel/drivers/bluetoothディレクトリにインストールされているものとする。
  5. 該当モジュール名は、rtk_btusb.koファイルとする。
  6.  
  7. セキュアブートが有効の場合、Realtek BT8761BUモジュールの署名を登録する必要がある。
  8. また、ユーザが勝手にモジュールファイルをXZ形式等へ圧縮してはならない。(モジュールの署名に失敗するため)
  9.  
  10. 署名を登録する手順を以下に示す。
  11.  
  12. 1. まず、署名に必要な設定ファイルを作成する。
  13. mkdir -p ~/.MOK/RTL8761BU && cd ~/.MOK/RTL8761BU
  14. vi RTL8761BU.config
  15.  
  16.  
  17. # ~/.MOK/RTL8761BU/RTL8761BU.configファイル
  18. [ req ]
  19. default_bits = 4096
  20. distinguished_name = req_distinguished_name
  21. prompt = no
  22. string_mask = utf8only
  23. x509_extensions = myexts
  24.  
  25. [ req_distinguished_name ]
  26. O = SUSE Linux Products GmbH (User Add RTL8761BU) # 任意の名前
  27. CN = SUSE Linux Enterprise Secure Boot (User Add RTL8761BU) # 任意の名前
  28. emailAddress = suse@localhost # 任意のメールアドレス
  29.  
  30. [ myexts ]
  31. basicConstraints=critical,CA:FALSE
  32. keyUsage=digitalSignature
  33. subjectKeyIdentifier=hash
  34. authorityKeyIdentifier=keyid
  35.  
  36.  
  37. 2. キーペアを作成する。
  38. openssl req -x509 -new -nodes -utf8 -sha256 -days 36500 -batch -config ./RTL8761BU.config \
  39. -outform DER -out ./RTL8761BU.der -keyout ./RTL8761BU.priv \
  40. -addext "extendedKeyUsage=codeSigning"
  41.  
  42.  
  43. 3. 次に、MOK(Module owned Key)にキーをインポートする。
  44. --root-pwオプションを付加することにより、再起動時のRealtek BT8761BUモジュールの署名において、rootパスワードが必要となる。
  45. sudo mokutil --import ./RTL8761BU.der --root-pw
  46.  
  47.  
  48. 4. PCを再起動して、上記のキーの署名する。
  49. sudo systemctl reboot
  50.  
  51.  
  52. 5. Realtek BT8761BUモジュール(rtk_btusb)を署名して、モジュールを読み込む。
  53. sudo /lib/modules/$(uname -r)/build/scripts/sign-file sha256 ./RTL8761BU.priv ./RTL8761BU.der
  54. /lib/modules/$(uname -r)/kernel/drivers/bluetooth/rtk_btusb.ko
  55.  
  56. sudo depmod -a $(uname -r) # モジュール依存リストを更新する
  57. sudo modprobe -v rtk_btusb # RTL8761BUモジュールをロードする
  58.  
  59. lsmod | grep rtk_btusb # 正常に読み込まれたかどうかを確認する
  60.  
  61.  
  62. 5. Realtek BT8761BUモジュールが正しく署名されているかどうかを確認する。
  63. 正常に読み込まれている場合は、"RTK_8761BU.der is already enrolled"と表示される。
  64. cd ~/.MOK/RTL8761BU
  65. sudo mokutil --test-key ./RTK_8761BU.der
  66.  
  67.  
  68. 注意1. 上記の署名は、カーネルがアップデートされた場合、再度、署名が必要となることに注意する。
  69.  
  70.  
  71. 注意2. RTL8761BUが正常に動作しない場合、標準のBluetoothモジュールを無効にする。
  72. sudo vi /etc/modprobe.d/50-bluetooth-blacklist.conf
  73.  
  74. # /etc/modprobe.d/50-bluetooth-blacklist.confファイル
  75.  
  76. blacklist btrtl
  77. blacklist btusb
  78. blacklist btintel
  79. blacklist btbcm
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty