Hi Adrian,
On 07/04/2016 13:53,
amcg...@ad-holdings.co.uk wrote:
>
>
> On Thursday, 7 April 2016 12:41:34 UTC+1,
amcg...@ad-holdings.co.uk wrote:
>
> Hi Stefano
>
> Following on from last week, I now have a "swupdate" enabled
> boot/root system that is working well and have started to test the
> .swu files that I previously generated.
>
> The results of testing make me think that the bitbake generated .swu
> files are not correct.
>
> I'm trying to update a target ext3 rootfs. My bitbake swu .bb and
> sw-description files are nearly identical to those you've seen
> previously (included below).
>
> I wonder whether you could provide some advice for what is wrong
> with my .swu generation scripts. I've highlighted the target serial
> output error in red.
>
> Many thanks
>
> Adrian
>
>
> *Scenario: Upload an "ext3 rootfs" to my target*
> _Target Serial Output_
> root@swan-target:~# X_FILENAME: vblade-swu-image-imx6qswan.swu
> lenght: 872416256
> [NOTIFY] : SWUPDATE running : [network_thread] : Incoming network
> request: processing...
> [NOTIFY] : SWUPDATE started : Software Update started !
> [NOTIFY] : SWUPDATE running : [extract_files] : Found file:
> filename sw-description
> size 190
> Version 1.9.32
> [NOTIFY] : SWUPDATE running : [parse_hw_compatibility] : Accepted
> Hw Revision : 1.0
> [NOTIFY] : SWUPDATE running : [parse_images] : Found Image :
> vblade-image-imx6qswan.ext3 in device : /dev/mmcblk2p2 for handler
>
> [NOTIFY] : SWUPDATE running : [check_hw_compatibility] : Hardware
> swan Revision: 1.0
> [NOTIFY] : SWUPDATE running : [check_hw_compatibility] : Hardware
> compatibility verified
> [NOTIFY] : SWUPDATE running : [extract_files] : Found file:
> filename vblade-image-imx6qswan.ext3
> size 872415232 required
The very simple question is: do you have really ~870MB free on RAM ? The
file is firstly copied into tmpfs.
> ERROR core/cpio_utils.c : copy_write : 148 : cannot write 12288 bytes
> [NOTIFY] : SWUPDATE failed [0] ERROR core/cpio_utils.c : copy_write
> : 148 : cannot write 12288 bytes
The error tells us that there is no more space available - you get rid
of RAM.
If you have such as big file that get rid of your resources, you should
flag it into sw-description to be streamed directly to the target.
> [NOTIFY] : SWUPDATE failed [1] Image invalid or corrupted. Not
> installing ...
> [NOTIFY] : SWUPDATE running : [network_initializer] : Main thread
> sleep again !
> [NOTIFY] : No SWUPDATE running : Waiting for requests...
> Main loop Daemon
>
> root@swan-target:~#
>
>
> _File:
vblade-swu-image.bb <
http://vblade-swu-image.bb>_
> DESCRIPTION = "Compound image for Swan"
> SECTION = ""
>
> PR = "r1"
>
> SRC_URI += "file://sw-description "
> inherit swupdate
>
> LICENSE = "MIT"
> LIC_FILES_CHKSUM =
> "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
>
> file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
>
> IMAGE_DEPENDS = "vblade-image"
> SWUPDATE_IMAGES = " \
> vblade-image \
> "
> SWUPDATE_IMAGES_FSTYPES[vblade-image] = ".ext3"
>
> COMPATIBLE = "imx6qswan"
>
>
> _File: sw-description_
> software =
> {
> version = "1.9.32";
>
> hardware-compatibility: [ "1.0" ];
>
> images: (
> {
> filename = "vblade-image-imx6qswan.ext3";
> device = "/dev/mmcblk2p2";
> type = "raw";
This is the default behavior: artifact is copied into /tmp and then
installed into eMMC. This works when RAM is bigger as flash.
You should add:
installed-directly = true;
> }
> );
> }
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
=====================================================================