projects/Amlogic: move aml_autoscript generation to a package

This allows to make the script installation device-specific in device options and removing the ugly case in bootloader mkimage.
This commit is contained in:
kszaq 2018-03-06 00:10:30 +01:00
parent 172e62986f
commit 55bbee2989
8 changed files with 60 additions and 10 deletions

View File

@ -19,16 +19,7 @@
################################################################################
# compile and copy amlogic autoscript files to part1
case "$DEVICE" in
"S905"|"S912"|"LePotato"|"KVIM"*)
for src in $INSTALL_SRC_DIR/*autoscript.src ; do
if [ -e "$src" ] ; then
$TOOLCHAIN/bin/mkimage -A $TARGET_KERNEL_ARCH -O linux -T script -C none -d "$src" "$LE_TMP/$(basename $src .src)" > /dev/null
mcopy "$LE_TMP/$(basename $src .src)" ::
fi
done
;;
esac
mcopy $RELEASE_DIR/3rdparty/bootloader/*autoscript :: 2>&1 > /dev/null || true
# copy device trees to part1
for dtb in $RELEASE_DIR/3rdparty/bootloader/device_trees $RELEASE_DIR/3rdparty/bootloader/*.dtb $RELEASE_DIR/3rdparty/bootloader/dtb.img ; do

View File

@ -23,3 +23,8 @@
# Space separated list is supported,
# e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware"
FIRMWARE="$FIRMWARE brcmfmac_sdio-firmware-all-aml"
# additional packages to install:
# Space separated list is supported,
# e.g. ADDITIONAL_PACKAGES="PACKAGE1 PACKAGE2"
ADDITIONAL_PACKAGES+=" autoscript-amlogic"

View File

@ -29,3 +29,8 @@
# Space separated list is supported,
# e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware"
FIRMWARE="$FIRMWARE brcmfmac_sdio-firmware-all-aml"
# additional packages to install:
# Space separated list is supported,
# e.g. ADDITIONAL_PACKAGES="PACKAGE1 PACKAGE2"
ADDITIONAL_PACKAGES+=" autoscript-amlogic"

View File

@ -12,3 +12,8 @@
# Additional kernel dependencies
KERNEL_EXTRA_DEPENDS_TARGET="device-trees-amlogic"
# additional packages to install:
# Space separated list is supported,
# e.g. ADDITIONAL_PACKAGES="PACKAGE1 PACKAGE2"
ADDITIONAL_PACKAGES+=" autoscript-amlogic"

View File

@ -13,3 +13,8 @@
# Space separated list is supported,
# e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware"
FIRMWARE="$FIRMWARE brcmfmac_sdio-firmware-all-aml rtl8723bs_bt qca9377-firmware-aml"
# additional packages to install:
# Space separated list is supported,
# e.g. ADDITIONAL_PACKAGES="PACKAGE1 PACKAGE2"
ADDITIONAL_PACKAGES+=" autoscript-amlogic"

View File

@ -22,3 +22,8 @@
# Space separated list is supported,
# e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware"
FIRMWARE="$FIRMWARE brcmfmac_sdio-firmware-all-aml rtl8723bs_bt qca9377-firmware-aml"
# additional packages to install:
# Space separated list is supported,
# e.g. ADDITIONAL_PACKAGES="PACKAGE1 PACKAGE2"
ADDITIONAL_PACKAGES+=" autoscript-amlogic"

View File

@ -0,0 +1,34 @@
################################################################################
# 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 <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="autoscript-amlogic"
PKG_VERSION=""
PKG_LICENSE="GPL"
PKG_DEPENDS_TARGET="toolchain"
PKG_TOOLCHAIN="manual"
make_target() {
for src in $PKG_DIR/scripts/*autoscript.src ; do
$TOOLCHAIN/bin/mkimage -A $TARGET_KERNEL_ARCH -O linux -T script -C none -d "$src" "$(basename $src .src)" > /dev/null
done
}
makeinstall_target() {
mkdir -p $INSTALL/usr/share/bootloader
cp -a $PKG_BUILD/*autoscript $INSTALL/usr/share/bootloader/
}