wireless-regdb_2020.04.29.bb 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. SUMMARY = "Wireless Central Regulatory Domain Database"
  2. HOMEPAGE = "https://wireless.wiki.kernel.org/en/developers/regulatory/crda"
  3. SECTION = "net"
  4. LICENSE = "ISC"
  5. LIC_FILES_CHKSUM = "file://LICENSE;md5=07c4f6dea3845b02a18dc00c8c87699c"
  6. SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz"
  7. SRC_URI[sha256sum] = "89fd031aed5977c219a71501e144375a10e7c90d1005d5d086ea7972886a2c7a"
  8. inherit bin_package allarch
  9. do_install() {
  10. install -d -m0755 ${D}${nonarch_libdir}/crda
  11. install -d -m0755 ${D}${sysconfdir}/wireless-regdb/pubkeys
  12. install -m 0644 regulatory.bin ${D}${nonarch_libdir}/crda/regulatory.bin
  13. install -m 0644 sforshee.key.pub.pem ${D}${sysconfdir}/wireless-regdb/pubkeys/sforshee.key.pub.pem
  14. install -m 0644 -D regulatory.db ${D}${nonarch_base_libdir}/firmware/regulatory.db
  15. install -m 0644 regulatory.db.p7s ${D}${nonarch_base_libdir}/firmware/regulatory.db.p7s
  16. }
  17. # Install static regulatory DB in /lib/firmware for kernel to load.
  18. # This requires Linux kernel >= v4.15.
  19. # For kernel <= v4.14, inherit the kernel_wireless_regdb.bbclass
  20. # (in meta-networking) in kernel's recipe.
  21. PACKAGES = "${PN}-static ${PN}"
  22. RCONFLICTS_${PN} = "${PN}-static"
  23. FILES_${PN}-static = " \
  24. ${nonarch_base_libdir}/firmware/regulatory.db \
  25. ${nonarch_base_libdir}/firmware/regulatory.db.p7s \
  26. "
  27. # Native users might want to use the source of regulatory DB.
  28. # This is for example used by Linux kernel <= v4.14 and
  29. # kernel_wireless_regdb.bbclass in meta-networking.
  30. do_install_append_class-native() {
  31. install -m 0644 -D db.txt ${D}${libdir}/crda/db.txt
  32. }
  33. RSUGGESTS_${PN} = "crda"
  34. BBCLASSEXTEND = "native"