Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChromeOS Flex Linux 容器中使用 make 编译 rtl8192eu 故障 #91

Closed
javenhmh opened this issue Oct 13, 2023 · 1 comment
Closed

Comments

@javenhmh
Copy link

ChromeOS Flex Linux 容器中使用 make 编译 rtl8192eu 故障

系统版本:linux 5.15.117

一、最开始编译提示内核版本不一致
xxx@penguin:/mnt/chromeos/MyFiles/APK/rtl8192eu-linux$ make

make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.10.0-26-amd64/build M=/mnt/chromeos/MyFiles/APK/rtl8192eu-linux modules
make[1]: Entering directory '/usr/src/linux-headers-5.10.0-26-amd64'

ERROR: Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing.
Run 'make oldconfig && make prepare' on kernel src to fix it.

make[2]: *** [/usr/src/linux-headers-5.10.0-26-common/Makefile:752: include/config/auto.conf] Error 1
make[1]: *** [/usr/src/linux-headers-5.10.0-26-common/Makefile:192: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.0-26-amd64'
make: *** [Makefile:2459: modules] Error 2

二、指定使用内核版本 5.10.0-26-amd64 头文件 /usr/src/linux-headers-5.10.0-26-amd64 编译

xxx@penguin:/mnt/chromeos/MyFiles/APK/rtl8192eu-linux$ make

make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.10.0-26-amd64/build M=/mnt/chromeos/MyFiles/APK/rtl8192eu-linux modules
make[1]: Entering directory '/usr/src/linux-headers-5.10.0-26-amd64'

ERROR: Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing.
Run 'make oldconfig && make prepare' on kernel src to fix it.

make[2]: *** [/usr/src/linux-headers-5.10.0-26-common/Makefile:752: include/config/auto.conf] Error 1
make[1]: *** [/usr/src/linux-headers-5.10.0-26-common/Makefile:192: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.0-26-amd64'
make: *** [Makefile:2459: modules] Error 2

三、使用 linux 5.15.117 源代码中的 auto.conf autoconf.h 复制到 /usr/src/linux-headers-5.10.0-26-amd64/include 中的 config 和generated,编译错误如下:

xxx@penguin:/mnt/chromeos/MyFiles/APK/rtl8192eu-linux$ sudo make > rtl8192eu.bulid.log

In file included from /usr/src/linux-headers-5.10.0-26-common/include/linux/jiffies.h:14,
from /usr/src/linux-headers-5.10.0-26-common/include/linux/ktime.h:25,
from /usr/src/linux-headers-5.10.0-26-common/include/linux/timer.h:6,
from /usr/src/linux-headers-5.10.0-26-common/include/linux/workqueue.h:9,
from /usr/src/linux-headers-5.10.0-26-common/include/linux/srcu.h:21,
from /usr/src/linux-headers-5.10.0-26-common/include/linux/notifier.h:16,
from /usr/src/linux-headers-5.10.0-26-common/arch/x86/include/asm/uprobes.h:13,
from /usr/src/linux-headers-5.10.0-26-common/include/linux/uprobes.h:49,
from /usr/src/linux-headers-5.10.0-26-common/include/linux/mm_types.h:14,
from /usr/src/linux-headers-5.10.0-26-common/include/linux/mmzone.h:21,
from /usr/src/linux-headers-5.10.0-26-common/include/linux/gfp.h:6,
from /usr/src/linux-headers-5.10.0-26-common/include/linux/umh.h:4,
from /usr/src/linux-headers-5.10.0-26-common/include/linux/kmod.h:9,
from /usr/src/linux-headers-5.10.0-26-common/include/linux/module.h:16,
from /mnt/chromeos/MyFiles/APK/rtl8192eu-linux/include/basic_types.h:76,
from /mnt/chromeos/MyFiles/APK/rtl8192eu-linux/include/drv_types.h:26,
from /mnt/chromeos/MyFiles/APK/rtl8192eu-linux/core/rtw_cmd.c:17:
./include/generated/timeconst.h:11:2: error: #error "include/generated/timeconst.h has the wrong HZ value!"
11 | #error "include/generated/timeconst.h has the wrong HZ value!"
| ^~~~~
In file included from /usr/src/linux-headers-5.10.0-26-common/include/linux/umh.h:4,
from /usr/src/linux-headers-5.10.0-26-common/include/linux/kmod.h:9,
from /usr/src/linux-headers-5.10.0-26-common/include/linux/module.h:16,
from /mnt/chromeos/MyFiles/APK/rtl8192eu-linux/include/basic_types.h:76,
from /mnt/chromeos/MyFiles/APK/rtl8192eu-linux/include/drv_types.h:26,
from /mnt/chromeos/MyFiles/APK/rtl8192eu-linux/core/rtw_cmd.c:17:
/usr/src/linux-headers-5.10.0-26-common/include/linux/gfp.h: In function ‘gfp_zone’:
/usr/src/linux-headers-5.10.0-26-common/include/linux/gfp.h:430:20: warning: left shift count >= width of type [-Wshift-count-overflow]
430 | | (OPT_ZONE_DMA32 << (___GFP_MOVABLE | ___GFP_DMA32) * GFP_ZONES_SHIFT)
| ^~
/usr/src/linux-headers-5.10.0-26-common/include/linux/gfp.h:455:7: note: in expansion of macro ‘GFP_ZONE_TABLE’
455 | z = (GFP_ZONE_TABLE >> (bit * GFP_ZONES_SHIFT)) &
| ^~~~~~~~~~~~~~
make[3]: *** [/usr/src/linux-headers-5.10.0-26-common/scripts/Makefile.build:291: /mnt/chromeos/MyFiles/APK/rtl8192eu-linux/core/rtw_cmd.o] Error 1
make[2]: *** [/usr/src/linux-headers-5.10.0-26-common/Makefile:1856: /mnt/chromeos/MyFiles/APK/rtl8192eu-linux] Error 2
make[1]: *** [/usr/src/linux-headers-5.10.0-26-common/Makefile:192: __sub-make] Error 2
make: *** [Makefile:2459: modules] Error 2

@clnhub
Copy link
Owner

clnhub commented Oct 14, 2023

Please try to (re)install headers.

@clnhub clnhub closed this as completed Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants