diff mbox

[2/2] rtl8188eu: new package

Message ID 1436188175-7912-2-git-send-email-luca@lucaceresoli.net
State Changes Requested
Headers show

Commit Message

Luca Ceresoli July 6, 2015, 1:09 p.m. UTC
This standalone driver needs a few small patches to properly build and install
within Buildroot.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>

---

Pathces sent upstream: https://github.com/lwfinger/rtl8188eu/pull/128
---
 package/Config.in                                  |  1 +
 .../0001-Makefile-quote-CROSS_COMPILE.patch        | 33 ++++++++++++++++++
 ...002-Makefile-add-a-modules_install-target.patch | 34 +++++++++++++++++++
 ...03-Makefile-add-a-firmware_install-target.patch | 32 ++++++++++++++++++
 ...stall-use-firmware_install-to-copy-the-fi.patch | 39 ++++++++++++++++++++++
 ...stall-remove-double-firmware-installation.patch | 28 ++++++++++++++++
 package/rtl8188eu/Config.in                        | 18 ++++++++++
 package/rtl8188eu/rtl8188eu.mk                     | 22 ++++++++++++
 8 files changed, 207 insertions(+)
 create mode 100644 package/rtl8188eu/0001-Makefile-quote-CROSS_COMPILE.patch
 create mode 100644 package/rtl8188eu/0002-Makefile-add-a-modules_install-target.patch
 create mode 100644 package/rtl8188eu/0003-Makefile-add-a-firmware_install-target.patch
 create mode 100644 package/rtl8188eu/0004-Makefile-install-use-firmware_install-to-copy-the-fi.patch
 create mode 100644 package/rtl8188eu/0005-Makefile-install-remove-double-firmware-installation.patch
 create mode 100644 package/rtl8188eu/Config.in
 create mode 100644 package/rtl8188eu/rtl8188eu.mk

Comments

Thomas Petazzoni July 6, 2015, 1:17 p.m. UTC | #1
Luca,

On Mon,  6 Jul 2015 15:09:35 +0200, Luca Ceresoli wrote:

> diff --git a/package/rtl8188eu/Config.in b/package/rtl8188eu/Config.in
> new file mode 100644
> index 0000000..3228c67
> --- /dev/null
> +++ b/package/rtl8188eu/Config.in
> @@ -0,0 +1,18 @@
> +config BR2_PACKAGE_RTL8188EU
> +	bool "rtl8188eu"
> +	depends on BR2_LINUX_KERNEL && !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS

Even though my understanding of firmware loading is not very deep, I
believe this is wrong. Since quite some time, the kernel has been able
to load firmware by itself, without the help of a userspace helper
program.

See
http://lxr.free-electrons.com/source/drivers/base/firmware_class.c#L1089.
It first tries to load the firmware through a userspace helper. But if
that doesn't work, it falls back to fw_get_filesystem_firmware(), which
makes the kernel directly load the firmware itself.

See also:

config FW_LOADER_USER_HELPER_FALLBACK
        bool "Fallback user-helper invocation for firmware loading"
        depends on FW_LOADER
        select FW_LOADER_USER_HELPER
        help
          This option enables / disables the invocation of user-helper
          (e.g. udev) for loading firmware files as a fallback after the
          direct file loading in kernel fails.  The user-mode helper is
          no longer required unless you have a special firmware file that
          resides in a non-standard path. Moreover, the udev support has
          been deprecated upstream.

          If you are unsure about this, say N here.

Best regards,

Thomas
Luca Ceresoli July 6, 2015, 1:59 p.m. UTC | #2
Dear Thomas,

Thomas Petazzoni wrote:
> Luca,
>
> On Mon,  6 Jul 2015 15:09:35 +0200, Luca Ceresoli wrote:
>
>> diff --git a/package/rtl8188eu/Config.in b/package/rtl8188eu/Config.in
>> new file mode 100644
>> index 0000000..3228c67
>> --- /dev/null
>> +++ b/package/rtl8188eu/Config.in
>> @@ -0,0 +1,18 @@
>> +config BR2_PACKAGE_RTL8188EU
>> +	bool "rtl8188eu"
>> +	depends on BR2_LINUX_KERNEL && !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS
>
> Even though my understanding of firmware loading is not very deep, I
> believe this is wrong. Since quite some time, the kernel has been able
> to load firmware by itself, without the help of a userspace helper
> program.

Unless I'm wrong, this feature is only available since 3.7
(abb139e75c2: "firmware: teach the kernel to load firmware files
directly from the filesystem").

But your suggestion is applicable for versions 3.7 to 3.11.

So I should drop the dependency on
!BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS and clearly point out in
the help text that you must set up some firmware loading mechanism, and
let users discover on their own how they should achieve that.

Overall, the available choices for firmware loading are:
  - the kernel-only mechanism (3.7+ only)
  - /dev management by mdev ot udev
  - static /dev management + BR2_ROOTFS_MDEV_FIRMWARE_LOADING (patch 1
    of this series).

Should we add a section to the manual about this? We have a few words 
under "/dev management", but they do not encompass the kernel-only
loading.

BTW, my use case here is a 2.6.30 kernel, which has no devtmpfs and no
kernel-only firmware loading. So I must use static /dev management, and
still install mdev as a hotplug helper for firmware loading.
Thomas Petazzoni July 6, 2015, 2:36 p.m. UTC | #3
Dear Luca Ceresoli,

On Mon, 06 Jul 2015 15:59:51 +0200, Luca Ceresoli wrote:

> Unless I'm wrong, this feature is only available since 3.7
> (abb139e75c2: "firmware: teach the kernel to load firmware files
> directly from the filesystem").

Right, it's been there for a "while" :-)

> So I should drop the dependency on
> !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS and clearly point out in
> the help text that you must set up some firmware loading mechanism, and
> let users discover on their own how they should achieve that.

Correct. In the linux-firmware package for example, we don't have
anything that enforces having a firmware loading mechanism available.

> Overall, the available choices for firmware loading are:
>   - the kernel-only mechanism (3.7+ only)
>   - /dev management by mdev ot udev
>   - static /dev management + BR2_ROOTFS_MDEV_FIRMWARE_LOADING (patch 1
>     of this series).
> 
> Should we add a section to the manual about this? We have a few words 
> under "/dev management", but they do not encompass the kernel-only
> loading.

Yes, that might be great.

> BTW, my use case here is a 2.6.30 kernel, which has no devtmpfs and no
> kernel-only firmware loading. So I must use static /dev management, and
> still install mdev as a hotplug helper for firmware loading.

Poor soul :-)

Thomas
Thomas Petazzoni July 18, 2015, 9:30 p.m. UTC | #4
Dear Luca Ceresoli,

On Mon,  6 Jul 2015 15:09:35 +0200, Luca Ceresoli wrote:

> diff --git a/package/rtl8188eu/rtl8188eu.mk b/package/rtl8188eu/rtl8188eu.mk
> new file mode 100644
> index 0000000..843d9b0
> --- /dev/null
> +++ b/package/rtl8188eu/rtl8188eu.mk
> @@ -0,0 +1,22 @@
> +################################################################################
> +#
> +# rtl8188eu
> +#
> +################################################################################
> +
> +RTL8188EU_VERSION = 3091828c8f4b4a01cbec6025128bf77e6e7b9f97
> +RTL8188EU_SITE = $(call github,lwfinger,rtl8188eu,$(RTL8188EU_VERSION))
> +RTL8188EU_DEPENDENCIES = linux
> +RTL8188EU_LICENSE = GPLv2
> +RTL8188EU_LICENSE_FILES = COPYING
> +
> +define RTL8188EU_BUILD_CMDS
> +	$(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) KSRC=$(LINUX_DIR)
> +endef
> +
> +define RTL8188EU_INSTALL_TARGET_CMDS
> +	$(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) KSRC=$(LINUX_DIR) \
> +		modules_install firmware_install
> +endef
> +
> +$(eval $(generic-package))

In addition to the previous discussion, this package should also
probably be using the new kernel-module infrastructure.

Can you respin a new version? In the mean time, I'll mark this one as
"Changes Requested" in patchwork.

Thanks!

Thomas
Luca Ceresoli July 21, 2015, 4:26 p.m. UTC | #5
Dear Thomas,

Thomas Petazzoni wrote:
> Dear Luca Ceresoli,
>
> On Mon,  6 Jul 2015 15:09:35 +0200, Luca Ceresoli wrote:
>
>> diff --git a/package/rtl8188eu/rtl8188eu.mk b/package/rtl8188eu/rtl8188eu.mk
>> new file mode 100644
>> index 0000000..843d9b0
>> --- /dev/null
>> +++ b/package/rtl8188eu/rtl8188eu.mk
>> @@ -0,0 +1,22 @@
>> +################################################################################
>> +#
>> +# rtl8188eu
>> +#
>> +################################################################################
>> +
>> +RTL8188EU_VERSION = 3091828c8f4b4a01cbec6025128bf77e6e7b9f97
>> +RTL8188EU_SITE = $(call github,lwfinger,rtl8188eu,$(RTL8188EU_VERSION))
>> +RTL8188EU_DEPENDENCIES = linux
>> +RTL8188EU_LICENSE = GPLv2
>> +RTL8188EU_LICENSE_FILES = COPYING
>> +
>> +define RTL8188EU_BUILD_CMDS
>> +	$(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) KSRC=$(LINUX_DIR)
>> +endef
>> +
>> +define RTL8188EU_INSTALL_TARGET_CMDS
>> +	$(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) KSRC=$(LINUX_DIR) \
>> +		modules_install firmware_install
>> +endef
>> +
>> +$(eval $(generic-package))
>
> In addition to the previous discussion, this package should also
> probably be using the new kernel-module infrastructure.

Yes, I guess so.

>
> Can you respin a new version? In the mean time, I'll mark this one as
> "Changes Requested" in patchwork.

It's on my todo list.

However, I still haven't understood your opinion about using mdev
without devtmpfs (it's for firmware loading in this case)...
Thomas Petazzoni July 21, 2015, 8:57 p.m. UTC | #6
Luca,

On Tue, 21 Jul 2015 18:26:48 +0200, Luca Ceresoli wrote:

> > Can you respin a new version? In the mean time, I'll mark this one as
> > "Changes Requested" in patchwork.
> 
> It's on my todo list.
> 
> However, I still haven't understood your opinion about using mdev
> without devtmpfs (it's for firmware loading in this case)...

I think it's OK to support this case. People using kernels older than
2.6.32 are stuck with static /dev and may have to load firmwares.

Now, I'm wondering if we should simply make the "mdev" /dev management
option work with both static /dev *and* devtmpfs, or if we should have
something like "mdev with static /dev" and "mdev with devtmpfs".

Do you have some proposals?

Thomas
Luca Ceresoli July 22, 2015, 10:17 a.m. UTC | #7
Il 21/07/2015 22:57, Thomas Petazzoni ha scritto:
> Luca,
>
> On Tue, 21 Jul 2015 18:26:48 +0200, Luca Ceresoli wrote:
>
>>> Can you respin a new version? In the mean time, I'll mark this one as
>>> "Changes Requested" in patchwork.
>>
>> It's on my todo list.

BTW, I think the rtl8188eu can go on its own way, without waiting for
the discussion about /dev management, right?

>>
>> However, I still haven't understood your opinion about using mdev
>> without devtmpfs (it's for firmware loading in this case)...
>
> I think it's OK to support this case. People using kernels older than
> 2.6.32 are stuck with static /dev and may have to load firmwares.

Another use case is to have dynamic /dev management on kernels
<2.6.32, even without any firmware loading need. mdev is reportedly
working without devtmpfs. I haven't tested it seriously, but it might
be very interesting for the poor souls.

>
> Now, I'm wondering if we should simply make the "mdev" /dev management
> option work with both static /dev *and* devtmpfs, or if we should have
> something like "mdev with static /dev" and "mdev with devtmpfs".
>
> Do you have some proposals?

Idea 1:
   - just add a new entry to "/dev management":
       ( ) Static using device table
       ( ) Static using device table + mdev   <- New option
       (X) Dynamic using devtmpfs only
       ( ) Dynamic using {devtmpfs +} mdev    {} = new wording only
       ( ) Dynamic using {devtmpfs +} eudev   {} = new wording only

Idea 2:
   - Add a new bool named "Use devtmpfs"
     - y (default) -> enable devtmpfs in the kernel config
     - n           -> use the static device table
   - Change "/dev management" to "dynamic /dev management":
       ( ) none
       (X) mdev
       ( ) eudev

Idea 2 enables 2 new behaviours: "static + mdev" and "static + eudev".
Does the latter make any sense? I've never used eudev, I have no idea.

Idea 2 is somewhat more flexible, and closer to the implementation.
This probably means also farther away from the user...

Idea 1 involves less changes and no legacy burden. Besides, it shows an
option for each use case. This allows to document each of the five
options in menuconfig, with hints to use cases, without the need to
switch to the manual for a use-case to kconfig-options-to-enable map.

Theoretically we might also make optional the firmware loading feature
of mdev, but I really don't think it's worth the effort.
Thomas Petazzoni July 22, 2015, 11:26 a.m. UTC | #8
Luca,

On Wed, 22 Jul 2015 12:17:22 +0200, Luca Ceresoli wrote:

> >> It's on my todo list.
> 
> BTW, I think the rtl8188eu can go on its own way, without waiting for
> the discussion about /dev management, right?

Absolutely, I'll be happy to take rtl8818eu independently from the
discussion on /dev management and firmware loading.

> > I think it's OK to support this case. People using kernels older than
> > 2.6.32 are stuck with static /dev and may have to load firmwares.
> 
> Another use case is to have dynamic /dev management on kernels
> <2.6.32, even without any firmware loading need. mdev is reportedly
> working without devtmpfs. I haven't tested it seriously, but it might
> be very interesting for the poor souls.

Correct. So far I believe Peter's position was that people still using
kernel older than 2.6.32 should simply use static, but maybe that was a
too restrictive decision.

> > Do you have some proposals?
> 
> Idea 1:
>    - just add a new entry to "/dev management":
>        ( ) Static using device table
>        ( ) Static using device table + mdev   <- New option
>        (X) Dynamic using devtmpfs only
>        ( ) Dynamic using {devtmpfs +} mdev    {} = new wording only
>        ( ) Dynamic using {devtmpfs +} eudev   {} = new wording only
> 
> Idea 2:
>    - Add a new bool named "Use devtmpfs"
>      - y (default) -> enable devtmpfs in the kernel config
>      - n           -> use the static device table
>    - Change "/dev management" to "dynamic /dev management":
>        ( ) none
>        (X) mdev
>        ( ) eudev

I think I prefer idea (1) here. It's closer to what we already have,
and as you say, it's probably clearer for the user / easier to document.

Our manual has a complete section about /dev management at
http://buildroot.org/downloads/manual/manual.html#_dev_management, so
this will have to be updated.

Thanks!

Thomas
diff mbox

Patch

diff --git a/package/Config.in b/package/Config.in
index 23858ca..bd00f16 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -400,6 +400,7 @@  endif
 	source "package/read-edid/Config.in"
 	source "package/rng-tools/Config.in"
 	source "package/rpi-userland/Config.in"
+	source "package/rtl8188eu/Config.in"
 	source "package/sane-backends/Config.in"
 	source "package/sdparm/Config.in"
 	source "package/setserial/Config.in"
diff --git a/package/rtl8188eu/0001-Makefile-quote-CROSS_COMPILE.patch b/package/rtl8188eu/0001-Makefile-quote-CROSS_COMPILE.patch
new file mode 100644
index 0000000..9b375fe
--- /dev/null
+++ b/package/rtl8188eu/0001-Makefile-quote-CROSS_COMPILE.patch
@@ -0,0 +1,33 @@ 
+From 7b7d6b392a963b462c0240296daa38d6413f6246 Mon Sep 17 00:00:00 2001
+From: Luca Ceresoli <luca@lucaceresoli.net>
+Date: Fri, 3 Jul 2015 14:45:03 +0200
+Subject: [PATCH 1/5] Makefile: quote CROSS_COMPILE
+
+When using a CROSS_COMPILE value that contains a whitespace, such as
+"ccache arm-linux-", building fails because only the first word is passed down
+to the kernel Makefile as CROSS_COMPILE. Successive words are interpreted as
+targets.
+
+Fix by quoting CROSS_COMPILE.
+
+Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index ea1b316..76db121 100644
+--- a/Makefile
++++ b/Makefile
+@@ -144,7 +144,7 @@ export CONFIG_RTL8188EU = m
+ all: modules
+ 
+ modules:
+-	$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd)  modules
++	$(MAKE) ARCH=$(ARCH) CROSS_COMPILE="$(CROSS_COMPILE)" -C $(KSRC) M=$(shell pwd)  modules
+ 
+ strip:
+ 	$(CROSS_COMPILE)strip 8188eu.ko --strip-unneeded
+-- 
+1.9.1
+
diff --git a/package/rtl8188eu/0002-Makefile-add-a-modules_install-target.patch b/package/rtl8188eu/0002-Makefile-add-a-modules_install-target.patch
new file mode 100644
index 0000000..fe0aa94
--- /dev/null
+++ b/package/rtl8188eu/0002-Makefile-add-a-modules_install-target.patch
@@ -0,0 +1,34 @@ 
+From f7e5725ea2e848546830ac2da117d808b4c19d08 Mon Sep 17 00:00:00 2001
+From: Luca Ceresoli <luca@lucaceresoli.net>
+Date: Fri, 3 Jul 2015 15:51:38 +0200
+Subject: [PATCH 2/5] Makefile: add a modules_install target
+
+Allows to cleanly install the module in the standard way, as suggested by
+Documentation/kbuild/modules.txt in the kernel sources.
+
+This is needed when installing from within a build system (such as Buildroot)
+that implement depmod on its own, and does not need the blacklist and other
+fixups that are implemented by the 'install' target.
+
+Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
+---
+ Makefile | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/Makefile b/Makefile
+index 76db121..63e0103 100644
+--- a/Makefile
++++ b/Makefile
+@@ -149,6 +149,9 @@ modules:
+ strip:
+ 	$(CROSS_COMPILE)strip 8188eu.ko --strip-unneeded
+ 
++modules_install:
++	$(MAKE) -C $(KSRC) M=`pwd` modules_install
++
+ install:
+ 	install -p -m 644 8188eu.ko  $(MODDESTDIR)
+ 	@if [ -a /lib/modules/$(KVER)/kernel/drivers/staging/rtl8188eu/r8188eu.ko ] ; then modprobe -r r8188eu; fi;
+-- 
+1.9.1
+
diff --git a/package/rtl8188eu/0003-Makefile-add-a-firmware_install-target.patch b/package/rtl8188eu/0003-Makefile-add-a-firmware_install-target.patch
new file mode 100644
index 0000000..eebef3a
--- /dev/null
+++ b/package/rtl8188eu/0003-Makefile-add-a-firmware_install-target.patch
@@ -0,0 +1,32 @@ 
+From d8063ef657fd44e29ef2fffba07f0632d1e60a92 Mon Sep 17 00:00:00 2001
+From: Luca Ceresoli <luca@lucaceresoli.net>
+Date: Mon, 6 Jul 2015 09:59:46 +0200
+Subject: [PATCH 3/5] Makefile: add a firmware_install target
+
+When installing using the modules_install target, the firmware is not
+installed. Add an ad-hoc target that just installs the firmware into
+$(INSTALL_MOD_PATH)/lib/firmware/rtlwifi/.
+
+Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
+---
+ Makefile | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/Makefile b/Makefile
+index 63e0103..4012f9a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -152,6 +152,10 @@ strip:
+ modules_install:
+ 	$(MAKE) -C $(KSRC) M=`pwd` modules_install
+ 
++firmware_install:
++	install -D -m 644 rtl8188eufw.bin \
++		$(INSTALL_MOD_PATH)/lib/firmware/rtlwifi/rtl8188eufw.bin
++
+ install:
+ 	install -p -m 644 8188eu.ko  $(MODDESTDIR)
+ 	@if [ -a /lib/modules/$(KVER)/kernel/drivers/staging/rtl8188eu/r8188eu.ko ] ; then modprobe -r r8188eu; fi;
+-- 
+1.9.1
+
diff --git a/package/rtl8188eu/0004-Makefile-install-use-firmware_install-to-copy-the-fi.patch b/package/rtl8188eu/0004-Makefile-install-use-firmware_install-to-copy-the-fi.patch
new file mode 100644
index 0000000..18e9ead
--- /dev/null
+++ b/package/rtl8188eu/0004-Makefile-install-use-firmware_install-to-copy-the-fi.patch
@@ -0,0 +1,39 @@ 
+From c4d952d6184d82413c09f5ad668305ce37effbba Mon Sep 17 00:00:00 2001
+From: Luca Ceresoli <luca@lucaceresoli.net>
+Date: Mon, 6 Jul 2015 10:03:11 +0200
+Subject: [PATCH 4/5] Makefile: install: use firmware_install to copy the
+ firmware
+
+Now there is a specific target to install the firmware, use it everywhere.
+
+Note: this does not change the behaviour if INSTALL_MOD_PATH is undefined.
+Otherwise the firmware is now installed under the INSTALL_MOD_PATH prefix.
+
+Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
+---
+ Makefile | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 4012f9a..8faf484 100644
+--- a/Makefile
++++ b/Makefile
+@@ -156,14 +156,12 @@ firmware_install:
+ 	install -D -m 644 rtl8188eufw.bin \
+ 		$(INSTALL_MOD_PATH)/lib/firmware/rtlwifi/rtl8188eufw.bin
+ 
+-install:
++install: firmware_install
+ 	install -p -m 644 8188eu.ko  $(MODDESTDIR)
+ 	@if [ -a /lib/modules/$(KVER)/kernel/drivers/staging/rtl8188eu/r8188eu.ko ] ; then modprobe -r r8188eu; fi;
+ 	@echo "blacklist r8188eu" > /etc/modprobe.d/50-8188eu.conf
+ 	cp rtl8188eufw.bin /lib/firmware/.
+ 	/sbin/depmod -a ${KVER}
+-	mkdir -p /lib/firmware/rtlwifi
+-	cp -n rtl8188eufw.bin /lib/firmware/rtlwifi/.
+ 
+ uninstall:
+ 	rm -f $(MODDESTDIR)/8188eu.ko
+-- 
+1.9.1
+
diff --git a/package/rtl8188eu/0005-Makefile-install-remove-double-firmware-installation.patch b/package/rtl8188eu/0005-Makefile-install-remove-double-firmware-installation.patch
new file mode 100644
index 0000000..8dac074
--- /dev/null
+++ b/package/rtl8188eu/0005-Makefile-install-remove-double-firmware-installation.patch
@@ -0,0 +1,28 @@ 
+From 7339528fdf72468fa1a0a0a28ccd5a5a966f0dd0 Mon Sep 17 00:00:00 2001
+From: Luca Ceresoli <luca@lucaceresoli.net>
+Date: Mon, 6 Jul 2015 10:05:00 +0200
+Subject: [PATCH 5/5] Makefile: install: remove double firmware installation
+
+The firmware is already installed in /lib/firmware/rtlwifi, no need to
+install it also in /lib/firmware.
+
+Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
+---
+ Makefile | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 8faf484..8bef18e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -160,7 +160,6 @@ install: firmware_install
+ 	install -p -m 644 8188eu.ko  $(MODDESTDIR)
+ 	@if [ -a /lib/modules/$(KVER)/kernel/drivers/staging/rtl8188eu/r8188eu.ko ] ; then modprobe -r r8188eu; fi;
+ 	@echo "blacklist r8188eu" > /etc/modprobe.d/50-8188eu.conf
+-	cp rtl8188eufw.bin /lib/firmware/.
+ 	/sbin/depmod -a ${KVER}
+ 
+ uninstall:
+-- 
+1.9.1
+
diff --git a/package/rtl8188eu/Config.in b/package/rtl8188eu/Config.in
new file mode 100644
index 0000000..3228c67
--- /dev/null
+++ b/package/rtl8188eu/Config.in
@@ -0,0 +1,18 @@ 
+config BR2_PACKAGE_RTL8188EU
+	bool "rtl8188eu"
+	depends on BR2_LINUX_KERNEL && !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS
+	select BR2_ROOTFS_MDEV_FIRMWARE_LOADING if BR2_ROOTFS_DEVICE_CREATION_STATIC
+	help
+	  A standalone driver for the RTL8188EU USB Wi-Fi adapter.
+	  This is needed only for Linux kernels before 3.12.
+	  Since 3.12, there is a (staging) driver in mainline, with a similar
+	  codebase.
+
+	  Note: if you use a static /dev management, this package enables mdev
+	  as a hotplug helper to load the firmware that is needed for the chip
+	  to work.
+
+	  https://github.com/lwfinger/rtl8188eu
+
+comment "rtl8188eu needs a Linux kernel to be built and static, mdev or udev /dev management"
+	depends on !BR2_LINUX_KERNEL || BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS
diff --git a/package/rtl8188eu/rtl8188eu.mk b/package/rtl8188eu/rtl8188eu.mk
new file mode 100644
index 0000000..843d9b0
--- /dev/null
+++ b/package/rtl8188eu/rtl8188eu.mk
@@ -0,0 +1,22 @@ 
+################################################################################
+#
+# rtl8188eu
+#
+################################################################################
+
+RTL8188EU_VERSION = 3091828c8f4b4a01cbec6025128bf77e6e7b9f97
+RTL8188EU_SITE = $(call github,lwfinger,rtl8188eu,$(RTL8188EU_VERSION))
+RTL8188EU_DEPENDENCIES = linux
+RTL8188EU_LICENSE = GPLv2
+RTL8188EU_LICENSE_FILES = COPYING
+
+define RTL8188EU_BUILD_CMDS
+	$(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) KSRC=$(LINUX_DIR)
+endef
+
+define RTL8188EU_INSTALL_TARGET_CMDS
+	$(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) KSRC=$(LINUX_DIR) \
+		modules_install firmware_install
+endef
+
+$(eval $(generic-package))