Hi Hamish,
On 9/10/25 10:19, 'Guthrie Hamish' via swupdate wrote:
> Hi,
>
> We have a device with both SD-Card and eMMC being handled by the same
> device driver and normally, the eMMC device comes up on /dev/mmcblk1 and
> the SD-Card on /dev/mmcblk0. Occasionally however, the eMMC is probed
> first and as a result is associated with /dev/mmcblk0.
It is common, it depends which controller has finished the probe first,
and this happens.
>
> For our regular update mechanism I use the /dev/disk/by-partlabel/
> <partition-label> device, so this does not effect us, however, we also
> provision our devices in production using swupdate and our .swu image
> contains partitioning information, and for that I have a partitions
> section which needs to know the device to partition, and there I use /
> dev/mmcblk1, but if the devices are probed incorrectly, this does not
> work, and of course there is no similar symlink to reliably find the
> real device.
>
> Any ideas?
Well, you can set an udev rule for set up a link, or you could detect
the device inside swupdate using a hook:
...
embedded_script = "
function dectect_emmc(image)
.....
end";
....
partitions: (
{
type = "diskpart";
device = "dummy";
hook = "detect_emmc";
....
and generally it is enough a check inside /sys to know which is the
correct one.
Best regards,
Stefano Babic
>
>
>
> Hamish Guthrie
> Senior Embedded Software Engineer
>
> *Kistler Instrumente AG*
>
> Eulachstrasse 22, 8408 Winterthur, Switzerland
>
> Direct +41 52 2241 642, Main Office
+41 52 224 11 11
>
hamish....@kistler.com <mailto:
hamish....@kistler.com>,
>
www.kistler.com <
https://www.kistler.com/>, myKistler <https://
>
www.kistler.com/mykistler?
> utm_source=Outlook_signature&utm_medium=Outlook_signature&utm_campaign=Outlook_signature&utm_id=Outlook_signature>, Contact Service <mailto:
Ser...@kistler.com?subject=Service%20request>
>
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "swupdate" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
swupdate+u...@googlegroups.com
> <mailto:
swupdate+u...@googlegroups.com>.
> To view this discussion visit
https://groups.google.com/d/msgid/
> swupdate/
> AS1P190MB17769D3DC360BE88A2FDC654830EA%
40AS1P190MB1776.EURP190.PROD.OUTLOOK.COM <
https://groups.google.com/d/msgid/swupdate/AS1P190MB17769D3DC360BE88A2FDC654830EA%40AS1P190MB1776.EURP190.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer>.