Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] rtl8723bu: new package
@ 2017-11-26 21:59 Mylène Josserand
  2017-11-27  8:08 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Mylène Josserand @ 2017-11-26 21:59 UTC (permalink / raw)
  To: buildroot

Add RTL8723BU package to compile the Realtek RTL8723BU Wifi driver.

Signed-off-by: Myl?ne Josserand <mylene.josserand@free-electrons.com>
---
 package/Config.in                |  1 +
 package/rtl8723bu/Config.in      | 10 ++++++++++
 package/rtl8723bu/rtl8723bu.hash |  2 ++
 package/rtl8723bu/rtl8723bu.mk   | 25 +++++++++++++++++++++++++
 4 files changed, 38 insertions(+)
 create mode 100644 package/rtl8723bu/Config.in
 create mode 100644 package/rtl8723bu/rtl8723bu.hash
 create mode 100644 package/rtl8723bu/rtl8723bu.mk

diff --git a/package/Config.in b/package/Config.in
index fe5ccc434e..9d5a031e50 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -482,6 +482,7 @@ endmenu
 	source "package/rs485conf/Config.in"
 	source "package/rtl8188eu/Config.in"
 	source "package/rtl8723bs/Config.in"
+	source "package/rtl8723bu/Config.in"
 	source "package/rtl8821au/Config.in"
 	source "package/sane-backends/Config.in"
 	source "package/sdparm/Config.in"
diff --git a/package/rtl8723bu/Config.in b/package/rtl8723bu/Config.in
new file mode 100644
index 0000000000..266a794a7d
--- /dev/null
+++ b/package/rtl8723bu/Config.in
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_RTL8723BU
+	bool "rtl8723bu"
+	depends on BR2_LINUX_KERNEL
+	help
+	  rtl8723bu wifi driver
+
+	  https://github.com/lwfinger/rtl8723bu
+
+comment "rtl8723bu needs a Linux kernel to be built"
+	depends on !BR2_LINUX_KERNEL
diff --git a/package/rtl8723bu/rtl8723bu.hash b/package/rtl8723bu/rtl8723bu.hash
new file mode 100644
index 0000000000..ef4eddaa63
--- /dev/null
+++ b/package/rtl8723bu/rtl8723bu.hash
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 da04cffc306d9738abdc67d234b8948db6ca97ed77760c68d99d18817839a513 rtl8723bu-b922079a090dcaad58179d478442ff97f18521c9.tar.gz
diff --git a/package/rtl8723bu/rtl8723bu.mk b/package/rtl8723bu/rtl8723bu.mk
new file mode 100644
index 0000000000..774caa02f9
--- /dev/null
+++ b/package/rtl8723bu/rtl8723bu.mk
@@ -0,0 +1,25 @@
+################################################################################
+#
+# rtl8723bu
+#
+################################################################################
+
+RTL8723BU_VERSION = b922079a090dcaad58179d478442ff97f18521c9
+RTL8723BU_SITE = $(call github,lwfinger,rtl8723bu,$(RTL8723BU_VERSION))
+RTL8723BU_LICENSE = GPL-2.0, proprietary (*.bin firmware blobs)
+
+RTL8723BU_MODULE_MAKE_OPTS = \
+	KVER=$(LINUX_VERSION_PROBED) \
+	KSRC=$(LINUX_DIR)
+
+RTL8723BU_BINS = rtl8723b_fw.bin
+
+define RTL8723BU_INSTALL_FIRMWARE
+	$(foreach bin, $(RTL8723BU_BINS), \
+		$(INSTALL) -D -m 644 $(@D)/$(bin) $(TARGET_DIR)/lib/firmware/rtlwifi/$(bin)
+	)
+endef
+RTL8723BU_POST_INSTALL_TARGET_HOOKS += RTL8723BU_INSTALL_FIRMWARE
+
+$(eval $(kernel-module))
+$(eval $(generic-package))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] rtl8723bu: new package
  2017-11-26 21:59 [Buildroot] [PATCH] rtl8723bu: new package Mylène Josserand
@ 2017-11-27  8:08 ` Thomas Petazzoni
  2017-11-27  8:18   ` Mylene JOSSERAND
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2017-11-27  8:08 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 26 Nov 2017 22:59:13 +0100, Myl?ne Josserand wrote:
> Add RTL8723BU package to compile the Realtek RTL8723BU Wifi driver.
> 
> Signed-off-by: Myl?ne Josserand <mylene.josserand@free-electrons.com>

Thanks for this contribution!

>  package/Config.in                |  1 +
>  package/rtl8723bu/Config.in      | 10 ++++++++++
>  package/rtl8723bu/rtl8723bu.hash |  2 ++
>  package/rtl8723bu/rtl8723bu.mk   | 25 +++++++++++++++++++++++++
>  4 files changed, 38 insertions(+)

Could you add yourself to the DEVELOPERS file for this package?

> diff --git a/package/rtl8723bu/rtl8723bu.mk b/package/rtl8723bu/rtl8723bu.mk
> new file mode 100644
> index 0000000000..774caa02f9
> --- /dev/null
> +++ b/package/rtl8723bu/rtl8723bu.mk
> @@ -0,0 +1,25 @@
> +################################################################################
> +#
> +# rtl8723bu
> +#
> +################################################################################
> +
> +RTL8723BU_VERSION = b922079a090dcaad58179d478442ff97f18521c9
> +RTL8723BU_SITE = $(call github,lwfinger,rtl8723bu,$(RTL8723BU_VERSION))
> +RTL8723BU_LICENSE = GPL-2.0, proprietary (*.bin firmware blobs)
> +
> +RTL8723BU_MODULE_MAKE_OPTS = \
> +	KVER=$(LINUX_VERSION_PROBED) \
> +	KSRC=$(LINUX_DIR)
> +
> +RTL8723BU_BINS = rtl8723b_fw.bin
> +
> +define RTL8723BU_INSTALL_FIRMWARE
> +	$(foreach bin, $(RTL8723BU_BINS), \
> +		$(INSTALL) -D -m 644 $(@D)/$(bin) $(TARGET_DIR)/lib/firmware/rtlwifi/$(bin)
> +	)

The loop is not needed, since you have a single firmware file, so this
can be simplified as:

	$(INSTALL) -D -m 0644 $(@D)/rtl8723b_fw.bin $(TARGET_DIR)/lib/firmware/rtlwifi/rtl8723b_fw.bin

> +endef
> +RTL8723BU_POST_INSTALL_TARGET_HOOKS += RTL8723BU_INSTALL_FIRMWARE

I know the rtl8723bs package that you probably used as an example does
this, but in fact there is no need to use a post install target hook
here. You can just do:

define RTL8723BU_INSTALL_TARGET_CMDS
	$(INSTALL) -D ...
endef

Could you fix those minor details, and submit an updated version?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] rtl8723bu: new package
  2017-11-27  8:08 ` Thomas Petazzoni
@ 2017-11-27  8:18   ` Mylene JOSSERAND
  0 siblings, 0 replies; 3+ messages in thread
From: Mylene JOSSERAND @ 2017-11-27  8:18 UTC (permalink / raw)
  To: buildroot

Hello,

Le Mon, 27 Nov 2017 09:08:11 +0100,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> a ?crit :

> Hello,
> 
> On Sun, 26 Nov 2017 22:59:13 +0100, Myl?ne Josserand wrote:
> > Add RTL8723BU package to compile the Realtek RTL8723BU Wifi driver.
> > 
> > Signed-off-by: Myl?ne Josserand
> > <mylene.josserand@free-electrons.com>  
> 
> Thanks for this contribution!
> 
> >  package/Config.in                |  1 +
> >  package/rtl8723bu/Config.in      | 10 ++++++++++
> >  package/rtl8723bu/rtl8723bu.hash |  2 ++
> >  package/rtl8723bu/rtl8723bu.mk   | 25 +++++++++++++++++++++++++
> >  4 files changed, 38 insertions(+)  
> 
> Could you add yourself to the DEVELOPERS file for this package?

Sure, no problem.

> 
> > diff --git a/package/rtl8723bu/rtl8723bu.mk
> > b/package/rtl8723bu/rtl8723bu.mk new file mode 100644
> > index 0000000000..774caa02f9
> > --- /dev/null
> > +++ b/package/rtl8723bu/rtl8723bu.mk
> > @@ -0,0 +1,25 @@
> > +################################################################################
> > +#
> > +# rtl8723bu
> > +#
> > +################################################################################
> > +
> > +RTL8723BU_VERSION = b922079a090dcaad58179d478442ff97f18521c9
> > +RTL8723BU_SITE = $(call
> > github,lwfinger,rtl8723bu,$(RTL8723BU_VERSION)) +RTL8723BU_LICENSE
> > = GPL-2.0, proprietary (*.bin firmware blobs) +
> > +RTL8723BU_MODULE_MAKE_OPTS = \
> > +	KVER=$(LINUX_VERSION_PROBED) \
> > +	KSRC=$(LINUX_DIR)
> > +
> > +RTL8723BU_BINS = rtl8723b_fw.bin
> > +
> > +define RTL8723BU_INSTALL_FIRMWARE
> > +	$(foreach bin, $(RTL8723BU_BINS), \
> > +		$(INSTALL) -D -m 644 $(@D)/$(bin)
> > $(TARGET_DIR)/lib/firmware/rtlwifi/$(bin)
> > +	)  
> 
> The loop is not needed, since you have a single firmware file, so this
> can be simplified as:
> 
> 	$(INSTALL) -D -m 0644 $(@D)/rtl8723b_fw.bin
> $(TARGET_DIR)/lib/firmware/rtlwifi/rtl8723b_fw.bin
> 

Yep, thank you. While testing it, I installed different firmwares and
finally, I reduced the list to one element. I forgot to remove the
loop :)

> > +endef
> > +RTL8723BU_POST_INSTALL_TARGET_HOOKS += RTL8723BU_INSTALL_FIRMWARE  
> 
> I know the rtl8723bs package that you probably used as an example does
> this, but in fact there is no need to use a post install target hook
> here. You can just do:
> 
> define RTL8723BU_INSTALL_TARGET_CMDS
> 	$(INSTALL) -D ...
> endef

Okay. I will fix the RTL8723BS package too, so.

> 
> Could you fix those minor details, and submit an updated version?

Sure, thank you for the review!

Best regards,

-- 
Myl?ne Josserand, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-27  8:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-26 21:59 [Buildroot] [PATCH] rtl8723bu: new package Mylène Josserand
2017-11-27  8:08 ` Thomas Petazzoni
2017-11-27  8:18   ` Mylene JOSSERAND

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox