MMC core block has changed in kernel 5.4 so Replay Protected Memory Block (RPMB)
and boot partitions are not listed under /proc/partitions anymore.
get_emmc_block_device() function in pkg_postinst_ontarget() method was looking
for these entries to identify the MMC partition where to execute resize2fs.
This function has been modified to do the checks inside /dev/mmcblk* where RPMB
and boot entries are still listed.
https://jira.digi.com/browse/DEL-7094
Signed-off-by: Hector Bujanda <hector.bujanda@digi.com>
This interface should be the last item defined in the
/etc/network/interfaces file.
When you try to enable the interface br0 (bridge interface),
all the other interfaces should be available.
If the br0 interface is located before the other interfaces
involved in the bridge, it will fail.
Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
* prefix TRUSTFENCE_ to variable SIGN_MODE for DEY
* prefix CONFIG_ to variable SIGN_MODE for script
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
The poweroff command is not available in the initramfs due to a missing
sysvinit/systemd dependency. Use the busybox "halt" command, since it's
available regardless of the init manager used. Rework the error message and
script variables accordingly.
https://jira.digi.com/browse/DEL-6983
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
Userspace firmware loading support is required for the Linux imx-sdma driver.
The patches that accomplish this were originally in poky, but were removed in
the thud upgrade. Re-work the patches so they apply over systemd v239.
https://jira.digi.com/browse/DEL-6932
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
In very rare cases, random services would hang when powering off the system,
causing the poweroff process to stall for 90 seconds before timing out the stop
job. To avoid this behaviour, minimize the effect of these random freezes by
decreasing the timeout.
The default services in our system take well under 15 seconds to stop
gracefully, so we can guarantee that a timeout will never happen under normal
circumstances.
https://jira.digi.com/browse/DEL-6794
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
Use ifupdown variable 'p2p-network-id' to pass a WPA supplicant network
id, to pre-populate some parameters (SSID/passphrase) when creating the
group where this device is the GO.
Also replace go_intent=7 with the auto parameter. According to the
documentation:
"auto" can be used to request wpa_supplicant to automatically
figure out whether the peer device is operating as a GO and if so,
use join-a-group operation rather than GO Negotiation.
https://jira.digi.com/browse/DEL-6741
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit fixes the error message when specific network scripts
are launched.
Signed-off-by: Mike Engel <Mike.Engel@digi.com>
https://jira.digi.com/browse/DEL-6728
Commit 074e3ba3 ("meta-digi-dey: add cryptsetup tool into initramfs") added
the runtime dependency to cryptsetup for all platforms, but it is
required only to encrypt/decrypt block devices.
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This commit disables file system check on the root file system when it is encrypted.
This prevents the service from failing on encrypted rootfs with the message:
[FAILED] Failed to mount /run/media/mmcblk0p3.
See 'systemctl status run-media-mmcblk0p3.mount' for details.
Signed-off-by: Mike Engel <Mike.Engel@digi.com>
https://jira.digi.com/browse/DEL-6655
To avoid possible conflicts with NetworkManager, remove systemd-networkd
entirely.
https://jira.digi.com/browse/DEL-6610
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
The Replay Protected Memory Block (RPMB) is an special storage
partition that cannot be accessed via standard block layer.
When a user space tool like blkid, tries to read it the kernel
suffers buffer I/O errors and timeouts.
This commit modifies the post installation script to filter the RPMB
partitions from the mmc block devices, to avoid multiple kernel
errors during the script execution.
https://jira.digi.com/browse/DEL-6609
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
Removed the platform dependency to apply the resize to all platforms.
https://jira.digi.com/browse/DEL-6609
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This recipe is an example for customer for a system-monitor. Scripts that
verify the system status can be added to /etc/system-monitor.d
The recovery mechanisms can be implemented on those scripts or in the
system-monitor script. The software watchdog systemd support is used to
guarantee that the system-monitor is running.
When using this it is recommended to enable the systemd hardware watchdog
support, refer to the systemd documentation for this.
The systemd service provided by this recipe is not enabled by default as it
is an example that needs customization.
https://jira.digi.com/browse/DEL-6593
Signed-off-by: Jose Diaz de Grenu <Jose.DiazdeGrenu@digi.com>
Currently in a systemd based init, the httpd server is not launched. A
systemd service is needed, so add it.
Also install a CGI script that allows to use the device for the
NetworkManager connectivity check.
https://jira.digi.com/browse/DEL-6577
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
Even though systemd support is not yet available for these platforms, add the
scripts so bitbake doesn't fail when building the busybox package.
https://jira.digi.com/browse/DEL-6565
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
* Use the same operation order when resuming interfaces
* Remove unnecessary delay in ccimx6sbc standby script
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
Otherwise, packagegroup-dey-core won't get included in ccimx6ulstarter images.
This packagegroup contains fundamental OS elements, such as sysvinit, kernel
modules and so on. Use CORE_IMAGE_BASE_INSTALL instead and make sure to append
to the default value instead of overwriting it.
https://jira.digi.com/browse/DEL-6536
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This modifies the behavior of the sd-resolve libsystemd component to prevent
the system from freezing whenever a service that uses said component is
stopped. Even though this doesn't free the terminated thread's resources
properly, this procedure only gets executed during the final moments of a
service's process before it exits, so resource leaks aren't an issue.
https://jira.digi.com/browse/DEL-6523
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This commit removes the following examples that were accessing
hardware interfaces:
- dey-examples-adc
- dey-examples-can
- dey-examples-gpio-sysfs
- dey-examples-spidev
- dey-examples-watchdog
The recipe 'dey-examples-digiapix' builds similar examples that make
use of Digi's APIX for accessing the hardware. Add this recipe to images
- dey-image-qt
- core-image-base
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
https://jira.digi.com/browse/DEL-5169
This way, the wlan1 interface will only be created whenever a user wants to
bring the interface up with ifupdown. Modify the script to be able to delete
the interface whenever it gets brought down and remove its .sh file extension
so run-parts can run it properly during the ifup process.
https://jira.digi.com/browse/DEL-6353
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
Tests have shown that having this interface up hinders wlan0's performance,
so don't bring it up by default.
https://jira.digi.com/browse/DEL-6353
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This script introduces a minor delay when the own script
launch the wpa_supplicant daemon, however this minor delay
is needed in the boot process when the wireless interface
is loaded, if not the bridge mechanism throws an unexpected
error trying to add the interface to the bridge before the
wireless is ready to use.
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
Soften the dependencies between the services and start the bluetooth stack
regardless of the existence of a bluetooth chip. Also, update the standby
script to reflect that there is no longer a strong dependency between the
services.
https://jira.digi.com/browse/DEL-6452
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
Unlike eudev, which is used on images without systemd, the list of paths
systemd-udev uses to look for rules is very limited. Include an upstream patch
(commit 116b91e8ccfee1d44fc2b140d831d688e3747902 in the systemd repo) that
expands said list.
This fixes an issue with crda's regulatory domain rule file, which was being
excluded due to it being in a path systemd-udev was ignoring (/usr/lib/udev).
Because of this, the regulatory domain was never set properly and hostapd was
failing when configured to use 5GHz channels (which is the default config).
https://jira.digi.com/browse/DEL-6504
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
To avoid bringing up interfaces before they're created by udev scripts
(specifically wlan1), wait until udev settles before starting the service.
https://jira.digi.com/browse/DEL-6504
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
When using systemd, putting the wlan1 interface up wasn't working because it
was relying on initscripts that are no longer in the filesystem.
Add a parametrized version of the upstream hostapd service to be able to use a
configuration that's different from the default one. Also, modify the
generation of the wlan1 entry in /etc/network/interfaces to be able to use
different post-up/pre-down hooks depending on the init manager that's being
used.
https://jira.digi.com/browse/DEL-6504
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
Latest update to version 1.29.3 in upstream breaks the compatibility
of our bbappend, to avoid it in future updates, this commit
generalizes the bbappend to apply all the 1.29 series.
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This script behaves the same way as our custom standby script, with a few
modifications, for example:
* instead of using initscripts to stop/start daemons, it uses systemctl calls
* save variables that are needed when resuming in /tmp, because the script is
executed twice instead of once (when suspending and when resuming)
* remove the locking/unlocking of the critical section and the actual state
change, since that is handled by systemd-suspend now
Also, add a different standby script for when systemd is enabled. Said script
acts as a wrapper for systemd's suspend mechanism.
https://jira.digi.com/browse/DEL-6415
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
These patches don't apply on the latest version of systemd used in Yocto 2.6.
https://jira.digi.com/browse/DEL-6415
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
Without systemd, our KEY_POWER events were handled by the ACPI daemon, which in
turn issued a "poweroff" command. With systemd, the ACPI daemon is no longer
available and the events are handled by systemd-logind instead, which also
powers down the system properly. However, NXP added a patch that prevents
system-logind from handling the events, since they use the sc_powerkey instead.
Remove this patch to be able to power the target off via our power button.
https://jira.digi.com/browse/DEL-6415
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
Otherwise, there will be errors due to missing dependencies.
https://jira.digi.com/browse/DEL-6415
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>