ivanovborislav / rtl8188eu

Realtek RTL8188EU v5.13.3 (2021-06-15) Wireless Lan Driver for Linux
GNU General Public License v2.0
129 stars 34 forks source link

Linux kernel 5.17 build error #1

Closed BratishkaErik closed 2 years ago

BratishkaErik commented 2 years ago
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.17.0-gentoo/build M=/usr/src/rtl8188eu  modules
make[1]: вход в каталог «/usr/src/linux-5.17.0-gentoo»
  CC [M]  /usr/src/rtl8188eu/os_dep/osdep_service.o
  CC [M]  /usr/src/rtl8188eu/os_dep/linux/os_intfs.o
  CC [M]  /usr/src/rtl8188eu/os_dep/linux/rtw_proc.o
In file included from /usr/src/rtl8188eu/os_dep/linux/rtw_proc.c:17:
In file included from /usr/src/rtl8188eu/include/drv_types.h:78:
/usr/src/rtl8188eu/include/rtw_recv.h:817:52: warning: variable 'buf_star' is uninitialized when used here [-Wuninitialized]
        precv_frame = rxmem_to_recvframe((unsigned char *)buf_star);
                                                          ^~~~~~~~
/usr/src/rtl8188eu/include/rtw_recv.h:815:14: note: initialize the variable 'buf_star' to silence this warning
        u8 *buf_star;
                    ^
                     = NULL
In file included from /usr/src/rtl8188eu/os_dep/osdep_service.c:19:
In file included from /usr/src/rtl8188eu/include/drv_types.h:78:
/usr/src/rtl8188eu/include/rtw_recv.h:817:52: warning: variable 'buf_star' is uninitialized when used here [-Wuninitialized]
        precv_frame = rxmem_to_recvframe((unsigned char *)buf_star);
                                                          ^~~~~~~~
/usr/src/rtl8188eu/include/rtw_recv.h:815:14: note: initialize the variable 'buf_star' to silence this warning
        u8 *buf_star;
                    ^
                     = NULL
In file included from /usr/src/rtl8188eu/os_dep/linux/os_intfs.c:17:
In file included from /usr/src/rtl8188eu/include/drv_types.h:78:
/usr/src/rtl8188eu/include/rtw_recv.h:817:52: warning: variable 'buf_star' is uninitialized when used here [-Wuninitialized]
        precv_frame = rxmem_to_recvframe((unsigned char *)buf_star);
                                                          ^~~~~~~~
/usr/src/rtl8188eu/include/rtw_recv.h:815:14: note: initialize the variable 'buf_star' to silence this warning
        u8 *buf_star;
                    ^
                     = NULL
/usr/src/rtl8188eu/os_dep/osdep_service.c:1312:2: error: implicit declaration of function 'complete_and_exit' [-Werror,-Wimplicit-function-declaration]
        complete_and_exit(comp, 0);
        ^
/usr/src/rtl8188eu/os_dep/linux/rtw_proc.c:250:27: error: implicit declaration of function 'PDE_DATA' [-Werror,-Wimplicit-function-declaration]
        ssize_t index = (ssize_t)PDE_DATA(inode);
                                 ^
/usr/src/rtl8188eu/os_dep/linux/rtw_proc.c:250:27: note: did you mean 'NODE_DATA'?
./include/linux/mmzone.h:1100:35: note: 'NODE_DATA' declared here
static inline struct pglist_data *NODE_DATA(int nid)
                                  ^
/usr/src/rtl8188eu/os_dep/linux/rtw_proc.c:276:27: error: implicit declaration of function 'PDE_DATA' [-Werror,-Wimplicit-function-declaration]
        ssize_t index = (ssize_t)PDE_DATA(file_inode(file));
                                 ^
1 warning and 1 error generated.
make[2]: *** [scripts/Makefile.build:288: /usr/src/rtl8188eu/os_dep/osdep_service.o] Ошибка 1
make[2]: *** Ожидание завершения заданий…
/usr/src/rtl8188eu/os_dep/linux/rtw_proc.c:5691:27: error: implicit declaration of function 'PDE_DATA' [-Werror,-Wimplicit-function-declaration]
        ssize_t index = (ssize_t)PDE_DATA(inode);
                                 ^
/usr/src/rtl8188eu/os_dep/linux/rtw_proc.c:5717:27: error: implicit declaration of function 'PDE_DATA' [-Werror,-Wimplicit-function-declaration]
        ssize_t index = (ssize_t)PDE_DATA(file_inode(file));
                                 ^
/usr/src/rtl8188eu/os_dep/linux/rtw_proc.c:5880:27: error: implicit declaration of function 'PDE_DATA' [-Werror,-Wimplicit-function-declaration]
        ssize_t index = (ssize_t)PDE_DATA(inode);
                                 ^
/usr/src/rtl8188eu/os_dep/linux/rtw_proc.c:5906:27: error: implicit declaration of function 'PDE_DATA' [-Werror,-Wimplicit-function-declaration]
        ssize_t index = (ssize_t)PDE_DATA(file_inode(file));
                                 ^
1 warning and 6 errors generated.
/usr/src/rtl8188eu/os_dep/linux/os_intfs.c:1637:14: error: passing 'const unsigned char *' to parameter of type 'void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
        _rtw_memcpy(pnetdev->dev_addr, sa->sa_data, ETH_ALEN); /* set mac addr to net_device */
                    ^~~~~~~~~~~~~~~~~
/usr/src/rtl8188eu/include/osdep_service.h:313:31: note: passing argument to parameter 'dec' here
extern void     _rtw_memcpy(void *dec, const void *sour, u32 sz);
                                  ^
make[2]: *** [scripts/Makefile.build:288: /usr/src/rtl8188eu/os_dep/linux/rtw_proc.o] Ошибка 1
/usr/src/rtl8188eu/os_dep/linux/os_intfs.c:2173:14: error: passing 'const unsigned char *' to parameter of type 'void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
        _rtw_memcpy(ndev->dev_addr, adapter_mac_addr(adapter), ETH_ALEN);
                    ^~~~~~~~~~~~~~
/usr/src/rtl8188eu/include/osdep_service.h:313:31: note: passing argument to parameter 'dec' here
extern void     _rtw_memcpy(void *dec, const void *sour, u32 sz);
                                  ^
1 warning and 2 errors generated.
make[2]: *** [scripts/Makefile.build:288: /usr/src/rtl8188eu/os_dep/linux/os_intfs.o] Ошибка 1
make[1]: *** [Makefile:1831: /usr/src/rtl8188eu] Ошибка 2
make[1]: выход из каталога «/usr/src/linux-5.17.0-gentoo»
make: *** [Makefile:2489: modules] Ошибка 2

uname -r: 5.17.0-gentoo

ivanovborislav commented 2 years ago

I am sorry, but kernel 5.17 support is not added yet! I have no time for test. You can patch the driver and recompile again.

cd rtl8188eu
wget https://raw.githubusercontent.com/ivanovborislav/document/main/patch/rtl8188EU_v5.13.3_kernel_5.17-rc5_support.patch
patch -p1 < rtl8188EU_v5.13.3_kernel_5.17-rc5_support.patch
sudo make uninstall
make clean
make
sudo make install
BratishkaErik commented 2 years ago

I am sorry, but kernel 5.17 support is not added yet! I have no time for test. You can patch the driver and recompile again.

cd rtl8188eu
wget https://raw.githubusercontent.com/ivanovborislav/document/main/patch/rtl8188EU_v5.13.3_kernel_5.17-rc5_support.patch
patch -p1 < rtl8188EU_v5.13.3_kernel_5.17-rc5_support.patch
sudo make uninstall
make clean
make
sudo make install

It works, thank you!

ivanovborislav commented 2 years ago

You are welcome!

Kernel 5.17 is now supported. NO patch required.