developer | 15a4331 | 2022-04-12 11:23:23 +0800 | [diff] [blame] | 1 | SRC_URI_append = " \ |
| 2 | ${CMF_GIT_ROOT}/rdkb/devices/raspberrypi/sysint;module=.;protocol=${CMF_GIT_PROTOCOL};branch=${CMF_GIT_BRANCH};destsuffix=git/devicerpi;name=sysintdevicerpi \ |
| 3 | " |
| 4 | SRCREV_sysintdevicerpi = "${AUTOREV}" |
| 5 | SRCREV_FORMAT = "sysintgeneric_sysintdevicerpi" |
| 6 | |
| 7 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" |
| 8 | |
| 9 | SRCREV_FORMAT = "${AUTOREV}" |
| 10 | |
| 11 | SRC_URI_remove = "${CMF_GIT_ROOT}/rdkb/devices/intel-x86-pc/emulator/sysint;module=.;protocol=${CMF_GIT_PROTOCOL};branch=${CMF_GIT_BRANCH};destsuffix=git/device;name=sysintdevice" |
| 12 | |
developer | 15a4331 | 2022-04-12 11:23:23 +0800 | [diff] [blame] | 13 | SRC_URI += "file://swupdate_utility.sh" |
| 14 | SRC_URI += "file://swupdate.service" |
| 15 | SRC_URI += "file://commonUtils.sh \ |
| 16 | file://dcaSplunkUpload.sh \ |
| 17 | file://dca_utility.sh \ |
| 18 | file://interfaceCalls.sh \ |
| 19 | file://DCMscript.sh \ |
| 20 | file://logfiles.sh \ |
| 21 | file://StartDCM.sh \ |
| 22 | file://uploadSTBLogs.sh \ |
| 23 | file://getaccountid.sh \ |
| 24 | file://getpartnerid.sh \ |
| 25 | file://utils.sh \ |
| 26 | file://dcm-log.service" |
| 27 | |
| 28 | SYSTEMD_SERVICE_${PN} = "swupdate.service" |
| 29 | SYSTEMD_SERVICE_${PN} = "dcm-log.service" |
| 30 | |
| 31 | do_install_append() { |
developer | acff779 | 2022-06-14 10:58:11 +0800 | [diff] [blame] | 32 | echo "BOX_TYPE=turris" >> ${D}${sysconfdir}/device.properties |
developer | 15a4331 | 2022-04-12 11:23:23 +0800 | [diff] [blame] | 33 | echo "ARM_INTERFACE=erouter0" >> ${D}${sysconfdir}/device.properties |
| 34 | install -d ${D}${base_libdir}/rdk |
| 35 | install -d ${D}${systemd_unitdir}/system |
developer | 15a4331 | 2022-04-12 11:23:23 +0800 | [diff] [blame] | 36 | install -m 0755 ${WORKDIR}/swupdate_utility.sh ${D}${base_libdir}/rdk |
| 37 | install -m 0644 ${WORKDIR}/swupdate.service ${D}${systemd_unitdir}/system |
| 38 | echo "CLOUDURL="http://35.155.171.121:9092/xconf/swu/stb?eStbMac="" >> ${D}${sysconfdir}/include.properties |
| 39 | |
| 40 | #DCM simulator Support |
| 41 | install -m 0644 ${S}/dcmlogservers.txt ${D}/rdklogger/ |
| 42 | install -m 0755 ${WORKDIR}/StartDCM.sh ${D}${base_libdir}/rdk |
| 43 | install -m 0755 ${WORKDIR}/DCMscript.sh ${D}${base_libdir}/rdk |
| 44 | install -m 0755 ${WORKDIR}/uploadSTBLogs.sh ${D}${base_libdir}/rdk |
| 45 | install -m 0755 ${WORKDIR}/dcaSplunkUpload.sh ${D}${base_libdir}/rdk |
| 46 | install -m 0755 ${WORKDIR}/dca_utility.sh ${D}${base_libdir}/rdk |
| 47 | install -m 0755 ${WORKDIR}/interfaceCalls.sh ${D}${base_libdir}/rdk |
| 48 | install -m 0755 ${WORKDIR}/commonUtils.sh ${D}${base_libdir}/rdk |
| 49 | install -m 0755 ${WORKDIR}/logfiles.sh ${D}${base_libdir}/rdk |
| 50 | install -m 0755 ${WORKDIR}/getaccountid.sh ${D}${base_libdir}/rdk |
| 51 | install -m 0755 ${WORKDIR}/getpartnerid.sh ${D}${base_libdir}/rdk |
| 52 | install -m 0755 ${WORKDIR}/utils.sh ${D}${base_libdir}/rdk |
| 53 | install -m 0755 ${WORKDIR}/dcm-log.service ${D}${systemd_unitdir}/system |
| 54 | echo "DCM_LOG_SERVER_URL="http://35.155.171.121:9092/loguploader/getSettings"" >> ${D}${sysconfdir}/dcm.properties |
| 55 | echo "DCM_HTTP_SERVER_URL="http://35.155.171.121/xconf/telemetry_upload.php"" >> ${D}${sysconfdir}/dcm.properties |
| 56 | echo "DCM_LA_SERVER_URL="http://35.155.171.121/xconf/logupload.php"" >> ${D}${sysconfdir}/dcm.properties |
| 57 | echo "TFTP_SERVER_IP=35.155.171.121" >> ${D}${sysconfdir}/device.properties |
developer | 3d785cd | 2022-05-05 16:20:47 +0800 | [diff] [blame] | 58 | echo "MODEL_NAME=Filogic" >> ${D}${sysconfdir}/device.properties |
developer | 15a4331 | 2022-04-12 11:23:23 +0800 | [diff] [blame] | 59 | |
| 60 | #Log Rotate Support |
| 61 | sed -i "/if \[ \! -f \/usr\/bin\/GetConfigFile \]\;then/,+4d" ${D}/rdklogger/logfiles.sh |
| 62 | sed -i "/uploadRDKBLogs.sh/a \ \t \t \t uploading_rdklogs" ${D}/rdklogger/rdkbLogMonitor.sh |
| 63 | sed -i "/uploadRDKBLogs.sh/d " ${D}/rdklogger/rdkbLogMonitor.sh |
| 64 | sed -i "/upload_nvram2_logs()/i uploading_rdklogs() \n { \n \ \t \t TFTP_RULE_COUNT=\`iptables -t raw -L -n | grep tftp | wc -l\` \n \ \t \t if [ \"\$TFTP_RULE_COUNT\" == 0 ] \n \t \t then \n \ \t \t \t iptables -t raw -I OUTPUT -j CT -p udp -m udp --dport 69 --helper tftp \n \ \t \t \t sleep 2 \n \ \t \t fi \n \ \t \t cd /nvram/logbackup \n \ \t \t FILENAME=\`ls *.tgz\` \n \ \t \t tftp -p -r \$FILENAME \$TFTP_SERVER_IP \n } " ${D}/rdklogger/rdkbLogMonitor.sh |
| 65 | |
| 66 | install -m 0755 ${S}/devicerpi/lib/rdk/run_rm_key.sh ${D}${base_libdir}/rdk |
| 67 | } |
| 68 | |
| 69 | FILES_${PN} += "${systemd_unitdir}/system/swupdate.service" |
| 70 | FILES_${PN} += "${systemd_unitdir}/system/dcm-log.service" |
| 71 | |
| 72 | RDEPENDS_${PN}_append_dunfell = " bash" |