Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Onboard: Add onboard virtual keyboard to scarthgap #734

Closed
wants to merge 147 commits into from

Conversation

pratheekshasn
Copy link
Contributor

@pratheekshasn pratheekshasn commented Sep 19, 2024

Summary of Changes

The PR adds the virtual keyboard "Onboard" to scarthgap.

Justification

#AB2491688 requires the keyboard to be present on scarthgap as well.

The virtual keyboard "Onboard" (present on kirkstone) had been removed from scarthgap due to build errors on python 3.12. This PR adds back the same to scarthgap with corrections required for python3.12.

image

Implementation

Changes that differ from kirkstone:
The recipe adds another patch file, onboard_hover_seg_fault.patch. This patch was found online here.

Currently, when the mouse pointer hovers on a key, the app crashes with a segmentation fault, and this is what the patch fixes.

Other required changes can be seen in this PR in the meta-openembedded layer.

The keyboard can now be launched and used just like in kirkstone.

Testing

  • I have built the core package feed with this PR in place. (bitbake packagefeed-ni-core)

Tested by installing the built IPK on a VM.

  • Keyboard launch
  • Type on keyboard by clicking on the keys
  • Click on other windows (like the file explorer) to test that the keyboard goes to the background
  • Click on any window or textbox where something can be typed to test that the keyboard is back in focus and can type

Signed-off by: Pratheeksha S N pratheeksha.s.n@ni.com

amstewart and others added 30 commits November 30, 2023 15:05
Upstream OE now enforces a requirement that the configuration templates
be stored in a path like: ${layer}/conf/templates/${name}.

Move the meta-nilrt conf templates to a compliant location.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Add a cyclictest ptest with container start/stop in background.

Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@ni.com>
(cherry picked from commit 30d75a9)
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Some NI driver teams have noticed increased jitter on the 6.1 NO_HZ
kernel, which has not yet been addressed. Since this issue was not
present in the 5.15 kernel, we can downgrade this recipe to 5.15 to
avoid performance regressions in the 2023Q4 release.

Signed-off-by: Mike Petersen <mike.petersen@ni.com>

(cherry picked from commit e805904)
Rebased-by: Alex Stewart <alex.stewart@ni.com>

Rebased to apply the same change to the kirkstone master branch.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
(cherry picked from commit afb05b0)
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
(cherry picked from commit b279f07)
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
When the reset_source register is `0x00` (no flags) - as in cases where
the system is totally powered off and then on - the ni-rtfeatures
driver writes "poweron" into the reset_source sysfs entry. The
ni-rtfeatures initscript does not handle this string, and warns that the
sysfs is malformed.

Handle this case in the initscript, and provide some useful logging
output.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
(cherry picked from commit b42be87)
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
run-cyclictest is run from a container, and although the output is
logged, it is never printed, meaning the tests do not print the
PASS/FAIL messages required of ptests

Print the logs to have this output.

Signed-off-by: Dylan Turner <dylan.turner@ni.com>
(cherry picked from commit faa2615)
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
As of OE-core commit d58cf08421e0f89840820370dd3c5b6e153efcbb,
ptest-runner now creates a user and group called `ptest`. Since NILRT
uses static uid/gids, we have to reserve a slot for this account.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Currency upgrade for meta-oe nanbield.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
The changes applied by the procps.bbappend are generic enough that they
should apply to all versions of procps. Instead of reversioning the
bbappend on each OE rebase, just make the append version match
generic.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
The meta-nilrt gnupg bbappend only ignores a CVE, which has been fixed
in master. Since we are now based on upstream master refs, this
ignore-rule is no longer needed. Remove it and drop the empty bbappend.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Currency upgrade for meta-oe nanbield.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Upstream meta-OE has dropped the onboard virtual keyboard recipe, so
meta-nilrt's bbappends have nothing to apply to.

Until we can find a new solution or resurrect the onboard recipe, remove
it from meta-nilrt.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
As of nanbield, meta-oe's uutils-coreutils recipe adds a DEPENDS on
clang-native, in the case that 'selinux' is selected in the recipe
PACKAGECONFIG. However, clang-native is not provided by either
meta-oe or meat-selinux. It is only available in meta-clang.

NILRT doesn't actually use uutils-coreutils, which is an alternative for
the normal coreutils recipe. But the fact that NILRT declares selinux
support is enough to activate the uutils-coreutils->clang DEPENDS -
which breaks the bitbake task tree generation.

Manually remove the offending 'selinux' PACKAGECONFIG, so that
uutils-coreutils doesn't break.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Currency upgrade for OE nanbield.

This commit drops 4 threadsafety commits which conflict with a new
threadsafety implementation from upstream.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
As of OE nanbield, bitbake will throw an error if a .patch doesn't have
an upstream-status trailer. Add it to the glibc patches.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Drop patches which have been merged into util-linux 2.39.2.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
OE nanbield errors if .patches do not have an Upstream-Status trailer.
Add those trailers to the bootmisc .patches.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
The correct RDEPENDS for docker is either 'docker' or 'docker-moby'.
docker-ce has been deprecated as of nanbield.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
The xserver-xfce-init recipe includes some local files which are
licensed as GPLv2. A .patch containing the GPLv2 license file is
distributed along side the recipe source.

This isn't necessary, as we can just set the recipe to use the common
GPLv2 license that is distributed with the distro at large. So remove
the unecessary .patch.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Refactor cyclictest files common between containerized and
non-containerized tests to single location.

Signed-off-by: Gratian Crisan <gratian.crisan@ni.com>
(cherry picked from commit fedc675)
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Move docker related files to common location.

Signed-off-by: Gratian Crisan <gratian.crisan@ni.com>
(cherry picked from commit da1ba2b)
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
…to central script

Pull out common container build logic from each containerized
performance test file into a single file and run it in run-ptest.

Signed-off-by: Gratian Crisan <gratian.crisan@ni.com>
(cherry picked from commit 16be6c6)
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
…r script

Simplify container test logic
 - Remove need for intermediate log files to capture container output
   and remove associated wrapper script
 - Modify logging directory location in common.cfg to be applicable for
   all tests
 - Imporve sourcing of common.cfg
 - Improve exit code handling for clarity

Signed-off-by: Gratian Crisan <gratian.crisan@ni.com>
(cherry picked from commit 0a4cf8b)
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Simplify tetst logic for containerized and non-containerized tests
 - Remove unnecessary load wrapper scripts in containerized tests
 - Single source hackbench, fio, iperf start/stop logic in individual
   tests by moving into common scripts
 - Remove superfluous syntax

Signed-off-by: Gratian Crisan <gratian.crisan@ni.com>
(cherry picked from commit 30a3fdc)
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
- Single source cyclictest docker calls, params into a script
- Remove superfluous syntax

Signed-off-by: Gratian Crisan <gratian.crisan@ni.com>
(cherry picked from commit 2086764)
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Alex Stewart and others added 26 commits August 14, 2024 11:09
Add a packagegroup to track package dependencies of the NILRT Secured,
Network-Attached Controller (SNAC) configuration.

Since the SNAC configuration is officially supported, add it to the core
package feed.

This packagegroup SHOULD NOT be installed to the NILRT runmode or
safemode images.

Signed-off-by: Alex Stewart <astewart.49c6@gmail.com>
Add some initial packages that we know are going to be used in the SNAC
v1.0 design.

Signed-off-by: Alex Stewart <astewart.49c6@gmail.com>
The snac packagegroup is only expected to contain one logical subsection
of packages, so there is no need to split up the RDEPENDS assignments.
Use a single section.

Signed-off-by: Alex Stewart <astewart.49c6@gmail.com>
Signed-off-by: Can Wong <can.wong@ni.com
(cherry picked from commit e58c9c9)
Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@ni.com>
Add a Github PR template to help contributors write high-quality PRs
correctly the first time.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Haris Okanovic no longer works at NI. Change NISSL dependency ownership
to Rich Tollerton.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Signed-off-by: Mark Silva <mark.silva@ni.com>
* Add pwquality.conf that has the values that are required
  for SNAC mode
  * These values are more restrictive than the default
    values
* Add bbappend file to install the config file to the
  correct location

Signed-off-by: Mark Silva <mark.silva@ni.com>
FAT32 max file size is limited to 2^32 - 1. So split the image files at
this boundary.

Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@ni.com>
(cherry picked from commit 47e9f1f)
Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@ni.com>
* Create a directory for tmux configuration files in /usr/share/tmux/conf.d
* Add a /etc/tmux.conf file with default lock command
* Add a line to source all files in /usr/share/tmux/conf.d in /etc/tmux.conf
  * -q is to ignore errors if the directory is empty
* This allows snac mode to add a conf file to this location without modifying the main tmux.conf file

Signed-off-by: Mark Silva <mark.silva@ni.com>

tmux-bbappend: Add conf.d directory
The default upstream kernel configuration uses SCHED_OTHER scheduling
policy for per-CPU 'ksoftirqd/x' kernel threads. Early in NI Linux RT we
have bumped their priority to SCHED_FIFO/8 with the assumption this will
help deferred I/O work in drivers.

In the intervening time several RCU kernel threads were added upstream:
rcub, rcuc, rcuog, and rcu_preempt. These by default run as SCHED_FIFO/1
i.e. they were intended to have higher priority than softirq threads. In
our configuration this priority is inverted.

Also, new 'irq_work/x' threads were added by linux-stable-rt kernel
commit b4c6f86ec2f6 ("irq_work: Handle some irq_work in a per-CPU thread
on PREEMPT_RT"). These use 'rcuwait' for scheduling and run at
SCHED_FIFO/12 on NILRT. When combined with the priority inversion
described above this can lead to a deadlock in certain rare cases.

Set the 'ksoftirqd/x' priority to the lowest RT priority
SCHED_FIFO/1. This preserves the previous behavior where they are
scheduled before other normal or background tasks but is closer to the
upstream default.

Set the priority of RCU threads which require a RT scheduling policy to
SCHED_FIFO/2 to align with upstream assumptions where the priority of:

  irq_work > rcu* > ksoftirqd

Additionally, modify the rt-tests ptest to account for the new
priorities.

AB#2795435

Signed-off-by: Gratian Crisan <gratian.crisan@ni.com>
(cherry picked from commit 5da2ed4)
Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@ni.com>
Add a ptest to catch any new (kernel) threads which get added with the
default SCHED_FIFO/1 priority. On NI Linux RT we expect this priority
level to be used by 'ksoftirqd/x' tasks.

Signed-off-by: Gratian Crisan <gratian.crisan@ni.com>
(cherry picked from commit 4588ac7)
Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@ni.com>
The wl12xx WiFi driver is not enabled in our x86_64 configurations.
Additionally it is a workaround introduced for AB#735824 and was never
revisited in AB#779061.

On top of it the assumptions underlying the workaround - that RCU
callbacks are processed in softirqs - no longer apply.

Remove this dead code.

Signed-off-by: Gratian Crisan <gratian.crisan@ni.com>
(cherry picked from commit 805579d)
Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@ni.com>
Existing "Set Image" workflow installed grub and safemode afresh from
provisioning media while setting some variables to ensure settings from
system image get carried over but this left undesired changes in some
files.

This commit fixes this by copying nigrub and nibootfs from system image
and later fixing the few files in them that are required to be
different.

Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@ni.com>
(cherry picked from commit 1d4eb32)
Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@ni.com>
nftables is the modern packet filtering solution on Linux. The nftables
userspace can be installed alongside iptables, but in general, only one can be
enabled at once. This commit adds the userspace but does not do anything with
the present iptables-based firewall configuration.

At present, there are no plans to introduce nftables into safemode, so add it
to the runmode packagegroup, not base.

Signed-off-by: Rich Tollerton <rich.tollerton@ni.com>
firewalld is the best-maintained high-level firewall administration tool on
Linux. We ultimately wish to replace our present direct use of iptables (via
initscript) with firewalld; but at present the existing configuration is
unchanged.

Signed-off-by: Rich Tollerton <rich.tollerton@ni.com>
…settings

- update the pam-plugin-faillock package so that the plugin gets enabled when it's installed
- modify some faillock configuration settings
- prevent pam-plugin-faillock from being installed when ni-auth is installed

This change simplifies Secured, Network-Attached Controller (SNAC) configuration. faillock is required to be enabled on a SNAC. The faillock settings were chosen to comply with SNAC requirements. The conflict with ni-auth was added because from testing it appears that the faillock plugin is incompatible with the ni-auth plugin.

Signed-off-by: Alex Hearn <alex.hearn@ni.com>
Signed-off-by: Alex Hearn <alex.hearn@ni.com>
nilrt-snac is an NI configuration tool for NILRT that allows a system
administrator to semi-automate the process of configuring the system
into the Secured, Network-Attached Controller (SNAC) configuration.

Add a recipe for it.

This recipe is NILRT-specific.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Add the nilrt-snac configuration tool to the SNAC packagegroup to ensure
that it is always built into the core packagefeed. It should not be
installed to the base system image by default.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
ni-grpc-device has been updated to compile with grpc >= 1.60.
This commit enables the recipe back into the package feeds.

Signed-off-by: Rajendra Desai <rajendra.desai@ni.com>
The nilrt-snac project now has an integration test suite. Add a
run-ptest entrypoint and pytest subpackage to run it.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Signed-off-by: Alex Stewart <alex.stewart@ni.com>
The ptest.bbclass already adds an RDEPENDS on `nilrt-snac`, but it is
overriden by the nilrt-snac-ptest RDEPENDS bb assignment.

Instead, append the ptest RDEPENDS.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Signed-off by: Pratheeksha S N <pratheeksha.s.n@ni.com>
@pratheekshasn pratheekshasn requested review from a team and removed request for a team September 19, 2024 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.