diff --git a/tools/mkpkg/update_binary-addons-retroplayer b/tools/mkpkg/update_binary-addons-retroplayer
new file mode 100755
index 0000000000..6e467148af
--- /dev/null
+++ b/tools/mkpkg/update_binary-addons-retroplayer
@@ -0,0 +1,97 @@
+#!/bin/sh
+################################################################################
+# This file is part of LibreELEC - https://libreelec.tv
+# Copyright (C) 2016 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 .
+################################################################################
+
+git_clone() {
+ # git_clone https://repo.url branch ./target_dir [githash]
+ echo "[mkpkg] Checking out $1 ..."
+ if [ ! -d "$3" ]; then
+ git clone --recursive "$1" -b $2 "$3"
+ else
+ if [ -d "$3" ] ; then
+ cd "$3"
+ git checkout $2 >/dev/null 2>/dev/null
+ git pull
+ cd ..
+ fi
+ fi
+ if [ ! -z "$4" ] ; then
+ cd "$3"
+ git fetch >/dev/null 2>/dev/null
+ git branch -D $4 >/dev/null 2>/dev/null
+ git checkout $4 >/dev/null 2>/dev/null
+ git checkout -b ref-$4 >/dev/null 2>/dev/null
+ cd ..
+ fi
+}
+
+resolve_hash() {
+ if [ -d "$1" ] ; then
+ cd "$1"
+ git rev-parse --short $2 2>/dev/null
+ fi
+}
+
+# addons
+for addontxt in "binary-addons https://github.com/lrusak/repo-binary-addons.git retroplayer" ; do
+ ADDONS=$(echo $addontxt | awk '{print $1}')
+ ADDONREPO=$(echo $addontxt | awk '{print $2}')
+ GIT_HASH=$(echo $addontxt | awk '{print $3}')
+ git_clone $ADDONREPO retroplayer $ADDONS.git $GIT_HASH
+
+ if [ -z "$1" ]; then
+ for addon in $ADDONS.git/*.*/ ; do
+ if [ -n "$(echo $addon | grep game.)" -o -n "$(echo $addon | grep peripheral.)" ]; then
+ ADDON=$(basename $addon)
+ REPO=$(cat $addon/$ADDON.txt | awk '{print $2}')
+ GIT_HASH=$(cat $addon/$ADDON.txt | awk '{print $3}')
+
+ if ! grep -q all $addon/platforms.txt && ! grep -q linux $addon/platforms.txt && ! grep -q ! $addon/platforms.txt; then
+ continue
+ fi
+
+ git_clone $REPO master $ADDON.git $GIT_HASH
+
+ if [ -f ../../packages/mediacenter/kodi-binary-addons/$ADDON/package.mk ] ; then
+ # update package.mk
+ RESOLVED_HASH=$(resolve_hash $ADDON.git $GIT_HASH)
+ sed -i "s|PKG_VERSION=.*|PKG_VERSION=\"$RESOLVED_HASH\"|g" ../../packages/mediacenter/kodi-binary-addons/$ADDON/package.mk
+ fi
+ fi
+ done
+ else
+ addon="$ADDONS.git/$1"
+ if [ -n "$(echo $addon | grep game.)" -o -n "$(echo $addon | grep peripheral.)" ]; then
+ ADDON=$(basename $addon)
+ REPO=$(cat $addon/$ADDON.txt | awk '{print $2}')
+ GIT_HASH=$(cat $addon/$ADDON.txt | awk '{print $3}')
+
+ if ! grep -q all $addon/platforms.txt && ! grep -q linux $addon/platforms.txt && ! grep -q ! $addon/platforms.txt; then
+ continue
+ fi
+
+ git_clone $REPO master $ADDON.git $GIT_HASH
+
+ if [ -f ../../packages/mediacenter/kodi-binary-addons/$ADDON/package.mk ] ; then
+ # update package.mk
+ RESOLVED_HASH=$(resolve_hash $ADDON.git $GIT_HASH)
+ sed -i "s|PKG_VERSION=.*|PKG_VERSION=\"$RESOLVED_HASH\"|g" ../../packages/mediacenter/kodi-binary-addons/$ADDON/package.mk
+ fi
+ fi
+ fi
+done
diff --git a/tools/mkpkg/update_emulation b/tools/mkpkg/update_emulation
new file mode 100755
index 0000000000..5913a6ba43
--- /dev/null
+++ b/tools/mkpkg/update_emulation
@@ -0,0 +1,69 @@
+#!/bin/sh
+################################################################################
+# This file is part of LibreELEC - https://libreelec.tv
+# Copyright (C) 2016 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 .
+################################################################################
+
+git_clone() {
+ # git_clone https://repo.url branch ./target_dir [githash]
+ echo "[mkpkg] Checking out $1 ..."
+ if [ ! -d "$3" ]; then
+ git clone --recursive "$1" -b $2 "$3"
+ else
+ if [ -d "$3" ] ; then
+ cd "$3"
+ git checkout $2 >/dev/null 2>/dev/null
+ git pull
+ cd ..
+ fi
+ fi
+ if [ ! -z "$4" ] ; then
+ cd "$3"
+ git fetch >/dev/null 2>/dev/null
+ git branch -D $4 >/dev/null 2>/dev/null
+ git checkout $4 -b ref-$4 >/dev/null 2>/dev/null
+ cd ..
+ fi
+}
+
+resolve_hash() {
+ if [ -d "$1" ] ; then
+ cd "$1"
+ git rev-parse --short $2 2>/dev/null
+ fi
+}
+
+if [ -z "$1" ]; then
+ for package in $(find ../../packages/emulation/* -name package.mk); do
+ . $package
+ git_clone $PKG_SITE master $PKG_NAME.git
+
+ if [ -f ../../packages/emulation/$PKG_NAME/package.mk ] ; then
+ # update package.mk
+ RESOLVED_HASH=$(resolve_hash $PKG_NAME.git master)
+ sed -i "s|PKG_VERSION=.*|PKG_VERSION=\"$RESOLVED_HASH\"|g" ../../packages/emulation/$PKG_NAME/package.mk
+ fi
+ done
+else
+ . ../../packages/emulation/$1/package.mk
+ git_clone $PKG_SITE master $PKG_NAME.git
+
+ if [ -f ../../packages/emulation/$PKG_NAME/package.mk ] ; then
+ # update package.mk
+ RESOLVED_HASH=$(resolve_hash $PKG_NAME.git master)
+ sed -i "s|PKG_VERSION=.*|PKG_VERSION=\"$RESOLVED_HASH\"|g" ../../packages/emulation/$PKG_NAME/package.mk
+ fi
+fi