Skip to content

Commit

Permalink
Add cross compile support
Browse files Browse the repository at this point in the history
Can build for a custom architecture using cross compile support.

Signed-off-by: Chaitanya Tata <[email protected]>
  • Loading branch information
krish2718 committed Aug 19, 2024
1 parent 4815497 commit 7e10fc4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,12 @@ obj-m += $(NAME).o

$(NAME)-objs= $(OBJS)

# Cross-compiler variables
CROSS_COMPILE ?=
ARCH ?= $(shell uname -m)

all: $(if $(filter-out 0,$(IS_RPI)),dt) gen_patch_bin
@make -C $(KROOT) M=$(PWD) modules
@make -C $(KROOT) M=$(PWD) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) modules

dt:
dtc -@ -I dts -O dtb -o $(basename $(RPI_DTS)).dtbo $(RPI_DTS)
Expand Down

0 comments on commit 7e10fc4

Please sign in to comment.