Skip to content
Snippets Groups Projects
Commit 0bbdd78d authored by BRONES Romain's avatar BRONES Romain
Browse files

fix(init):Moving fpga init to general init

* Add a link to the correct mapt file
* Add a default configuration
parent bcf27412
No related branches found
No related tags found
No related merge requests found
FOFB_APP=centralnode
......@@ -21,8 +21,14 @@ case $FOFB_APP in
;;
esac
# Taking the last binary fil in the sorted list (higher tag)
# Taking the last binary file in the sorted list (higher tag)
PATH_FPGABIN=$(ls -S /lib/firmware/base/${FOFB_APP}/*.bin | tail -n 1)
logger -t "fofb-fpgainit" "Loading FPGA image ${PATH_FPGABIN}"
fpgautil -b ${PATH_FPGABIN}
# Linking the correct MAP file
PATH_MAP="/opt/fofb/map/app_{FOFB_APP}.mapt"
logger -t "fofb-fpgainit" "Linking map file ${PATH_MAP}"
ln -s ${PATH_MAP} /opt/fofb/map/app.mapt
SUMMARY = "Program the FPGA depending on the configuration CellNode/CentralNode"
SUMMARY = "Initialize the system for FOFB application"
SECTION = "opt"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
# RC script
INITSCRIPT_NAME = "fofb-fpgainit.sh"
INITSCRIPT_NAME = "fofb-init.sh"
INITSCRIPT_PARAMS = "start 50 2"
inherit update-rc.d
SRC_URI = " file://fofb-fpgainit.sh"
SRC_URI = " file://fofb-init.sh"
SRC_URI += " file://configuration
RDEPENDS_${PN}=" fpga-manager-script bash"
FILES_${PN}+="/etc/init.d/fofb-fpgainit.sh"
FILES_${PN}+="/etc/init.d/fofb-init.sh"
do_install() {
install -d ${D}/etc/init.d/
install -m 0755 ${WORKDIR}/fofb-fpgainit.sh ${D}/etc/init.d/fofb-fpgainit.sh
install -m 0755 ${WORKDIR}/fofb-init.sh ${D}/etc/init.d/fofb-init.sh
# Write default configuration
install -d ${D}/opt/fofb/cfg/
install -m 0666 ${WORKDIR}/configuration ${D}/opt/fofb/cfg/configuration
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment