diff --git a/recipes-app/fofb-init/files/devices.dmap b/recipes-app/fofb-init/files/devices.dmap new file mode 100644 index 0000000000000000000000000000000000000000..d1d4847215df1c87b43c5dfe36e48a75c6376249 --- /dev/null +++ b/recipes-app/fofb-init/files/devices.dmap @@ -0,0 +1,2 @@ +APPUIO (uio:axiapp?map=/opt/fofb/map/app.mapt) +LNM (logicalNameMap?map=/opt/fofb//lnm.xlmap) diff --git a/recipes-app/fofb-init/files/fofb-init.sh b/recipes-app/fofb-init/files/fofb-init.sh index b515a79a986f50dc825f62baa6c194445504a678..537bc2ecd6c128dfb4758af5d32fc60e62601cac 100755 --- a/recipes-app/fofb-init/files/fofb-init.sh +++ b/recipes-app/fofb-init/files/fofb-init.sh @@ -42,8 +42,6 @@ link_fpga_bitstream() { ######################################################################## # Link the proper MAPT file depending on FOFB_APP -# Generate the DMAP file with correct UIO dev -# Add LNM device if specified in FOFB_LNM link_mapt() { if [ -z FOFB_APP ]; then log -p user.error "Variable FOFB_APP not set in configuration file ${CFG_FILE}" @@ -59,11 +57,27 @@ link_mapt() { log "Linking map file ${LINK_TARGET}" ln -sf ${LINK_TARGET} ${PATH_MAP}/app.mapt - log "Create dmap file to axi app UIO ${PATH_MAP}/appuio.dmap" - echo "APPUIO (uio:$(basename $(readlink /dev/axiapp))?map=${PATH_MAP}/app.mapt)" > ${PATH_MAP}/appuio.dmap - } +######################################################################## +# Link the proper XLMAP file depending on FOFB_APP +link_xlmap() { + if [ -z FOFB_APP ]; then + log -p user.error "Variable FOFB_APP not set in configuration file ${CFG_FILE}" + exit 1 + fi + + if [[ ${FOFB_APP} = *"Central"* ]]; then + log "CentralNode application detected" + ln -sf ${PATH_MAP}/lnm_central.xlmap ${PATH_MAP}/lnm.xlmap + fi + + if [[ ${FOFB_APP} = *"Cell"* ]]; then + log "CellNode application detected" + ln -sf ${PATH_MAP}/lnm_cell.xlmap ${PATH_MAP}/lnm.xlmap + fi + +} ######################################################################## # Link the proper configuration register @@ -95,7 +109,7 @@ fpga_reconfig() { /etc/init.d/fw_plreset.sh |& log # Applying configuration - fofb-configurator --config ${PATH_CFG}/config_register --dmap ${PATH_MAP}/appuio.dmap |& log + fofb-configurator --config ${PATH_CFG}/config_register --dmap ${PATH_MAP}/app.dmap |& log } ######################################################################## @@ -124,6 +138,7 @@ start() { link_fpga_bitstream link_mapt + link_xlmap link_configuration echo "configured" > $LOCK_FILE diff --git a/recipes-app/fofb-opcua-server/files/lnm_cell.xlmap b/recipes-app/fofb-init/files/lnm_cell.xlmap similarity index 100% rename from recipes-app/fofb-opcua-server/files/lnm_cell.xlmap rename to recipes-app/fofb-init/files/lnm_cell.xlmap diff --git a/recipes-app/fofb-opcua-server/files/lnm_central.xlmap b/recipes-app/fofb-init/files/lnm_central.xlmap similarity index 100% rename from recipes-app/fofb-opcua-server/files/lnm_central.xlmap rename to recipes-app/fofb-init/files/lnm_central.xlmap diff --git a/recipes-app/fofb-init/fofb-init_1.3.bb b/recipes-app/fofb-init/fofb-init_1.4.bb similarity index 78% rename from recipes-app/fofb-init/fofb-init_1.3.bb rename to recipes-app/fofb-init/fofb-init_1.4.bb index c5f7b5323b5f6846f0e5c5614ece90b656c05b3d..86bfa0faaa651c4332a69b753920b15795068bd1 100644 --- a/recipes-app/fofb-init/fofb-init_1.3.bb +++ b/recipes-app/fofb-init/fofb-init_1.4.bb @@ -13,11 +13,15 @@ SRC_URI += " file://fpgaversion.sh" SRC_URI += " file://fofb-configurator.py" SRC_URI += " file://configuration.example" SRC_URI += " file://config" +SRC_URI += " file://lnm_central.xlmap " +SRC_URI += " file://lnm_cell.xlmap " +SRC_URI += " file://devices.dmap " DEPENDS=" deviceaccess-mapfiles" RDEPENDS_${PN}=" deviceaccess-mapfiles fpga-manager-script bash" FILES_${PN}+="/etc/init.d/fofb-init.sh" +FILES_${PN}+="/opt/fofb/map/*" FILES_${PN}+="/usr/bin/fpgaversion" FILES_${PN}+="/usr/bin/fofb-configurator" FILES_${PN}+="/opt/fofb/cfg/configuration.example" @@ -35,6 +39,10 @@ do_install() { install -d ${D}/opt/fofb/cfg install ${WORKDIR}/config/*_config_register -t ${D}/opt/fofb/cfg - install ${WORKDIR}/configuration.example ${D}/opt/fofb/cfg/configuration.example + + install -d ${D}/opt/fofb/map + install -m 0644 ${WORKDIR}/lnm_central.xlmap ${D}/opt/fofb/map/lnm_central.xlmap + install -m 0644 ${WORKDIR}/lnm_cell.xlmap ${D}/opt/fofb/map/lnm_cell.xlmap + install -m 0644 ${WORKDIR}/devices.dmap ${D}/opt/fofb/map/devices.dmap } diff --git a/recipes-app/fofb-opcua-server/files/fofb-opcua-server.sh b/recipes-app/fofb-opcua-server/files/fofb-opcua-server.sh index c4fd73c245cfd92873662d2480a5e24fd4dd45ce..4b426faf5a32856de773975c976743ab35c0d33f 100755 --- a/recipes-app/fofb-opcua-server/files/fofb-opcua-server.sh +++ b/recipes-app/fofb-opcua-server/files/fofb-opcua-server.sh @@ -24,27 +24,11 @@ start() { exit 1 fi - if [ -z FOFB_APP ]; then - echo "Variable FOFB_APP not set in configuration file ${CFG_FILE}" >> $LOG_FILE - exit 1 - fi - echo "Starting fofb-opcua-server" >> $LOG_FILE cd $PATH_OPCUA - # Make the dmap file from AXI UIO - echo "Making dmap file" >> $LOG_FILE - cat ${PATH_MAP}/appuio.dmap > devices.dmap - - if [[ ${FOFB_APP} = *"Central"* ]]; then - echo "CentralNode application detected" >> $LOG_FILE - echo "LNM (logicalNameMap?map=${PATH_OPCUA}/lnm_central.xlmap)" >> devices.dmap - fi - - if [[ ${FOFB_APP} = *"Cell"* ]]; then - echo "CellNode application detected" >> $LOG_FILE - echo "LNM (logicalNameMap?map=${PATH_OPCUA}/lnm_cell.xlmap)" >> devices.dmap - fi + # Link to devices.dmap + ln -sf ${PATH_MAP}/devices.dmap devices.dmap # Start server echo "starting" > $LOCK_FILE diff --git a/recipes-app/fofb-opcua-server/fofb-opcua-server_0.3.bb b/recipes-app/fofb-opcua-server/fofb-opcua-server_0.4.bb similarity index 78% rename from recipes-app/fofb-opcua-server/fofb-opcua-server_0.3.bb rename to recipes-app/fofb-opcua-server/fofb-opcua-server_0.4.bb index ecba408368da21857e2c1a18a1b5f80454a062a1..ec1f84bf841bed531fa53f7e186d9d936f6eda15 100644 --- a/recipes-app/fofb-opcua-server/fofb-opcua-server_0.3.bb +++ b/recipes-app/fofb-opcua-server/fofb-opcua-server_0.4.bb @@ -11,8 +11,6 @@ inherit update-rc.d SRC_URI = " \ file://generic_chimeratk_server_configuration.xml \ - file://lnm_central.xlmap \ - file://lnm_cell.xlmap \ file://fofb-opcua-server.sh \ " @@ -25,8 +23,6 @@ FILES_${PN}+="/etc/init.d/fofb-opcua-server.sh" do_install() { install -d ${D}/opt/fofb/opcua-server/ install -m 0644 ${WORKDIR}/generic_chimeratk_server_configuration.xml ${D}/opt/fofb/opcua-server/generic_chimeratk_server_configuration.xml - install -m 0644 ${WORKDIR}/lnm_central.xlmap ${D}/opt/fofb/opcua-server/lnm_central.xlmap - install -m 0644 ${WORKDIR}/lnm_cell.xlmap ${D}/opt/fofb/opcua-server/lnm_cell.xlmap install -d ${D}/etc/init.d/ install -m 0755 ${WORKDIR}/fofb-opcua-server.sh ${D}/etc/init.d/fofb-opcua-server.sh