mirror of
https://github.com/lxsang/meta-rpi-diya.git
synced 2025-08-07 00:20:33 +02:00
Compare commits
1 Commits
2c10017bbb
...
sdl_vnc_cl
Author | SHA1 | Date | |
---|---|---|---|
2aab000c04 |
@ -1,17 +0,0 @@
|
|||||||
# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
|
|
||||||
# changes incompatibly
|
|
||||||
POKY_BBLAYERS_CONF_VERSION = "2"
|
|
||||||
|
|
||||||
BBPATH = "${TOPDIR}"
|
|
||||||
BBFILES ?= ""
|
|
||||||
|
|
||||||
BBLAYERS ?= " \
|
|
||||||
/home/dany/experiments/poky/meta \
|
|
||||||
/home/dany/experiments/poky/meta-poky \
|
|
||||||
/home/dany/experiments/poky/meta-yocto-bsp \
|
|
||||||
/home/dany/experiments/yocto-layers/meta-raspberrypi \
|
|
||||||
/home/dany/workspace/meta-rpi-diya \
|
|
||||||
/home/dany/experiments/yocto-layers/meta-openembedded/meta-oe \
|
|
||||||
/home/dany/experiments/yocto-layers/meta-openembedded/meta-python \
|
|
||||||
/home/dany/experiments/yocto-layers/meta-openembedded/meta-multimedia \
|
|
||||||
"
|
|
@ -5,27 +5,21 @@ BBPATH .= ":${LAYERDIR}"
|
|||||||
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
|
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
|
||||||
${LAYERDIR}/recipes-*/*/*.bbappend"
|
${LAYERDIR}/recipes-*/*/*.bbappend"
|
||||||
|
|
||||||
BBFILE_COLLECTIONS += "meta-rpi-diya"
|
BBFILE_COLLECTIONS += "meta-rpi-pharo"
|
||||||
BBFILE_PATTERN_meta-rpi-diya = "^${LAYERDIR}/"
|
BBFILE_PATTERN_meta-rpi-pharo = "^${LAYERDIR}/"
|
||||||
BBFILE_PRIORITY_meta-rpi-diya = "11"
|
BBFILE_PRIORITY_meta-rpi-pharo = "11"
|
||||||
|
|
||||||
LAYERDEPENDS_meta-rpi-diya = "core raspberrypi"
|
LAYERDEPENDS_meta-rpi-pharo = "core raspberrypi"
|
||||||
LAYERSERIES_COMPAT_meta-rpi-diya = "mickledore"
|
LAYERSERIES_COMPAT_meta-rpi-pharo = "honister"
|
||||||
|
|
||||||
PACKAGE_CLASSES = "package_ipk"
|
PACKAGE_CLASSES = "package_ipk"
|
||||||
|
|
||||||
INITRAMFS_IMAGE="core-image-recovery"
|
|
||||||
INITRAMFS_IMAGE_BUNDLE="0"
|
|
||||||
|
|
||||||
INHERIT += "rm_work"
|
INHERIT += "rm_work"
|
||||||
|
|
||||||
EXTRA_IMAGE_FEATURES ?= " ssh-server-dropbear read-only-rootfs "
|
EXTRA_IMAGE_FEATURES ?= " ssh-server-dropbear read-only-rootfs "
|
||||||
# ssh-server-dropbear
|
# ssh-server-dropbear
|
||||||
DISTRO_FEATURES:append := " vc4-gfx opengl wayland "
|
DISTRO_FEATURES:append := " vc4-gfx opengl "
|
||||||
DISTRO_FEATURES:remove = " x11 vulkan "
|
|
||||||
TOOLCHAIN_TARGET_TASK:append = " libgles3-mesa-dev "
|
|
||||||
# DISTRO_FEATURES:append := " vc4-gfx opengl directfb "
|
# DISTRO_FEATURES:append := " vc4-gfx opengl directfb "
|
||||||
MACHINE ?= "raspberrypi0-2w-64"
|
MACHINE ?= "raspberrypi4-64"
|
||||||
|
|
||||||
WKS_FILE="rpi.wks.in"
|
WKS_FILE="rpi.wks.in"
|
||||||
ROOT_HOME = "/root"
|
ROOT_HOME = "/root"
|
||||||
@ -37,12 +31,8 @@ ROOT_HOME = "/root"
|
|||||||
RPI_USE_U_BOOT = "0"
|
RPI_USE_U_BOOT = "0"
|
||||||
RPI_USE_wS_28_DPI_LCD = "1"
|
RPI_USE_wS_28_DPI_LCD = "1"
|
||||||
# enable usb boot in uboot
|
# enable usb boot in uboot
|
||||||
ENABLE_DWC2_PERIPHERAL = "1"
|
|
||||||
ENABLE_DWC2_HOST = "1"
|
|
||||||
ENABLE_USB_U_BOOT = "0"
|
ENABLE_USB_U_BOOT = "0"
|
||||||
|
|
||||||
ENABLE_UART = "0"
|
ENABLE_UART = "0"
|
||||||
|
|
||||||
DISABLE_SPLASH = "1"
|
DISABLE_SPLASH = "1"
|
||||||
VIDEO_CAMERA = "1"
|
VIDEO_CAMERA = "1"
|
||||||
DISABLE_RPI_BOOT_LOGO = "1"
|
DISABLE_RPI_BOOT_LOGO = "1"
|
||||||
@ -50,32 +40,23 @@ ENABLE_SPI_BUS = "0"
|
|||||||
ENABLE_I2C = "0"
|
ENABLE_I2C = "0"
|
||||||
KERNEL_MODULE_AUTOLOAD:rpi += " i2c-dev "
|
KERNEL_MODULE_AUTOLOAD:rpi += " i2c-dev "
|
||||||
|
|
||||||
VC4DTBO = "vc4-kms-v3d,noaudio"
|
VC4DTBO = "vc4-kms-v3d,nocomposite,noaudio"
|
||||||
|
|
||||||
KERNEL_DEVICETREE:append = " overlays/vc4-kms-dpi-generic.dtbo overlays/dpi24.dtbo "
|
KERNEL_DEVICETREE:append = " overlays/vc4-kms-dpi-generic.dtbo "
|
||||||
|
|
||||||
|
|
||||||
RPI_EXTRA_CONFIG += "${@['','\n\
|
RPI_EXTRA_CONFIG += "${@['','\n\
|
||||||
dtoverlay=vc4-kms-dpi-generic \n\
|
dtoverlay=vc4-kms-dpi-generic,hactive=480,hfp=26,hsync=16,hbp=10 \n\
|
||||||
dtparam=hactive=480,hfp=26,hsync=16,hbp=10 \n\
|
|
||||||
dtparam=vactive=640,vfp=25,vsync=10,vbp=15 \n\
|
dtparam=vactive=640,vfp=25,vsync=10,vbp=15 \n\
|
||||||
dtparam=clock-frequency=32000000 \n\
|
dtparam=clock-frequency=32000000,rgb666-padhi \n\
|
||||||
dtparam=hsync-invert,vsync-invert,pixclk-invert \n\
|
|
||||||
dtparam=rgb666-padhi,rotate=270 \n\
|
|
||||||
dtoverlay=waveshare-28dpi-3b-4b \n\
|
dtoverlay=waveshare-28dpi-3b-4b \n\
|
||||||
dtoverlay=waveshare-28dpi-3b \n\
|
dtoverlay=waveshare-28dpi-3b \n\
|
||||||
dtoverlay=waveshare-28dpi-4b \n']['${RPI_USE_wS_28_DPI_LCD}' == '1']}"
|
dtoverlay=waveshare-28dpi-4b \n\
|
||||||
|
display_rotate=1 #1:90;2: 180; 3: 270 \n']['${RPI_USE_wS_28_DPI_LCD}' == '1']}"
|
||||||
|
|
||||||
RPI_EXTRA_CONFIG += '\n\
|
RPI_EXTRA_CONFIG += '\n\
|
||||||
# enable ads1115 sensor for battery monitoring \n\
|
start_x=1 # essential \n\
|
||||||
dtoverlay=ads1115-i2c-gpio,cha_enable,cha_cfg=4,cha_datarate=7,cha_gain=1 \n\
|
dtparam=audio=on \n\
|
||||||
#start_x=1 # essential \n\
|
gpu_mem=128 # at least, or maybe more if you wish \n\
|
||||||
#gpu_mem=128 # at least, or maybe more if you wish \n\
|
disable_camera_led=1 # optional \n\
|
||||||
#disable_camera_led=1 # optional \n\
|
'
|
||||||
include extraconfig.txt \n\
|
|
||||||
'
|
|
||||||
|
|
||||||
# extra kernel CMDLINE_RNDIS option
|
|
||||||
# CMDLINE_RNDIS += " video=DPI-1:480x640,rotate=90 "
|
|
||||||
# accept license for wifi and bluetooth firmware
|
|
||||||
LICENSE_FLAGS_ACCEPTED = "synaptics-killswitch"
|
|
@ -1,272 +0,0 @@
|
|||||||
#
|
|
||||||
# This file is your local configuration file and is where all local user settings
|
|
||||||
# are placed. The comments in this file give some guide to the options a new user
|
|
||||||
# to the system might want to change but pretty much any configuration option can
|
|
||||||
# be set in this file. More adventurous users can look at local.conf.extended
|
|
||||||
# which contains other examples of configuration which can be placed in this file
|
|
||||||
# but new users likely won't need any of them initially.
|
|
||||||
#
|
|
||||||
# Lines starting with the '#' character are commented out and in some cases the
|
|
||||||
# default values are provided as comments to show people example syntax. Enabling
|
|
||||||
# the option is a question of removing the # character and making any change to the
|
|
||||||
# variable as required.
|
|
||||||
|
|
||||||
#
|
|
||||||
# Machine Selection
|
|
||||||
#
|
|
||||||
# You need to select a specific machine to target the build with. There are a selection
|
|
||||||
# of emulated machines available which can boot and run in the QEMU emulator:
|
|
||||||
#
|
|
||||||
#MACHINE ?= "qemuarm"
|
|
||||||
#MACHINE ?= "qemuarm64"
|
|
||||||
#MACHINE ?= "qemumips"
|
|
||||||
#MACHINE ?= "qemumips64"
|
|
||||||
#MACHINE ?= "qemuppc"
|
|
||||||
#MACHINE ?= "qemux86"
|
|
||||||
#MACHINE ?= "qemux86-64"
|
|
||||||
#
|
|
||||||
# There are also the following hardware board target machines included for
|
|
||||||
# demonstration purposes:
|
|
||||||
#
|
|
||||||
#MACHINE ?= "beaglebone-yocto"
|
|
||||||
#MACHINE ?= "genericx86"
|
|
||||||
#MACHINE ?= "genericx86-64"
|
|
||||||
#MACHINE ?= "edgerouter"
|
|
||||||
#
|
|
||||||
# This sets the default machine to be qemux86-64 if no other machine is selected:
|
|
||||||
|
|
||||||
#
|
|
||||||
# Where to place downloads
|
|
||||||
#
|
|
||||||
# During a first build the system will download many different source code tarballs
|
|
||||||
# from various upstream projects. This can take a while, particularly if your network
|
|
||||||
# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you
|
|
||||||
# can preserve this directory to speed up this part of subsequent builds. This directory
|
|
||||||
# is safe to share between multiple builds on the same machine too.
|
|
||||||
#
|
|
||||||
# The default is a downloads directory under TOPDIR which is the build directory.
|
|
||||||
#
|
|
||||||
#DL_DIR ?= "${TOPDIR}/downloads"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Where to place shared-state files
|
|
||||||
#
|
|
||||||
# BitBake has the capability to accelerate builds based on previously built output.
|
|
||||||
# This is done using "shared state" files which can be thought of as cache objects
|
|
||||||
# and this option determines where those files are placed.
|
|
||||||
#
|
|
||||||
# You can wipe out TMPDIR leaving this directory intact and the build would regenerate
|
|
||||||
# from these files if no changes were made to the configuration. If changes were made
|
|
||||||
# to the configuration, only shared state files where the state was still valid would
|
|
||||||
# be used (done using checksums).
|
|
||||||
#
|
|
||||||
# The default is a sstate-cache directory under TOPDIR.
|
|
||||||
#
|
|
||||||
#SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Where to place the build output
|
|
||||||
#
|
|
||||||
# This option specifies where the bulk of the building work should be done and
|
|
||||||
# where BitBake should place its temporary files and output. Keep in mind that
|
|
||||||
# this includes the extraction and compilation of many applications and the toolchain
|
|
||||||
# which can use Gigabytes of hard disk space.
|
|
||||||
#
|
|
||||||
# The default is a tmp directory under TOPDIR.
|
|
||||||
#
|
|
||||||
#TMPDIR = "${TOPDIR}/tmp"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Default policy config
|
|
||||||
#
|
|
||||||
# The distribution setting controls which policy settings are used as defaults.
|
|
||||||
# The default value is fine for general Yocto project use, at least initially.
|
|
||||||
# Ultimately when creating custom policy, people will likely end up subclassing
|
|
||||||
# these defaults.
|
|
||||||
#
|
|
||||||
DISTRO ?= "poky"
|
|
||||||
# As an example of a subclass there is a "bleeding" edge policy configuration
|
|
||||||
# where many versions are set to the absolute latest code from the upstream
|
|
||||||
# source control systems. This is just mentioned here as an example, its not
|
|
||||||
# useful to most new users.
|
|
||||||
# DISTRO ?= "poky-bleeding"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Package Management configuration
|
|
||||||
#
|
|
||||||
# This variable lists which packaging formats to enable. Multiple package backends
|
|
||||||
# can be enabled at once and the first item listed in the variable will be used
|
|
||||||
# to generate the root filesystems.
|
|
||||||
# Options are:
|
|
||||||
# - 'package_deb' for debian style deb files
|
|
||||||
# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager)
|
|
||||||
# - 'package_rpm' for rpm style packages
|
|
||||||
# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk"
|
|
||||||
# We default to rpm:
|
|
||||||
|
|
||||||
#
|
|
||||||
# SDK target architecture
|
|
||||||
#
|
|
||||||
# This variable specifies the architecture to build SDK items for and means
|
|
||||||
# you can build the SDK packages for architectures other than the machine you are
|
|
||||||
# running the build on (i.e. building i686 packages on an x86_64 host).
|
|
||||||
# Supported values are i686, x86_64, aarch64
|
|
||||||
#SDKMACHINE ?= "i686"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Extra image configuration defaults
|
|
||||||
#
|
|
||||||
# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated
|
|
||||||
# images. Some of these options are added to certain image types automatically. The
|
|
||||||
# variable can contain the following options:
|
|
||||||
# "dbg-pkgs" - add -dbg packages for all installed packages
|
|
||||||
# (adds symbol information for debugging/profiling)
|
|
||||||
# "src-pkgs" - add -src packages for all installed packages
|
|
||||||
# (adds source code for debugging)
|
|
||||||
# "dev-pkgs" - add -dev packages for all installed packages
|
|
||||||
# (useful if you want to develop against libs in the image)
|
|
||||||
# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages
|
|
||||||
# (useful if you want to run the package test suites)
|
|
||||||
# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.)
|
|
||||||
# "tools-debug" - add debugging tools (gdb, strace)
|
|
||||||
# "eclipse-debug" - add Eclipse remote debugging support
|
|
||||||
# "tools-profile" - add profiling tools (oprofile, lttng, valgrind)
|
|
||||||
# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.)
|
|
||||||
# "debug-tweaks" - make an image suitable for development
|
|
||||||
# e.g. ssh root access has a blank password
|
|
||||||
# There are other application targets that can be used here too, see
|
|
||||||
# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details.
|
|
||||||
# We default to enabling the debugging tweaks.
|
|
||||||
|
|
||||||
#
|
|
||||||
# Additional image features
|
|
||||||
#
|
|
||||||
# The following is a list of additional classes to use when building images which
|
|
||||||
# enable extra features. Some available options which can be included in this variable
|
|
||||||
# are:
|
|
||||||
# - 'buildstats' collect build statistics
|
|
||||||
USER_CLASSES ?= "buildstats"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Runtime testing of images
|
|
||||||
#
|
|
||||||
# The build system can test booting virtual machine images under qemu (an emulator)
|
|
||||||
# after any root filesystems are created and run tests against those images. It can also
|
|
||||||
# run tests against any SDK that are built. To enable this uncomment these lines.
|
|
||||||
# See classes/test{image,sdk}.bbclass for further details.
|
|
||||||
#IMAGE_CLASSES += "testimage testsdk"
|
|
||||||
#TESTIMAGE_AUTO:qemuall = "1"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Interactive shell configuration
|
|
||||||
#
|
|
||||||
# Under certain circumstances the system may need input from you and to do this it
|
|
||||||
# can launch an interactive shell. It needs to do this since the build is
|
|
||||||
# multithreaded and needs to be able to handle the case where more than one parallel
|
|
||||||
# process may require the user's attention. The default is iterate over the available
|
|
||||||
# terminal types to find one that works.
|
|
||||||
#
|
|
||||||
# Examples of the occasions this may happen are when resolving patches which cannot
|
|
||||||
# be applied, to use the devshell or the kernel menuconfig
|
|
||||||
#
|
|
||||||
# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none
|
|
||||||
# Note: currently, Konsole support only works for KDE 3.x due to the way
|
|
||||||
# newer Konsole versions behave
|
|
||||||
#OE_TERMINAL = "auto"
|
|
||||||
# By default disable interactive patch resolution (tasks will just fail instead):
|
|
||||||
PATCHRESOLVE = "noop"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Disk Space Monitoring during the build
|
|
||||||
#
|
|
||||||
# Monitor the disk space during the build. If there is less that 1GB of space or less
|
|
||||||
# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully
|
|
||||||
# shutdown the build. If there is less than 100MB or 1K inodes, perform a hard abort
|
|
||||||
# of the build. The reason for this is that running completely out of space can corrupt
|
|
||||||
# files and damages the build in ways which may not be easily recoverable.
|
|
||||||
# It's necessary to monitor /tmp, if there is no space left the build will fail
|
|
||||||
# with very exotic errors.
|
|
||||||
BB_DISKMON_DIRS ??= "\
|
|
||||||
STOPTASKS,${TMPDIR},1G,100K \
|
|
||||||
STOPTASKS,${DL_DIR},1G,100K \
|
|
||||||
STOPTASKS,${SSTATE_DIR},1G,100K \
|
|
||||||
STOPTASKS,/tmp,100M,100K \
|
|
||||||
ABORT,${TMPDIR},100M,1K \
|
|
||||||
ABORT,${DL_DIR},100M,1K \
|
|
||||||
ABORT,${SSTATE_DIR},100M,1K \
|
|
||||||
ABORT,/tmp,10M,1K"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Shared-state files from other locations
|
|
||||||
#
|
|
||||||
# As mentioned above, shared state files are prebuilt cache data objects which can be
|
|
||||||
# used to accelerate build time. This variable can be used to configure the system
|
|
||||||
# to search other mirror locations for these objects before it builds the data itself.
|
|
||||||
#
|
|
||||||
# This can be a filesystem directory, or a remote url such as http or ftp. These
|
|
||||||
# would contain the sstate-cache results from previous builds (possibly from other
|
|
||||||
# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the
|
|
||||||
# cache locations to check for the shared objects.
|
|
||||||
# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH
|
|
||||||
# at the end as shown in the examples below. This will be substituted with the
|
|
||||||
# correct path within the directory structure.
|
|
||||||
#SSTATE_MIRRORS ?= "\
|
|
||||||
#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
|
|
||||||
#file://.* file:///some/local/dir/sstate/PATH"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Yocto Project SState Mirror
|
|
||||||
#
|
|
||||||
# The Yocto Project has prebuilt artefacts available for its releases, you can enable
|
|
||||||
# use of these by uncommenting the following lines. This will mean the build uses
|
|
||||||
# the network to check for artefacts at the start of builds, which does slow it down
|
|
||||||
# equally, it will also speed up the builds by not having to build things if they are
|
|
||||||
# present in the cache. It assumes you can download something faster than you can build it
|
|
||||||
# which will depend on your network.
|
|
||||||
# Note: For this to work you also need hash-equivalence passthrough to the matching server
|
|
||||||
#
|
|
||||||
#BB_HASHSERVE_UPSTREAM = "typhoon.yocto.io:8687"
|
|
||||||
#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/3.4/PATH;downloadfilename=PATH"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Qemu configuration
|
|
||||||
#
|
|
||||||
# By default native qemu will build with a builtin VNC server where graphical output can be
|
|
||||||
# seen. The line below enables the SDL UI frontend too.
|
|
||||||
PACKAGECONFIG:append:pn-qemu-system-native = " sdl"
|
|
||||||
# By default libsdl2-native will be built, if you want to use your host's libSDL instead of
|
|
||||||
# the minimal libsdl built by libsdl2-native then uncomment the ASSUME_PROVIDED line below.
|
|
||||||
#ASSUME_PROVIDED += "libsdl2-native"
|
|
||||||
|
|
||||||
# You can also enable the Gtk UI frontend, which takes somewhat longer to build, but adds
|
|
||||||
# a handy set of menus for controlling the emulator.
|
|
||||||
#PACKAGECONFIG:append:pn-qemu-system-native = " gtk+"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Hash Equivalence
|
|
||||||
#
|
|
||||||
# Enable support for automatically running a local hash equivalence server and
|
|
||||||
# instruct bitbake to use a hash equivalence aware signature generator. Hash
|
|
||||||
# equivalence improves reuse of sstate by detecting when a given sstate
|
|
||||||
# artifact can be reused as equivalent, even if the current task hash doesn't
|
|
||||||
# match the one that generated the artifact.
|
|
||||||
#
|
|
||||||
# A shared hash equivalent server can be set with "<HOSTNAME>:<PORT>" format
|
|
||||||
#
|
|
||||||
#BB_HASHSERVE = "auto"
|
|
||||||
#BB_SIGNATURE_HANDLER = "OEEquivHash"
|
|
||||||
|
|
||||||
#
|
|
||||||
# Memory Resident Bitbake
|
|
||||||
#
|
|
||||||
# Bitbake's server component can stay in memory after the UI for the current command
|
|
||||||
# has completed. This means subsequent commands can run faster since there is no need
|
|
||||||
# for bitbake to reload cache files and so on. Number is in seconds, after which the
|
|
||||||
# server will shut down.
|
|
||||||
#
|
|
||||||
#BB_SERVER_TIMEOUT = "60"
|
|
||||||
|
|
||||||
# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to
|
|
||||||
# track the version of this file when it was generated. This can safely be ignored if
|
|
||||||
# this doesn't mean anything to you.
|
|
||||||
CONF_VERSION = "2"
|
|
@ -1,103 +0,0 @@
|
|||||||
/*
|
|
||||||
* TI ADS1115 multi-channel ADC overlay
|
|
||||||
*/
|
|
||||||
|
|
||||||
/dts-v1/;
|
|
||||||
/plugin/;
|
|
||||||
|
|
||||||
/ {
|
|
||||||
compatible = "brcm,bcm2835";
|
|
||||||
|
|
||||||
fragment@0 {
|
|
||||||
target = <&i2c_gpio>;
|
|
||||||
__overlay__ {
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <0>;
|
|
||||||
status = "okay";
|
|
||||||
|
|
||||||
ads1115: ads1115@48 {
|
|
||||||
compatible = "ti,ads1115";
|
|
||||||
status = "okay";
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <0>;
|
|
||||||
reg = <0x48>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fragment@1 {
|
|
||||||
target = <&ads1115>;
|
|
||||||
__dormant__ {
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <0>;
|
|
||||||
|
|
||||||
channel_a: channel_a {
|
|
||||||
reg = <4>;
|
|
||||||
ti,gain = <1>;
|
|
||||||
ti,datarate = <7>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fragment@2 {
|
|
||||||
target = <&ads1115>;
|
|
||||||
__dormant__ {
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <0>;
|
|
||||||
|
|
||||||
channel_b: channel_b {
|
|
||||||
reg = <5>;
|
|
||||||
ti,gain = <1>;
|
|
||||||
ti,datarate = <7>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fragment@3 {
|
|
||||||
target = <&ads1115>;
|
|
||||||
__dormant__ {
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <0>;
|
|
||||||
|
|
||||||
channel_c: channel_c {
|
|
||||||
reg = <6>;
|
|
||||||
ti,gain = <1>;
|
|
||||||
ti,datarate = <7>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fragment@4 {
|
|
||||||
target = <&ads1115>;
|
|
||||||
__dormant__ {
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <0>;
|
|
||||||
|
|
||||||
channel_d: channel_d {
|
|
||||||
reg = <7>;
|
|
||||||
ti,gain = <1>;
|
|
||||||
ti,datarate = <7>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
__overrides__ {
|
|
||||||
addr = <&ads1115>,"reg:0";
|
|
||||||
cha_enable = <0>,"=1";
|
|
||||||
cha_cfg = <&channel_a>,"reg:0";
|
|
||||||
cha_gain = <&channel_a>,"ti,gain:0";
|
|
||||||
cha_datarate = <&channel_a>,"ti,datarate:0";
|
|
||||||
chb_enable = <0>,"=2";
|
|
||||||
chb_cfg = <&channel_b>,"reg:0";
|
|
||||||
chb_gain = <&channel_b>,"ti,gain:0";
|
|
||||||
chb_datarate = <&channel_b>,"ti,datarate:0";
|
|
||||||
chc_enable = <0>,"=3";
|
|
||||||
chc_cfg = <&channel_c>,"reg:0";
|
|
||||||
chc_gain = <&channel_c>,"ti,gain:0";
|
|
||||||
chc_datarate = <&channel_c>,"ti,datarate:0";
|
|
||||||
chd_enable = <0>,"=4";
|
|
||||||
chd_cfg = <&channel_d>,"reg:0";
|
|
||||||
chd_gain = <&channel_d>,"ti,gain:0";
|
|
||||||
chd_datarate = <&channel_d>,"ti,datarate:0";
|
|
||||||
};
|
|
||||||
};
|
|
@ -1,101 +0,0 @@
|
|||||||
/*
|
|
||||||
* vc4-kms-waveshare-28dpi-overlay.dts
|
|
||||||
*/
|
|
||||||
|
|
||||||
/dts-v1/;
|
|
||||||
/plugin/;
|
|
||||||
|
|
||||||
#include <dt-bindings/gpio/gpio.h>
|
|
||||||
#include <dt-bindings/pinctrl/bcm2835.h>
|
|
||||||
|
|
||||||
/ {
|
|
||||||
compatible = "brcm,bcm2835";
|
|
||||||
fragment@0 {
|
|
||||||
target = <&gpio>;
|
|
||||||
__overlay__ {
|
|
||||||
pwm_pins: pwm_pins {
|
|
||||||
brcm,pins = <18>;
|
|
||||||
brcm,function = <BCM2835_FSEL_ALT5>;
|
|
||||||
brcm,pull = <0>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fragment@1 {
|
|
||||||
target = <&pwm>;
|
|
||||||
frag1: __overlay__ {
|
|
||||||
pinctrl-names = "default";
|
|
||||||
pinctrl-0 = <&pwm_pins>;
|
|
||||||
assigned-clock-rates = <100000000>;
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fragment@2 {
|
|
||||||
target-path = "/";
|
|
||||||
__overlay__ {
|
|
||||||
//#gpio-cells = <2>;
|
|
||||||
/* Panel backlight through PWM0_0 on GPIO18 */
|
|
||||||
backlight_lvds: backlight {
|
|
||||||
compatible = "pwm-backlight";
|
|
||||||
pwms = <&pwm 0 10000000>;
|
|
||||||
brightness-levels = <0 1000>;
|
|
||||||
num-interpolated-steps = <1000>;
|
|
||||||
default-brightness-level = <1000>;
|
|
||||||
};
|
|
||||||
|
|
||||||
panel: panel {
|
|
||||||
reg = <0>;
|
|
||||||
compatible = "panel-dpi";
|
|
||||||
backlight = <&backlight_lvds>;
|
|
||||||
|
|
||||||
width-mm = <154>;
|
|
||||||
height-mm = <86>;
|
|
||||||
bus-format = <0x1015>;
|
|
||||||
|
|
||||||
timing: panel-timing {
|
|
||||||
clock-frequency = <28000000>;
|
|
||||||
hactive = <480>;
|
|
||||||
hfront-porch = <26>;
|
|
||||||
hsync-len = <16>;
|
|
||||||
hback-porch = <10>;
|
|
||||||
hsync-active = <0>;
|
|
||||||
vactive = <640>;
|
|
||||||
vfront-porch = <25>;
|
|
||||||
vsync-len = <10>;
|
|
||||||
vback-porch = <16>;
|
|
||||||
vsync-active = <0>;
|
|
||||||
|
|
||||||
de-active = <1>;
|
|
||||||
pixelclk-active = <1>;
|
|
||||||
};
|
|
||||||
|
|
||||||
port {
|
|
||||||
panel_in: endpoint {
|
|
||||||
remote-endpoint = <&dpi_out>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fragment@3 {
|
|
||||||
target = <&dpi>;
|
|
||||||
dpi_node: __overlay__ {
|
|
||||||
status = "okay";
|
|
||||||
|
|
||||||
pinctrl-names = "default";
|
|
||||||
|
|
||||||
/* refer to /home/pi/linux/arch/arm/boot/dts/bcm270x.dtsi
|
|
||||||
* for the pin multiplex setting
|
|
||||||
*/
|
|
||||||
pinctrl-0 = <&dpi_18bit_cpadhi_gpio0>;
|
|
||||||
|
|
||||||
port {
|
|
||||||
dpi_out: endpoint {
|
|
||||||
remote-endpoint = <&panel_in>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
Binary file not shown.
@ -2,25 +2,13 @@ SUMMARY = "Waveshare 2.8 inch DPI"
|
|||||||
DESCRIPTION = "support overlay layer for Waveshare 2.8 inch DPI"
|
DESCRIPTION = "support overlay layer for Waveshare 2.8 inch DPI"
|
||||||
LICENSE = "MIT"
|
LICENSE = "MIT"
|
||||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||||
inherit devicetree
|
|
||||||
|
|
||||||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
do_deploy () {
|
||||||
SRC_URI = " file://dts/ads1115-i2c-gpio.dts "
|
|
||||||
|
|
||||||
S = "${WORKDIR}/dts"
|
|
||||||
DT_FILES = "ads1115-i2c-gpio.dtbo"
|
|
||||||
|
|
||||||
COMPATIBLE_MACHINE = "raspberrypi.*"
|
|
||||||
|
|
||||||
do_deploy:append () {
|
|
||||||
install -d ${DEPLOY_DIR_IMAGE}
|
install -d ${DEPLOY_DIR_IMAGE}
|
||||||
# install -m 0755 ${B}/vc4-kms-waveshare-28dpi.dtbo ${DEPLOY_DIR_IMAGE}/vc4-kms-waveshare-28dpi.dtbo
|
|
||||||
install -m 0755 ${B}/ads1115-i2c-gpio.dtbo ${DEPLOY_DIR_IMAGE}/ads1115-i2c-gpio.dtbo
|
|
||||||
install -m 0755 ${THISDIR}/files/vc4-kms-DPI-28inch.dtbo ${DEPLOY_DIR_IMAGE}/vc4-kms-DPI-28inch.dtbo
|
|
||||||
install -m 0755 ${THISDIR}/files/waveshare-28dpi-3b-4b.dtbo ${DEPLOY_DIR_IMAGE}/waveshare-28dpi-3b-4b.dtbo
|
install -m 0755 ${THISDIR}/files/waveshare-28dpi-3b-4b.dtbo ${DEPLOY_DIR_IMAGE}/waveshare-28dpi-3b-4b.dtbo
|
||||||
install -m 0755 ${THISDIR}/files/waveshare-28dpi-3b.dtbo ${DEPLOY_DIR_IMAGE}/waveshare-28dpi-3b.dtbo
|
install -m 0755 ${THISDIR}/files/waveshare-28dpi-3b.dtbo ${DEPLOY_DIR_IMAGE}/waveshare-28dpi-3b.dtbo
|
||||||
install -m 0755 ${THISDIR}/files/waveshare-28dpi-4b.dtbo ${DEPLOY_DIR_IMAGE}/waveshare-28dpi-4b.dtbo
|
install -m 0755 ${THISDIR}/files/waveshare-28dpi-4b.dtbo ${DEPLOY_DIR_IMAGE}/waveshare-28dpi-4b.dtbo
|
||||||
# install -m 0755 ${THISDIR}/files/start.mp3 ${DEPLOY_DIR_IMAGE}/start.mp3
|
# install -m 0755 ${THISDIR}/files/start.mp3 ${DEPLOY_DIR_IMAGE}/start.mp3
|
||||||
}
|
}
|
||||||
|
|
||||||
# addtask deploy
|
addtask deploy
|
@ -1,15 +1 @@
|
|||||||
hostname = "diya"
|
hostname = "diya"
|
||||||
|
|
||||||
do_install:append () {
|
|
||||||
cat << 'EOF' >> "${D}${sysconfdir}/profile"
|
|
||||||
export GDK_BACKEND=wayland
|
|
||||||
export XDG_RUNTIME_DIR=/home/$USER/.xdg
|
|
||||||
export XDG_CONFIG_HOME=/home/$USER/.config
|
|
||||||
export PATH=$PATH:/home/$USER/bin:/home/$USER/.local/bin
|
|
||||||
export LD_LIBRARY_PATH=/home/$USER/lib:/home/$USER/.local/lib
|
|
||||||
if [ ! -e "$XDG_RUNTIME_DIR" ]; then
|
|
||||||
mkdir -p "$XDG_RUNTIME_DIR"
|
|
||||||
fi
|
|
||||||
export TERM=xterm-256color
|
|
||||||
EOF
|
|
||||||
}
|
|
@ -1,2 +1,2 @@
|
|||||||
DROPBEAR_EXTRA_ARGS="-w"
|
DROPBEAR_EXTRA_ARGS="-w"
|
||||||
DROPBEAR_RSAKEY_DIR=/etc/dropbear
|
DROPBEAR_RSAKEY_DIR=/home/diya/etc/dropbear
|
@ -9,18 +9,10 @@ pulseaudio-module-cli \
|
|||||||
pulseaudio-module-echo-cancel \
|
pulseaudio-module-echo-cancel \
|
||||||
pulseaudio-misc \
|
pulseaudio-misc \
|
||||||
i2c-tools \
|
i2c-tools \
|
||||||
mpg123
|
|
||||||
libsdl2-mixer \
|
|
||||||
#tslib
|
#tslib
|
||||||
#tslib-tests
|
#tslib-tests
|
||||||
#tslib-calibrate
|
#tslib-calibrate
|
||||||
#tslib-uinput
|
#tslib-uinput
|
||||||
|
|
||||||
libsdl2 \
|
|
||||||
libsdl2-ttf \
|
|
||||||
libsdl2-image \
|
|
||||||
libsdl2-mixer \
|
|
||||||
libsdl2-net \
|
|
||||||
# v4l-utils
|
# v4l-utils
|
||||||
evtest
|
evtest
|
||||||
|
|
||||||
|
@ -1,59 +1,42 @@
|
|||||||
inherit extrausers
|
inherit extrausers
|
||||||
|
|
||||||
KERNEL_DEVICETREE:append = "${@bb.utils.contains('RPI_USE_wS_28_DPI_LCD', '1', ' overlays/dpi24.dtbo overlays/vc4-kms-dpi-generic.dtbo overlays/ads1115-i2c-gpio.dtbo overlays/ads1115-i2c-gpio.dtbo overlays/vc4-kms-DPI-28inch.dtbo overlays/waveshare-28dpi-3b-4b.dtbo overlays/waveshare-28dpi-3b.dtbo overlays/waveshare-28dpi-4b.dtbo ', ' ', d)}"
|
KERNEL_DEVICETREE:append = "${@bb.utils.contains('RPI_USE_wS_28_DPI_LCD', '1', ' overlays/waveshare-28dpi-3b-4b.dtbo overlays/waveshare-28dpi-3b.dtbo overlays/waveshare-28dpi-4b.dtbo ', ' ', d)}"
|
||||||
|
|
||||||
# usermod -p BJpK8ADNDLsGg root;
|
|
||||||
EXTRA_USERS_PARAMS = "usermod -p 2Pe/4xyFxsokE diya; \
|
EXTRA_USERS_PARAMS = "usermod -p BJpK8ADNDLsGg root; \
|
||||||
|
usermod -p 2Pe/4xyFxsokE diya; \
|
||||||
usermod -a -G video diya; \
|
usermod -a -G video diya; \
|
||||||
usermod -a -G tty diya; \
|
usermod -a -G tty diya; \
|
||||||
usermod -a -G input diya; \
|
usermod -a -G input diya; \
|
||||||
usermod -a -G dialout diya; \
|
usermod -a -G dialout diya; \
|
||||||
usermod -a -G audio diya; \
|
usermod -a -G audio diya; \
|
||||||
usermod -a -G avahi diya; \
|
usermod -a -G avahi diya \
|
||||||
usermod -a -G sudo diya \
|
|
||||||
"
|
"
|
||||||
IMAGE_BOOT_FILES:append = "fs_resize extraconfig.txt cmd.recovery recovery-${MACHINE}.cpio.gz "
|
IMAGE_BOOT_FILES:append = "fs_resize"
|
||||||
|
# KERNEL_DEVICETREE:append = "${@bb.utils.contains('RPI_USE_wS_28_DPI_LCD', '1', ' overlays/vc4-kms-dpi-generic.dtbo overlays/waveshare-28dpi-3b-4b.dtbo overlays/waveshare-28dpi-3b.dtbo overlays/waveshare-28dpi-4b.dtbo ', ' ', d)}"
|
||||||
|
|
||||||
IMAGE_INSTALL:append = "libcurl \
|
IMAGE_INSTALL:append = "mpg123 \
|
||||||
|
libcurl \
|
||||||
libdrm \
|
libdrm \
|
||||||
libgbm \
|
libgbm \
|
||||||
libgles2 \
|
libgles2 \
|
||||||
libegl-mesa \
|
libegl-mesa \
|
||||||
|
libgl-mesa \
|
||||||
libglapi \
|
libglapi \
|
||||||
libudev \
|
|
||||||
libinput \
|
|
||||||
pango \
|
|
||||||
libxkbcommon \
|
|
||||||
xkeyboard-config \
|
|
||||||
seatd \
|
|
||||||
pixman \
|
|
||||||
cairo \
|
|
||||||
glib-2.0 \
|
|
||||||
udev \
|
|
||||||
glew \
|
glew \
|
||||||
freetype \
|
freetype \
|
||||||
fontconfig \
|
freeglut \
|
||||||
librsvg librsvg-gtk \
|
|
||||||
gdk-pixbuf \
|
|
||||||
gtk-layer-shell \
|
|
||||||
gobject-introspection \
|
|
||||||
l3afpad \
|
|
||||||
mesa \
|
mesa \
|
||||||
sudo \
|
libsdl2 \
|
||||||
|
libsdl2-ttf \
|
||||||
|
libsdl2-image \
|
||||||
|
libsdl2-mixer \
|
||||||
|
libsdl2-net \
|
||||||
|
example \
|
||||||
htop \
|
htop \
|
||||||
waveshare-2.8-lcd \
|
waveshare-2.8-lcd \
|
||||||
realtekfw \
|
realtekfw \
|
||||||
diya-overlay \
|
diya-overlay \
|
||||||
i2c-tools \
|
opensmalltalk-cog-vm \
|
||||||
bash \
|
libvncserver \
|
||||||
nano \
|
"
|
||||||
wpa-supplicant \
|
|
||||||
evtest \
|
|
||||||
raspi-gpio \
|
|
||||||
rsync \
|
|
||||||
coreutils \
|
|
||||||
wayland wayland-protocols \
|
|
||||||
labwc foot swaybg swayidle swaylock wlr-randr wlopm sfwbar tofi wtype \
|
|
||||||
gdbserver \
|
|
||||||
"
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
|||||||
|
|
||||||
DESCRIPTION = "Recovery initramfs image."
|
|
||||||
|
|
||||||
|
|
||||||
PACKAGE_INSTALL = "recovery-boot e2fsprogs kernel-modules busybox ${VIRTUAL-RUNTIME_base-utils} udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
|
|
||||||
|
|
||||||
# Do not pollute the initrd image with rootfs features
|
|
||||||
IMAGE_FEATURES = ""
|
|
||||||
|
|
||||||
export IMAGE_BASENAME = "${MLPREFIX}recovery"
|
|
||||||
IMAGE_NAME_SUFFIX ?= ""
|
|
||||||
IMAGE_LINGUAS = ""
|
|
||||||
|
|
||||||
LICENSE = "MIT"
|
|
||||||
|
|
||||||
IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
|
|
||||||
inherit core-image
|
|
||||||
|
|
||||||
IMAGE_ROOTFS_SIZE = "8192"
|
|
||||||
IMAGE_ROOTFS_EXTRA_SPACE = "0"
|
|
||||||
|
|
||||||
# Use the same restriction as initramfs-module-install
|
|
||||||
COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
|
|
||||||
|
|
||||||
IMAGE_PREPROCESS_COMMAND += "clobber_unused;"
|
|
||||||
|
|
||||||
clobber_unused () {
|
|
||||||
rm -rf ${IMAGE_ROOTFS}/boot/*
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
|
|
||||||
|
|
||||||
# The loopback interface
|
|
||||||
auto lo
|
|
||||||
iface lo inet loopback
|
|
||||||
|
|
||||||
# Wireless interfaces
|
|
||||||
auto wlan0
|
|
||||||
iface wlan0 inet dhcp
|
|
||||||
# wireless_mode managed
|
|
||||||
# wireless_essid any
|
|
||||||
# wpa-driver wext
|
|
||||||
wpa-conf /etc/network/wpa_supplicant.conf
|
|
||||||
|
|
||||||
# Ethernet/RNDIS gadget (g_ether)
|
|
||||||
# ... or on host side, usbnet and random hwaddr
|
|
||||||
iface usb0 inet static
|
|
||||||
address 192.168.7.2
|
|
||||||
netmask 255.255.255.0
|
|
||||||
network 192.168.7.0
|
|
||||||
gateway 192.168.7.1
|
|
||||||
|
|
||||||
# Bluetooth networking
|
|
||||||
# iface bnep0 inet dhcp
|
|
@ -1,7 +1,3 @@
|
|||||||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
|
||||||
SRC_URI += " file://itf_diya "
|
|
||||||
|
|
||||||
do_install:append () {
|
do_install:append () {
|
||||||
rm ${D}/etc/network/interfaces
|
rm ${D}/etc/network/interfaces
|
||||||
install -m 0644 ${WORKDIR}/itf_diya ${D}/etc/network/interfaces
|
|
||||||
}
|
}
|
@ -6,9 +6,7 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda
|
|||||||
SRC_URI += "file://confd \
|
SRC_URI += "file://confd \
|
||||||
file://expandfs.sh \
|
file://expandfs.sh \
|
||||||
file://80_diya \
|
file://80_diya \
|
||||||
file://fs_resize \
|
file://fs_resize"
|
||||||
file://cmd.recovery \
|
|
||||||
file://extraconfig.txt"
|
|
||||||
|
|
||||||
|
|
||||||
inherit update-rc.d useradd
|
inherit update-rc.d useradd
|
||||||
@ -19,21 +17,15 @@ GROUPADD_PACKAGES = "${PN}"
|
|||||||
USERADD_PARAM:${PN} = "-u 1000 -d /home/diya -r -s /bin/sh diya"
|
USERADD_PARAM:${PN} = "-u 1000 -d /home/diya -r -s /bin/sh diya"
|
||||||
|
|
||||||
INITSCRIPT_NAME = "confd"
|
INITSCRIPT_NAME = "confd"
|
||||||
INITSCRIPT_PARAMS = "start 30 S ."
|
INITSCRIPT_PARAMS = "start 80 S ."
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
install -d ${D}/${sysconfdir}/init.d/
|
install -d ${D}/${sysconfdir}/init.d/
|
||||||
install -d ${DEPLOY_DIR_IMAGE}
|
|
||||||
install -m 0755 ${WORKDIR}/confd ${D}/${sysconfdir}/init.d/confd
|
install -m 0755 ${WORKDIR}/confd ${D}/${sysconfdir}/init.d/confd
|
||||||
install -d ${D}/usr/bin/
|
install -d ${D}/usr/bin/
|
||||||
install -d ${D}/etc/default/volatiles
|
install -d ${D}/etc/default/volatiles
|
||||||
# install -m 0644 ${WORKDIR}/80_diya ${D}${sysconfdir}/default/volatiles
|
install -m 0644 ${WORKDIR}/80_diya ${D}${sysconfdir}/default/volatiles
|
||||||
install -m 0755 ${WORKDIR}/expandfs.sh ${D}/usr/bin/expandfs.sh
|
install -m 0755 ${WORKDIR}/expandfs.sh ${D}/usr/bin/expandfs.sh
|
||||||
install -m 0755 ${WORKDIR}/fs_resize ${DEPLOY_DIR_IMAGE}/
|
install -m 0755 ${WORKDIR}/fs_resize ${DEPLOY_DIR_IMAGE}/
|
||||||
install -m 0755 ${WORKDIR}/cmd.recovery ${DEPLOY_DIR_IMAGE}/
|
|
||||||
install -m 0755 ${WORKDIR}/extraconfig.txt ${DEPLOY_DIR_IMAGE}/
|
|
||||||
|
|
||||||
install -d ${D}/var/etc
|
|
||||||
install -d ${D}/var/etc/upper
|
|
||||||
install -d ${D}/var/etc/work
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
# d root root 0755 /var/etc/upper none
|
l root root 0644 /etc/network/interfaces /home/diya/etc/network/interfaces
|
||||||
# d root root 0755 /var/etc/work none
|
l root root 0644 /etc/dropbear /home/diya/etc/dropbear
|
||||||
# l root root 0644 /etc/dropbear /var/etc/dropbear
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
dwc_otg.lpm_enable=0 root=/dev/ram0 console=tty0,115200 bootparam_init_fatal_sh=1 rootwait logo.nologo
|
|
@ -6,12 +6,6 @@ DESC="Auto deployment configuration from media"
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
echo -n "Start $DESC: "
|
echo -n "Start $DESC: "
|
||||||
# mount the overlay which is not auto mount by fstab
|
|
||||||
# this make /etc editable
|
|
||||||
mount -t overlay -o lowerdir=/etc,upperdir=/var/etc/upper,workdir=/var/etc/work overlay /etc
|
|
||||||
# for some reason the LCD backlight is turned off
|
|
||||||
# need to turn it on manually
|
|
||||||
echo 0 > /sys/class/backlight/backlight/bl_power
|
|
||||||
if [ -f "/boot/fs_resize" ]; then
|
if [ -f "/boot/fs_resize" ]; then
|
||||||
/usr/bin/expandfs.sh
|
/usr/bin/expandfs.sh
|
||||||
touch /boot/home_partition_should_be_formated
|
touch /boot/home_partition_should_be_formated
|
||||||
@ -20,20 +14,23 @@ case "$1" in
|
|||||||
fi
|
fi
|
||||||
if [ -f "/boot/home_partition_should_be_formated" ]; then
|
if [ -f "/boot/home_partition_should_be_formated" ]; then
|
||||||
echo "Trying to format the home partition"
|
echo "Trying to format the home partition"
|
||||||
umount /dev/mmcblk0p4
|
umount /dev/mmcblk0p3
|
||||||
yes | mkfs.ext4 /dev/mmcblk0p4
|
yes | mkfs.ext4 /dev/mmcblk0p3
|
||||||
mount /dev/mmcblk0p4 /home
|
mount /dev/mmcblk0p3 /home
|
||||||
mkdir -p /home/diya
|
mkdir -p /home/diya/etc/network
|
||||||
|
mkdir -p /home/diya/etc/dropbear
|
||||||
chown -R diya:diya /home/diya
|
chown -R diya:diya /home/diya
|
||||||
rm /boot/home_partition_should_be_formated
|
rm /boot/home_partition_should_be_formated
|
||||||
fi
|
fi
|
||||||
if [ -e "/boot/wpa_supplicant.conf" ];then
|
if [ -e "/boot/install" ];then
|
||||||
mv /boot/wpa_supplicant.conf /etc/network/
|
cp -rf /boot/install/* /home/diya
|
||||||
|
rm -rf /boot/install
|
||||||
reboot
|
reboot
|
||||||
fi
|
fi
|
||||||
# display information
|
# display information
|
||||||
# disable wifi power save
|
# disable wifi power save
|
||||||
/usr/sbin/iw wlan0 set power_save off
|
/usr/sbin/iw wlan0 set power_save off
|
||||||
|
/sbin/ip a
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
N=/etc/init.d/$NAME
|
N=/etc/init.d/$NAME
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
line=$(
|
line=$(
|
||||||
sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk /dev/mmcblk0 | grep /dev/mmcblk0p4
|
sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk /dev/mmcblk0 | grep /dev/mmcblk0p3
|
||||||
p
|
p
|
||||||
q
|
q
|
||||||
EOF
|
EOF
|
||||||
@ -18,11 +18,11 @@ fi
|
|||||||
|
|
||||||
echo "Expanding the partition"
|
echo "Expanding the partition"
|
||||||
sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk /dev/mmcblk0
|
sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk /dev/mmcblk0
|
||||||
d # delete partition
|
d
|
||||||
4 # number 4
|
3
|
||||||
n # new partition
|
n # new partition
|
||||||
p # primary partition
|
p # primary partition
|
||||||
4 # partition number 4
|
3 # partition number 3
|
||||||
$start_sector
|
$start_sector
|
||||||
# default - end of disk
|
# default - end of disk
|
||||||
p # print the in-memory partition table
|
p # print the in-memory partition table
|
||||||
|
@ -1 +0,0 @@
|
|||||||
# initramfs recovery.cpio.gz followkernel
|
|
@ -1,82 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Copyright (C) 2011 O.S. Systems Software LTDA.
|
|
||||||
# Licensed on MIT
|
|
||||||
|
|
||||||
# Adds support to dynamic debugging of initramfs using bootparam in
|
|
||||||
# following format:
|
|
||||||
# shell : starts a shell before and after each module
|
|
||||||
# shell=before:<module> : starts a shell before <module> is loaded and run
|
|
||||||
# shell=after:<module> : starts a shell after <module> is loaded and run
|
|
||||||
#
|
|
||||||
# shell-debug : run set -x as soon as possible
|
|
||||||
# shell-debug=before:<module> : run set -x before <module> is loaded and run
|
|
||||||
# shell-debug=after:<module> : run set -x after <module> is loaded and run
|
|
||||||
|
|
||||||
DEBUG_SHELL="false"
|
|
||||||
|
|
||||||
debug_hook_handler() {
|
|
||||||
status=$1
|
|
||||||
module=$2
|
|
||||||
|
|
||||||
if [ -n "$bootparam_shell" ] && [ "$bootparam_shell" != "true" ]; then
|
|
||||||
shell_wanted_status=`expr $bootparam_shell : '\(.*\):.*'`
|
|
||||||
shell_wanted_module=`expr $bootparam_shell : '.*:\(.*\)'`
|
|
||||||
|
|
||||||
if [ "$shell_wanted_status" = "before" ]; then
|
|
||||||
shell_wanted_status=pre
|
|
||||||
else
|
|
||||||
shell_wanted_status=post
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$bootparam_shell" = "true" ] ||
|
|
||||||
( [ "$status" = "$shell_wanted_status" ] &&
|
|
||||||
[ "$module" = "$shell_wanted_module" ] ); then
|
|
||||||
if [ "$status" = "pre" ]; then
|
|
||||||
status_msg="before"
|
|
||||||
else
|
|
||||||
status_msg="after"
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg "Starting shell $status_msg $module..."
|
|
||||||
sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$bootparam_shell_debug" ] && [ "$bootparam_shell_debug" != "true" ]; then
|
|
||||||
shell_debug_wanted_status=`expr $bootparam_shell_debug : '\(.*\):.*'`
|
|
||||||
shell_debug_wanted_module=`expr $bootparam_shell_debug : '.*:\(.*\)'`
|
|
||||||
|
|
||||||
if [ "$shell_debug_wanted_status" = "before" ]; then
|
|
||||||
shell_debug_wanted_status=pre
|
|
||||||
else
|
|
||||||
shell_debug_wanted_status=post
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$bootparam_shell_debug" = "true" ] ||
|
|
||||||
( [ "$status" = "$shell_debug_wanted_status" ] &&
|
|
||||||
[ "$module" = "$shell_debug_wanted_module" ] ); then
|
|
||||||
if [ "$DEBUG_SHELL" = "true" ]; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$status" = "pre" ]; then
|
|
||||||
status_msg="before"
|
|
||||||
else
|
|
||||||
status_msg="after"
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg "Starting shell debugging $status_msg $module..."
|
|
||||||
DEBUG_SHELL="true"
|
|
||||||
set -x
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
debug_enabled() {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
debug_run() {
|
|
||||||
add_module_pre_hook "debug_hook_handler"
|
|
||||||
add_module_post_hook "debug_hook_handler"
|
|
||||||
}
|
|
@ -1,28 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Copyright (C) 2011 O.S. Systems Software LTDA.
|
|
||||||
# Licensed on MIT
|
|
||||||
|
|
||||||
e2fs_enabled() {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
e2fs_run() {
|
|
||||||
filesystems="ext4 ext3 ext2"
|
|
||||||
|
|
||||||
# load modules
|
|
||||||
for fs in $filesystems; do
|
|
||||||
load_kernel_module $fs
|
|
||||||
done
|
|
||||||
|
|
||||||
for fs in $filesystems; do
|
|
||||||
eval "fs_options=\$bootparam_${fs}"
|
|
||||||
if [ -n "$fs_options" ]; then
|
|
||||||
dev=`expr "$fs_options" : '\([^:]*\).*'`
|
|
||||||
path=`expr "$fs_options" : '[^:]*:\([^:]*\).*'`
|
|
||||||
|
|
||||||
info "Mounting $dev as $fs on $path as $fs..."
|
|
||||||
mkdir -p $path
|
|
||||||
mount -t $fs $dev $path
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Copyright (C) 2017 O.S. Systems Software LTDA.
|
|
||||||
# Licensed on MIT
|
|
||||||
|
|
||||||
EXEC_DIR=/exec.d # place to look for modules
|
|
||||||
|
|
||||||
exec_enabled() {
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
exec_run() {
|
|
||||||
if [ ! -d $EXEC_DIR ]; then
|
|
||||||
msg "No contents to exec in $EXEC_DIR. Starting shell ..."
|
|
||||||
sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Load and run modules
|
|
||||||
for m in $EXEC_DIR/*; do
|
|
||||||
# Skip backup files
|
|
||||||
if [ "`echo $m | sed -e 's/\~$//'`" != "$m" ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
debug "Starting $m"
|
|
||||||
|
|
||||||
# process module
|
|
||||||
./$m
|
|
||||||
done
|
|
||||||
}
|
|
@ -1,163 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Copyright (C) 2011 O.S. Systems Software LTDA.
|
|
||||||
# Licensed on MIT
|
|
||||||
#
|
|
||||||
# Provides the API to be used by the initramfs modules
|
|
||||||
#
|
|
||||||
# Modules need to provide the following functions:
|
|
||||||
#
|
|
||||||
# <module>_enabled : check if the module ought to run (return 1 to skip)
|
|
||||||
# <module>_run : do what is need
|
|
||||||
#
|
|
||||||
# Boot parameters are available on environment in the as:
|
|
||||||
#
|
|
||||||
# 'foo=value' as 'bootparam_foo=value'
|
|
||||||
# 'foo' as 'bootparam_foo=true'
|
|
||||||
# 'foo.bar[=value] as 'foo_bar=[value|true]'
|
|
||||||
|
|
||||||
# Register a function to be called before running a module
|
|
||||||
# The hook is called as:
|
|
||||||
# <function> pre <module>
|
|
||||||
add_module_pre_hook() {
|
|
||||||
MODULE_PRE_HOOKS="$MODULE_PRE_HOOKS $1"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Register a function to be called after running a module
|
|
||||||
# The hook is called as:
|
|
||||||
# <function> post <module>
|
|
||||||
add_module_post_hook() {
|
|
||||||
MODULE_POST_HOOKS="$MODULE_POST_HOOKS $1"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Load kernel module
|
|
||||||
load_kernel_module() {
|
|
||||||
if modprobe $1 >/dev/null 2>&1; then
|
|
||||||
info "Loaded module $1"
|
|
||||||
else
|
|
||||||
debug "Failed to load module $1"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Prints information
|
|
||||||
msg() {
|
|
||||||
echo "$@" >/dev/console
|
|
||||||
}
|
|
||||||
|
|
||||||
# Prints information if verbose bootparam is used
|
|
||||||
info() {
|
|
||||||
[ -n "$bootparam_verbose" ] && echo "$@" >/dev/console
|
|
||||||
}
|
|
||||||
|
|
||||||
# Prints information if debug bootparam is used
|
|
||||||
debug() {
|
|
||||||
[ -n "$bootparam_debug" ] && echo "DEBUG: $@" >/dev/console
|
|
||||||
}
|
|
||||||
|
|
||||||
# Prints a message and start a endless loop
|
|
||||||
fatal() {
|
|
||||||
echo $1 >/dev/console
|
|
||||||
echo >/dev/console
|
|
||||||
|
|
||||||
if [ -n "$bootparam_init_fatal_sh" ]; then
|
|
||||||
sh
|
|
||||||
else
|
|
||||||
while [ "true" ]; do
|
|
||||||
sleep 3600
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Variables shared amoung modules
|
|
||||||
MODULE_PRE_HOOKS="" # functions to call before running each module
|
|
||||||
MODULE_POST_HOOKS="" # functions to call after running each module
|
|
||||||
MODULES_DIR=/init.d # place to look for modules
|
|
||||||
EFI_DIR=/sys/firmware/efi # place to store device firmware information
|
|
||||||
|
|
||||||
# make mount stop complaining about missing /etc/fstab
|
|
||||||
touch /etc/fstab
|
|
||||||
|
|
||||||
# initialize /proc, /sys, /run/lock and /var/lock
|
|
||||||
mkdir -p /proc /sys /run/lock /var/lock
|
|
||||||
mount -t proc proc /proc
|
|
||||||
mount -t sysfs sysfs /sys
|
|
||||||
|
|
||||||
if [ -d $EFI_DIR ];then
|
|
||||||
mount -t efivarfs none /sys/firmware/efi/efivars
|
|
||||||
fi
|
|
||||||
|
|
||||||
# populate bootparam environment
|
|
||||||
for p in `cat /proc/cmdline`; do
|
|
||||||
if [ -n "$quoted" ]; then
|
|
||||||
value="$value $p"
|
|
||||||
if [ "`echo $p | sed -e 's/\"$//'`" != "$p" ]; then
|
|
||||||
eval "bootparam_${quoted}=${value}"
|
|
||||||
unset quoted
|
|
||||||
fi
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
opt=`echo $p | cut -d'=' -f1`
|
|
||||||
opt=`echo $opt | sed -e 'y/.-/__/'`
|
|
||||||
if [ "`echo $p | cut -d'=' -f1`" = "$p" ]; then
|
|
||||||
eval "bootparam_${opt}=true"
|
|
||||||
else
|
|
||||||
value="`echo $p | cut -d'=' -f2-`"
|
|
||||||
if [ "`echo $value | sed -e 's/^\"//'`" != "$value" ]; then
|
|
||||||
quoted=${opt}
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
eval "bootparam_${opt}=\"${value}\""
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# use /dev with devtmpfs
|
|
||||||
if grep -q devtmpfs /proc/filesystems; then
|
|
||||||
mkdir -p /dev
|
|
||||||
mount -t devtmpfs devtmpfs /dev
|
|
||||||
else
|
|
||||||
if [ ! -d /dev ]; then
|
|
||||||
fatal "ERROR: /dev doesn't exist and kernel doesn't has devtmpfs enabled."
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# active the back light
|
|
||||||
echo 0 > /sys/class/backlight/backlight/bl_power
|
|
||||||
|
|
||||||
# Load and run modules
|
|
||||||
for m in $MODULES_DIR/*; do
|
|
||||||
# Skip backup files
|
|
||||||
if [ "`echo $m | sed -e 's/\~$//'`" != "$m" ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
module=`basename $m | cut -d'-' -f 2`
|
|
||||||
debug "Loading module $module"
|
|
||||||
|
|
||||||
# pre hooks
|
|
||||||
for h in $MODULE_PRE_HOOKS; do
|
|
||||||
debug "Calling module hook (pre): $h"
|
|
||||||
eval "$h pre $module"
|
|
||||||
debug "Finished module hook (pre): $h"
|
|
||||||
done
|
|
||||||
|
|
||||||
# process module
|
|
||||||
. $m
|
|
||||||
|
|
||||||
if ! eval "${module}_enabled"; then
|
|
||||||
debug "Skipping module $module"
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
debug "Running ${module}_run"
|
|
||||||
eval "${module}_run"
|
|
||||||
|
|
||||||
# post hooks
|
|
||||||
for h in $MODULE_POST_HOOKS; do
|
|
||||||
debug "Calling module hook (post): $h"
|
|
||||||
eval "$h post $module"
|
|
||||||
debug "Finished module hook (post): $h"
|
|
||||||
done
|
|
||||||
done
|
|
||||||
|
|
||||||
# Catch all
|
|
||||||
fatal "ERROR: Initramfs failed to initialize the system."
|
|
@ -1,50 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Copyright (C) 2011, 2012 O.S. Systems Software LTDA.
|
|
||||||
# Licensed on MIT
|
|
||||||
|
|
||||||
udev_shutdown_hook_handler() {
|
|
||||||
status=$1
|
|
||||||
module=$2
|
|
||||||
if [ "$status" = "pre" ] && [ "$module" = "finish" ]; then
|
|
||||||
udevadm settle
|
|
||||||
killall `basename $_UDEV_DAEMON` 2>/dev/null
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
udev_daemon() {
|
|
||||||
OPTIONS="/sbin/udev/udevd /sbin/udevd /lib/udev/udevd /lib/systemd/systemd-udevd"
|
|
||||||
|
|
||||||
for o in $OPTIONS; do
|
|
||||||
if [ -x "$o" ]; then
|
|
||||||
echo $o
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
_UDEV_DAEMON=`udev_daemon`
|
|
||||||
|
|
||||||
udev_enabled() {
|
|
||||||
if [ -z "$_UDEV_DAEMON" ]; then
|
|
||||||
msg "WARNING: Cannot find the udev daemon; daemon will not be started in initramfs."
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
udev_run() {
|
|
||||||
add_module_pre_hook "udev_shutdown_hook_handler"
|
|
||||||
|
|
||||||
mkdir -p /run
|
|
||||||
mkdir -p /var/run
|
|
||||||
|
|
||||||
# Workaround if console=null, systemd-udevd needs valid stdin, stdout and stderr to work
|
|
||||||
sh -c "exec 4< /dev/console" || { exec 0> /dev/null; exec 1> /dev/null; exec 2> /dev/null; }
|
|
||||||
|
|
||||||
$_UDEV_DAEMON --daemon
|
|
||||||
udevadm trigger --action=add
|
|
||||||
udevadm settle
|
|
||||||
}
|
|
@ -1,48 +0,0 @@
|
|||||||
SUMMARY = "Modular initramfs system"
|
|
||||||
LICENSE = "MIT"
|
|
||||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
|
||||||
RDEPENDS:${PN} += "${VIRTUAL-RUNTIME_base-utils}"
|
|
||||||
RRECOMMENDS:${PN} = "${VIRTUAL-RUNTIME_base-utils-syslog}"
|
|
||||||
|
|
||||||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
|
||||||
|
|
||||||
PR = "r4"
|
|
||||||
|
|
||||||
inherit allarch
|
|
||||||
|
|
||||||
SRC_URI = "file://init \
|
|
||||||
file://exec \
|
|
||||||
file://udev \
|
|
||||||
file://e2fs \
|
|
||||||
file://debug \
|
|
||||||
"
|
|
||||||
|
|
||||||
S = "${WORKDIR}"
|
|
||||||
|
|
||||||
do_install() {
|
|
||||||
install -d ${D}/init.d
|
|
||||||
|
|
||||||
# base
|
|
||||||
install -m 0755 ${WORKDIR}/init ${D}/init
|
|
||||||
|
|
||||||
# exec
|
|
||||||
install -m 0755 ${WORKDIR}/exec ${D}/init.d/89-exec
|
|
||||||
|
|
||||||
# udev
|
|
||||||
install -m 0755 ${WORKDIR}/udev ${D}/init.d/01-udev
|
|
||||||
|
|
||||||
# e2fs
|
|
||||||
install -m 0755 ${WORKDIR}/e2fs ${D}/init.d/10-e2fs
|
|
||||||
|
|
||||||
# debug
|
|
||||||
install -m 0755 ${WORKDIR}/debug ${D}/init.d/00-debug
|
|
||||||
|
|
||||||
|
|
||||||
# Create device nodes expected by some kernels in initramfs
|
|
||||||
# before even executing /init.
|
|
||||||
install -d ${D}/dev
|
|
||||||
mknod -m 622 ${D}/dev/console c 5 1
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
FILES:${PN} = "/init /init.d /dev"
|
|
@ -3,22 +3,27 @@ DESCRIPTION = "Recipe created by bitbake-layers"
|
|||||||
LICENSE = "MIT"
|
LICENSE = "MIT"
|
||||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||||
|
|
||||||
inherit pkgconfig
|
DEPENDS += "libsdl2 libvncserver"
|
||||||
|
|
||||||
DEPENDS += " libsdl2 mesa virtual/libgles2 virtual/libgl "
|
|
||||||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
||||||
SRC_URI = "file://sdl_test.cpp file://sdlgl.c file://sdlglshader.c"
|
SRC_URI = "file://sdl_test.cpp file://sdlgl.c file://sdlglshader.c file://sdlvncviewer.c"
|
||||||
TARGET_CC_ARCH += "${LDFLAGS}"
|
TARGET_CC_ARCH += "${LDFLAGS}"
|
||||||
|
|
||||||
do_compile() {
|
do_compile() {
|
||||||
${CXX} ${WORKDIR}/sdl_test.cpp `pkg-config --cflags --libs sdl2` -o ${WORKDIR}/sdl_test
|
${CXX} ${WORKDIR}/sdl_test.cpp `pkg-config --cflags --libs sdl2` -o ${WORKDIR}/sdl_test
|
||||||
# ${CC} ${WORKDIR}/sdlgl.c `pkg-config --cflags --libs sdl2` -lGLESv2 -o ${WORKDIR}/sdlgl
|
${CC} ${WORKDIR}/sdlgl.c `pkg-config --cflags --libs sdl2` -lGL -o ${WORKDIR}/sdlgl
|
||||||
${CC} ${WORKDIR}/sdlglshader.c `pkg-config --cflags --libs sdl2` -lGLESv2 -o ${WORKDIR}/sdlglshader
|
${CC} ${WORKDIR}/sdlglshader.c `pkg-config --cflags --libs sdl2` -lGL -o ${WORKDIR}/sdlglshader
|
||||||
|
${CC} ${WORKDIR}/sdlvncviewer.c `pkg-config --cflags --libs sdl2` -lvncclient -o ${WORKDIR}/sdlvncviewer
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
install -d ${D}/usr/bin
|
install -d ${D}/usr/bin
|
||||||
install -m 0755 ${WORKDIR}/sdl_test ${D}/usr/bin
|
install -m 0755 ${WORKDIR}/sdl_test ${D}/usr/bin
|
||||||
# install -m 0755 ${WORKDIR}/sdlgl ${D}/usr/bin
|
install -m 0755 ${WORKDIR}/sdlgl ${D}/usr/bin
|
||||||
install -m 0755 ${WORKDIR}/sdlglshader ${D}/usr/bin
|
install -m 0755 ${WORKDIR}/sdlglshader ${D}/usr/bin
|
||||||
|
install -m 0755 ${WORKDIR}/sdlvncviewer ${D}/usr/bin
|
||||||
|
# for manual copy test applications on target from tmp dir
|
||||||
|
install -m 0755 ${WORKDIR}/sdl_test /tmp
|
||||||
|
install -m 0755 ${WORKDIR}/sdlgl /tmp
|
||||||
|
install -m 0755 ${WORKDIR}/sdlglshader /tmp
|
||||||
|
install -m 0755 ${WORKDIR}/sdlvncviewer /tmp
|
||||||
}
|
}
|
||||||
|
@ -84,10 +84,10 @@ int main( int argc, char** argv )
|
|||||||
running = false;
|
running = false;
|
||||||
break;
|
break;
|
||||||
case SDL_KEYDOWN:
|
case SDL_KEYDOWN:
|
||||||
//if(ev.key.keysym.sym == SDLK_ESCAPE)
|
if(ev.key.keysym.sym == SDLK_ESCAPE)
|
||||||
//{
|
{
|
||||||
running = false;
|
running = false;
|
||||||
//}
|
}
|
||||||
break;
|
break;
|
||||||
case SDL_FINGERDOWN:
|
case SDL_FINGERDOWN:
|
||||||
case SDL_FINGERMOTION:
|
case SDL_FINGERMOTION:
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL.h>
|
||||||
#include <SDL2/SDL_opengl.h>
|
#include <SDL2/SDL_opengl.h>
|
||||||
#include <GLES/gl.h>
|
#include <GL/gl.h>
|
||||||
|
|
||||||
typedef int32_t i32;
|
typedef int32_t i32;
|
||||||
typedef uint32_t u32;
|
typedef uint32_t u32;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL.h>
|
||||||
#include <SDL2/SDL_opengl.h>
|
#include <SDL2/SDL_opengl.h>
|
||||||
#include <GLES/gl.h>
|
#include <GL/gl.h>
|
||||||
|
|
||||||
typedef int32_t i32;
|
typedef int32_t i32;
|
||||||
typedef uint32_t u32;
|
typedef uint32_t u32;
|
||||||
@ -120,7 +120,7 @@ int main(int ArgCount, char **Args)
|
|||||||
printf("Vertex Array ID %d\n", VertexArrayID);
|
printf("Vertex Array ID %d\n", VertexArrayID);
|
||||||
// Create and compile our GLSL program from the shaders
|
// Create and compile our GLSL program from the shaders
|
||||||
GLuint programID = load_shader();
|
GLuint programID = load_shader();
|
||||||
// GLfloat tmp_buffer[9];
|
GLfloat tmp_buffer[9];
|
||||||
static const GLfloat g_vertex_buffer_data[] = {
|
static const GLfloat g_vertex_buffer_data[] = {
|
||||||
-1.0f,
|
-1.0f,
|
||||||
-1.0f,
|
-1.0f,
|
||||||
@ -138,10 +138,9 @@ int main(int ArgCount, char **Args)
|
|||||||
glGenBuffers(1, &vertexbuffer);
|
glGenBuffers(1, &vertexbuffer);
|
||||||
glBindBuffer(GL_ARRAY_BUFFER, vertexbuffer);
|
glBindBuffer(GL_ARRAY_BUFFER, vertexbuffer);
|
||||||
glBufferData(GL_ARRAY_BUFFER, sizeof(g_vertex_buffer_data), g_vertex_buffer_data, GL_STATIC_DRAW);
|
glBufferData(GL_ARRAY_BUFFER, sizeof(g_vertex_buffer_data), g_vertex_buffer_data, GL_STATIC_DRAW);
|
||||||
// printf("Buffer ID %d of size: %d\n", vertexbuffer, sizeof(tmp_buffer));
|
printf("Buffer ID %d of size: %d\n", vertexbuffer, sizeof(tmp_buffer));
|
||||||
// read back buffer data
|
// read back buffer data
|
||||||
// memset(tmp_buffer, 0, sizeof(tmp_buffer));
|
memset(tmp_buffer, 0, sizeof(tmp_buffer));
|
||||||
/*
|
|
||||||
glGetBufferSubData(GL_ARRAY_BUFFER, 0,sizeof(tmp_buffer), tmp_buffer );
|
glGetBufferSubData(GL_ARRAY_BUFFER, 0,sizeof(tmp_buffer), tmp_buffer );
|
||||||
printf("Read back buffer data: \n");
|
printf("Read back buffer data: \n");
|
||||||
|
|
||||||
@ -149,7 +148,6 @@ int main(int ArgCount, char **Args)
|
|||||||
{
|
{
|
||||||
printf("%d: %.2f\n", i, tmp_buffer[i]);
|
printf("%d: %.2f\n", i, tmp_buffer[i]);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &currid);
|
glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &currid);
|
||||||
printf("current id: %d\n",currid);
|
printf("current id: %d\n",currid);
|
||||||
while (Running)
|
while (Running)
|
||||||
|
478
recipes-example/example/files/sdlvncviewer.c
Normal file
478
recipes-example/example/files/sdlvncviewer.c
Normal file
@ -0,0 +1,478 @@
|
|||||||
|
#include <SDL.h>
|
||||||
|
#include <signal.h>
|
||||||
|
#include <rfb/rfbclient.h>
|
||||||
|
struct { int sdl; int rfb; } buttonMapping[]={
|
||||||
|
{1, rfbButton1Mask},
|
||||||
|
{2, rfbButton2Mask},
|
||||||
|
{3, rfbButton3Mask},
|
||||||
|
{4, rfbButton4Mask},
|
||||||
|
{5, rfbButton5Mask},
|
||||||
|
{0,0}
|
||||||
|
};
|
||||||
|
struct { char mask; int bits_stored; } utf8Mapping[]= {
|
||||||
|
{0b00111111, 6},
|
||||||
|
{0b01111111, 7},
|
||||||
|
{0b00011111, 5},
|
||||||
|
{0b00001111, 4},
|
||||||
|
{0b00000111, 3},
|
||||||
|
{0,0}
|
||||||
|
};
|
||||||
|
static int enableResizable = 1, viewOnly, listenLoop, buttonMask;
|
||||||
|
int sdlFlags;
|
||||||
|
SDL_Texture *sdlTexture;
|
||||||
|
SDL_Renderer *sdlRenderer;
|
||||||
|
SDL_Window *sdlWindow;
|
||||||
|
/* client's pointer position */
|
||||||
|
int x,y;
|
||||||
|
static int rightAltKeyDown, leftAltKeyDown;
|
||||||
|
static rfbBool resize(rfbClient* client) {
|
||||||
|
int width=client->width,height=client->height,
|
||||||
|
depth=client->format.bitsPerPixel;
|
||||||
|
if (enableResizable)
|
||||||
|
sdlFlags |= SDL_WINDOW_RESIZABLE;
|
||||||
|
client->updateRect.x = client->updateRect.y = 0;
|
||||||
|
client->updateRect.w = width; client->updateRect.h = height;
|
||||||
|
/* (re)create the surface used as the client's framebuffer */
|
||||||
|
SDL_FreeSurface(rfbClientGetClientData(client, SDL_Init));
|
||||||
|
SDL_Surface* sdl=SDL_CreateRGBSurface(0,
|
||||||
|
width,
|
||||||
|
height,
|
||||||
|
depth,
|
||||||
|
0,0,0,0);
|
||||||
|
if(!sdl)
|
||||||
|
rfbClientErr("resize: error creating surface: %s\n", SDL_GetError());
|
||||||
|
rfbClientSetClientData(client, SDL_Init, sdl);
|
||||||
|
client->width = sdl->pitch / (depth / 8);
|
||||||
|
client->frameBuffer=sdl->pixels;
|
||||||
|
client->format.bitsPerPixel=depth;
|
||||||
|
client->format.redShift=sdl->format->Rshift;
|
||||||
|
client->format.greenShift=sdl->format->Gshift;
|
||||||
|
client->format.blueShift=sdl->format->Bshift;
|
||||||
|
client->format.redMax=sdl->format->Rmask>>client->format.redShift;
|
||||||
|
client->format.greenMax=sdl->format->Gmask>>client->format.greenShift;
|
||||||
|
client->format.blueMax=sdl->format->Bmask>>client->format.blueShift;
|
||||||
|
SetFormatAndEncodings(client);
|
||||||
|
/* create or resize the window */
|
||||||
|
if(!sdlWindow) {
|
||||||
|
sdlWindow = SDL_CreateWindow(client->desktopName,
|
||||||
|
SDL_WINDOWPOS_UNDEFINED,
|
||||||
|
SDL_WINDOWPOS_UNDEFINED,
|
||||||
|
width,
|
||||||
|
height,
|
||||||
|
sdlFlags);
|
||||||
|
if(!sdlWindow)
|
||||||
|
rfbClientErr("resize: error creating window: %s\n", SDL_GetError());
|
||||||
|
} else {
|
||||||
|
SDL_SetWindowSize(sdlWindow, width, height);
|
||||||
|
}
|
||||||
|
/* create the renderer if it does not already exist */
|
||||||
|
if(!sdlRenderer) {
|
||||||
|
sdlRenderer = SDL_CreateRenderer(sdlWindow, -1, 0);
|
||||||
|
if(!sdlRenderer)
|
||||||
|
rfbClientErr("resize: error creating renderer: %s\n", SDL_GetError());
|
||||||
|
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); /* make the scaled rendering look smoother. */
|
||||||
|
}
|
||||||
|
SDL_RenderSetLogicalSize(sdlRenderer, width, height); /* this is a departure from the SDL1.2-based version, but more in the sense of a VNC viewer in keeeping aspect ratio */
|
||||||
|
/* (re)create the texture that sits in between the surface->pixels and the renderer */
|
||||||
|
if(sdlTexture)
|
||||||
|
SDL_DestroyTexture(sdlTexture);
|
||||||
|
sdlTexture = SDL_CreateTexture(sdlRenderer,
|
||||||
|
SDL_PIXELFORMAT_ARGB8888,
|
||||||
|
SDL_TEXTUREACCESS_STREAMING,
|
||||||
|
width, height);
|
||||||
|
if(!sdlTexture)
|
||||||
|
rfbClientErr("resize: error creating texture: %s\n", SDL_GetError());
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
static rfbKeySym SDL_key2rfbKeySym(SDL_KeyboardEvent* e) {
|
||||||
|
rfbKeySym k = 0;
|
||||||
|
SDL_Keycode sym = e->keysym.sym;
|
||||||
|
switch (sym) {
|
||||||
|
case SDLK_BACKSPACE: k = XK_BackSpace; break;
|
||||||
|
case SDLK_TAB: k = XK_Tab; break;
|
||||||
|
case SDLK_CLEAR: k = XK_Clear; break;
|
||||||
|
case SDLK_RETURN: k = XK_Return; break;
|
||||||
|
case SDLK_PAUSE: k = XK_Pause; break;
|
||||||
|
case SDLK_ESCAPE: k = XK_Escape; break;
|
||||||
|
case SDLK_DELETE: k = XK_Delete; break;
|
||||||
|
case SDLK_KP_0: k = XK_KP_0; break;
|
||||||
|
case SDLK_KP_1: k = XK_KP_1; break;
|
||||||
|
case SDLK_KP_2: k = XK_KP_2; break;
|
||||||
|
case SDLK_KP_3: k = XK_KP_3; break;
|
||||||
|
case SDLK_KP_4: k = XK_KP_4; break;
|
||||||
|
case SDLK_KP_5: k = XK_KP_5; break;
|
||||||
|
case SDLK_KP_6: k = XK_KP_6; break;
|
||||||
|
case SDLK_KP_7: k = XK_KP_7; break;
|
||||||
|
case SDLK_KP_8: k = XK_KP_8; break;
|
||||||
|
case SDLK_KP_9: k = XK_KP_9; break;
|
||||||
|
case SDLK_KP_PERIOD: k = XK_KP_Decimal; break;
|
||||||
|
case SDLK_KP_DIVIDE: k = XK_KP_Divide; break;
|
||||||
|
case SDLK_KP_MULTIPLY: k = XK_KP_Multiply; break;
|
||||||
|
case SDLK_KP_MINUS: k = XK_KP_Subtract; break;
|
||||||
|
case SDLK_KP_PLUS: k = XK_KP_Add; break;
|
||||||
|
case SDLK_KP_ENTER: k = XK_KP_Enter; break;
|
||||||
|
case SDLK_KP_EQUALS: k = XK_KP_Equal; break;
|
||||||
|
case SDLK_UP: k = XK_Up; break;
|
||||||
|
case SDLK_DOWN: k = XK_Down; break;
|
||||||
|
case SDLK_RIGHT: k = XK_Right; break;
|
||||||
|
case SDLK_LEFT: k = XK_Left; break;
|
||||||
|
case SDLK_INSERT: k = XK_Insert; break;
|
||||||
|
case SDLK_HOME: k = XK_Home; break;
|
||||||
|
case SDLK_END: k = XK_End; break;
|
||||||
|
case SDLK_PAGEUP: k = XK_Page_Up; break;
|
||||||
|
case SDLK_PAGEDOWN: k = XK_Page_Down; break;
|
||||||
|
case SDLK_F1: k = XK_F1; break;
|
||||||
|
case SDLK_F2: k = XK_F2; break;
|
||||||
|
case SDLK_F3: k = XK_F3; break;
|
||||||
|
case SDLK_F4: k = XK_F4; break;
|
||||||
|
case SDLK_F5: k = XK_F5; break;
|
||||||
|
case SDLK_F6: k = XK_F6; break;
|
||||||
|
case SDLK_F7: k = XK_F7; break;
|
||||||
|
case SDLK_F8: k = XK_F8; break;
|
||||||
|
case SDLK_F9: k = XK_F9; break;
|
||||||
|
case SDLK_F10: k = XK_F10; break;
|
||||||
|
case SDLK_F11: k = XK_F11; break;
|
||||||
|
case SDLK_F12: k = XK_F12; break;
|
||||||
|
case SDLK_F13: k = XK_F13; break;
|
||||||
|
case SDLK_F14: k = XK_F14; break;
|
||||||
|
case SDLK_F15: k = XK_F15; break;
|
||||||
|
case SDLK_NUMLOCKCLEAR: k = XK_Num_Lock; break;
|
||||||
|
case SDLK_CAPSLOCK: k = XK_Caps_Lock; break;
|
||||||
|
case SDLK_SCROLLLOCK: k = XK_Scroll_Lock; break;
|
||||||
|
case SDLK_RSHIFT: k = XK_Shift_R; break;
|
||||||
|
case SDLK_LSHIFT: k = XK_Shift_L; break;
|
||||||
|
case SDLK_RCTRL: k = XK_Control_R; break;
|
||||||
|
case SDLK_LCTRL: k = XK_Control_L; break;
|
||||||
|
case SDLK_RALT: k = XK_Alt_R; break;
|
||||||
|
case SDLK_LALT: k = XK_Alt_L; break;
|
||||||
|
case SDLK_LGUI: k = XK_Super_L; break;
|
||||||
|
case SDLK_RGUI: k = XK_Super_R; break;
|
||||||
|
#if 0
|
||||||
|
case SDLK_COMPOSE: k = XK_Compose; break;
|
||||||
|
#endif
|
||||||
|
case SDLK_MODE: k = XK_Mode_switch; break;
|
||||||
|
case SDLK_HELP: k = XK_Help; break;
|
||||||
|
case SDLK_PRINTSCREEN: k = XK_Print; break;
|
||||||
|
case SDLK_SYSREQ: k = XK_Sys_Req; break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
/* SDL_TEXTINPUT does not generate characters if ctrl is down, so handle those here */
|
||||||
|
if (k == 0 && sym > 0x0 && sym < 0x100 && e->keysym.mod & KMOD_CTRL)
|
||||||
|
k = sym;
|
||||||
|
return k;
|
||||||
|
}
|
||||||
|
/* UTF-8 decoding is from https://rosettacode.org/wiki/UTF-8_encode_and_decode which is under GFDL 1.2 */
|
||||||
|
static rfbKeySym utf8char2rfbKeySym(const char chr[4]) {
|
||||||
|
int bytes = strlen(chr);
|
||||||
|
int shift = utf8Mapping[0].bits_stored * (bytes - 1);
|
||||||
|
rfbKeySym codep = (*chr++ & utf8Mapping[bytes].mask) << shift;
|
||||||
|
int i;
|
||||||
|
for(i = 1; i < bytes; ++i, ++chr) {
|
||||||
|
shift -= utf8Mapping[0].bits_stored;
|
||||||
|
codep |= ((char)*chr & utf8Mapping[0].mask) << shift;
|
||||||
|
}
|
||||||
|
return codep;
|
||||||
|
}
|
||||||
|
static void update(rfbClient* cl,int x,int y,int w,int h) {
|
||||||
|
SDL_Surface *sdl = rfbClientGetClientData(cl, SDL_Init);
|
||||||
|
/* update texture from surface->pixels */
|
||||||
|
SDL_Rect r = {x,y,w,h};
|
||||||
|
if(SDL_UpdateTexture(sdlTexture, &r, sdl->pixels + y*sdl->pitch + x*4, sdl->pitch) < 0)
|
||||||
|
rfbClientErr("update: failed to update texture: %s\n", SDL_GetError());
|
||||||
|
/* copy texture to renderer and show */
|
||||||
|
if(SDL_RenderClear(sdlRenderer) < 0)
|
||||||
|
rfbClientErr("update: failed to clear renderer: %s\n", SDL_GetError());
|
||||||
|
if(SDL_RenderCopy(sdlRenderer, sdlTexture, NULL, NULL) < 0)
|
||||||
|
rfbClientErr("update: failed to copy texture to renderer: %s\n", SDL_GetError());
|
||||||
|
SDL_RenderPresent(sdlRenderer);
|
||||||
|
}
|
||||||
|
static void kbd_leds(rfbClient* cl, int value, int pad) {
|
||||||
|
/* note: pad is for future expansion 0=unused */
|
||||||
|
fprintf(stderr,"Led State= 0x%02X\n", value);
|
||||||
|
fflush(stderr);
|
||||||
|
}
|
||||||
|
/* trivial support for textchat */
|
||||||
|
static void text_chat(rfbClient* cl, int value, char *text) {
|
||||||
|
switch(value) {
|
||||||
|
case rfbTextChatOpen:
|
||||||
|
fprintf(stderr,"TextChat: We should open a textchat window!\n");
|
||||||
|
TextChatOpen(cl);
|
||||||
|
break;
|
||||||
|
case rfbTextChatClose:
|
||||||
|
fprintf(stderr,"TextChat: We should close our window!\n");
|
||||||
|
break;
|
||||||
|
case rfbTextChatFinished:
|
||||||
|
fprintf(stderr,"TextChat: We should close our window!\n");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
fprintf(stderr,"TextChat: Received \"%s\"\n", text);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
fflush(stderr);
|
||||||
|
}
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
#define LOG_TO_FILE
|
||||||
|
#endif
|
||||||
|
#ifdef LOG_TO_FILE
|
||||||
|
#include <stdarg.h>
|
||||||
|
static void
|
||||||
|
log_to_file(const char *format, ...)
|
||||||
|
{
|
||||||
|
FILE* logfile;
|
||||||
|
static char* logfile_str=0;
|
||||||
|
va_list args;
|
||||||
|
char buf[256];
|
||||||
|
time_t log_clock;
|
||||||
|
if(!rfbEnableClientLogging)
|
||||||
|
return;
|
||||||
|
if(logfile_str==0) {
|
||||||
|
logfile_str=getenv("VNCLOG");
|
||||||
|
if(logfile_str==0)
|
||||||
|
logfile_str="vnc.log";
|
||||||
|
}
|
||||||
|
logfile=fopen(logfile_str,"a");
|
||||||
|
va_start(args, format);
|
||||||
|
time(&log_clock);
|
||||||
|
strftime(buf, 255, "%d/%m/%Y %X ", localtime(&log_clock));
|
||||||
|
fprintf(logfile,buf);
|
||||||
|
vfprintf(logfile, format, args);
|
||||||
|
fflush(logfile);
|
||||||
|
va_end(args);
|
||||||
|
fclose(logfile);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
static void cleanup(rfbClient* cl)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
just in case we're running in listenLoop:
|
||||||
|
close viewer window by restarting SDL video subsystem
|
||||||
|
*/
|
||||||
|
SDL_QuitSubSystem(SDL_INIT_VIDEO);
|
||||||
|
SDL_InitSubSystem(SDL_INIT_VIDEO);
|
||||||
|
if(cl)
|
||||||
|
rfbClientCleanup(cl);
|
||||||
|
}
|
||||||
|
static rfbBool handleSDLEvent(rfbClient *cl, SDL_Event *e)
|
||||||
|
{
|
||||||
|
switch(e->type) {
|
||||||
|
case SDL_WINDOWEVENT:
|
||||||
|
switch (e->window.event) {
|
||||||
|
case SDL_WINDOWEVENT_EXPOSED:
|
||||||
|
SendFramebufferUpdateRequest(cl, 0, 0,
|
||||||
|
cl->width, cl->height, FALSE);
|
||||||
|
break;
|
||||||
|
case SDL_WINDOWEVENT_FOCUS_GAINED:
|
||||||
|
if (SDL_HasClipboardText()) {
|
||||||
|
char *text = SDL_GetClipboardText();
|
||||||
|
if(text) {
|
||||||
|
rfbClientLog("sending clipboard text '%s'\n", text);
|
||||||
|
SendClientCutText(cl, text, strlen(text));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SDL_WINDOWEVENT_FOCUS_LOST:
|
||||||
|
if (rightAltKeyDown) {
|
||||||
|
SendKeyEvent(cl, XK_Alt_R, FALSE);
|
||||||
|
rightAltKeyDown = FALSE;
|
||||||
|
rfbClientLog("released right Alt key\n");
|
||||||
|
}
|
||||||
|
if (leftAltKeyDown) {
|
||||||
|
SendKeyEvent(cl, XK_Alt_L, FALSE);
|
||||||
|
leftAltKeyDown = FALSE;
|
||||||
|
rfbClientLog("released left Alt key\n");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case SDL_MOUSEWHEEL:
|
||||||
|
{
|
||||||
|
int steps;
|
||||||
|
if (viewOnly)
|
||||||
|
break;
|
||||||
|
if(e->wheel.y > 0)
|
||||||
|
for(steps = 0; steps < e->wheel.y; ++steps) {
|
||||||
|
SendPointerEvent(cl, x, y, rfbButton4Mask);
|
||||||
|
SendPointerEvent(cl, x, y, 0);
|
||||||
|
}
|
||||||
|
if(e->wheel.y < 0)
|
||||||
|
for(steps = 0; steps > e->wheel.y; --steps) {
|
||||||
|
SendPointerEvent(cl, x, y, rfbButton5Mask);
|
||||||
|
SendPointerEvent(cl, x, y, 0);
|
||||||
|
}
|
||||||
|
if(e->wheel.x > 0)
|
||||||
|
for(steps = 0; steps < e->wheel.x; ++steps) {
|
||||||
|
SendPointerEvent(cl, x, y, 0b01000000);
|
||||||
|
SendPointerEvent(cl, x, y, 0);
|
||||||
|
}
|
||||||
|
if(e->wheel.x < 0)
|
||||||
|
for(steps = 0; steps > e->wheel.x; --steps) {
|
||||||
|
SendPointerEvent(cl, x, y, 0b00100000);
|
||||||
|
SendPointerEvent(cl, x, y, 0);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case SDL_MOUSEBUTTONUP:
|
||||||
|
case SDL_MOUSEBUTTONDOWN:
|
||||||
|
case SDL_MOUSEMOTION:
|
||||||
|
{
|
||||||
|
int state, i;
|
||||||
|
if (viewOnly)
|
||||||
|
break;
|
||||||
|
if (e->type == SDL_MOUSEMOTION) {
|
||||||
|
x = e->motion.x;
|
||||||
|
y = e->motion.y;
|
||||||
|
state = e->motion.state;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
x = e->button.x;
|
||||||
|
y = e->button.y;
|
||||||
|
state = e->button.button;
|
||||||
|
for (i = 0; buttonMapping[i].sdl; i++)
|
||||||
|
if (state == buttonMapping[i].sdl) {
|
||||||
|
state = buttonMapping[i].rfb;
|
||||||
|
if (e->type == SDL_MOUSEBUTTONDOWN)
|
||||||
|
buttonMask |= state;
|
||||||
|
else
|
||||||
|
buttonMask &= ~state;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SendPointerEvent(cl, x, y, buttonMask);
|
||||||
|
buttonMask &= ~(rfbButton4Mask | rfbButton5Mask);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case SDL_KEYUP:
|
||||||
|
case SDL_KEYDOWN:
|
||||||
|
if (viewOnly)
|
||||||
|
break;
|
||||||
|
SendKeyEvent(cl, SDL_key2rfbKeySym(&e->key),
|
||||||
|
e->type == SDL_KEYDOWN ? TRUE : FALSE);
|
||||||
|
if (e->key.keysym.sym == SDLK_RALT)
|
||||||
|
rightAltKeyDown = e->type == SDL_KEYDOWN;
|
||||||
|
if (e->key.keysym.sym == SDLK_LALT)
|
||||||
|
leftAltKeyDown = e->type == SDL_KEYDOWN;
|
||||||
|
break;
|
||||||
|
case SDL_TEXTINPUT:
|
||||||
|
if (viewOnly)
|
||||||
|
break;
|
||||||
|
rfbKeySym sym = utf8char2rfbKeySym(e->text.text);
|
||||||
|
SendKeyEvent(cl, sym, TRUE);
|
||||||
|
SendKeyEvent(cl, sym, FALSE);
|
||||||
|
break;
|
||||||
|
case SDL_QUIT:
|
||||||
|
if(listenLoop)
|
||||||
|
{
|
||||||
|
cleanup(cl);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rfbClientCleanup(cl);
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
rfbClientLog("ignore SDL event: 0x%x\n", e->type);
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
static void got_selection(rfbClient *cl, const char *text, int len)
|
||||||
|
{
|
||||||
|
rfbClientLog("received clipboard text '%s'\n", text);
|
||||||
|
if(SDL_SetClipboardText(text) != 0)
|
||||||
|
rfbClientErr("could not set received clipboard text: %s\n", SDL_GetError());
|
||||||
|
}
|
||||||
|
static rfbCredential* get_credential(rfbClient* cl, int credentialType){
|
||||||
|
rfbCredential *c = malloc(sizeof(rfbCredential));
|
||||||
|
c->userCredential.username = malloc(RFB_BUF_SIZE);
|
||||||
|
c->userCredential.password = malloc(RFB_BUF_SIZE);
|
||||||
|
if(credentialType != rfbCredentialTypeUser) {
|
||||||
|
rfbClientErr("something else than username and password required for authentication\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
rfbClientLog("username and password required for authentication!\n");
|
||||||
|
printf("user: ");
|
||||||
|
fgets(c->userCredential.username, RFB_BUF_SIZE, stdin);
|
||||||
|
printf("pass: ");
|
||||||
|
fgets(c->userCredential.password, RFB_BUF_SIZE, stdin);
|
||||||
|
/* remove trailing newlines */
|
||||||
|
c->userCredential.username[strcspn(c->userCredential.username, "\n")] = 0;
|
||||||
|
c->userCredential.password[strcspn(c->userCredential.password, "\n")] = 0;
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
#ifdef mac
|
||||||
|
#define main SDLmain
|
||||||
|
#endif
|
||||||
|
int main(int argc,char** argv) {
|
||||||
|
rfbClient* cl;
|
||||||
|
int i, j;
|
||||||
|
SDL_Event e;
|
||||||
|
#ifdef LOG_TO_FILE
|
||||||
|
rfbClientLog=rfbClientErr=log_to_file;
|
||||||
|
#endif
|
||||||
|
for (i = 1, j = 1; i < argc; i++)
|
||||||
|
if (!strcmp(argv[i], "-viewonly"))
|
||||||
|
viewOnly = 1;
|
||||||
|
else if (!strcmp(argv[i], "-resizable"))
|
||||||
|
enableResizable = 1;
|
||||||
|
else if (!strcmp(argv[i], "-no-resizable"))
|
||||||
|
enableResizable = 0;
|
||||||
|
else if (!strcmp(argv[i], "-listen")) {
|
||||||
|
listenLoop = 1;
|
||||||
|
argv[i] = "-listennofork";
|
||||||
|
++j;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (i != j)
|
||||||
|
argv[j] = argv[i];
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
argc = j;
|
||||||
|
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE);
|
||||||
|
atexit(SDL_Quit);
|
||||||
|
signal(SIGINT, exit);
|
||||||
|
do {
|
||||||
|
/* 16-bit: cl=rfbGetClient(5,3,2); */
|
||||||
|
cl=rfbGetClient(8,3,4);
|
||||||
|
cl->MallocFrameBuffer=resize;
|
||||||
|
cl->canHandleNewFBSize = TRUE;
|
||||||
|
cl->GotFrameBufferUpdate=update;
|
||||||
|
cl->HandleKeyboardLedState=kbd_leds;
|
||||||
|
cl->HandleTextChat=text_chat;
|
||||||
|
cl->GotXCutText = got_selection;
|
||||||
|
cl->GetCredential = get_credential;
|
||||||
|
cl->listenPort = LISTEN_PORT_OFFSET;
|
||||||
|
cl->listen6Port = LISTEN_PORT_OFFSET;
|
||||||
|
if(!rfbInitClient(cl,&argc,argv))
|
||||||
|
{
|
||||||
|
cl = NULL; /* rfbInitClient has already freed the client struct */
|
||||||
|
cleanup(cl);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
while(1) {
|
||||||
|
if(SDL_PollEvent(&e)) {
|
||||||
|
/*
|
||||||
|
handleSDLEvent() return 0 if user requested window close.
|
||||||
|
In this case, handleSDLEvent() will have called cleanup().
|
||||||
|
*/
|
||||||
|
if(!handleSDLEvent(cl, &e))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
i=WaitForMessage(cl,500);
|
||||||
|
if(i<0)
|
||||||
|
{
|
||||||
|
cleanup(cl);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if(i)
|
||||||
|
if(!HandleRFBServerMessage(cl))
|
||||||
|
{
|
||||||
|
cleanup(cl);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while(listenLoop);
|
||||||
|
return 0;
|
||||||
|
}
|
@ -1,9 +0,0 @@
|
|||||||
do_install:append() {
|
|
||||||
# grant all permission to sudo group
|
|
||||||
sed -i 's/^#\s*\(%sudo\s*ALL=(ALL:ALL)\s*ALL\)/\1/' ${D}/${sysconfdir}/sudoers
|
|
||||||
# allow sudo group to power off/reboot system without password
|
|
||||||
cat << EOF >> ${D}/${sysconfdir}/sudoers
|
|
||||||
## sudo user group is allowed to execute halt and reboot
|
|
||||||
%sudo ALL=NOPASSWD: /sbin/halt, /sbin/reboot, /sbin/poweroff, /usr/bin/swaylock
|
|
||||||
EOF
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
DEPENS += " mesa libdrm alsa virtual/libgbm virtual/libgles2 virtual/libgl udev libudev "
|
|
||||||
|
|
||||||
PACKAGECONFIG = " kmsdrm opengl gles2 alsa libusb "
|
|
||||||
# PACKAGECONFIG:remove = "x11 wayland"
|
|
@ -1,7 +0,0 @@
|
|||||||
|
|
||||||
# change default weston user to diya
|
|
||||||
do_install:append() {
|
|
||||||
if [ -e ${D}/${sysconfdir}/init.d/weston ]; then
|
|
||||||
sed -i 's#WESTON_USER=weston#WESTON_USER=diya WESTON_GROUP=weston#' ${D}/${sysconfdir}/init.d/weston
|
|
||||||
fi
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
CONFIG_TOUCHSCREEN_GOODIX=m
|
|
||||||
CONFIG_OVERLAY_FS=y
|
|
||||||
CONFIG_BLK_DEV_INITRD=y
|
|
||||||
CONFIG_INITRAMFS_SOURCE=""
|
|
||||||
CONFIG_RD_GZIP=y
|
|
1
recipes-kernel/linux/files/goodix.cfg
Normal file
1
recipes-kernel/linux/files/goodix.cfg
Normal file
@ -0,0 +1 @@
|
|||||||
|
CONFIG_TOUCHSCREEN_GOODIX=m
|
@ -2,5 +2,5 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
|||||||
|
|
||||||
# inherit kernel
|
# inherit kernel
|
||||||
SRC_URI += " \
|
SRC_URI += " \
|
||||||
file://diya.cfg \
|
file://goodix.cfg \
|
||||||
"
|
"
|
5
recipes-multimedia/libsdl2/libsdl2_%.bbappend
Normal file
5
recipes-multimedia/libsdl2/libsdl2_%.bbappend
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
DEPENS += " mesa libdrm virtual/libgbm alsa virtual/libgles2 "
|
||||||
|
EXTRA_OECONF:append=" --disable-video-x11 \
|
||||||
|
--disable-video-wayland \
|
||||||
|
--enable-video-kmsdrm \
|
||||||
|
--enable-video-opengles"
|
Binary file not shown.
@ -1,30 +0,0 @@
|
|||||||
DESCRIPTION = "leafpad for GTK3"
|
|
||||||
|
|
||||||
LICENSE = "GPL-3.0-only"
|
|
||||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-3.0-only;md5=c79ff39f19dfec6d293b95dea7b07891"
|
|
||||||
|
|
||||||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
|
||||||
|
|
||||||
S="${WORKDIR}"
|
|
||||||
|
|
||||||
DEPENDS = "gtk+3 pango cairo harfbuzz gdk-pixbuf intltool-native"
|
|
||||||
|
|
||||||
inherit pkgconfig
|
|
||||||
|
|
||||||
|
|
||||||
SRC_URI = "file://l3afpad-0.8.18.1.11.tar.gz"
|
|
||||||
SRC_URI[sha256sum] = "005457fa35a7e37024e403852a21a5c7362a0314a8de9b7fff73b1e7802d8959"
|
|
||||||
|
|
||||||
do_configure () {
|
|
||||||
./configure --host=x86_64-unknown-linux --target=aarch64-poky-linux
|
|
||||||
}
|
|
||||||
|
|
||||||
do_compile () {
|
|
||||||
make
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install () {
|
|
||||||
DESTDIR=${D} make install
|
|
||||||
}
|
|
||||||
|
|
||||||
FILES:${PN} += "/usr/local/*"
|
|
@ -1,334 +0,0 @@
|
|||||||
Set Term = "foot"
|
|
||||||
|
|
||||||
# Task Switcher
|
|
||||||
switcher {
|
|
||||||
interval = 700
|
|
||||||
icons = true
|
|
||||||
labels = false
|
|
||||||
cols = 5
|
|
||||||
}
|
|
||||||
|
|
||||||
function("SfwbarInit") {
|
|
||||||
SetBarId "bar-0"
|
|
||||||
SetLayer "bottom"
|
|
||||||
}
|
|
||||||
|
|
||||||
function("ToggleMinimize") {
|
|
||||||
[!Minimized] Minimize
|
|
||||||
[Minimized] UnMinimize
|
|
||||||
}
|
|
||||||
|
|
||||||
function("ToggleMaximize") {
|
|
||||||
[!Maximized] Maximize
|
|
||||||
[Maximized] UnMaximize
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function("ShowDesktopSaveFocus") {
|
|
||||||
[Focused] UserState "2:on"
|
|
||||||
[!Focused] UserState "2:off"
|
|
||||||
}
|
|
||||||
|
|
||||||
function("ShowdesktopMinimize") {
|
|
||||||
[!Minimized] UserState "on"
|
|
||||||
[Minimized] UserState "off"
|
|
||||||
[!Minimized] Minimize
|
|
||||||
}
|
|
||||||
|
|
||||||
function("ShowDesktopRestore") {
|
|
||||||
[UserState] UnMinimize
|
|
||||||
}
|
|
||||||
|
|
||||||
function("ShowDesktopRestoreFocus") {
|
|
||||||
[UserState2] Focus
|
|
||||||
}
|
|
||||||
|
|
||||||
function("ShowDesktopCheckWindow") {
|
|
||||||
[!Minimized] UserState "target","2:on"
|
|
||||||
}
|
|
||||||
|
|
||||||
function("ShowDesktopReminimize")
|
|
||||||
{
|
|
||||||
[!Minimized] UserState "on"
|
|
||||||
[!Minimized] Minimize
|
|
||||||
}
|
|
||||||
|
|
||||||
function("ShowDesktopUnminimized") {
|
|
||||||
[UserState2 | Children] Function "ShowDesktopSaveFocus"
|
|
||||||
[UserState2 | Children] Function "ShowDesktopReminimize"
|
|
||||||
[!UserState2 | Children] Function "ShowDesktopRestore"
|
|
||||||
[!UserState2 | Children] Function "ShowDesktopRestoreFocus"
|
|
||||||
[!UserState2] UserState "off"
|
|
||||||
[UserState2] UserState "on"
|
|
||||||
}
|
|
||||||
|
|
||||||
function("ShowDesktop") {
|
|
||||||
[!UserState | Children] Function "ShowDesktopSaveFocus"
|
|
||||||
[!UserState | Children] Function "ShowDesktopMinimize"
|
|
||||||
[UserState] UserState "2:off"
|
|
||||||
[UserState| Children ] Function "ShowDesktopCheckWindow"
|
|
||||||
[UserState] Function "target","ShowDesktopUnminimized"
|
|
||||||
[!UserState] UserState "on"
|
|
||||||
}
|
|
||||||
|
|
||||||
menu("winops") {
|
|
||||||
item("Focus", Focus );
|
|
||||||
item("Close", Close );
|
|
||||||
item("Toggle minimize", Function "ToggleMinimize" );
|
|
||||||
item("Toggle maximize", Function "ToggleMaximize" );
|
|
||||||
}
|
|
||||||
|
|
||||||
# Panel layout
|
|
||||||
|
|
||||||
layout {
|
|
||||||
button {
|
|
||||||
style = "launcher"
|
|
||||||
value = "/usr/share/icons/Adwaita/scalable/actions/view-app-grid-symbolic.svg"
|
|
||||||
action = Exec "wtype -M alt ' ' -m alt"
|
|
||||||
}
|
|
||||||
button {
|
|
||||||
style = "launcher"
|
|
||||||
value = "/usr/share/icons/Adwaita/scalable/actions/system-run-symbolic.svg"
|
|
||||||
tooltip = "Quick run"
|
|
||||||
action = Exec "bash -c \"`drun`\""
|
|
||||||
}
|
|
||||||
button {
|
|
||||||
value = "/usr/share/icons/Adwaita/scalable/devices/tv-symbolic.svg"
|
|
||||||
style = "launcher"
|
|
||||||
tooltip = "Show Desktop"
|
|
||||||
action = Function "target", "ShowDesktop"
|
|
||||||
}
|
|
||||||
button {
|
|
||||||
style = "launcher"
|
|
||||||
value = $Term
|
|
||||||
tooltip = "Terminal"
|
|
||||||
action = Exec $Term
|
|
||||||
}
|
|
||||||
taskbar "target" {
|
|
||||||
rows = 1
|
|
||||||
css = "* { -GtkWidget-hexpand:false; }" # stretch horizontally
|
|
||||||
icons = true
|
|
||||||
group = false
|
|
||||||
sort = false
|
|
||||||
labels = true
|
|
||||||
action[3] = Menu "winops"
|
|
||||||
action[2] = Close
|
|
||||||
}
|
|
||||||
label {
|
|
||||||
css = "* { -GtkWidget-hexpand: true; }"
|
|
||||||
}
|
|
||||||
tray {
|
|
||||||
rows = 1
|
|
||||||
}
|
|
||||||
include("network-module.widget")
|
|
||||||
include("cpu.widget")
|
|
||||||
include("memory.widget")
|
|
||||||
}
|
|
||||||
|
|
||||||
#CSS
|
|
||||||
button#launcher, button#module{
|
|
||||||
padding: 0px 2px 0px 2px;
|
|
||||||
/*background: none;
|
|
||||||
background-color: #5F548E;*/
|
|
||||||
border-style:none;
|
|
||||||
box-shadow: none;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
window {
|
|
||||||
-GtkWidget-direction: top;
|
|
||||||
/*background-color: rgba(0,0,0,0.6);*/
|
|
||||||
border-color: rgba(0,0,0,0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
#hidden {
|
|
||||||
-GtkWidget-visible: false;
|
|
||||||
}
|
|
||||||
|
|
||||||
button#taskbar_normal grid {
|
|
||||||
-GtkWidget-hexpand: false;
|
|
||||||
padding-right: 0px;
|
|
||||||
margin-right: 0px;
|
|
||||||
}
|
|
||||||
button#launcher image, button#taskbar_normal image, button#taskbar_active image, button#taskbar_normal:hover image {
|
|
||||||
-GtkWidget-vexpand: true;
|
|
||||||
box-shadow: none;
|
|
||||||
border: none;
|
|
||||||
border-image: none;
|
|
||||||
background-image: none;
|
|
||||||
background: none;
|
|
||||||
min-width: 24px;
|
|
||||||
min-height: 24px;
|
|
||||||
-gtk-icon-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
button#taskbar_normal label, button#taskbar_active label, button#taskbar_normal:hover label {
|
|
||||||
-GtkWidget-vexpand: true;
|
|
||||||
-GtkWidget-hexpand: false;
|
|
||||||
padding-left: 0.75mm;
|
|
||||||
padding-top: 0px;
|
|
||||||
padding-bottom: 0px;
|
|
||||||
font: 0.3cm Sans;
|
|
||||||
}
|
|
||||||
|
|
||||||
button#taskbar_normal , button#taskbar_active , button#taskbar_normal:hover {
|
|
||||||
padding-left: 0.75mm;
|
|
||||||
padding-top: 0.5mm;
|
|
||||||
padding-bottom: 0.5mm;
|
|
||||||
background-image: none;
|
|
||||||
border-radius: 0;
|
|
||||||
border-image: none;
|
|
||||||
-GtkWidget-hexpand: false;
|
|
||||||
-GtkWidget-vexpand: true;
|
|
||||||
background-color: rgba(119,119,119,0.2);
|
|
||||||
border: none;
|
|
||||||
/*border-color: rgba(119,119,119,0.3);*/
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
button#taskbar_normal label {
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
button#taskbar_active {
|
|
||||||
/* background-color: rgba(255,255,255,0.2);
|
|
||||||
border-color: rgba(255,255,255,0.4); */
|
|
||||||
border-bottom:3px solid #5F548E;
|
|
||||||
}
|
|
||||||
button#taskbar_active label, button#taskbar_normal:hover label {
|
|
||||||
color: #5F548E;
|
|
||||||
}
|
|
||||||
/* button#taskbar_active:hover*/
|
|
||||||
button#taskbar_normal:hover {
|
|
||||||
background-color: #d2d2d2;
|
|
||||||
border-color: rgba(234,234,234,0.44);
|
|
||||||
}
|
|
||||||
|
|
||||||
grid#switcher_active image,
|
|
||||||
grid#switcher_active {
|
|
||||||
min-width: 1.25cm;
|
|
||||||
min-height: 1.25cm;
|
|
||||||
border-image: none;
|
|
||||||
padding: 1.25mm;
|
|
||||||
background-color: #777777;
|
|
||||||
border: 0px;
|
|
||||||
box-shadow: none;
|
|
||||||
border-radius: 1.25mm;
|
|
||||||
-GtkWidget-hexpand: true;
|
|
||||||
}
|
|
||||||
|
|
||||||
grid#switcher_normal image,
|
|
||||||
grid#switcher_normal {
|
|
||||||
min-width: 1.25cm;
|
|
||||||
min-height: 1.25cm;
|
|
||||||
border-image: none;
|
|
||||||
padding: 1.25mm;
|
|
||||||
-GtkWidget-direction: right;
|
|
||||||
-GtkWidget-hexpand: true;
|
|
||||||
}
|
|
||||||
|
|
||||||
window#switcher {
|
|
||||||
border-style: solid;
|
|
||||||
border-width: 0.25mm;
|
|
||||||
border-color: #000000;
|
|
||||||
border-radius: 1.25mm;
|
|
||||||
padding: 1.25mm;
|
|
||||||
-GtkWidget-hexpand: true;
|
|
||||||
}
|
|
||||||
|
|
||||||
grid#switcher {
|
|
||||||
border-radius: 1.25mm;
|
|
||||||
padding: 1.25mm;
|
|
||||||
background-color: rgba(0,0,0,0.8);
|
|
||||||
border-color: rgba(119,119,119,0.8);
|
|
||||||
box-shadow: none;
|
|
||||||
-GtkWidget-hexpand: true;
|
|
||||||
}
|
|
||||||
|
|
||||||
button#tray_active,
|
|
||||||
button#tray_passive,
|
|
||||||
button#tray_attention {
|
|
||||||
background-image: none;
|
|
||||||
border: 0px;
|
|
||||||
padding: 0px 1px;
|
|
||||||
margin: 0px;
|
|
||||||
border-image: none;
|
|
||||||
border-radius: 0px;
|
|
||||||
outline-style: none;
|
|
||||||
box-shadow: none;
|
|
||||||
-GtkWidget-hexpand: true;
|
|
||||||
-GtkWidget-vexpand: true;
|
|
||||||
}
|
|
||||||
|
|
||||||
button#tray_active image,
|
|
||||||
button#tray_passive image,
|
|
||||||
button#tray_attention image {
|
|
||||||
min-width: 26px;
|
|
||||||
}
|
|
||||||
|
|
||||||
grid#layout {
|
|
||||||
padding: 0.25mm;
|
|
||||||
-GtkWidget-direction: right;
|
|
||||||
min-height: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
menu {
|
|
||||||
background-color: rgba(0,0,0,0.8);
|
|
||||||
border-color: rgba(119,119,119,0.3);
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
menuitem {
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
menu image {
|
|
||||||
min-width: 24px;
|
|
||||||
min-height: 24px;
|
|
||||||
padding-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
chart#cpu_chart {
|
|
||||||
background: rgba(127,127,127,0.3);
|
|
||||||
min-width: 9px;
|
|
||||||
-GtkWidget-vexpand: true;
|
|
||||||
margin: 2px;
|
|
||||||
border: 1px solid @theme_fg_color;
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
|
|
||||||
progressbar#memory {
|
|
||||||
-GtkWidget-direction: top;
|
|
||||||
-GtkWidget-vexpand: true;
|
|
||||||
min-width: 9px;
|
|
||||||
border: 1px solid @theme_fg_color;
|
|
||||||
margin: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
progressbar#memory trough {
|
|
||||||
min-height: 2px;
|
|
||||||
min-width: 9px;
|
|
||||||
border: none;
|
|
||||||
border-radius: 0px;
|
|
||||||
background: rgba(127,127,127,0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
progressbar#memory progress {
|
|
||||||
-GtkWidget-hexpand: true;
|
|
||||||
min-width: 9px;
|
|
||||||
border-radius: 0px;
|
|
||||||
border: none;
|
|
||||||
margin: 0px;
|
|
||||||
background-color: alpha(green,0.9);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
label {
|
|
||||||
font: 0.27cm Sans;
|
|
||||||
color: #ffffff;
|
|
||||||
text-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
* {
|
|
||||||
-GtkWidget-vexpand: true;
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
DESCRIPTION = "sfwbar pannel for wayland"
|
|
||||||
|
|
||||||
LICENSE = "GPL-3.0-only"
|
|
||||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-3.0-only;md5=c79ff39f19dfec6d293b95dea7b07891"
|
|
||||||
|
|
||||||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
|
||||||
|
|
||||||
DEPENDS = "gtk+3 gtk-layer-shell json-c wayland-native"
|
|
||||||
|
|
||||||
SRCREV = "${AUTOREV}"
|
|
||||||
|
|
||||||
SRC_URI = "git://github.com/LBCrion/sfwbar.git;protocol=https;branch=main"
|
|
||||||
SRC_URI += " file://sfwbar.config "
|
|
||||||
|
|
||||||
S="${WORKDIR}/git"
|
|
||||||
|
|
||||||
inherit meson pkgconfig
|
|
||||||
|
|
||||||
EXTRA_OEMESON += "--buildtype release"
|
|
||||||
|
|
||||||
do_install:append () {
|
|
||||||
install -d ${D}/${sysconfdir}/xdg/
|
|
||||||
install -d ${D}/${sysconfdir}/xdg/sfwbar/
|
|
||||||
install -m 0755 ${WORKDIR}/sfwbar.config ${D}/${sysconfdir}/xdg/sfwbar/
|
|
||||||
}
|
|
||||||
|
|
||||||
FILES:${PN} += "/usr/share/icons/*"
|
|
@ -1 +0,0 @@
|
|||||||
PACKAGECONFIG:remove = " systemd sysvinit man-pages "
|
|
@ -1 +0,0 @@
|
|||||||
PACKAGECONFIG:remove = " man-pages pam "
|
|
@ -1,320 +0,0 @@
|
|||||||
# Default config for tofi
|
|
||||||
#
|
|
||||||
# Copy this file to ~/.config/tofi/config and get customising!
|
|
||||||
#
|
|
||||||
# A complete reference of available options can be found in `man 5 tofi`.
|
|
||||||
|
|
||||||
#
|
|
||||||
### Fonts
|
|
||||||
#
|
|
||||||
# Font to use, either a path to a font file or a name.
|
|
||||||
#
|
|
||||||
# If a path is given, tofi will startup much quicker, but any
|
|
||||||
# characters not in the chosen font will fail to render.
|
|
||||||
#
|
|
||||||
# Otherwise, fonts are interpreted in Pango format.
|
|
||||||
font = "Sans"
|
|
||||||
|
|
||||||
# Point size of text.
|
|
||||||
font-size = 24
|
|
||||||
|
|
||||||
# Comma separated list of OpenType font feature settings to apply,
|
|
||||||
# if supported by the chosen font. The format is similar to the CSS
|
|
||||||
# "font-feature-settings" property.
|
|
||||||
#
|
|
||||||
# Examples:
|
|
||||||
#
|
|
||||||
# font-features = "smcp, c2sc" (all small caps)
|
|
||||||
# font-features = "liga 0" (disable ligatures)
|
|
||||||
font-features = ""
|
|
||||||
|
|
||||||
# Comma separated list of OpenType font variation settings to apply
|
|
||||||
# to variable fonts. The format is similar to the CSS
|
|
||||||
# "font-variation-settings" property.
|
|
||||||
#
|
|
||||||
# Examples:
|
|
||||||
#
|
|
||||||
# font-variations = "wght 900" (Extra bold)
|
|
||||||
# font-variations = "wdth 25, slnt -10" (Narrow and slanted)
|
|
||||||
font-variations = ""
|
|
||||||
|
|
||||||
# Perform font hinting. Only applies when a path to a font has been
|
|
||||||
# specified via `font`. Disabling font hinting speeds up text
|
|
||||||
# rendering appreciably, but will likely look poor at small font pixel
|
|
||||||
# sizes.
|
|
||||||
hint-font = true
|
|
||||||
|
|
||||||
#
|
|
||||||
### Text theming
|
|
||||||
#
|
|
||||||
# Default text color
|
|
||||||
#
|
|
||||||
# All text defaults to this color if not otherwise specified.
|
|
||||||
text-color = #FFFFFF
|
|
||||||
|
|
||||||
# All pieces of text have the same theming attributes available:
|
|
||||||
#
|
|
||||||
# *-color
|
|
||||||
# Foreground color
|
|
||||||
#
|
|
||||||
# *-background
|
|
||||||
# Background color
|
|
||||||
#
|
|
||||||
# *-background-padding
|
|
||||||
# Background padding in pixels (comma-delimited, CSS-style list).
|
|
||||||
# See "DIRECTIONAL VALUES" under `man 5 tofi` for more info.
|
|
||||||
#
|
|
||||||
# *-background-corner-radius
|
|
||||||
# Radius of background box corners in pixels
|
|
||||||
|
|
||||||
# Prompt text theme
|
|
||||||
# prompt-color = #FFFFFF
|
|
||||||
prompt-background = #00000000
|
|
||||||
prompt-background-padding = 0
|
|
||||||
prompt-background-corner-radius = 0
|
|
||||||
|
|
||||||
# Placeholder text theme
|
|
||||||
placeholder-color = #FFFFFFA8
|
|
||||||
placeholder-background = #00000000
|
|
||||||
placeholder-background-padding = 0
|
|
||||||
placeholder-background-corner-radius = 0
|
|
||||||
|
|
||||||
# Input text theme
|
|
||||||
# input-color = #FFFFFF
|
|
||||||
input-background = #00000000
|
|
||||||
input-background-padding = 0
|
|
||||||
input-background-corner-radius = 0
|
|
||||||
|
|
||||||
# Default result text theme
|
|
||||||
# default-result-color = #FFFFFF
|
|
||||||
default-result-background = #00000000
|
|
||||||
default-result-background-padding = 0
|
|
||||||
default-result-background-corner-radius = 0
|
|
||||||
|
|
||||||
# Alternate (even-numbered) result text theme
|
|
||||||
#
|
|
||||||
# If unspecified, these all default to the corresponding
|
|
||||||
# default-result-* attribute.
|
|
||||||
#
|
|
||||||
# alternate-result-color = #FFFFFF
|
|
||||||
# alternate-result-background = #00000000
|
|
||||||
# alternate-result-background-padding = 0
|
|
||||||
# alternate-result-background-corner-radius = 0
|
|
||||||
|
|
||||||
# Selection text
|
|
||||||
selection-color = #F92672
|
|
||||||
selection-background = #00000000
|
|
||||||
selection-background-padding = 0
|
|
||||||
selection-background-corner-radius = 0
|
|
||||||
|
|
||||||
# Matching portion of selection text
|
|
||||||
selection-match-color = #00000000
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
### Text cursor theme
|
|
||||||
#
|
|
||||||
# Style of the optional text cursor.
|
|
||||||
#
|
|
||||||
# Supported values: bar, block, underscore
|
|
||||||
text-cursor-style = bar
|
|
||||||
|
|
||||||
# Color of the text cursor
|
|
||||||
#
|
|
||||||
# If unspecified, defaults to the same as input-color
|
|
||||||
# text-cursor-color = #FFFFFF
|
|
||||||
|
|
||||||
# Color of text behind the text cursor when text-cursor-style = block
|
|
||||||
#
|
|
||||||
# If unspecified, defaults to the same as background-color
|
|
||||||
# text-cursor-background = #000000
|
|
||||||
|
|
||||||
# Corner radius of the text cursor
|
|
||||||
text-cursor-corner-radius = 0
|
|
||||||
|
|
||||||
# Thickness of the bar and underscore text cursors.
|
|
||||||
#
|
|
||||||
# If unspecified, defaults to a font-dependent value when
|
|
||||||
# text-cursor-style = underscore, or to 2 otherwise.
|
|
||||||
# text-cursor-thickness = 2
|
|
||||||
|
|
||||||
#
|
|
||||||
### Text layout
|
|
||||||
#
|
|
||||||
# Prompt to display.
|
|
||||||
prompt-text = "run: "
|
|
||||||
|
|
||||||
# Extra horizontal padding between prompt and input.
|
|
||||||
prompt-padding = 0
|
|
||||||
|
|
||||||
# Placeholder input text.
|
|
||||||
placeholder-text = ""
|
|
||||||
|
|
||||||
# Maximum number of results to display.
|
|
||||||
# If 0, tofi will draw as many results as it can fit in the window.
|
|
||||||
num-results = 0
|
|
||||||
|
|
||||||
# Spacing between results in pixels. Can be negative.
|
|
||||||
result-spacing = 0
|
|
||||||
|
|
||||||
# List results horizontally.
|
|
||||||
horizontal = false
|
|
||||||
|
|
||||||
# Minimum width of input in horizontal mode.
|
|
||||||
min-input-width = 0
|
|
||||||
|
|
||||||
#
|
|
||||||
### Window theming
|
|
||||||
#
|
|
||||||
# Width and height of the window. Can be pixels or a percentage.
|
|
||||||
width = 640
|
|
||||||
height = 480
|
|
||||||
|
|
||||||
# Window background color
|
|
||||||
background-color = #1B1D1E
|
|
||||||
|
|
||||||
# Width of the border outlines in pixels.
|
|
||||||
outline-width = 4
|
|
||||||
|
|
||||||
# Border outline color
|
|
||||||
outline-color = #080800
|
|
||||||
|
|
||||||
# Width of the border in pixels.
|
|
||||||
border-width = 12
|
|
||||||
|
|
||||||
# Border color
|
|
||||||
border-color = #F92672
|
|
||||||
|
|
||||||
# Radius of window corners in pixels.
|
|
||||||
corner-radius = 0
|
|
||||||
|
|
||||||
# Padding between borders and text. Can be pixels or a percentage.
|
|
||||||
padding-top = 8
|
|
||||||
padding-bottom = 8
|
|
||||||
padding-left = 8
|
|
||||||
padding-right = 8
|
|
||||||
|
|
||||||
# Whether to clip text drawing to be within the specified padding. This
|
|
||||||
# is mostly important for allowing text to be inset from the border,
|
|
||||||
# while still allowing text backgrounds to reach right to the edge.
|
|
||||||
clip-to-padding = true
|
|
||||||
|
|
||||||
# Whether to scale the window by the output's scale factor.
|
|
||||||
scale = true
|
|
||||||
|
|
||||||
#
|
|
||||||
### Window positioning
|
|
||||||
#
|
|
||||||
# The name of the output to appear on. An empty string will use the
|
|
||||||
# default output chosen by the compositor.
|
|
||||||
output = ""
|
|
||||||
|
|
||||||
# Location on screen to anchor the window to.
|
|
||||||
#
|
|
||||||
# Supported values: top-left, top, top-right, right, bottom-right,
|
|
||||||
# bottom, bottom-left, left, center.
|
|
||||||
anchor = center
|
|
||||||
|
|
||||||
# Set the size of the exclusive zone.
|
|
||||||
#
|
|
||||||
# A value of -1 means ignore exclusive zones completely.
|
|
||||||
# A value of 0 will move tofi out of the way of other windows' zones.
|
|
||||||
# A value greater than 0 will set that much space as an exclusive zone.
|
|
||||||
#
|
|
||||||
# Values greater than 0 are only meaningful when tofi is anchored to a
|
|
||||||
# single edge.
|
|
||||||
exclusive-zone = -1
|
|
||||||
|
|
||||||
# Window offset from edge of screen. Only has an effect when anchored
|
|
||||||
# to the relevant edge. Can be pixels or a percentage.
|
|
||||||
margin-top = 0
|
|
||||||
margin-bottom = 0
|
|
||||||
margin-left = 0
|
|
||||||
margin-right = 0
|
|
||||||
|
|
||||||
#
|
|
||||||
### Behaviour
|
|
||||||
#
|
|
||||||
# Hide the mouse cursor.
|
|
||||||
hide-cursor = true
|
|
||||||
|
|
||||||
# Show a text cursor in the input field.
|
|
||||||
text-cursor = true
|
|
||||||
|
|
||||||
# Sort results by number of usages in run and drun modes.
|
|
||||||
history = true
|
|
||||||
|
|
||||||
# Specify an alternate file to read and store history information
|
|
||||||
# from / to. This shouldn't normally be needed, and is intended to
|
|
||||||
# facilitate the creation of custom modes.
|
|
||||||
# history-file = /path/to/histfile
|
|
||||||
|
|
||||||
# Select the matching algorithm used. If normal, substring matching is
|
|
||||||
# used, weighted to favour matches closer to the beginning of the
|
|
||||||
# string. If prefix, only substrings at the beginning of the string are
|
|
||||||
# matched. If fuzzy, searching is performed via a simple fuzzy matching
|
|
||||||
# algorithm.
|
|
||||||
#
|
|
||||||
# Supported values: normal, prefix, fuzzy
|
|
||||||
matching-algorithm = normal
|
|
||||||
|
|
||||||
# If true, require a match to allow a selection to be made. If false,
|
|
||||||
# making a selection with no matches will print input to stdout.
|
|
||||||
# In drun mode, this is always true.
|
|
||||||
require-match = true
|
|
||||||
|
|
||||||
# If true, automatically accept a result if it is the only one
|
|
||||||
# remaining. If there's only one result on startup, window creation is
|
|
||||||
# skipped altogether.
|
|
||||||
auto-accept-single = false
|
|
||||||
|
|
||||||
# If true, typed input will be hidden, and what is displayed (if
|
|
||||||
# anything) is determined by the hidden-character option.
|
|
||||||
hide-input = false
|
|
||||||
|
|
||||||
# Replace displayed input characters with a character. If the empty
|
|
||||||
# string is given, input will be completely hidden.
|
|
||||||
# This option only has an effect when hide-input is set to true.
|
|
||||||
hidden-character = "*"
|
|
||||||
|
|
||||||
# If true, use physical keys for shortcuts, regardless of the current
|
|
||||||
# keyboard layout. If false, use the current layout's keys.
|
|
||||||
physical-keybindings = true
|
|
||||||
|
|
||||||
# Instead of printing the selected entry, print the 1-based index of
|
|
||||||
# the selection. This option has no effect in run or drun mode. If
|
|
||||||
# require-match is set to false, non-matching input will still result
|
|
||||||
# in the input being printed.
|
|
||||||
print-index = false
|
|
||||||
|
|
||||||
# If true, directly launch applications on selection when in drun mode.
|
|
||||||
# Otherwise, just print the command line to stdout.
|
|
||||||
drun-launch = false
|
|
||||||
|
|
||||||
# The terminal to run terminal programs in when in drun mode.
|
|
||||||
# This option has no effect if drun-launch is set to true.
|
|
||||||
# Defaults to the value of the TERMINAL environment variable.
|
|
||||||
terminal = foot
|
|
||||||
|
|
||||||
# Delay keyboard initialisation until after the first draw to screen.
|
|
||||||
# This option is experimental, and will cause tofi to miss keypresses
|
|
||||||
# for a short time after launch. The only reason to use this option is
|
|
||||||
# performance on slow systems.
|
|
||||||
late-keyboard-init = false
|
|
||||||
|
|
||||||
# If true, allow multiple simultaneous processes.
|
|
||||||
# If false, create a lock file on startup to prevent multiple instances
|
|
||||||
# from running simultaneously.
|
|
||||||
multi-instance = false
|
|
||||||
|
|
||||||
# Assume input is plain ASCII, and disable some Unicode handling
|
|
||||||
# functions. This is faster, but means e.g. a search for "e" will not
|
|
||||||
# match "é".
|
|
||||||
ascii-input = false
|
|
||||||
|
|
||||||
#
|
|
||||||
### Inclusion
|
|
||||||
#
|
|
||||||
# Configs can be split between multiple files, and then included
|
|
||||||
# within each other.
|
|
||||||
# include = /path/to/config
|
|
@ -1,9 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
|
|
||||||
config="/etc/xdg/tofi/config"
|
|
||||||
|
|
||||||
if [ -e "$HOME/.config/tofi/config" ]; then
|
|
||||||
config="$HOME/.config/tofi/config"
|
|
||||||
fi
|
|
||||||
|
|
||||||
tofi-drun -c "$config"
|
|
@ -1,27 +0,0 @@
|
|||||||
DESCRIPTION = "tofi menu for wayland"
|
|
||||||
|
|
||||||
LICENSE = "MIT"
|
|
||||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
|
||||||
|
|
||||||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
|
||||||
|
|
||||||
DEPENDS = "wayland freetype wayland-native wayland-protocols-native wayland-protocols harfbuzz pango libxkbcommon"
|
|
||||||
|
|
||||||
SRCREV = "${AUTOREV}"
|
|
||||||
|
|
||||||
SRC_URI = "git://github.com/philj56/tofi.git;protocol=https;branch=master"
|
|
||||||
SRC_URI += " file://config file://drun "
|
|
||||||
|
|
||||||
S="${WORKDIR}/git"
|
|
||||||
|
|
||||||
inherit meson pkgconfig
|
|
||||||
|
|
||||||
EXTRA_OEMESON += "--buildtype release"
|
|
||||||
|
|
||||||
do_install:append () {
|
|
||||||
# replace the default config
|
|
||||||
install -m 0755 ${WORKDIR}/drun ${D}/usr/bin/
|
|
||||||
install -m 0755 ${WORKDIR}/config ${D}/${sysconfdir}/xdg/tofi/
|
|
||||||
}
|
|
||||||
|
|
||||||
FILES:${PN} += "/usr/share/*"
|
|
@ -1,23 +0,0 @@
|
|||||||
DESCRIPTION = "wlopm"
|
|
||||||
|
|
||||||
LICENSE = "GPL-3.0-only"
|
|
||||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-3.0-only;md5=c79ff39f19dfec6d293b95dea7b07891"
|
|
||||||
|
|
||||||
|
|
||||||
DEPENDS = "wayland wayland-native wayland-protocols"
|
|
||||||
|
|
||||||
SRCREV = "${AUTOREV}"
|
|
||||||
|
|
||||||
SRC_URI = "git://git.iohub.dev/dany/wlopm.git;protocol=https;branch=master"
|
|
||||||
|
|
||||||
S="${WORKDIR}/git"
|
|
||||||
|
|
||||||
do_compile () {
|
|
||||||
oe_runmake
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install() {
|
|
||||||
oe_runmake install DESTDIR='${D}'
|
|
||||||
}
|
|
||||||
|
|
||||||
FILES:${PN} += "/usr/local/*"
|
|
@ -1,17 +0,0 @@
|
|||||||
DESCRIPTION = "virtual key event for wayland"
|
|
||||||
|
|
||||||
LICENSE = "MIT"
|
|
||||||
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
|
||||||
|
|
||||||
|
|
||||||
DEPENDS = "wayland wayland-native wayland-protocols-native wayland-protocols libxkbcommon"
|
|
||||||
|
|
||||||
SRCREV = "${AUTOREV}"
|
|
||||||
|
|
||||||
SRC_URI = "git://github.com/atx/wtype.git;protocol=https;branch=master"
|
|
||||||
|
|
||||||
S="${WORKDIR}/git"
|
|
||||||
|
|
||||||
inherit meson pkgconfig
|
|
||||||
|
|
||||||
EXTRA_OEMESON += "--buildtype release"
|
|
@ -1,38 +0,0 @@
|
|||||||
# Example autostart file
|
|
||||||
|
|
||||||
# Set background color
|
|
||||||
swaybg -i /etc/xdg/labwc/wpp.jpg >/dev/null 2>&1 &
|
|
||||||
|
|
||||||
wlr-randr --output DPI-1 --transform 90
|
|
||||||
|
|
||||||
# Configure output directives such as mode, position, scale and transform.
|
|
||||||
# Use wlr-randr to get your output names
|
|
||||||
# Example ~/.config/kanshi/config below:
|
|
||||||
# profile {
|
|
||||||
# output HDMI-A-1 position 1366,0
|
|
||||||
# output eDP-1 position 0,0
|
|
||||||
# }
|
|
||||||
# kanshi >/dev/null 2>&1 &
|
|
||||||
|
|
||||||
# Launch a panel such as yambar or waybar.
|
|
||||||
# waybar >/dev/null 2>&1 &
|
|
||||||
|
|
||||||
# Enable notifications. Typically GNOME/KDE application notifications go
|
|
||||||
# through the org.freedesktop.Notifications D-Bus API and require a client such
|
|
||||||
# as mako to function correctly. Thunderbird is an example of this.
|
|
||||||
# mako >/dev/null 2>&1 &
|
|
||||||
|
|
||||||
# Lock screen after 1 minute; turn off display after another 5 minutes.
|
|
||||||
#
|
|
||||||
# Note that in the context of idle system power management, it is *NOT* a good
|
|
||||||
# idea to turn off displays by 'disabling outputs' for example by
|
|
||||||
# `wlr-randr --output <whatever> --off` because this re-arranges views
|
|
||||||
# (since a837fef). Instead use a wlr-output-power-management client such as
|
|
||||||
# https://git.sr.ht/~leon_plickat/wlopm
|
|
||||||
swayidle -w timeout 60 'wlopm --off DPI-1' resume 'wlopm --on DPI-1' &
|
|
||||||
|
|
||||||
SFWBAR_CNF="/etc/xdg/sfwbar/sfwbar.config"
|
|
||||||
if [ -e "$HOME/.config/sfwbar/sfwbar.config" ]; then
|
|
||||||
SFWBAR_CNF="$HOME/.config/sfwbar/sfwbar.config"
|
|
||||||
fi
|
|
||||||
sfwbar -f "$SFWBAR_CNF"
|
|
@ -1,28 +0,0 @@
|
|||||||
# Example environment file
|
|
||||||
|
|
||||||
# This allows xdg-desktop-portal-wlr to function (e.g. for screen-recording)
|
|
||||||
XDG_CURRENT_DESKTOP=wlroots
|
|
||||||
|
|
||||||
# Set keyboard layout to Swedish
|
|
||||||
# XKB_DEFAULT_LAYOUT=se
|
|
||||||
|
|
||||||
# Set two keyboard layouts and toggle between them using alt+shift
|
|
||||||
# XKB_DEFAULT_LAYOUT=se,de
|
|
||||||
XKB_DEFAULT_OPTIONS=grp:alt_shift_toggle
|
|
||||||
|
|
||||||
# Force firefox to use wayland backend
|
|
||||||
# MOZ_ENABLE_WAYLAND=1
|
|
||||||
|
|
||||||
# Set cursor theme.
|
|
||||||
# Find icons themes with the command below or similar:
|
|
||||||
# find /usr/share/icons/ -type d -name "cursors"
|
|
||||||
XCURSOR_THEME=breeze_cursors
|
|
||||||
|
|
||||||
# Disable hardware cursors. Most users wouldn't want to do this, but if you
|
|
||||||
# are experiencing issues with disappearing cursors, this might fix it.
|
|
||||||
# WLR_NO_HARDWARE_CURSORS=1
|
|
||||||
|
|
||||||
# For Java applications such as JetBrains/Intellij Idea, set this variable
|
|
||||||
# to avoid menus with incorrect offset and blank windows
|
|
||||||
# See https://github.com/swaywm/sway/issues/595
|
|
||||||
# _JAVA_AWT_WM_NONREPARENTING=1
|
|
@ -1,53 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
### BEGIN INIT INFO
|
|
||||||
# Provides: labwc
|
|
||||||
# Required-Start: $local_fs $remote_fs
|
|
||||||
# Required-Stop: $local_fs $remote_fs
|
|
||||||
# Default-Start: 2 3 4 5
|
|
||||||
# Default-Stop: 0 1 6
|
|
||||||
### END INIT INFO
|
|
||||||
LABWC_USER=diya
|
|
||||||
LABWC_CONFDIR="/etc/xdg/labwc"
|
|
||||||
if test -e "/home/$LABWC_USER/.config/labwc" ; then
|
|
||||||
LABWC_CONFDIR="/home/$LABWC_USER/.config/labwc"
|
|
||||||
fi
|
|
||||||
|
|
||||||
killproc() {
|
|
||||||
pid=`/bin/pidof $1`
|
|
||||||
[ "$pid" != "" ] && kill $pid
|
|
||||||
}
|
|
||||||
|
|
||||||
read CMDLINE < /proc/cmdline
|
|
||||||
for x in $CMDLINE; do
|
|
||||||
case $x in
|
|
||||||
labwc=false)
|
|
||||||
echo "labwc disabled"
|
|
||||||
exit 0;
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
. /etc/profile
|
|
||||||
su - $LABWC_USER -c "labwc -C $LABWC_CONFDIR" &
|
|
||||||
;;
|
|
||||||
|
|
||||||
stop)
|
|
||||||
echo "Stopping labwc"
|
|
||||||
killproc labwc
|
|
||||||
;;
|
|
||||||
|
|
||||||
restart)
|
|
||||||
$0 stop
|
|
||||||
sleep 1
|
|
||||||
$0 start
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
echo "usage: $0 { start | stop | restart }"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
|
@ -1,49 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<openbox_menu>
|
|
||||||
|
|
||||||
<menu id="client-menu">
|
|
||||||
<item label="Minimize">
|
|
||||||
<action name="Iconify" />
|
|
||||||
</item>
|
|
||||||
<item label="Maximize">
|
|
||||||
<action name="ToggleMaximize" />
|
|
||||||
</item>
|
|
||||||
<item label="Fullscreen">
|
|
||||||
<action name="ToggleFullscreen" />
|
|
||||||
</item>
|
|
||||||
<item label="Always on top">
|
|
||||||
<action name="ToggleAlwaysOnTop" />
|
|
||||||
</item>
|
|
||||||
<item label="Close">
|
|
||||||
<action name="Close"/>
|
|
||||||
</item>
|
|
||||||
</menu>
|
|
||||||
<menu id="root-menu">
|
|
||||||
<item label="Terminal">
|
|
||||||
<action name="Execute" command="foot -t xterm-256color" />
|
|
||||||
</item>
|
|
||||||
<item label="Reconfigure">
|
|
||||||
<action name="Reconfigure" />
|
|
||||||
</item>
|
|
||||||
<item label="Exit">
|
|
||||||
<action name="Exit" />
|
|
||||||
</item>
|
|
||||||
<item label="Reboot">
|
|
||||||
<action name="Execute" command="sudo /sbin/reboot" />
|
|
||||||
</item>
|
|
||||||
<item label="Power off">
|
|
||||||
<action name="Execute" command="sudo /sbin/halt" />
|
|
||||||
</item>
|
|
||||||
</menu>
|
|
||||||
|
|
||||||
<menu id="some-custom-menu">
|
|
||||||
<item label="Reconfigure">
|
|
||||||
<action name="Reconfigure" />
|
|
||||||
</item>
|
|
||||||
<item label="Exit">
|
|
||||||
<action name="Exit" />
|
|
||||||
</item>
|
|
||||||
</menu>
|
|
||||||
|
|
||||||
</openbox_menu>
|
|
@ -1,71 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
This is a very simple config file with many options missing. For a complete
|
|
||||||
set of options with comments, see docs/rc.xml.all
|
|
||||||
-->
|
|
||||||
|
|
||||||
<labwc_config>
|
|
||||||
|
|
||||||
<core>
|
|
||||||
<gap>10</gap>
|
|
||||||
</core>
|
|
||||||
|
|
||||||
<theme>
|
|
||||||
<name>Adwaita</name>
|
|
||||||
<cornerRadius>0</cornerRadius>
|
|
||||||
<font name="sans" size="12" />
|
|
||||||
</theme>
|
|
||||||
|
|
||||||
<keyboard>
|
|
||||||
<default />
|
|
||||||
<keybind key="W-F">
|
|
||||||
<action name="ToggleFullscreen" />
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-L">
|
|
||||||
<action name="NextWindow" />
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-M">
|
|
||||||
<action name="ShowMenu">
|
|
||||||
<menu>root-menu</menu>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<keybind key="A-Space">
|
|
||||||
<action name="ShowMenu">
|
|
||||||
<menu>root-menu</menu>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<!-- Use a different terminal emulator -->
|
|
||||||
<keybind key="W-Return">
|
|
||||||
<action name="Execute" command="foot" />
|
|
||||||
</keybind>
|
|
||||||
<keybind key="W-Space">
|
|
||||||
<action name="Execute">
|
|
||||||
<command>bash -c "bash -c \"`drun`\""</command>
|
|
||||||
</action>
|
|
||||||
</keybind>
|
|
||||||
<!--
|
|
||||||
Remove a previously defined keybind
|
|
||||||
A shorter alternative is <keybind key="W-F4" />
|
|
||||||
-->
|
|
||||||
<keybind key="W-F4">
|
|
||||||
<action name="None" />
|
|
||||||
</keybind>
|
|
||||||
</keyboard>
|
|
||||||
|
|
||||||
<mouse>
|
|
||||||
<default />
|
|
||||||
<!-- Show a custom menu on desktop right click -->
|
|
||||||
<context name="Root">
|
|
||||||
<mousebind button="Right" action="Press">
|
|
||||||
<action name="ShowMenu" menu="some-custom-menu" />
|
|
||||||
</mousebind>
|
|
||||||
</context>
|
|
||||||
</mouse>
|
|
||||||
|
|
||||||
<windowRules>
|
|
||||||
<windowRule identifier="*">
|
|
||||||
<action name="Maximize"/>
|
|
||||||
</windowRule>
|
|
||||||
</windowRules>
|
|
||||||
</labwc_config>
|
|
Binary file not shown.
Before Width: | Height: | Size: 161 KiB |
@ -1,27 +0,0 @@
|
|||||||
PACKAGECONFIG:remove = " man-pages xwayland "
|
|
||||||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
|
||||||
|
|
||||||
SRC_URI += " file://autostart \
|
|
||||||
file://init \
|
|
||||||
file://environment \
|
|
||||||
file://menu.xml \
|
|
||||||
file://rc.xml \
|
|
||||||
file://wpp.jpg \
|
|
||||||
"
|
|
||||||
do_install:append () {
|
|
||||||
install -d ${D}/${sysconfdir}/xdg
|
|
||||||
install -d ${D}/${sysconfdir}/init.d
|
|
||||||
install -d ${D}/${sysconfdir}/xdg/labwc
|
|
||||||
install -m 0755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/labwc
|
|
||||||
|
|
||||||
install -m 0755 ${WORKDIR}/wpp.jpg ${D}/${sysconfdir}/xdg/labwc/
|
|
||||||
install -m 0755 ${WORKDIR}/autostart ${D}/${sysconfdir}/xdg/labwc/
|
|
||||||
install -m 0755 ${WORKDIR}/environment ${D}/${sysconfdir}/xdg/labwc/
|
|
||||||
install -m 0755 ${WORKDIR}/menu.xml ${D}/${sysconfdir}/xdg/labwc/
|
|
||||||
install -m 0755 ${WORKDIR}/rc.xml ${D}/${sysconfdir}/xdg/labwc/
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
inherit update-rc.d
|
|
||||||
INITSCRIPT_NAME = "labwc"
|
|
||||||
INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
|
|
@ -1,2 +0,0 @@
|
|||||||
PACKAGECONFIG += " opengl gbm libinput "
|
|
||||||
PACKAGECONFIG:remove = " sysvinit systemd x11 xwayland "
|
|
@ -2,11 +2,7 @@
|
|||||||
# long-description: Creates a partitioned SD card image for use with
|
# long-description: Creates a partitioned SD card image for use with
|
||||||
# Raspberry Pi. Boot files are located in the first vfat partition.
|
# Raspberry Pi. Boot files are located in the first vfat partition.
|
||||||
|
|
||||||
part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4096 --size 32
|
part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4096 --size 50
|
||||||
# read only roofs
|
part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 4096 --size 150
|
||||||
part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 4096 --size 150 --exclude-path home/ var/etc/
|
|
||||||
# modifiable configurations stored in /var/etc
|
|
||||||
part /var/etc --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/var/etc --ondisk mmcblk0 --fstype=ext4 --label diya --align 1024 --size 32
|
|
||||||
# home partition
|
|
||||||
part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --ondisk mmcblk0 --fstype=ext4 --label home --align 1024 --size 16
|
part /home --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/home --ondisk mmcblk0 --fstype=ext4 --label home --align 1024 --size 16
|
||||||
# part /home --ondisk mmcblk0 --fstype=vfat --label music --active --align 1024 --size 16
|
# part /home --ondisk mmcblk0 --fstype=vfat --label music --active --align 1024 --size 16
|
Reference in New Issue
Block a user