Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable cross compile for RPi3 build #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions patches/bcm43438/7_45_41_26/nexmon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ init: FORCE
$(Q)mkdir -p obj gen log

brcmfmac.ko: check-nexmon-setup-env
ifeq ($(shell uname -m),armv7l)
@printf "\033[0;31m BUILDING DRIVER \033[0m brcmfmac/brcmfmac.ko (details: log/driver.log)\n" $@
ifeq ($(shell uname -m),armv7l)
$(Q)make -C /lib/modules/$(shell uname -r)/build M=$$PWD/brcmfmac -j2 >log/driver.log
else
$(warning Warning: Driver can not be compiled on this platform, execute the make command on a raspberry pi)
$(Q)make -C $(RPI3_KERNEL_PATH) M=$$PWD/brcmfmac -j2 >log/driver.log
endif

obj/%.o: src/%.c
Expand Down Expand Up @@ -120,6 +120,11 @@ check-nexmon-setup-env:
ifndef NEXMON_SETUP_ENV
$(error run 'source setup_env.sh' first in the repository\'s root directory)
endif
ifneq ($(shell uname -m),armv7l)
ifndef RPI3_KERNEL_PATH
$(error RPI3_KERNEL_PATH is undefined. Clone, compile, and set kernel path before compiling Nexmon patches.)
endif
endif

backup-firmware:
ifeq ($(shell uname -m),armv7l)
Expand All @@ -144,9 +149,11 @@ clean-firmware: FORCE
$(Q)rm -fr $(RAM_FILE) obj gen log src/ucode_compressed.c ucode_compressed.bin

clean: clean-firmware
ifeq ($(shell uname -m),armv7l)
@printf "\033[0;31m CLEANING DRIVER\033[0m\n" $@
ifeq ($(shell uname -m),armv7l)
$(Q)make -C /lib/modules/$(shell uname -r)/build M=$$PWD/brcmfmac clean
else
$(Q)make -C $(RPI3_KERNEL_PATH) M=$$PWD/brcmfmac clean
endif

FORCE: