Merge pull request #2470 from Raybuntu/WP2_unification

Move WeTek_Play_2 to Amlogic
This commit is contained in:
Alex Deryskyba 2018-02-07 00:33:49 +02:00 committed by GitHub
commit ba71faf9ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 23 additions and 15326 deletions

View File

@ -33,7 +33,7 @@ PKG_TOOLCHAIN="manual"
makeinstall_target() {
mkdir -p $INSTALL/$(get_full_module_dir)/$PKG_NAME
if [ $PROJECT = "WeTek_Play_2" ]; then
if [ "$DEVICE" = "WeTek_Play_2" ]; then
cp driver/wetekdvb_play2.ko $INSTALL/$(get_full_module_dir)/$PKG_NAME/wetekdvb.ko
else
cp driver/wetekdvb.ko $INSTALL/$(get_full_module_dir)/$PKG_NAME

View File

@ -0,0 +1,21 @@
# Kernel extra targets to build
KERNEL_UBOOT_EXTRA_TARGET="gxbb_p200_2G_wetek_play_2.dtb"
# additional drivers to install:
# for a list of additinoal drivers see packages/linux-drivers
# Space separated list is supported,
# e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2"
ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS brcmap6xxx-aml wetekdvb"
# additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)
# Space separated list is supported,
# e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware"
FIRMWARE="$FIRMWARE brcmfmac_sdio-firmware-aml"
# build and install driver addons (yes / no)
DRIVER_ADDONS_SUPPORT="no"
# driver addons to install:
# for a list of additinoal drivers see packages/linux-driver-addons
# Space separated list is supported,
DRIVER_ADDONS=""

View File

@ -3665,7 +3665,7 @@ CONFIG_NLS_UTF8=y
CONFIG_PRINTK_TIME=y
CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4
# CONFIG_BOOT_PRINTK_DELAY is not set
# CONFIG_DYNAMIC_DEBUG is not set
CONFIG_DYNAMIC_DEBUG=y
#
# Compile-time checks and compiler options

View File

@ -1,2 +0,0 @@
[Sleep]
SuspendMode=false

View File

@ -1,21 +0,0 @@
[Unit]
Description=Debug Shell on /dev/ttyS0
DefaultDependencies=no
ConditionKernelCommandLine=console=ttyS0,115200
[Service]
WorkingDirectory=/storage
Environment="ENV=/etc/profile"
ExecStartPre=/bin/sh -c 'echo -en "\033[?25h"'
ExecStart=/bin/sh
Restart=always
RestartSec=0
StandardInput=tty
TTYPath=/dev/ttyS0
KillMode=process
IgnoreSIGPIPE=no
# bash ignores SIGTERM
KillSignal=SIGHUP
[Install]
WantedBy=sysinit.target

View File

@ -1,71 +0,0 @@
#!/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 <http://www.gnu.org/licenses/>.
################################################################################
hdmimode=1080p60hz
# Parse command line arguments
for arg in $(cat /proc/cmdline); do
case $arg in
hdmimode=*)
hdmimode="${arg#*=}"
;;
esac
done
# Set colorspace to avoid no HDMI signal with non-4K output modes
echo 422,8bit > /sys/class/amhdmitx/amhdmitx0/attr
# Enable first framebuffer
echo 0 > /sys/class/graphics/fb0/blank
# Disable second framebuffer
echo 1 > /sys/class/graphics/fb1/blank
# Disable framebuffer scaling
echo 0 > /sys/class/graphics/fb0/free_scale
echo 0 > /sys/class/graphics/fb1/free_scale
# set initial video state
echo 1 > /sys/class/video/disable_video
# Set framebuffer geometry to match the resolution
case $hdmimode in
480*) X=720 Y=480 ;;
576*) X=720 Y=576 ;;
720p*) X=1280 Y=720 ;;
*) X=1920 Y=1080 ;;
esac
fbset -fb /dev/fb0 -g $X $Y 1920 2160 32
fbset -fb /dev/fb1 -g 32 32 32 32 32
# Enable scaling for 4K output
case $hdmimode in
4k*|smpte*|2160*)
echo 0 0 1919 1079 > /sys/class/graphics/fb0/free_scale_axis
echo 0 0 3839 2159 > /sys/class/graphics/fb0/window_axis
echo 1920 > /sys/class/graphics/fb0/scale_width
echo 1080 > /sys/class/graphics/fb0/scale_height
echo 0x10001 > /sys/class/graphics/fb0/free_scale
;;
esac
# Include deinterlacer into default VFM map
echo rm default > /sys/class/vfm/map
echo add default decoder ppmgr deinterlace amvideo > /sys/class/vfm/map

View File

@ -1,4 +0,0 @@
<advancedsettings>
<cputempcommand>cputemp</cputempcommand>
<gputempcommand>gputemp</gputempcommand>
</advancedsettings>

File diff suppressed because it is too large Load Diff

View File

@ -1,136 +0,0 @@
################################################################################
# setup system defaults
################################################################################
# The TARGET_CPU variable controls which processor should be targeted for
# generated code.
case $TARGET_ARCH in
aarch64)
# TARGET_CPU:
# arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm7m arm7d
# arm7dm arm7di arm7dmi arm70 arm700 arm700i arm710 arm710c
# arm7100 arm720 arm7500 arm7500fe arm7tdmi arm7tdmi-s arm710t
# arm720t arm740t strongarm strongarm110 strongarm1100
# strongarm1110 arm8 arm810 arm9 arm9e arm920 arm920t arm922t
# arm946e-s arm966e-s arm968e-s arm926ej-s arm940t arm9tdmi
# arm10tdmi arm1020t arm1026ej-s arm10e arm1020e arm1022e
# arm1136j-s arm1136jf-s mpcore mpcorenovfp arm1156t2-s
# arm1176jz-s arm1176jzf-s cortex-a8 cortex-a9 cortex-r4
# cortex-r4f cortex-m3 cortex-m1 xscale iwmmxt iwmmxt2 ep9312.
#
TARGET_CPU="cortex-a53"
TARGET_CPU_FLAGS="+crc+fp+simd"
TARGET_FEATURES="64bit neon"
;;
arm)
TARGET_KERNEL_ARCH="arm64"
TARGET_PATCH_ARCH="aarch64"
TARGET_FLOAT=hard
TARGET_CPU="cortex-a53"
TARGET_CPU_FLAGS="+crc"
TARGET_FPU="neon-fp-armv8"
TARGET_FEATURES="32bit neon"
;;
esac
# Bootloader to use (syslinux / u-boot / atv-bootloader / bcm2835-bootloader)
BOOTLOADER="u-boot"
# u-boot version to use (default)
UBOOT_VERSION="vendor"
# Configuration for u-boot
UBOOT_CONFIG=""
# Target Configfile for u-boot
UBOOT_CONFIGFILE=""
# Kernel target
KERNEL_TARGET="Image.lzo"
# Kernel extra targets to build
KERNEL_UBOOT_EXTRA_TARGET="gxbb_p200_2G_wetek_play_2.dtb"
# Build Android kernel image using mkbootimg
BUILD_ANDROID_BOOTIMG="yes"
# Additional options to be passed to Android mkbootimg
ANDROID_BOOTIMG_OPTIONS="--base 0x0 --kernel_offset 0x1080000"
# Additional kernel make parameters (for example to specify the u-boot loadaddress)
KERNEL_MAKE_EXTRACMD=""
# Kernel to use. values can be:
# default: default mainline kernel
LINUX="amlogic-3.14"
################################################################################
# setup build defaults
################################################################################
# Project CFLAGS
PROJECT_CFLAGS=""
# SquashFS compression method (gzip / lzo / xz)
SQUASHFS_COMPRESSION="lzo"
################################################################################
# setup project defaults
################################################################################
# build and install ALSA Audio support (yes / no)
ALSA_SUPPORT="yes"
# OpenGL(X) implementation to use (no / Mesa)
OPENGL="no"
# OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q / opengl-meson6)
OPENGLES="opengl-meson"
# Amlogic Meson SOC family (8 / 6 / gxbb)
MESON_FAMILY="gxbb"
# include uvesafb support (yes / no)
UVESAFB_SUPPORT="no"
# Displayserver to use (x11 / no)
DISPLAYSERVER="no"
# Windowmanager to use (ratpoison / fluxbox / none)
WINDOWMANAGER="none"
# Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,nvidia,nouveau)
# Space separated list is supported,
# e.g. GRAPHIC_DRIVERS="i915 i965 r300 r600 radeonsi nvidia nouveau"
GRAPHIC_DRIVERS=""
# KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap / libamcodec)
KODIPLAYER_DRIVER="libamcodec"
# Modules to install in initramfs for early boot
INITRAMFS_MODULES=""
# additional drivers to install:
# for a list of additinoal drivers see packages/linux-drivers
# Space separated list is supported,
# e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2"
ADDITIONAL_DRIVERS="gpu-aml brcmap6xxx-aml wetekdvb"
# additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)
# Space separated list is supported,
# e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware"
FIRMWARE="misc-firmware wlan-firmware dvb-firmware brcmfmac_sdio-firmware-aml"
# build and install ATV IR remote support (yes / no)
ATVCLIENT_SUPPORT="no"
# build with installer (yes / no)
INSTALLER_SUPPORT="no"
# extra build dependeices
EXTRA_DEPS="mkimage"
EXTRA_DEPS_PKG="u-boot-tools"
# kernel image name
KERNEL_NAME="kernel.img"

View File

@ -1,13 +0,0 @@
diff --git a/drivers/amlogic/display/logo/logo.c b/drivers/amlogic/display/logo/logo.c
index 9266be3..c2f10bd 100644
--- a/drivers/amlogic/display/logo/logo.c
+++ b/drivers/amlogic/display/logo/logo.c
@@ -117,7 +117,7 @@ int set_osd_freescaler(int index, enum vmode_e new_mode)
static int refresh_mode_and_logo(bool first)
{
enum vmode_e cur_mode = VMODE_MAX;
- int hdp_state = get_hpd_state();
+ int hdp_state = 1;//get_hpd_state();
if (!first && osd_get_logo_index() != logo_info.index)
return -1;

View File

@ -1,46 +0,0 @@
diff --git a/drivers/amlogic/display/logo/logo.c b/drivers/amlogic/display/logo/logo.c
index 9266be3..6803f10 100644
--- a/drivers/amlogic/display/logo/logo.c
+++ b/drivers/amlogic/display/logo/logo.c
@@ -246,6 +246,7 @@ __setup("logo=", logo_setup);
static int __init get_hdmi_mode(char *str)
{
hdmimode = vmode_name_to_mode(str);
+ set_vout_init_vmode(str);
pr_info("get hdmimode: %s\n", str);
return 1;
diff --git a/drivers/amlogic/display/vout/vout_serve.c b/drivers/amlogic/display/vout/vout_serve.c
index fae61b3..a248367 100644
--- a/drivers/amlogic/display/vout/vout_serve.c
+++ b/drivers/amlogic/display/vout/vout_serve.c
@@ -664,7 +664,16 @@ static int __init get_vout_init_mode(char *str)
return 0;
}
-__setup("vout=", get_vout_init_mode);
+//__setup("vout=", get_vout_init_mode);
+
+void set_vout_init_vmode(char *str)
+{
+ char str2[1024];
+ strcpy(str2, str);
+ strcat(str2, ",en"); // logo was already displayed by uboot
+ get_vout_init_mode(str2);
+}
+EXPORT_SYMBOL(set_vout_init_vmode);
MODULE_AUTHOR("Platform-BJ <platform.bj@amlogic.com>");
MODULE_DESCRIPTION("VOUT Server Module");
diff --git a/include/linux/amlogic/vout/vout_notify.h b/include/linux/amlogic/vout/vout_notify.h
index 2e4922a..659da93 100644
--- a/include/linux/amlogic/vout/vout_notify.h
+++ b/include/linux/amlogic/vout/vout_notify.h
@@ -102,6 +102,7 @@ extern enum vmode_e validate_vmode2(char *);
extern void set_vout2_mode_internal(char *name);
extern enum vmode_e get_logo_vmode(void);
extern int set_logo_vmode(enum vmode_e);
+extern void set_vout_init_vmode(char *);
extern int vout2_suspend(void);
extern int vout2_resume(void);

File diff suppressed because it is too large Load Diff