Firefly开源社区

打印 上一主题 下一主题

[Linux] 【迫切求助】SDK编译linux内核,修改配置即报recipe for target 'vmlinux' failed

25

积分

0

威望

0

贡献

技术小白

积分
25

【迫切求助】SDK编译linux内核,修改配置即报recipe for target 'vmlinux' failed

发表于 2021-12-11 18:52:41      浏览:5697 | 回复:2        打印      只看该作者   [复制链接] 楼主
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
回复

使用道具 举报

2122

积分

20

威望

24

贡献

中级创客

Rank: 4

积分
2122
发表于 2021-12-13 09:34:49        只看该作者  沙发
你执行make menuconfig和make savedefconfig都漏了ARCH=arm64
make ARCH=arm64 menuconfig
make ARCH=arm64 savedefconfig
回复

使用道具 举报

25

积分

0

威望

0

贡献

技术小白

积分
25
发表于 2021-12-13 11:42:05        只看该作者  板凳
Liuth 发表于 2021-12-13 09:34
你执行make menuconfig和make savedefconfig都漏了ARCH=arm64
make ARCH=arm64 menuconfig
make ARCH=arm ...

啊,是的。编译成功了,感谢!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表