In the typical scenario where the bootrr cpio archive is concatenated
onto some ramdisk, attributes of this cpio archive will overwrite those
previously extracted.
When used in combination with a ramdisk with systemd, this results in
many services failing to start, because the namespaced services does not
have permission to open e.g. /
Fix this my overriding the owner and group.
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Handles drivers with spaces in their names, and simplify slightly by
using globbing to unwrap the bus for loop.
It's necessary to add the final '*' in the "for driver in" loop in
bootrr-generate-template on POSIX sh.
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Make use of the newly added assert_usb_probed helper for USB devices on
Spherion, as it relies on documented kernel ABI and will therefore
require less maintenance.
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Current bootrr helpers, assert_device_present and assert_driver_present,
use driver and device names, both of which are not part of the kernel's
stable ABI and end up requiring extra maintenance whenever those names
are changed, in order to check for the expected name on each kernel
version.
Introduce a new helper, assert_usb_probed, that verifies a USB device
has been probed, taking as parameters the device's hardware identifying
properties, which are documented kernel ABI: idVendor, idProduct,
bcdDevice, bDeviceClass, bDeviceSubClass, bDeviceProtocol,
bInterfaceClass, bInterfaceSubClass, bInterfaceProtocol,
bInterfaceNumber.
A 'count' parameter is also required, to inform the number of devices
matching these criteria that should have been probed. This allows the
test to verify the probe of multiple identical devices.
A '*' can be used as wildcard for any of the matching fields as
necessary.
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
This is a modular system, it could be split up further (eg, there will
be a lot shared with the WiFi variant) but this is what I have to hand.
Signed-off-by: Mark Brown <broonie@kernel.org>
The helpers for verifiying that cpufreq and cpuidle are enabled
use let which is a bash extension and not supported in standard
POSIX shell, including with busybox. Convert to use expr which
is standard.
Signed-off-by: Mark Brown <broonie@kernel.org>
bootrr requires a description of each board it runs on to provide
detection of the actual devices and system support that is
present. Currently these descriptions must be written by hand
but we can ease the process of creating them by providing a tool
which examines the running system and outputs a set of bootrr
assertions which would pass on the system.
The script will require post processing by users, the generate
rule names won't be good, hotplugged devices will be included and
any spaces in device or driver names will cause confusion, but it
can provide a usefuls starting point.
Signed-off-by: Mark Brown <broonie@kernel.org>
There are a number of devices on the RK3288 which are usable on
and enabled for any system using the SoC, due to either being
essential for system operation or entirely internal to the SoC
(like the crypto engine). Move these to a separate script
identified by the compatible for the SoC so that we get coverage
of these things on any system which uses this SoC.
Signed-off-by: Mark Brown <broonie@kernel.org>