瑞芯微Rockchip开发者社区
直播中

YYXIAO

8年用户 1144经验值
擅长:接口/总线/驱动
私信 关注
[问答]

SDK编译linux内核修改配置报错如何为去解决呢

station p2用户,已经严格按照wiki搭建了编译环境,重装了干净的ubuntu 18.04系统和python 2,安装好了所有依赖,并且在不改动配置的情况下通过了所有编译。
现在的问题是需要在内核中增加一些模块,我的做法是进入kernel目录,并执行如下命令:
1:make ARCH=arm64 firefly_linux_defconfig
2:make menuconfig
3:在menuconfig中增加模块
4:make savedefconfig && mv defconfig arch/arm64/configs/firefly_linux_defconfig
5:cd ../ && ./build.sh kernel
编译即报错。
目前已经发现对menuconfig作任何修改,甚至不作修改,直接保存后写回defconfig都会报错,只能用原始defconfig还原才能通过编译。每次编译前都有make clean清理。

报错如下:
drivers/gpu/drm/bridge/synopsys/dw-hdmi-hdcp.o: In function `hdcp_load_keys_cb':
/home/ubuntu/rk3568-build/rk356x_linux_release_20211019/kernel/drivers/gpu/drm/bridge/synopsys/dw-hdmi-hdcp.c:281: undefined reference to `rk_vendor_read'
/home/ubuntu/rk3568-build/rk356x_linux_release_20211019/kernel/drivers/gpu/drm/bridge/synopsys/dw-hdmi-hdcp.c:281:(.text+0x2b8): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rk_vendor_read'
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd_wifi6/dhd_gpio.o: In function `dhd_wlan_set_carddetect':
/home/ubuntu/rk3568-build/rk356x_linux_release_20211019/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd_wifi6/dhd_gpio.c:124: undefined reference to `rockchip_wifi_set_carddetect'
/home/ubuntu/rk3568-build/rk356x_linux_release_20211019/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd_wifi6/dhd_gpio.c:124:(.text+0x98): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rockchip_wifi_set_carddetect'
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd_wifi6/dhd_gpio.o: In function `dhd_wlan_set_power':
/home/ubuntu/rk3568-build/rk356x_linux_release_20211019/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd_wifi6/dhd_gpio.c:41: undefined reference to `rockchip_wifi_power'
/home/ubuntu/rk3568-build/rk356x_linux_release_20211019/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd_wifi6/dhd_gpio.c:41:(.text+0x138): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rockchip_wifi_power'
/home/ubuntu/rk3568-build/rk356x_linux_release_20211019/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd_wifi6/dhd_gpio.c:92: undefined reference to `rockchip_wifi_power'
/home/ubuntu/rk3568-build/rk356x_linux_release_20211019/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd_wifi6/dhd_gpio.c:92:(.text+0x1a4): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rockchip_wifi_power'
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd_wifi6/dhd_gpio.o: In function `dhd_wlan_init_gpio':
/home/ubuntu/rk3568-build/rk356x_linux_release_20211019/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd_wifi6/dhd_gpio.c:295: undefined reference to `rockchip_wifi_get_oob_irq'
/home/ubuntu/rk3568-build/rk356x_linux_release_20211019/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd_wifi6/dhd_gpio.c:295:(.text+0x1dc): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rockchip_wifi_get_oob_irq'
/home/ubuntu/rk3568-build/rk356x_linux_release_20211019/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd_wifi6/dhd_gpio.c:299: undefined reference to `rockchip_wifi_get_oob_irq_flag'
/home/ubuntu/rk3568-build/rk356x_linux_release_20211019/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd_wifi6/dhd_gpio.c:299:(.text+0x1e4): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rockchip_wifi_get_oob_irq_flag'
drivers/input/sensors/sensor-dev.o: In function `sensor_calibration_data_read':
/home/ubuntu/rk3568-build/rk356x_linux_release_20211019/kernel/drivers/input/sensors/sensor-dev.c:80: undefined reference to `rk_vendor_read'
/home/ubuntu/rk3568-build/rk356x_linux_release_20211019/kernel/drivers/input/sensors/sensor-dev.c:80:(.text+0x2590): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rk_vendor_read'
drivers/input/sensors/sensor-dev.o: In function `sensor_calibration_data_write':
/home/ubuntu/rk3568-build/rk356x_linux_release_20211019/kernel/drivers/input/sensors/sensor-dev.c:65: undefined reference to `rk_vendor_write'
/home/ubuntu/rk3568-build/rk356x_linux_release_20211019/kernel/drivers/input/sensors/sensor-dev.c:65:(.text+0x3088): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `rk_vendor_write'
+ on_exit
+ '[' 1 -ne 0 ']'
+ cleanup
+ rm -f .tmp_System.map
+ rm -f '.tmp_kallsyms*'
+ rm -f .tmp_lto.lds
+ rm -f '.tmp_vmlinux*'
+ rm -f built-in.a
+ rm -f System.map
+ rm -f vmlinux
+ rm -f vmlinux.o
Makefile:1174: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1
ERROR: Running build_kernel failed!
ERROR: exit code 2 from line 561:
make ARCH=$RK_ARCH $RK_KERNEL_DTS.img -j$RK_JOBS V=1

回帖(2)

贾伟刚

2022-6-16 09:52:22
你执行make menuconfig和make savedefconfig都漏了ARCH=arm64
make ARCH=arm64 menuconfig
make ARCH=arm64 savedefconfig
举报

YYXIAO

2022-6-16 09:52:44
啊,是的。编译成功了,感谢!
举报

更多回帖

发帖
×
20
完善资料,
赚取积分