mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-31 14:37:59 +00:00
linux-driver-addons: automated code cleanup
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
This commit is contained in:
parent
ea1dff8688
commit
b2624896ff
@ -20,7 +20,7 @@ PKG_ADDON_VERSION="${ADDON_VERSION}.${PKG_REV}"
|
|||||||
|
|
||||||
PKG_KERNEL_CFG_FILE=$(kernel_config_path) || die
|
PKG_KERNEL_CFG_FILE=$(kernel_config_path) || die
|
||||||
|
|
||||||
if ! grep -q ^CONFIG_USB_PCI= ${PKG_KERNEL_CFG_FILE} ; then
|
if ! grep -q ^CONFIG_USB_PCI= ${PKG_KERNEL_CFG_FILE}; then
|
||||||
PKG_PATCH_DIRS="disable-pci"
|
PKG_PATCH_DIRS="disable-pci"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -30,21 +30,21 @@ pre_make_target() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
make_target() {
|
make_target() {
|
||||||
cp -RP $(get_build_dir media_tree_cc)/* $PKG_BUILD/linux
|
cp -RP $(get_build_dir media_tree_cc)/* ${PKG_BUILD}/linux
|
||||||
|
|
||||||
# make config all
|
# make config all
|
||||||
kernel_make VER=$KERNEL_VER SRCDIR=$(kernel_path) allyesconfig
|
kernel_make VER=${KERNEL_VER} SRCDIR=$(kernel_path) allyesconfig
|
||||||
|
|
||||||
# hack to workaround media_build bug
|
# hack to workaround media_build bug
|
||||||
if [ "$PROJECT" = Rockchip ]; then
|
if [ "${PROJECT}" = Rockchip ]; then
|
||||||
sed -e 's/CONFIG_DVB_CXD2820R=m/# CONFIG_DVB_CXD2820R is not set/g' -i v4l/.config
|
sed -e 's/CONFIG_DVB_CXD2820R=m/# CONFIG_DVB_CXD2820R is not set/g' -i v4l/.config
|
||||||
sed -e 's/CONFIG_DVB_LGDT3306A=m/# CONFIG_DVB_LGDT3306A is not set/g' -i v4l/.config
|
sed -e 's/CONFIG_DVB_LGDT3306A=m/# CONFIG_DVB_LGDT3306A is not set/g' -i v4l/.config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# add menuconfig to edit .config
|
# add menuconfig to edit .config
|
||||||
kernel_make VER=$KERNEL_VER SRCDIR=$(kernel_path)
|
kernel_make VER=${KERNEL_VER} SRCDIR=$(kernel_path)
|
||||||
}
|
}
|
||||||
|
|
||||||
makeinstall_target() {
|
makeinstall_target() {
|
||||||
install_driver_addon_files "$PKG_BUILD/v4l/"
|
install_driver_addon_files "${PKG_BUILD}/v4l/"
|
||||||
}
|
}
|
||||||
|
@ -8,13 +8,13 @@ PKG_LICENSE="GPL"
|
|||||||
PKG_SITE="https://git.linuxtv.org/media_tree.git"
|
PKG_SITE="https://git.linuxtv.org/media_tree.git"
|
||||||
PKG_URL="http://linuxtv.org/downloads/drivers/linux-media-${PKG_VERSION}.tar.bz2"
|
PKG_URL="http://linuxtv.org/downloads/drivers/linux-media-${PKG_VERSION}.tar.bz2"
|
||||||
PKG_DEPENDS_TARGET="toolchain"
|
PKG_DEPENDS_TARGET="toolchain"
|
||||||
PKG_NEED_UNPACK="$LINUX_DEPENDS"
|
PKG_NEED_UNPACK="${LINUX_DEPENDS}"
|
||||||
PKG_LONGDESC="Source of Linux Kernel media_tree subsystem to build with media_build."
|
PKG_LONGDESC="Source of Linux Kernel media_tree subsystem to build with media_build."
|
||||||
PKG_TOOLCHAIN="manual"
|
PKG_TOOLCHAIN="manual"
|
||||||
|
|
||||||
unpack() {
|
unpack() {
|
||||||
mkdir -p $PKG_BUILD/
|
mkdir -p ${PKG_BUILD}/
|
||||||
tar -xf $SOURCES/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.bz2 -C $PKG_BUILD/
|
tar -xf ${SOURCES}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.bz2 -C ${PKG_BUILD}/
|
||||||
}
|
}
|
||||||
|
|
||||||
post_unpack() {
|
post_unpack() {
|
||||||
@ -22,7 +22,7 @@ post_unpack() {
|
|||||||
# without removing atomisp there a lot additional includes that
|
# without removing atomisp there a lot additional includes that
|
||||||
# slowdown build process after modpost from 3min to 6min
|
# slowdown build process after modpost from 3min to 6min
|
||||||
# even if atomisp is disabled via kernel.conf
|
# even if atomisp is disabled via kernel.conf
|
||||||
rm -rf $PKG_BUILD/drivers/staging/media/atomisp
|
rm -rf ${PKG_BUILD}/drivers/staging/media/atomisp
|
||||||
sed -i 's|^.*drivers/staging/media/atomisp.*$||' \
|
sed -i 's|^.*drivers/staging/media/atomisp.*$||' \
|
||||||
$PKG_BUILD/drivers/staging/media/Kconfig
|
${PKG_BUILD}/drivers/staging/media/Kconfig
|
||||||
}
|
}
|
||||||
|
@ -6,15 +6,15 @@ PKG_VERSION="2020-02-14"
|
|||||||
PKG_SHA256="c81d0412c8f237ecf30100ba1260625ca25df463102af331b063f4a7dca164f5"
|
PKG_SHA256="c81d0412c8f237ecf30100ba1260625ca25df463102af331b063f4a7dca164f5"
|
||||||
PKG_LICENSE="GPL"
|
PKG_LICENSE="GPL"
|
||||||
PKG_SITE="https://bitbucket.org/CrazyCat/media_build/downloads/"
|
PKG_SITE="https://bitbucket.org/CrazyCat/media_build/downloads/"
|
||||||
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
PKG_URL="${DISTRO_SRC}/${PKG_NAME}-${PKG_VERSION}.tar.bz2"
|
||||||
PKG_DEPENDS_TARGET="toolchain"
|
PKG_DEPENDS_TARGET="toolchain"
|
||||||
PKG_NEED_UNPACK="$LINUX_DEPENDS"
|
PKG_NEED_UNPACK="${LINUX_DEPENDS}"
|
||||||
PKG_LONGDESC="Source of Linux Kernel media_tree subsystem to build with media_build."
|
PKG_LONGDESC="Source of Linux Kernel media_tree subsystem to build with media_build."
|
||||||
PKG_TOOLCHAIN="manual"
|
PKG_TOOLCHAIN="manual"
|
||||||
|
|
||||||
unpack() {
|
unpack() {
|
||||||
mkdir -p $PKG_BUILD/
|
mkdir -p ${PKG_BUILD}/
|
||||||
tar -xf $SOURCES/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.bz2 -C $PKG_BUILD/
|
tar -xf ${SOURCES}/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.bz2 -C ${PKG_BUILD}/
|
||||||
}
|
}
|
||||||
|
|
||||||
post_unpack() {
|
post_unpack() {
|
||||||
@ -22,7 +22,7 @@ post_unpack() {
|
|||||||
# without removing atomisp there a lot additional includes that
|
# without removing atomisp there a lot additional includes that
|
||||||
# slowdown build process after modpost from 3min to 6min
|
# slowdown build process after modpost from 3min to 6min
|
||||||
# even if atomisp is disabled via kernel.conf
|
# even if atomisp is disabled via kernel.conf
|
||||||
rm -rf $PKG_BUILD/drivers/staging/media/atomisp
|
rm -rf ${PKG_BUILD}/drivers/staging/media/atomisp
|
||||||
sed -i 's|^.*drivers/staging/media/atomisp.*$||' \
|
sed -i 's|^.*drivers/staging/media/atomisp.*$||' \
|
||||||
$PKG_BUILD/drivers/staging/media/Kconfig
|
${PKG_BUILD}/drivers/staging/media/Kconfig
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ PKG_SITE="https://github.com/DigitalDevices/dddvb/"
|
|||||||
PKG_URL="https://github.com/DigitalDevices/dddvb/archive/${PKG_VERSION}.tar.gz"
|
PKG_URL="https://github.com/DigitalDevices/dddvb/archive/${PKG_VERSION}.tar.gz"
|
||||||
PKG_DEPENDS_TARGET="toolchain linux"
|
PKG_DEPENDS_TARGET="toolchain linux"
|
||||||
PKG_BUILD_DEPENDS_TARGET="toolchain linux"
|
PKG_BUILD_DEPENDS_TARGET="toolchain linux"
|
||||||
PKG_NEED_UNPACK="$LINUX_DEPENDS"
|
PKG_NEED_UNPACK="${LINUX_DEPENDS}"
|
||||||
PKG_SECTION="driver.dvb"
|
PKG_SECTION="driver.dvb"
|
||||||
PKG_LONGDESC="DVB driver for Digital Devices cards"
|
PKG_LONGDESC="DVB driver for Digital Devices cards"
|
||||||
|
|
||||||
@ -25,5 +25,5 @@ make_target() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
makeinstall_target() {
|
makeinstall_target() {
|
||||||
install_driver_addon_files "$PKG_BUILD/ddbridge $PKG_BUILD/dvb-core $PKG_BUILD/frontends"
|
install_driver_addon_files "${PKG_BUILD}/ddbridge ${PKG_BUILD}/dvb-core ${PKG_BUILD}/frontends"
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ PKG_ADDON_VERSION="${ADDON_VERSION}.${PKG_REV}"
|
|||||||
|
|
||||||
PKG_KERNEL_CFG_FILE=$(kernel_config_path) || die
|
PKG_KERNEL_CFG_FILE=$(kernel_config_path) || die
|
||||||
|
|
||||||
if ! grep -q ^CONFIG_USB_PCI= ${PKG_KERNEL_CFG_FILE} ; then
|
if ! grep -q ^CONFIG_USB_PCI= ${PKG_KERNEL_CFG_FILE}; then
|
||||||
PKG_PATCH_DIRS="disable-pci"
|
PKG_PATCH_DIRS="disable-pci"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -30,14 +30,14 @@ pre_make_target() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
make_target() {
|
make_target() {
|
||||||
cp -RP $(get_build_dir media_tree)/* $PKG_BUILD/linux
|
cp -RP $(get_build_dir media_tree)/* ${PKG_BUILD}/linux
|
||||||
|
|
||||||
# make config all
|
# make config all
|
||||||
kernel_make VER=$KERNEL_VER SRCDIR=$(kernel_path) allyesconfig
|
kernel_make VER=${KERNEL_VER} SRCDIR=$(kernel_path) allyesconfig
|
||||||
|
|
||||||
kernel_make VER=$KERNEL_VER SRCDIR=$(kernel_path)
|
kernel_make VER=${KERNEL_VER} SRCDIR=$(kernel_path)
|
||||||
}
|
}
|
||||||
|
|
||||||
makeinstall_target() {
|
makeinstall_target() {
|
||||||
install_driver_addon_files "$PKG_BUILD/v4l/"
|
install_driver_addon_files "${PKG_BUILD}/v4l/"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user