Skip to content

Commit

Permalink
Modify compilation scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeChenL committed Dec 29, 2023
1 parent 84d5ab2 commit f4a6680
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ jobs:
make -f Makefile.dkms build -j$(nproc)
;;
linux-rockchip)
make -f Makefile.dkms build -j$(nproc) KERNEL_HEADER_VERSION=5.10.110-11-rockchip CONFIG_ARCH_MESON=n CONFIG_CPU_RK3399=rockchip CONFIG_CPU_RK3568=rockchip CONFIG_CPU_RK3588=rockchip
make -f Makefile.dkms build -j$(nproc) KERNELRELEASE=5.10.110-11-rockchip CONFIG_ARCH_MESON=n CONFIG_CPU_RK3399=rockchip CONFIG_CPU_RK3568=rockchip CONFIG_CPU_RK3588=rockchip
;;
linux-rk356x)
make -f Makefile.dkms build -j$(nproc) KERNEL_HEADER_VERSION=5.10.160-7-rk356x CONFIG_ARCH_MESON=n CONFIG_CPU_RK3399=rockchip CONFIG_CPU_RK3568=rockchip CONFIG_CPU_RK3588=rockchip
make -f Makefile.dkms build -j$(nproc) KERNELRELEASE=5.10.160-7-rk356x CONFIG_ARCH_MESON=n CONFIG_CPU_RK3399=rockchip CONFIG_CPU_RK3568=rockchip CONFIG_CPU_RK3588=rockchip
;;
esac
- name: Upload artifacts
Expand Down
16 changes: 8 additions & 8 deletions Makefile.dkms
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
KERNEL_HEADER_VERSION ?= $(shell uname -r)
ifeq ($(KERNELRELEASE),)
KERNELRELEASE ?= $(shell uname -r)
endif

KSRC := /lib/modules/$(KERNELRELEASE)/build

CONFIG_CLK_RK3308 ?= rockchip
CONFIG_CLK_RK3399 ?= rockchip
Expand All @@ -12,17 +16,13 @@ DTBO-ROCKCHIP := $(addprefix arch/arm64/boot/dts/rockchip/overlays/,$(dtb-rockch
DTBO := $(DTBO-AMLOGIC) $(DTBO-ROCKCHIP)
TMP := $(addsuffix .tmp,$(DTBO))

KDIR ?= /lib/modules/$(shell uname -r)/build
ARCH=arm64
CROSS_COMPILE=aarch64-linux-gnu-
export ARCH CROSS_COMPILEs

obj-m := radxa-overlays.o
all: build
$(MAKE) -C $(KDIR) M=$(CURDIR) modules
$(MAKE) ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -C $(KSRC) M=$(CURDIR) modules

clean:
$(MAKE) -C $(KDIR) M=$(CURDIR) clean
$(MAKE) ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -C $(KSRC) M=$(CURDIR) clean

#
# Build
Expand All @@ -31,5 +31,5 @@ clean:
build: $(DTBO)

%.dtbo: %.dts
cpp -nostdinc -undef -x assembler-with-cpp -E -I "/usr/src/linux-headers-$(KERNEL_HEADER_VERSION)/include" -I "/usr/lib/modules/$(KERNEL_HEADER_VERSION)/build/include" "$<" "[email protected]"
cpp -nostdinc -undef -x assembler-with-cpp -E -I "$(KSRC)/include" "$<" "[email protected]"
dtc -q -@ -I dts -O dtb -o "$@" "[email protected]"

0 comments on commit f4a6680

Please sign in to comment.