From fb2d2ea1300a9e1077ea44ad341d9c8661de15c4 Mon Sep 17 00:00:00 2001 From: lupeng Date: Mon, 25 Feb 2019 10:17:02 +0800 Subject: [PATCH] [mali]1.fb0 set 480x896 forbid mali400 crash 2.unavail wayland forbid eglfs segmentation fault. 3.add QtTest package for Qt Test --- package/netease/QtTest/Makefile | 85 +++++++++++++++++++ package/netease/QtTest/src/QtTest.pro | 20 +++++ package/netease/QtTest/src/main.cpp | 11 +++ package/netease/QtTest/src/mainwindow.cpp | 11 +++ package/netease/QtTest/src/mainwindow.h | 15 ++++ package/netease/clockFrame/clockFrame.sh | 4 +- package/qt/qt5/files/qt-env.sh | 6 +- .../mandolin-c1evb/configs/sys_config.fex | 40 ++++----- target/allwinner/mandolin-c1evb/defconfig | 19 ++--- 9 files changed, 172 insertions(+), 39 deletions(-) create mode 100755 package/netease/QtTest/Makefile create mode 100755 package/netease/QtTest/src/QtTest.pro create mode 100755 package/netease/QtTest/src/main.cpp create mode 100755 package/netease/QtTest/src/mainwindow.cpp create mode 100755 package/netease/QtTest/src/mainwindow.h diff --git a/package/netease/QtTest/Makefile b/package/netease/QtTest/Makefile new file mode 100755 index 000000000..9d3f6ca41 --- /dev/null +++ b/package/netease/QtTest/Makefile @@ -0,0 +1,85 @@ +include $(TOPDIR)/rules.mk +include $(BUILD_DIR)/kernel.mk + +PKG_NAME:=QtTest +PKG_VERSION:=1 +PKG_RELEASE:=1 + +QMAKE_R311 := $(STAGING_DIR)/host/bin/qmake +QMAKE_SPECFILE:=$(STAGING_DIR)/usr/mkspecs/linux-openwrt-g++ + +TARGET_INCDIRS += $(STAGING_DIR)/include -I$(STAGING_DIR)/usr/include +TARGET_LIBDIRS += $(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib + +PKG_BUILD_DIR := $(COMPILE_DIR)/$(PKG_NAME) + +include $(BUILD_DIR)/package.mk + +define Package/$(PKG_NAME) + SECTION:=utils + CATEGORY:=Netease + TITLE:=$(PKG_NAME) app + DEPENDS:=+qt5-gui +qt5-core +qt5-widgets +endef + +define Package/$(PKG_NAME)/description + $(PKG_NAME) app +endef + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) + $(CP) -r ./src/* $(PKG_BUILD_DIR)/ +endef + +define Build/Configure + TARGET_CC="$(TARGET_CROSS)gcc" \ + TARGET_CXX="$(TARGET_CROSS)g++" \ + TARGET_AR="$(TARGET_CROSS)ar cqs" \ + TARGET_OBJCOPY="$(TARGET_CROSS)objcopy" \ + TARGET_RANLIB="$(TARGET_CROSS)ranlib" \ + TARGET_CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ + TARGET_CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ + TARGET_LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \ + TARGET_INCDIRS="$(TARGET_INCDIRS)" \ + TARGET_LIBDIRS="$(TARGET_LIBDIRS)" \ + TARGET_LIBS="$(TARGET_LIBS)" \ + STAGING_DIR_HOST="$(STAGING_DIR_HOST)" \ + STAGING_DIR="$(STAGING_DIR)" \ + PKG_BUILD_DIR="$(PKG_BUILD_DIR)" \ + $(QMAKE_R311) \ + -spec $(QMAKE_SPECFILE) \ + -o $(PKG_BUILD_DIR)/Makefile \ + $(2) \ + $(PKG_BUILD_DIR)/$(1).pro -d +endef + +define Build/Compile + TARGET_CC="$(TARGET_CROSS)gcc" \ + TARGET_CXX="$(TARGET_CROSS)g++" \ + TARGET_AR="$(TARGET_CROSS)ar cqs" \ + TARGET_OBJCOPY="$(TARGET_CROSS)objcopy" \ + TARGET_RANLIB="$(TARGET_CROSS)ranlib" \ + TARGET_CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ + TARGET_CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \ + TARGET_LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \ + TARGET_INCDIRS="$(TARGET_INCDIRS)" \ + TARGET_LIBDIRS="$(TARGET_LIBDIRS)" \ + TARGET_LIBS="$(TARGET_LIBS)" \ + STAGING_DIR_HOST="$(STAGING_DIR_HOST)" \ + STAGING_DIR="$(STAGING_DIR)" \ + $(MAKE) -C $(PKG_BUILD_DIR)/ \ + ARCH="$(TARGET_ARCH)" \ + AR="$(TARGET_AR)" \ + CC="$(TARGET_CC)" \ + CXX="$(TARGET_CXX)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" +endef + + +define Package/$(PKG_NAME)/install + $(INSTALL_DIR) $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,$(PKG_NAME))) \ No newline at end of file diff --git a/package/netease/QtTest/src/QtTest.pro b/package/netease/QtTest/src/QtTest.pro new file mode 100755 index 000000000..3a54f8770 --- /dev/null +++ b/package/netease/QtTest/src/QtTest.pro @@ -0,0 +1,20 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2018-11-14T14:17:23 +# +#------------------------------------------------- + +QT += core gui widgets + +TARGET = QtTest +TEMPLATE = app + +CONFIG += c++11 + +SOURCES += \ + main.cpp \ + mainwindow.cpp + +HEADERS += \ + mainwindow.h + \ No newline at end of file diff --git a/package/netease/QtTest/src/main.cpp b/package/netease/QtTest/src/main.cpp new file mode 100755 index 000000000..bdaaa98d7 --- /dev/null +++ b/package/netease/QtTest/src/main.cpp @@ -0,0 +1,11 @@ +#include "mainwindow.h" +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + MainWindow w; + w.show(); + + return a.exec(); +} diff --git a/package/netease/QtTest/src/mainwindow.cpp b/package/netease/QtTest/src/mainwindow.cpp new file mode 100755 index 000000000..be3bafe39 --- /dev/null +++ b/package/netease/QtTest/src/mainwindow.cpp @@ -0,0 +1,11 @@ +#include "mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent) +{ + this->setStyleSheet("background-color:red;"); +} + +MainWindow::~MainWindow() +{ +} diff --git a/package/netease/QtTest/src/mainwindow.h b/package/netease/QtTest/src/mainwindow.h new file mode 100755 index 000000000..311ec49c1 --- /dev/null +++ b/package/netease/QtTest/src/mainwindow.h @@ -0,0 +1,15 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = nullptr); + ~MainWindow(); +}; + +#endif // MAINWINDOW_H diff --git a/package/netease/clockFrame/clockFrame.sh b/package/netease/clockFrame/clockFrame.sh index e6ced93d1..b1c5ae30c 100644 --- a/package/netease/clockFrame/clockFrame.sh +++ b/package/netease/clockFrame/clockFrame.sh @@ -1,5 +1,5 @@ #!/bin/sh source /etc/qt-env.sh -democlock -platform linuxfb -#democlock -platform eglfs +#democlock -platform linuxfb +democlock -platform eglfs diff --git a/package/qt/qt5/files/qt-env.sh b/package/qt/qt5/files/qt-env.sh index 1d196b974..f41c6c763 100755 --- a/package/qt/qt5/files/qt-env.sh +++ b/package/qt/qt5/files/qt-env.sh @@ -1,11 +1,11 @@ #!/bin/sh -export QT_QPA_PLATFORM=linuxfb:size=854x480 +export QT_QPA_PLATFORM=eglfs:size=896x480 export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/qt5/plugins export QT_QPA_FONTDIR=/usr/lib/fonts export QT_QPA_GENERIC_PLUGINS=tslib -#export QT_QPA_EGLFS_INTEGRATION=none -#export XDG_RUNTIME_DIR=/dev/shm +export QT_QPA_EGLFS_INTEGRATION=none +export XDG_RUNTIME_DIR=/dev/shm #export QT_QPA_GENERIC_PLUGINS=evdevmouse:/dev/input/event1 export QT_QPA_GENERIC_PLUGINS=evdevkeyboard:/dev/input/event0 export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event4:rotate=90 diff --git a/target/allwinner/mandolin-c1evb/configs/sys_config.fex b/target/allwinner/mandolin-c1evb/configs/sys_config.fex index 9453fd88a..fd76d8d74 100755 --- a/target/allwinner/mandolin-c1evb/configs/sys_config.fex +++ b/target/allwinner/mandolin-c1evb/configs/sys_config.fex @@ -500,9 +500,9 @@ screen0_output_format = 0 screen1_output_type = 1 screen1_output_mode = 4 -fb0_format = 8 +fb0_format = 0 fb0_width = 480 -fb0_height = 854 +fb0_height = 896 fb1_format = 0 fb1_width = 0 @@ -1422,28 +1422,28 @@ pmu_powkey_on_time = 1000 [regulator0] compatible = "pmu1736-regulator" regulator_count = 23 -regulator1 = "pmu1736_dcdc1 none vcc-pd vcc-pc vcc-pf vcc-3v3 vcc-sdc vcc-io vcc-usb vcc-sec vcc-nand" +regulator1 = "pmu1736_dcdc1 none vcc-pd vcc-3v3 vcc-emmc vcc-sdc vcc-io vcc-usb vcc-sensor" regulator2 = "pmu1736_dcdc2 none vdd-cpua" -regulator3 = "pmu1736_dcdc3 none " -regulator4 = "pmu1736_dcdc4 none vdd-sys vdd-usb vdd-dram" -regulator5 = "pmu1736_dcdc5 none vcc-dram" +regulator3 = "pmu1736_dcdc3 none vdd-cpub" +regulator4 = "pmu1736_dcdc4 none vdd-sys vdd-gpu" +regulator5 = "pmu1736_dcdc5 none vcc-dram vcc-1v1 vcc-1v2 vcc-1v5 vcc-1v35" regulator6 = "pmu1736_dcdc6 none vcc-wifi" regulator7 = "pmu1736_rtc none vcc-rtc" -regulator8 = "pmu1736_aldo1 none vcc-pl vcc-wifi-io" -regulator9 = "pmu1736_aldo2 none vdd18-dram" +regulator8 = "pmu1736_aldo1 none vcc-pg vcc-wifi-io" +regulator9 = "pmu1736_aldo2 none vdd18-dram vdd18-lpddr " regulator10 = "pmu1736_aldo3 none avcc vcc-pll" -regulator11 = "pmu1736_aldo4 none vcc-mcub netease-io" -regulator12 = "pmu1736_aldo5 none " -regulator13 = "pmu1736_bldo1 none " -regulator14 = "pmu1736_bldo2 none vcc-pe" -regulator15 = "pmu1736_bldo3 none " -regulator16 = "pmu1736_bldo4 none " -regulator17 = "pmu1736_bldo5 none vdd-dsi vcc-efuse vcc-cpvin vcc-lvds vcc-mcsi" -regulator18 = "pmu1736_cldo1 none " -regulator19 = "pmu1736_cldo2 none " -regulator20 = "pmu1736_cldo3 none " -regulator21 = "pmu1736_cldo4 none " -regulator22 = "pmu1736_cpusldo none vdd-cpus" +regulator11 = "pmu1736_aldo4 none vcc-pl vcc-tvout netease-io" +regulator12 = "pmu1736_aldo5 none vpp-dram" +regulator13 = "pmu1736_bldo1 none vcc-csi" +regulator14 = "pmu1736_bldo2 none vcc-pe iovdd-csi afvcc-csi" +regulator15 = "pmu1736_bldo3 none avdd-csi-r avdd-csi-f" +regulator16 = "pmu1736_bldo4 none vdd-csi dvdd-csi" +regulator17 = "pmu1736_bldo5 none vdd-dsi vcc-efuse vcc-pc vcc-cpvin vcc-lvds vcc-mcsi" +regulator18 = "pmu1736_cldo1 none vcc-ctp" +regulator19 = "pmu1736_cldo2 none vcc-pf" +regulator20 = "pmu1736_cldo3 none vcc-motor" +regulator21 = "pmu1736_cldo4 none vccio-dcxo vccio-wifi" +regulator22 = "pmu1736_cpusldo none vdd-cpus vdd-usb" regulator23 = "pmu1736_dc1sw none vcc-lcd" ;-------------------------------------------------------------------------------------------------------- diff --git a/target/allwinner/mandolin-c1evb/defconfig b/target/allwinner/mandolin-c1evb/defconfig index b7180052f..75c01a208 100755 --- a/target/allwinner/mandolin-c1evb/defconfig +++ b/target/allwinner/mandolin-c1evb/defconfig @@ -2911,6 +2911,7 @@ CONFIG_PACKAGE_KPlatinum=y CONFIG_PACKAGE_KPlayer=y CONFIG_PACKAGE_KPlayerTest=y CONFIG_PACKAGE_NeteaseInitScript=y +CONFIG_PACKAGE_QtTest=y CONFIG_PACKAGE_SPlayer=y CONFIG_PACKAGE_SPlayer-demo=y CONFIG_PACKAGE_alarmer=y @@ -4686,17 +4687,7 @@ CONFIG_PACKAGE_whereis=y # # Wayland # -CONFIG_PACKAGE_glmark2=y -CONFIG_GLMARK2_FBDEV=y -CONFIG_GLMARK2_WAYLAND=y -CONFIG_PACKAGE_wayland=y -CONFIG_PACKAGE_wayland-protocols=y -CONFIG_PACKAGE_weston=y -CONFIG_WESTON_DBUS=y -# CONFIG_WESTON_LAUNCH is not set -CONFIG_WESTON_OPENGL_ES=y -CONFIG_WESTON_FBDEV=y -CONFIG_WESTON_DRM=y -# CONFIG_WESTON_LCMS2 is not set -# CONFIG_WESTON_LIBXML2 is not set -CONFIG_WESTON_DEMO_CLIENTS=y +# CONFIG_PACKAGE_glmark2 is not set +# CONFIG_PACKAGE_wayland is not set +# CONFIG_PACKAGE_wayland-protocols is not set +# CONFIG_PACKAGE_weston is not set