diff mbox

CRDA and cross-compilation

Message ID 1249580707.14919.29.camel@mj (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Pavel Roskin Aug. 6, 2009, 5:45 p.m. UTC
On Thu, 2009-08-06 at 09:56 -0700, Luis R. Rodriguez wrote:

> ACK, is it possible to make it simpler?

OK, here's my take.

We only need a native compiler to verify regulatory.bin.  I believe it's
orthogonal to building CRDA.

For someone doing a cross-compilation, it makes no sense to verify the
installed regulatory.bin.  Thus, the verification should be optional.

But the compilation of regdbdump shouldn't be.  Firstly, it's installed
by "make install".  Secondly, somebody may want to verify regulatory.bin
on the target system.

Here's the patch:


crda: make it possible to disable verification

Signed-off-by: Pavel Roskin <proski@gnu.org>
---
 Makefile |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

Comments

Philip Prindeville Aug. 6, 2009, 6:30 p.m. UTC | #1
Pavel Roskin wrote:
> On Thu, 2009-08-06 at 09:56 -0700, Luis R. Rodriguez wrote:
> 
>> ACK, is it possible to make it simpler?
> 
> OK, here's my take.
> 
> We only need a native compiler to verify regulatory.bin.  I believe it's
> orthogonal to building CRDA.
> 
> For someone doing a cross-compilation, it makes no sense to verify the
> installed regulatory.bin.  Thus, the verification should be optional.
> 
> But the compilation of regdbdump shouldn't be.  Firstly, it's installed
> by "make install".  Secondly, somebody may want to verify regulatory.bin
> on the target system.
> 
> Here's the patch:
> 
[snip]

Dumb question but, why not just build a target and host version each of regdumpdb?

-Philip
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Pavel Roskin Aug. 6, 2009, 6:41 p.m. UTC | #2
On Thu, 2009-08-06 at 11:30 -0700, Philip A. Prindeville wrote:

> Dumb question but, why not just build a target and host version each of regdumpdb?

Because it's more complicated.  Because we may want to disable
verification for reasons other than cross-compiling.  Because it's
already possible:

set -e
make verify REG_BIN=/targetfs/regulatory.bin
make clean
make all_noverify CC=cross-gcc
Luis Rodriguez Aug. 6, 2009, 6:42 p.m. UTC | #3
On Thu, Aug 6, 2009 at 10:45 AM, Pavel Roskin<proski@gnu.org> wrote:
> On Thu, 2009-08-06 at 09:56 -0700, Luis R. Rodriguez wrote:
>
>> ACK, is it possible to make it simpler?
>
> OK, here's my take.
>
> We only need a native compiler to verify regulatory.bin.  I believe it's
> orthogonal to building CRDA.
>
> For someone doing a cross-compilation, it makes no sense to verify the
> installed regulatory.bin.  Thus, the verification should be optional.
>
> But the compilation of regdbdump shouldn't be.  Firstly, it's installed
> by "make install".  Secondly, somebody may want to verify regulatory.bin
> on the target system.
>
> Here's the patch:
>
>
> crda: make it possible to disable verification
>
> Signed-off-by: Pavel Roskin <proski@gnu.org>
> ---
>  Makefile |    7 +++++--
>  1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index b93b735..3cc61c2 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -24,7 +24,9 @@ PUBKEY_DIR?=pubkeys
>
>  CFLAGS += -Wall -g
>
> -all: $(REG_BIN) crda intersect verify
> +all: all_noverify verify
> +
> +all_noverify: crda intersect regdbdump

You removed REG_BIN from here, was that intentional?

>  ifeq ($(USE_OPENSSL),1)
>  CFLAGS += -DUSE_OPENSSL `pkg-config --cflags openssl`
> @@ -74,11 +76,12 @@ $(REG_BIN):
>        $(NQ) '  EXIST ' $(REG_BIN)
>        $(NQ)
>        $(NQ) ERROR: The file: $(REG_BIN) is missing. You need this in place in order
> -       $(NQ) to build CRDA. You can get it from:
> +       $(NQ) to verify CRDA. You can get it from:
>        $(NQ)
>        $(NQ) $(REG_GIT)
>        $(NQ)
>        $(NQ) "Once cloned (no need to build) cp regulatory.bin to $(REG_BIN)"
> +       $(NQ) "Use \"make noverify\" to disable verification"
>        $(NQ)
>        $(Q) exit 1
>
>
> --
> Regards,
> Pavel Roskin
>
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Pavel Roskin Aug. 6, 2009, 7:08 p.m. UTC | #4
On Thu, 2009-08-06 at 11:42 -0700, Luis R. Rodriguez wrote:

> > -all: $(REG_BIN) crda intersect verify
> > +all: all_noverify verify
> > +
> > +all_noverify: crda intersect regdbdump
> 
> You removed REG_BIN from here, was that intentional?

Yes.  It's not needed for the build.  As for the "verify" target, it
already depends on $(REG_BIN)
Philip Prindeville Aug. 6, 2009, 7:14 p.m. UTC | #5
Pavel Roskin wrote:
> On Thu, 2009-08-06 at 09:56 -0700, Luis R. Rodriguez wrote:
> 
>> ACK, is it possible to make it simpler?
> 
> OK, here's my take.
> 
> We only need a native compiler to verify regulatory.bin.  I believe it's
> orthogonal to building CRDA.
> 
> For someone doing a cross-compilation, it makes no sense to verify the
> installed regulatory.bin.  Thus, the verification should be optional.
> 
> But the compilation of regdbdump shouldn't be.  Firstly, it's installed
> by "make install".  Secondly, somebody may want to verify regulatory.bin
> on the target system.
> 
> Here's the patch:
> 
> 
> crda: make it possible to disable verification
> 
> Signed-off-by: Pavel Roskin <proski@gnu.org>
> ---
>  Makefile |    7 +++++--
>  1 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index b93b735..3cc61c2 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -24,7 +24,9 @@ PUBKEY_DIR?=pubkeys
>  
>  CFLAGS += -Wall -g
>  
> -all: $(REG_BIN) crda intersect verify
> +all: all_noverify verify
> +
> +all_noverify: crda intersect regdbdump
>  
>  ifeq ($(USE_OPENSSL),1)
>  CFLAGS += -DUSE_OPENSSL `pkg-config --cflags openssl`
> @@ -74,11 +76,12 @@ $(REG_BIN):
>  	$(NQ) '  EXIST ' $(REG_BIN)
>  	$(NQ)
>  	$(NQ) ERROR: The file: $(REG_BIN) is missing. You need this in place in order
> -	$(NQ) to build CRDA. You can get it from:
> +	$(NQ) to verify CRDA. You can get it from:
>  	$(NQ)
>  	$(NQ) $(REG_GIT)
>  	$(NQ)
>  	$(NQ) "Once cloned (no need to build) cp regulatory.bin to $(REG_BIN)"
> +	$(NQ) "Use \"make noverify\" to disable verification"
>  	$(NQ)
>  	$(Q) exit 1
>  
> 

Can someone roll *all* the patches together?  For instance, "pkg-config" shouldn't be used on a cross-compile...

-Philip

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jon Loeliger Aug. 6, 2009, 7:21 p.m. UTC | #6
On Thu, 2009-08-06 at 12:14 -0700, Philip A. Prindeville wrote:

> 
> Can someone roll *all* the patches together?  For instance, "pkg-config" shouldn't be used on a cross-compile...
> 
> -Philip


Philip,

These are the sorts of issues that made my patch seem
more complicated than first blush might suggest was needed.

jdl


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Luis Rodriguez Aug. 6, 2009, 7:23 p.m. UTC | #7
On Thu, Aug 6, 2009 at 12:08 PM, Pavel Roskin<proski@gnu.org> wrote:
> On Thu, 2009-08-06 at 11:42 -0700, Luis R. Rodriguez wrote:
>
>> > -all: $(REG_BIN) crda intersect verify
>> > +all: all_noverify verify
>> > +
>> > +all_noverify: crda intersect regdbdump
>>
>> You removed REG_BIN from here, was that intentional?
>
> Yes.  It's not needed for the build.  As for the "verify" target, it
> already depends on $(REG_BIN)

Oh nice, thanks applied!

  Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Makefile b/Makefile
index b93b735..3cc61c2 100644
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,9 @@  PUBKEY_DIR?=pubkeys
 
 CFLAGS += -Wall -g
 
-all: $(REG_BIN) crda intersect verify
+all: all_noverify verify
+
+all_noverify: crda intersect regdbdump
 
 ifeq ($(USE_OPENSSL),1)
 CFLAGS += -DUSE_OPENSSL `pkg-config --cflags openssl`
@@ -74,11 +76,12 @@  $(REG_BIN):
 	$(NQ) '  EXIST ' $(REG_BIN)
 	$(NQ)
 	$(NQ) ERROR: The file: $(REG_BIN) is missing. You need this in place in order
-	$(NQ) to build CRDA. You can get it from:
+	$(NQ) to verify CRDA. You can get it from:
 	$(NQ)
 	$(NQ) $(REG_GIT)
 	$(NQ)
 	$(NQ) "Once cloned (no need to build) cp regulatory.bin to $(REG_BIN)"
+	$(NQ) "Use \"make noverify\" to disable verification"
 	$(NQ)
 	$(Q) exit 1