blob: 001bfdb2a1a7af5c1fdb511b71ccb7f663eec6de [file] [log] [blame]
developer15a43312022-04-12 11:23:23 +08001SRC_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"
4SRCREV_sysintdevicerpi = "${AUTOREV}"
5SRCREV_FORMAT = "sysintgeneric_sysintdevicerpi"
6
7FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
8
9SRCREV_FORMAT = "${AUTOREV}"
10
11SRC_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
developer15a43312022-04-12 11:23:23 +080013SRC_URI += "file://swupdate_utility.sh"
14SRC_URI += "file://swupdate.service"
15SRC_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
28SYSTEMD_SERVICE_${PN} = "swupdate.service"
29SYSTEMD_SERVICE_${PN} = "dcm-log.service"
30
31do_install_append() {
developeracff7792022-06-14 10:58:11 +080032 echo "BOX_TYPE=turris" >> ${D}${sysconfdir}/device.properties
developer15a43312022-04-12 11:23:23 +080033 echo "ARM_INTERFACE=erouter0" >> ${D}${sysconfdir}/device.properties
34 install -d ${D}${base_libdir}/rdk
35 install -d ${D}${systemd_unitdir}/system
developer15a43312022-04-12 11:23:23 +080036 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
developer3d785cd2022-05-05 16:20:47 +080058 echo "MODEL_NAME=Filogic" >> ${D}${sysconfdir}/device.properties
developer15a43312022-04-12 11:23:23 +080059
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
69FILES_${PN} += "${systemd_unitdir}/system/swupdate.service"
70FILES_${PN} += "${systemd_unitdir}/system/dcm-log.service"
71
72RDEPENDS_${PN}_append_dunfell = " bash"