The ccmp1 has two MTD partitions (UBI, UBI_2) with different system
volumes.
Previously, the fact of having two ubi devices was taken as proof of
being on a multi-MTD system (one that has one UBI volume per partition).
Instead, this commit reformulates the condition to having a partition of
the same name than the UBI volume.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
When the system runs as read-only with '/etc' overlayfs enabled, '/sbin/init' is not a symlink
to 'systemd', but '/sbin/init.orig' is. This causes the script to wrongly think than 'systemd'
is not being used. The outcome is that partitions are not being automatically mounted in R/O
systems running in mmc with '/etc' overlayfs enabled, as the specific '/usr/bin/systemd-mount'
binary needs to be invoked in these cases.
The proposed fix performs a second check with '/sbin/init.orig' to determine whether systemd is
being used or not. While on it, add an early check to determine if the partition is already
mounted to exit the script.
Signed-off-by: David Escalona <david.escalona@digi.com>
This commit disables the uSD mounting, due to issues
detected during the boot process when UBIFS starts
with the wear-leveling process to erase NAND blocks.
https://onedigi.atlassian.net/browse/DEL-8415
Signed-off-by: Mike Engel <Mike.Engel@digi.com>
For devices running 'systemd', the mount process is done through 'systemd-mount', which
spawns a system unit. Trying to mount the partition again throws an error stating that a
unit with the same name is already running. To avoid it, check if the unit is already
spawned before mounting the partition and, if so, just restart the unit.
Signed-off-by: David Escalona <david.escalona@digi.com>
Our /tmp file is a symbolic link to /var/tmp, therefore a "find /tmp" returns
nothing. Force to search files inside tmp folder by using "find /tmp/".
https://onedigi.atlassian.net/browse/DEL-8410
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
In the past, this file was cloned from poky to skip mounting
an already mounted device. This condition was done on poky's
version so the cloned file is no longer needed.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
This commit fixes the issue in Jira
https://onedigi.atlassian.net/browse/DEL-7827 (and in GitHub
91bfa01a52#),
that is being manifest again in a CC6UL with 1GB although it may affect other
hardware.
Partitions are mounted:
* For multi-MTD systems, when an MTD subsystem event is received.
* For single-MTD systems, when a UBI subsystem event is received.
This commit avoids process UBI subsystem events in multi-MTD systems.
The automount rules filter UBI subsystem events to only process 'ubi0*' (the
only UBI device/volumes in a single-MTD) and then the executed script
'mount_digiparts.sh' checks for the existance of '/dev/ubi1' node to consider
the system multi-MTD instead of using 'singlemtdsys' U-Boot variable that only
exists on CC6UL.
Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
* Use 'MOUNT' variable instead of 'mount' command
* On the MTD subsystem event, stop looping once the UBI device number is found
Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
Commit b8d46f01 ("read_only: create folders in build time") creates
unconditionally default folders in spite of we are in a read-only filesystem or
not, however there are different models (dual boot, single boot..) where these
partitions exist or not, so this commit only creates these default partitions
for a read-only filesystem.
https://onedigi.atlassian.net/browse/DEL-8193
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This commit allows to mount only the linux partition active in read-only mode.
https://onedigi.atlassian.net/browse/DEL-8193
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
According to udev documentation running programs that access to mount/umount
filesystems is not allowed due to the default sandbox that is enforced on
systemd-udevd.service, so on systemd systems we must to use systemd-mount
binary instead of mount. Also systemd-mount does not support mount ubi devices
by volume name, so we need to use the absolute device path.
https://onedigi.atlassian.net/browse/DEL-8193
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
On the CCMP1 SOMs, we only consider a single system partition called UBI,
with many UBI volumes.
The variable 'singlemtdsys' allowed to change between this and
a system with multiple MTD partitions with one UBI volume each
(old approach on CC6UL).
This commit removes the variable and uses the logic as if it was set.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
The modalias changed as part of the kernel update to version 5.15.
See commit dd545833b773b20aa7cec10f89bff96014ccb64f in kernel tree.
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This code path was added in the context of single MTD layout support for
ccimx6ul boards, but it was being executed in the default storage layout use
case as well. This could trigger a race condition in which one code path
deletes the mount point while the other one is still setting it up, causing
partitions to not be mounted automatically (specifically, the "update"
partition).
Since both code paths are mutually exclusive in our implementation, reflect
this by making sure that the single MTD layout path is executed only when said
layout is enabled in the U-Boot environment.
https://onedigi.atlassian.net/browse/DEL-7827
Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
(cherry picked from commit 9a7ea10a4dfb74651f865f125372604fe6840a10)
These folders /mnt/linux, /mnt/update and /mnt/data are
created by the automount_block.sh script. In a read only
system, these folders are not created raising some errors.
Creating these folders solves the issue.
Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
Traditionally, platforms based on NAND, used one UBI volume
per MTD partition.
Now it's possible to use only one MTD partition containing many
UBI volumes.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
https://onedigi.atlassian.net/browse/DEL-7614
Default poky's version of the 'mount.sh' script doesn't account
for the possibility of udev calling twice the script for the 'add'
action. This has been observed on USB sticks connected to a USB hub
and, although the script eventually fails, for already mounted
partitions, in that case the script tries to remove the created
mountpoint, when it shouldn't.
This patch checks for already mounted partitions earlier (before
creating the mount point) and returns with no actions.
The patch that it adds (with respect to poky's thud default) is
the following:
diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh
index 3ee67b13183a..e6882a69c223 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -38,6 +38,12 @@ done
automount_systemd() {
name="`basename "$DEVNAME"`"
+ # Skip already mounted partitions
+ if [ -f /run/systemd/transient/run-media-$name.mount ]; then
+ logger "mount.sh/automount" "/run/media/$name already mounted"
+ return
+ fi
+
# Skip the partition which are already in /etc/fstab
grep "^[[:space:]]*$DEVNAME" /etc/fstab && return
for n in LABEL PARTLABEL UUID PARTUUID; do
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
https://jira.digi.com/browse/DEL-6759
The current scripts used the standard mount binary at /bin/mount
for mounting the partitions. Systemd however seems to have a monitor
that eventually umounts such partitions if not mounted by systemd's
specific command 'systemd-mount`.
For platforms using systemd, we need to use this binary together with
parameter --no-block so that partitions are mounted correctly during
the boot process.
This commit merges the two scripts for Digi-handled partitions into
just one:
mount_bootparts.sh
\
+--> mount_digiparts.sh
/
mount_partition.sh
The merged script:
- checks if running with systemd, to use its binary.
- checks if running with busybox, to not use the unsupported '-o'
attribute.
- checks if mounting the 'linux' partition, to mount it read-only.
- checks for already-attached UBI devices, to avoid re-attaching.
This commit also combines the Digi-handled partitions (linux, update)
into the same udev rule, to simplify it, and breaks the rules lines
for readability.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
https://jira.digi.com/browse/DEL-6744
This kernel module is used for debugging and when available it spams the
log file with every input event.
This patch avoid it being loaded by default but the user can still load
it manually if required.
Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
Prevents loading the spidev module at boot time to avoid
the undesired warning message from driver.
https://jira.digi.com/browse/DEL-4748
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
Revert to the old way of setting the console for ccardimx28js. Configure
the console on the generic ttyS0 port name and let the device managers
create a symbolic link to the correct device at runtime.
Trying to set it statically at compile time lead to some side effects
with some packages not being recompiled after a change of the preferred
kernel version in the project's local.conf (e.g. udev-extraconf and
sysvinit-inittab).
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
In Yocto 1.7 meta-fsl-arm replaced udev-extraconf bbappend with a new
package (udev-rules-imx). So we need to adapt our own bbappend to these
changes so all the needed udev rules are in place.
https://jira.digi.com/browse/DEL-1336
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This cleans following warning:
Use of PRINC is deprecated.
The PR server should be used to automatically increment the PR.
See: https://wiki.yoctoproject.org/wiki/PR_Service
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
The boot partions name has been changed in u-boot, so change it also
here to match current u-boot.
https://jira.digi.com/browse/DEL-949
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
It was added to fix [DEL-898] but it is no longer needed after the
underlying changes in the rootfs hierarchy (added '/run' mountpoint)
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
These files were needed in previous versions of Yocto to overcome
different problems. Remove them as the default ones in current Yocto
version are good enough for our platforms.
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
So the IMX udev rules can be used without meta-digi-dey layer. For
example when building core-image-minimal with poky distro.
Signed-off-by: Javier Viguera <javier.viguera@digi.com>