Skip to content

Commit

Permalink
fix: move the kernel version judgment to rk3588-can.mak
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeChenL committed May 21, 2024
1 parent 7fdf0f0 commit 34f5626
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
9 changes: 3 additions & 6 deletions arch/arm64/boot/dts/rockchip/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,10 @@ ifeq ($(strip $(CONFIG_CPU_RK3588)), y)
CONFIG_CLK_RK3588 ?= y
endif

# 防止 make deb 打包时运行
# Prevent make deb from running when packaging
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
$(info include $(src)/rk3588-can.mak)
include $(src)/rk3588-can.mak
endif

dtb-$(CONFIG_CLK_RK3308) += \
Expand Down
15 changes: 7 additions & 8 deletions arch/arm64/boot/dts/rockchip/overlays/rk3588-can.mak
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# 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
# Can-related overlays are not compiled when kernel version is bsp 6.1.
ifeq ($(shell echo $(KERNELRELEASE) | grep -q '6\.1\..*-rk2312' && echo 1 || echo 0),0)
dtb-$(CONFIG_CPU_RK3588) += \
rk3588-can1-m0.dtbo \
rk3588-can1-m1.dtbo \
rk3588-can2-m1.dtbo
endif

0 comments on commit 34f5626

Please sign in to comment.