diff --git a/packages/addons/service/fd628/changelog.txt b/packages/addons/service/fd628/changelog.txt
new file mode 100644
index 0000000000..32d81ca428
--- /dev/null
+++ b/packages/addons/service/fd628/changelog.txt
@@ -0,0 +1,2 @@
+100
+- Initial add-on
diff --git a/packages/addons/service/fd628/icon/icon.png b/packages/addons/service/fd628/icon/icon.png
new file mode 100644
index 0000000000..265d6fa943
Binary files /dev/null and b/packages/addons/service/fd628/icon/icon.png differ
diff --git a/packages/addons/service/fd628/package.mk b/packages/addons/service/fd628/package.mk
new file mode 100644
index 0000000000..af4cb2aa95
--- /dev/null
+++ b/packages/addons/service/fd628/package.mk
@@ -0,0 +1,45 @@
+################################################################################
+# This file is part of LibreELEC - https://libreelec.tv
+# Copyright (C) 2018-present Team LibreELEC
+#
+# LibreELEC is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# LibreELEC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with LibreELEC. If not, see .
+################################################################################
+
+PKG_NAME="fd628"
+PKG_VERSION="1.0"
+PKG_REV="100"
+PKG_ARCH="any"
+PKG_LICENSE="GPL"
+PKG_SITE="https://libreelec.tv"
+PKG_URL=""
+PKG_DEPENDS_TARGET="toolchain"
+PKG_SECTION="service"
+PKG_SHORTDESC="fd628: Kodi service to light up additional icons on devices with FD628 display"
+PKG_LONGDESC="fd628: Kodi service to light up additional icons on devices with FD628 display"
+PKG_TOOLCHAIN="manual"
+
+PKG_IS_ADDON="yes"
+PKG_ADDON_NAME="service.fd628"
+PKG_ADDON_PROJECTS="S905"
+PKG_ADDON_TYPE="xbmc.service"
+
+make_target() {
+ $SED -e "s|@PKG_VERSION@|$PKG_VERSION|g" \
+ -i addon.xml
+}
+
+addon() {
+ mkdir -p $ADDON_BUILD/$PKG_ADDON_ID
+ cp -R $PKG_BUILD/* $ADDON_BUILD/$PKG_ADDON_ID
+}
diff --git a/packages/addons/service/fd628/sources/addon.xml b/packages/addons/service/fd628/sources/addon.xml
new file mode 100644
index 0000000000..431312422f
--- /dev/null
+++ b/packages/addons/service/fd628/sources/addon.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+ Service for controlling FD628 VFD display icons
+ Service for controlling FD628 VFD display icons, e.g. Ethernet/WiFi connection status and Time
+ all
+
+ resources/icon.png
+
+
+
diff --git a/packages/addons/service/fd628/sources/default.py b/packages/addons/service/fd628/sources/default.py
new file mode 100644
index 0000000000..cefec180a2
--- /dev/null
+++ b/packages/addons/service/fd628/sources/default.py
@@ -0,0 +1,104 @@
+################################################################################
+# This file is part of LibreELEC - https://libreelec.tv
+# Copyright (C) 2018-present Team LibreELEC
+#
+# LibreELEC is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# LibreELEC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with LibreELEC. If not, see .
+################################################################################
+
+import datetime
+import xbmcgui
+import xbmcaddon
+import threading
+import time
+import sys
+import os
+import subprocess
+
+addon = xbmcaddon.Addon(id='service.fd628')
+
+class clockThreadClass(threading.Thread):
+ def run(self):
+ self.shutdown = False
+ while not self.shutdown:
+ vfdon = '/sys/class/leds/fd628_dev/led_on'
+ vfdoff = '/sys/class/leds/fd628_dev/led_off'
+ ledon = []
+ ledoff = []
+ play = pause = lanstate = lan = wifistate = wifi = ""
+ sd_state = sd = usb_state = usb = ''
+ play = xbmc.getCondVisibility('Player.Playing')
+ pause = xbmc.getCondVisibility('Player.Paused')
+ if ( os.path.isfile('/sys/class/amhdmitx/amhdmitx0/hpd_state')):
+ hpd_state = file('/sys/class/amhdmitx/amhdmitx0/hpd_state', "rb")
+ hpdstate = hpd_state.read()
+ p = subprocess.Popen('blkid /dev/sd*', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ for line in p.stdout.readlines():
+ usb_state += line
+ retval = p.wait()
+ p = subprocess.Popen('blkid /dev/mmcblk* | grep " UUID"', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ for line in p.stdout.readlines():
+ sd_state += line
+ retval = p.wait()
+ if ( os.path.isfile('/sys/class/net/eth0/operstate')):
+ lanstate = file('/sys/class/net/eth0/operstate', 'rb')
+ lan = lanstate.read()
+ if ( os.path.isfile('/sys/class/net/wlan0/operstate')):
+ wifistate = file('/sys/class/net/wlan0/operstate', 'rb')
+ wifi = wifistate.read()
+ if len(usb_state) > 0 :
+ ledon.append('usb')
+ else:
+ ledoff.append('usb')
+ if len(sd_state) > 0 :
+ ledon.append('sd')
+ else:
+ ledoff.append('sd')
+ if (hpdstate == '1'):
+ ledon.append('hdmi')
+ else:
+ ledoff.append('hdmi')
+ if (lan.find('up')>=0 or lan.find('unknown')>=0):
+ ledon.append('eth')
+ else:
+ ledoff.append('eth')
+ if (wifi.find('up')>=0):
+ ledon.append('wifi')
+ else:
+ ledoff.append('wifi')
+ if pause == True:
+ ledon.append('pause')
+ else:
+ ledoff.append('pause')
+ if play == True:
+ ledon.append('play')
+ else:
+ ledoff.append('play')
+ for i in ledon:
+ vfd = file(vfdon, "wb")
+ vfd.write(i)
+ vfd.flush()
+ for j in ledoff:
+ vfd = file(vfdoff, "wb")
+ vfd.write(j)
+ vfd.flush()
+ time.sleep(0.5)
+
+class ClockDialog:
+ def __init__(self):
+ self.clockThread = clockThreadClass()
+ self.clockThread.start()
+
+dialog = ClockDialog()
+del dialog
+del addon
diff --git a/packages/linux-drivers/amlogic/fd628-aml/package.mk b/packages/linux-drivers/amlogic/fd628-aml/package.mk
index 84a6d5020a..0cb4df1789 100644
--- a/packages/linux-drivers/amlogic/fd628-aml/package.mk
+++ b/packages/linux-drivers/amlogic/fd628-aml/package.mk
@@ -37,7 +37,7 @@ pre_make_target() {
}
make_target() {
- make -C $(kernel_path) M=$PKG_BUILD/driver
+ make -C "$(kernel_path)" M="$PKG_BUILD/driver"
make FD628Service
}