Age | Commit message (Collapse) | Author |
|
Here is an extension to a lesser known feature - making it easier to use
in the case of pre-canned kernels and rootfs as we'd typically find in
tmp/deploy/images from Yocto.
Have you've ever looked at a WARN_ONCE() or a printk_once() and wondered
"How would I know if that really just happened as a fluke, or happens
every 3am when cron runs, but I just only hear about it once?"
Well, the answer was added around v4.15 - in the form of a little known
/sys/kernel/debug/clear_warn_once feature that lets you reset state to
"freshly booted" for all the "once" type instances, in order to see if
they happen again.
The problem is, that you need debugfs enabled/mounted, and you need to
be able to ssh onto the target to reset. Or you have to re-spin your
rootfs to contain an rc.local to periodically reset for a rootfs that doesn't
support interactive logins (as is fairly common for Yocto targets).
Here, we add an in-kernel timer based reset, and provide access to
arming it with a kernel boot arg, so that it doesn't require kernel rebuilds,
or rootfs image alterations. In addition, the boot arg doesn't depend on
debugfs, which is likely disabled to reduce the size and attack surface
of embedded deployments.
I should note that this was sent to the printk maintainer recently, but
he declined to merge it. I won't try and summarize the reasons given
here - but if people are at all interested in using this, I strongly
suggest you go read the 0/3 thread and decide for yourself from the
discussion on how many of the possible concerns floated are valid and
worthy of consideration for your use case, or just in general.
https://lore.kernel.org/r/20201126063029.2030-1-paul.gortmaker@windriver.com/
That said, I think it is still useful for the kinds of deployments we
see in Yocto, and indeed the request for something like this came from users
of Yocto, hence why I'm offering it for inclusion in the Yocto kernels
regardless.
There are two minor changes in the code here vs. that original posting.
1) Make the user facing timer value minute based, instead of seconds.
2) Make the boot arg use the same name as used in /sys/kernel/debug for
consistency and ease of use.
I've tested on standard/base + defconfig on v5.4.82 in linux-yocto, and
the rolling v5.10 baseline of linux-yocto-dev. As it turns out, the git
am of the v5.10 patches is hands free on the the v5.4 baseline, so there
is no need to send two versions, and it also speaks to a minimal
carrying cost going forward
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
|
Traditionally kprobes and -rt haven't mixed well, but recent -rt
kernels support kprobes without issues.
lttng now requires kprobes to be enabled, or the following error
is thrown:
|
build/tmp/work/qemux86_64-poky-linux/lttng-modules/2.12.2-r0/lttng-modules-2.12.2/wrapper/kallsyms.c:20:3:
error: #error "LTTng-modules requires CONFIG_KPROBES on kernels >= 5.7.0"
| 20 | # error "LTTng-modules requires CONFIG_KPROBES on kernels >= 5.7.0"
| | ^~~~~
| make[3]: ***
[build/tmp/work-shared/qemux86-64/kernel-source/scripts/Makefile.build:280:
build/tmp/work/qemux86_64-poky-linux/lttng-modules/2.12.2-r0/lttng-modules-2.12.2/wrapper/kallsyms.o]
Error 1
By including the kprobes fragment into the -rt kernel by default, we
fix the issue.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
|
The uptime feature was specifically requested in the early days of
linux-yocto. It is no longer useful, and is causing build issues, so
we remove it completely.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
|
This in particular allows testing mdraid inside qemu as it
expects RAID 4/5/6 to be available.
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
|
With the latest preempt-rt, we use juse CONFIG_PREEMPT_RT and
not CONFIG_PREEMPT_RT_FULL.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
|
Signed-off-by: Yann CARDAILLAC <ycnakajsph@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
|
Since commit d5178578bcd461cc79118c7a139882350fe505aa
Author: Johannes Thumshirn <jthumshirn@suse.de>
Date: Mon Jun 3 16:58:57 2019 +0200
btrfs: directly call into crypto framework for checksumming
We now have a dependency on crc32 in crypto, and it must be built
into the kernel to avoid:
| x86_64-poky-linux-ld.bfd: fs/btrfs/super.o: in function
`btrfs_mount_root':
| super.c:(.text+0xb9b6): undefined reference to `crc32c_impl'
| x86_64-poky-linux-ld.bfd: fs/btrfs/super.o: in function
`init_btrfs_fs':
| super.c:(.init.text+0x362b): undefined reference to `crc32c_impl'
| x86_64-poky-linux-ld.bfd: fs/btrfs/extent-tree.o: in function
`hash_extent_data_ref':
| extent-tree.c:(.text+0xdfa): undefined reference to `crc32c'
| x86_64-poky-linux-ld.bfd: extent-tree.c:(.text+0xe13): undefined
reference to `crc32c'
| x86_64-poky-linux-ld.bfd: extent-tree.c:(.text+0xe27): undefined
reference to `crc32c'
| x86_64-poky-linux-ld.bfd: fs/btrfs/dir-item.o: in function
`btrfs_insert_xattr_item':
| dir-item.c:(.text+0x286): undefined reference to `crc32c'
So we set our defaults to cover the btrfs build cases without error.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
|
As per commit f382fb0bce [block: remove legacy IO schedulers], the
legacy CFQ schedulers have been dropped from the kernel. So we drop
them from our base configuration.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
This is always enabled now starting 4.19.
https://github.com/torvalds/linux/commit/fcabb89299d79010eb923afdd26de04afcc0527f
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
The preempt-rt config explicitly disables aufs which can result in
config warnings for kernels where the aufs patches aren't applied.
Since default state of aufs is 'n', there's no need to disable it
explicitly here.
For BSPs relying on aufs, they should enable it by including
features/aufs/aufs-enable.scc.
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Userspace functionality that requires BPF is becoming more common
(even systemd is looking for it), so we globally enable these
configs in the standard configuration.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Currently CONFIG_SMP and CONFIG_PREEMPT are enabled for tiny by default
which prevents CONFIG_TINY_RCU from being enabled and causes the follow
warning.
When CONFIG_SMP and CONFIG_PREEMPT are disabled, like when building UP
kernel, CONFIG_TINY_RCU will be selected by default. So this removal
fixes the warning and is harmless.
---------- CONFIG_TINY_RCU -----------------
Config: CONFIG_TINY_RCU
From: kernel-source/.kernel-meta/configs/VERSION/standard/tiny/ktypes/tiny/tiny.cfg
Requested value: CONFIG_TINY_RCU=y
Actual value:
Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Calling out the existing edac.scc via KERNEL_FEATURES_append will
fail since it contains patch commands, and the patches will
unconditionally be queued for application. Split it so instead it
can use
KERNEL_FEATURES_append += "features/edac/edac-enable.scc"
in templates/configuration files external to the kernel-cache.
Note that we also hook the remaining patch chunk into the standard
ktype so that "rebase" branches (when created) will faithfully
mirror the content merged into the fast forward branches.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
In order to build backport-iwlwifi driver (meta-intel has
the recipe) that ships its own MAC80211 and to use the crypto
drivers from the targeted kernel for it, CONFIG_CRYPTO_CCM must
be enabled.
backport-iwlwifi does have a compat implementation of crypto-ccm.c too
that would be used if CONFIG_CRYPTO_CCM is not set but that currently
fails to build (implicit function declaration).
Therefore, just enable CRYPTO_CCM. And while we're at it, enable
all crypto drivers that are needed by MAC80211.
Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
The oe-core provides kexec-tools recipe, since we don't
have a manner to enable automatically a kernel feature by
recipe request, this is the best place to enable it in
a kernel developer mode.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
|
|
This patch enables ext4 filesystem encryption and also layered
filesystem encryption.
Signed-off-by: Jussi Laako <jussi.laako@linux.intel.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
A stray 'branch base' crept into the preempt-rt meta-data.
This isnt needed, since the tools can detect when to create
a 'base' branch on their own.
The extra branch command was clearing the patch queue, which
prevented preempt-rt patches from being applied during treegen.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Legacy PTY support adds overhead to the kernel and delays to
the boot process. So we disable it by default.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Fixes [YOCTO #9269]
Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
The users of minux and reiser fs are few and far between. We don't
need these modules built (and deployed) all the time, so we disable
them by default. The few users of these FSs can enable them in
fragments.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
ext4 is compatble with ext2/3 filesystems, so we should streamline
our config and only enable ext4.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Tiny kernels currently fail to run /init from tiny-init, a #!/bin/sh
script as the kernel is missing BINFMT_SCRIPT. Add this to the tiny.cfg
fragment.
Developed on 3.19, applied and verified on 3.14.
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Saul Wold <sgw@linux.intel.com>
Cc: Eduard Bartosh <eduard.bartosh@intel.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
|