blob: 2a599cea5d4103540f269ad762c50777345e4ef7 [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
13SRC_URI += "file://TurrisFwUpgrade.sh"
14SRC_URI += "file://swupdate_utility.sh"
15SRC_URI += "file://swupdate.service"
16SRC_URI += "file://commonUtils.sh \
17 file://dcaSplunkUpload.sh \
18 file://dca_utility.sh \
19 file://interfaceCalls.sh \
20 file://DCMscript.sh \
21 file://logfiles.sh \
22 file://StartDCM.sh \
23 file://uploadSTBLogs.sh \
24 file://getaccountid.sh \
25 file://getpartnerid.sh \
26 file://utils.sh \
27 file://dcm-log.service"
28
29SYSTEMD_SERVICE_${PN} = "swupdate.service"
30SYSTEMD_SERVICE_${PN} = "dcm-log.service"
31
32do_install_append() {
33 echo "BOX_TYPE=turris" >> ${D}${sysconfdir}/device.properties
34 echo "ARM_INTERFACE=erouter0" >> ${D}${sysconfdir}/device.properties
35 install -d ${D}${base_libdir}/rdk
36 install -d ${D}${systemd_unitdir}/system
37 install -m 0755 ${WORKDIR}/TurrisFwUpgrade.sh ${D}${base_libdir}/rdk
38 install -m 0755 ${WORKDIR}/swupdate_utility.sh ${D}${base_libdir}/rdk
39 install -m 0644 ${WORKDIR}/swupdate.service ${D}${systemd_unitdir}/system
40 echo "CLOUDURL="http://35.155.171.121:9092/xconf/swu/stb?eStbMac="" >> ${D}${sysconfdir}/include.properties
41
42 #DCM simulator Support
43 install -m 0644 ${S}/dcmlogservers.txt ${D}/rdklogger/
44 install -m 0755 ${WORKDIR}/StartDCM.sh ${D}${base_libdir}/rdk
45 install -m 0755 ${WORKDIR}/DCMscript.sh ${D}${base_libdir}/rdk
46 install -m 0755 ${WORKDIR}/uploadSTBLogs.sh ${D}${base_libdir}/rdk
47 install -m 0755 ${WORKDIR}/dcaSplunkUpload.sh ${D}${base_libdir}/rdk
48 install -m 0755 ${WORKDIR}/dca_utility.sh ${D}${base_libdir}/rdk
49 install -m 0755 ${WORKDIR}/interfaceCalls.sh ${D}${base_libdir}/rdk
50 install -m 0755 ${WORKDIR}/commonUtils.sh ${D}${base_libdir}/rdk
51 install -m 0755 ${WORKDIR}/logfiles.sh ${D}${base_libdir}/rdk
52 install -m 0755 ${WORKDIR}/getaccountid.sh ${D}${base_libdir}/rdk
53 install -m 0755 ${WORKDIR}/getpartnerid.sh ${D}${base_libdir}/rdk
54 install -m 0755 ${WORKDIR}/utils.sh ${D}${base_libdir}/rdk
55 install -m 0755 ${WORKDIR}/dcm-log.service ${D}${systemd_unitdir}/system
56 echo "DCM_LOG_SERVER_URL="http://35.155.171.121:9092/loguploader/getSettings"" >> ${D}${sysconfdir}/dcm.properties
57 echo "DCM_HTTP_SERVER_URL="http://35.155.171.121/xconf/telemetry_upload.php"" >> ${D}${sysconfdir}/dcm.properties
58 echo "DCM_LA_SERVER_URL="http://35.155.171.121/xconf/logupload.php"" >> ${D}${sysconfdir}/dcm.properties
59 echo "TFTP_SERVER_IP=35.155.171.121" >> ${D}${sysconfdir}/device.properties
60 echo "MODEL_NAME=Turris" >> ${D}${sysconfdir}/device.properties
61
62 #Log Rotate Support
63 sed -i "/if \[ \! -f \/usr\/bin\/GetConfigFile \]\;then/,+4d" ${D}/rdklogger/logfiles.sh
64 sed -i "/uploadRDKBLogs.sh/a \ \t \t \t uploading_rdklogs" ${D}/rdklogger/rdkbLogMonitor.sh
65 sed -i "/uploadRDKBLogs.sh/d " ${D}/rdklogger/rdkbLogMonitor.sh
66 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
67
68 install -m 0755 ${S}/devicerpi/lib/rdk/run_rm_key.sh ${D}${base_libdir}/rdk
69}
70
71FILES_${PN} += "${systemd_unitdir}/system/swupdate.service"
72FILES_${PN} += "${systemd_unitdir}/system/dcm-log.service"
73
74RDEPENDS_${PN}_append_dunfell = " bash"