1*1a4b7ee2SBrad Bishop# Linux kernels before v4.15, allowed to be compiled with static 2*1a4b7ee2SBrad Bishop# regulatory database if it was put under net/wireless/db.txt. 3*1a4b7ee2SBrad Bishop# 4*1a4b7ee2SBrad Bishop# This class copies the regulatory plaintext database to kernel sources before 5*1a4b7ee2SBrad Bishop# compiling. 6*1a4b7ee2SBrad Bishop# 7*1a4b7ee2SBrad Bishop# Usage: 8*1a4b7ee2SBrad Bishop# 1. The class should be inherited by kernel recipe (e.g. in 9*1a4b7ee2SBrad Bishop# linux-yocto_%.bbappend). 10*1a4b7ee2SBrad Bishop# 2. For Linux kernels up to v4.14, build kernel with CONFIG_EXPERT and 11*1a4b7ee2SBrad Bishop# CONFIG_CFG80211_INTERNAL_REGDB. 12*1a4b7ee2SBrad Bishop 13*1a4b7ee2SBrad BishopDEPENDS += "wireless-regdb-native" 14*1a4b7ee2SBrad Bishop 15*1a4b7ee2SBrad BishopSRCTREECOVEREDTASKS += "do_kernel_add_regdb" 16*1a4b7ee2SBrad Bishopdo_kernel_add_regdb() { 17*1a4b7ee2SBrad Bishop cp ${STAGING_LIBDIR_NATIVE}/crda/db.txt ${S}/net/wireless/db.txt 18*1a4b7ee2SBrad Bishop} 19*1a4b7ee2SBrad Bishopdo_kernel_add_regdb[dirs] = "${S}" 20*1a4b7ee2SBrad Bishopaddtask kernel_add_regdb before do_build after do_configure 21