Skip to content

Commit

Permalink
Makefile: support builtin fpga-{mgr,bridge,region} modules
Browse files Browse the repository at this point in the history
The GSRD (Golden Software Reference Design) Yocto image for Intel
SoCFPGA is built with CONFIG_FPGA=y by default, which causes an
unresolvable symbol conflict with the fpga-mgr backport module.

Assuming that the kernel version is recent enough not to require any
changes to fpga-{mgr,bridge,region}, do not build these modules when
built into the kernel. This is not complete solution and will result
in unknown failures when the builtin kernel modules are too old, but
it does work with GSRD which currently builds with Linux 6.1 (LTS).

Link: https://github.com/altera-opensource/gsrd-socfpga
Link: https://github.com/altera-opensource/linux-socfpga
Signed-off-by: Peter Colberg <[email protected]>
  • Loading branch information
pcolberg committed Mar 20, 2024
1 parent 40e659d commit 87f3eb6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,15 @@ endif
# The module order matters; it determines the module order for
# both the insmod and rmmod targets. The module order is also
# leveraged for install packages by the dkms.conf file.
ifneq ($(CONFIG_FPGA),y)
obj-m += fpga-mgr.o
endif
ifneq ($(CONFIG_FPGA_BRIDGE),y)
obj-m += fpga-bridge.o
endif
ifneq ($(CONFIG_FPGA_REGION),y)
obj-m += fpga-region.o
endif
ifndef CONFIG_FW_UPLOAD
obj-m += fpga-image-load.o
endif
Expand Down

0 comments on commit 87f3eb6

Please sign in to comment.