[v2,7/8] wireless-regdb: Use db.txt file for wlanap.cgi

Message ID 20210728172932.2737967-7-adolf.belka@ipfire.org
State Superseded
Headers
Series [v2,1/8] make.sh: Remove crda and remaining python2 modules |

Commit Message

Adolf Belka July 28, 2021, 5:29 p.m. UTC
  - db.txt is the text file version of the wireless settings by country database
- Using db.txt means that regdbdump from crda is not required by wlanap.cgi
- This patch copies the db.txt file from the source tarball to /lib/firmware/ where
   it can be read by wlanap.cgi
- Updated rootfile to include db.txt

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 config/rootfiles/common/wireless-regdb | 1 +
 lfs/wireless-regdb                     | 1 +
 2 files changed, 2 insertions(+)
  

Comments

Michael Tremer Aug. 4, 2021, 2:34 p.m. UTC | #1
Hello,

This whole patch set looks very good.

I am just wondering if “db.txt” isn’t a bit generic for the file?

Should we not call it /lib/firmware/regulatory.txt?

-Michael

> On 28 Jul 2021, at 19:29, Adolf Belka <adolf.belka@ipfire.org> wrote:
> 
> - db.txt is the text file version of the wireless settings by country database
> - Using db.txt means that regdbdump from crda is not required by wlanap.cgi
> - This patch copies the db.txt file from the source tarball to /lib/firmware/ where
>   it can be read by wlanap.cgi
> - Updated rootfile to include db.txt
> 
> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
> ---
> config/rootfiles/common/wireless-regdb | 1 +
> lfs/wireless-regdb                     | 1 +
> 2 files changed, 2 insertions(+)
> 
> diff --git a/config/rootfiles/common/wireless-regdb b/config/rootfiles/common/wireless-regdb
> index 7e830ae1f..2ebbfc169 100644
> --- a/config/rootfiles/common/wireless-regdb
> +++ b/config/rootfiles/common/wireless-regdb
> @@ -1,3 +1,4 @@
> +lib/firmware/db.txt
> lib/firmware/regulatory.db
> lib/firmware/regulatory.db.p7s
> #usr/lib/crda
> diff --git a/lfs/wireless-regdb b/lfs/wireless-regdb
> index 6cffd34ba..1ef7da231 100644
> --- a/lfs/wireless-regdb
> +++ b/lfs/wireless-regdb
> @@ -72,5 +72,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
> 	@$(PREBUILD)
> 	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
> 	cd $(DIR_APP) && make install
> +	cp -vf $(DIR_APP)/db.txt /lib/firmware/db.txt
> 	@rm -rf $(DIR_APP)
> 	@$(POSTBUILD)
> -- 
> 2.32.0
>
  

Patch

diff --git a/config/rootfiles/common/wireless-regdb b/config/rootfiles/common/wireless-regdb
index 7e830ae1f..2ebbfc169 100644
--- a/config/rootfiles/common/wireless-regdb
+++ b/config/rootfiles/common/wireless-regdb
@@ -1,3 +1,4 @@ 
+lib/firmware/db.txt
 lib/firmware/regulatory.db
 lib/firmware/regulatory.db.p7s
 #usr/lib/crda
diff --git a/lfs/wireless-regdb b/lfs/wireless-regdb
index 6cffd34ba..1ef7da231 100644
--- a/lfs/wireless-regdb
+++ b/lfs/wireless-regdb
@@ -72,5 +72,6 @@  $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 	@$(PREBUILD)
 	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
 	cd $(DIR_APP) && make install
+	cp -vf $(DIR_APP)/db.txt /lib/firmware/db.txt
 	@rm -rf $(DIR_APP)
 	@$(POSTBUILD)