On 31/01/20 08:29, Pelle Windestam wrote:
> Hi,
>
> I am having a strange issue with swupdate, occasionally I will get the following error message when trying to upgrade:
> [TRACE] : SWUPDATE running : [install_raw_image] : Device /dev/mmcblk0p1 cannot be opened: No such file or directory
>
> The setup is a single-copy update, where I have placed swupdate in an initrd-image which is booted if the upgrade_available variable is set in u-boot. I am using swupdate version 2018.03.
>
> In the shell I can see that /dev/mmcblk0p1 is present, and I can hexdump from the device so it is definitely there. I can even mount it and look around in the file system.
>
> Any ideas what could be causing this? I have checked the source code for the raw_handler and I cannot understand what's going wrong,
I think you are looking to the wrong place because this does not seem
related to SWUpdate. You run from initramfs, and I can suppose there is
a race condition and when SWUpdate tries to access via open() to the
eMMC, the device is not yot availabl and the kernel returns an error.
When yopu check in the shell, you are much more later and device is
available. And I guess that SWUPdate will run then if you restart it
into this shell.
it seems like it is simply calling open() on the device, which I assume
what hexdump would use as well. Most of the time if I do a board reset
and try the update again, the error is not occurring.
>
> My sw-description looks like this:
> software =
> {
> version = "1.0";
> description = "Firmware upgrade"
>
> firmware = {
> hardware-compatibility: [ "1.0" ];
> images: (
> {
> filename = "firmware-image-base-imx8qxp-var-som.ext4.gz";
> type = "raw";
> compressed = true;
> device = "/dev/mmcblk0p1";
> filesystem = "ext4";
> sha256 = "@firmware-image-base-imx8qxp-var-som.ext4.gz" ;
> }
> );
> scripts: (
> {
> filename = "update.sh";
> type = "shellscript";
> sha256 = "@update.sh";
Check this thread, too.
https://groups.google.com/forum/#!searchin/swupdate/update$20of$20u-boot.imx%7Csort:date/swupdate/jASLNVWl98E/NgNCJzqSDgAJ
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone:
+49-8142-66989-53 Fax:
+49-8142-66989-80 Email:
sba...@denx.de
=====================================================================