Commit d208a1bb authored by Federico Vaga's avatar Federico Vaga

Merge branch '27-add-necessary-udev-rules-to-flash-the-fpga' into 'master'

Resolve "Add necessary udev rules to flash the FPGA"

Closes #27

See merge request be-cem-edl/fec/hardware-modules/svec!19
parents d5cddff3 f3495a41
# SPDX-FileCopyrightText: 2023 CERN (home.cern)
#
# SPDX-License-Identifier: LGPL-2.1-or-later
ACTION=="add", SUBSYSTEMS=="pci", SUBSYSTEM=="vme", DRIVERS=="vme_bridge", ENV{DEVTYPE}=="slot", GOTO="svec-fmc-carrier-start"
GOTO="svec-fmc-carrier-end"
LABEL="svec-fmc-carrier-start"
# Skip flashing if the card is not a SVEC
IMPORT{program}="/usr/local/bin/fechw udev module --slot VME.$number --type FMC-SVEC-A24"
ENV{MODULE_SLOT}=="", GOTO="svec-fmc-carrier-end"
IMPORT{program}="/usr/local/bin/fechw udev fpu --slot VME.$number --type FPGA --role Application"
ENV{MODULE_SLOT}!="", ENV{FPU_SLOT}!="", ENV{FPU_FW_NAME}!="", RUN+="/usr/local/bin/svec-flasher -f $env{FPU_SLOT} /lib/firmware/cern/$env{FPU_FW_NAME}"
ENV{MODULE_SLOT}!="", ENV{FPU_SLOT}!="", ENV{FPU_FW_NAME}!="", RUN+="/usr/local/bin/vme-scan --slot $number"
LABEL="svec-fmc-carrier-end"
......@@ -7,7 +7,7 @@ CFLAGS = -I.
OBJS = libvmebus.o svec-flasher.o
all: $(OBJS)
${CC} -o svec-flasher $(OBJS)
${CC} -Wall -Werror -o svec-flasher $(OBJS)
clean:
rm -f $(OBJS) svec-flasher
\ No newline at end of file
rm -f $(OBJS) svec-flasher
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment