Skip to content

Commit

Permalink
fix: can overlays aren't compiled when kernel is bsp 6.1
Browse files Browse the repository at this point in the history
* closes radxa-pkg#316
  • Loading branch information
CodeChenL committed May 20, 2024
1 parent 1651015 commit 6940cd8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
12 changes: 9 additions & 3 deletions arch/arm64/boot/dts/rockchip/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ ifeq ($(strip $(CONFIG_CPU_RK3588)), y)
CONFIG_CLK_RK3588 ?= y
endif

# 防止 make deb 打包时运行
ifeq ($(strip $(CONFIG_CLK_RK3588)), y)
# 判断内核版本为 bsp 6.1 时不编译 can 相关 overlays
ifeq ($(shell echo $(KERNELRELEASE) | grep -q '6\.1\..*-rk2312' && echo 1 || echo 0),0)
$(info include $(src)/rk3588-can.mak)
include $(src)/rk3588-can.mak
endif
endif

dtb-$(CONFIG_CLK_RK3308) += \
radxa-s0-ext-antenna.dtbo \
rk3308-bs-opp-1008.dtbo \
Expand Down Expand Up @@ -431,9 +440,6 @@ dtb-$(CONFIG_CLK_RK3588) += \
rock-5b-sata.dtbo

dtb-$(CONFIG_CPU_RK3588) += \
rk3588-can1-m0.dtbo \
rk3588-can1-m1.dtbo \
rk3588-can2-m1.dtbo \
radxa-cm5-io-okdo-5mp.dtbo \
radxa-cm5-io-radxa-display-8hd.dtbo \
radxa-cm5-io-radxa-camera-4k.dtbo \
Expand Down
11 changes: 11 additions & 0 deletions arch/arm64/boot/dts/rockchip/overlays/rk3588-can.mak
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# SPDX-License-Identifier: GPL-2.0

dtb-$(CONFIG_CPU_RK3588) += \
rk3588-can1-m0.dtbo \
rk3588-can1-m1.dtbo \
rk3588-can2-m1.dtbo

targets += $(dtb-y)

always-y := $(dtb-y)
clean-files := *.dtbo *.scr

0 comments on commit 6940cd8

Please sign in to comment.