Rootfs update from cwe image


#1

hi!

i have built cwe image and i update my mango red using fwupdate utility.
is fwupdate is support rootfs update i dont see it is updates the rootfs.
Thanks


#2

fwupdate tool only supports CWE/SPK file.


#3

hi!
thanks for help!!!
please explain how to burn rootfs to the target?
another utility?
below you can see image i have built
need i add rootfs to the CWE?
/work/work/legato/yocto/build_bin/tmp/deploy/images/swi-mdm9x28-wp $ swicwe -c yocto_wp76xx.4k.cwe
input image type is APPL
Parsing input file yocto_wp76xx.4k.cwe
Type Size(Exclude Header) Product Compress Version
*APPL 30136464 Y921 0 Wed Jan 9 15:21:20 IST 2019
SYST 20971520 9X28 0 Wed Jan 9 15:21:20 IST 2019
APPS 9164144 9X28 0 3.18.44 20181223150058
3.18.44 20181223161852
3.18.44 20181224154520
3.18.44 201812201/09/19
Parsed image is Legato/Linux
Concatenating images

CWE Header Generator 3.01. Copyright Sierra Wireless, Inc., 2012
Output CWE Header File /tmp/temp.mbn.hdr
Image size 0x1cbda20, crc32 0x905c0cd0


#4

When you say rootfs, are you referring to system partition?
If yes, you can put your file in yocto cwe and update according.


#5

hi!
i put my bash scripts to my yocto custom level via append file

FILESEXTRAPATHS_prepend := "{THISDIR}/initscripts:" SRC_URI += "file://wifi.sh" do_install_append() { install -m 0755 {WORKDIR}/wifi.sh {D}{sysconfdir}/init.d
update-rc.d -r ${D} wifi.sh start 99 S .
}
and see file is created in
/swi_mdm9x28_wp-poky-linux-gnueabi/mdm9x28-image-minimal/1.0-r0.0/rootfs/etc/init.d/wifi.sh
/swi_mdm9x28_wp-poky-linux-gnueabi/mdm9x28-image-minimal/1.0-r0.0/rootfs/etc/rcS.d/S99wifi.sh

when i do fwupdate i dont see my script on rootfs
what the problem here ?
it seems its not updated properly?!?


#6

How about putting your script to /usr/bin folder?
You might refer to a post here:


#7

but etc/init.d is not readonly i can copy file via ssh


#8

How about putting your script to /usr/bin folder?


#9

I just tried to put a file in /usr/bin and /etc/init.d, no problem is found for WP76 FW R9.
Below is part of my .bb file:


do_install() {
	     install -d ${D}${bindir}
	     install -m 0755 helloworld ${D}${bindir}
		 install -d ${D}${sysconfdir}/init.d
 		install -m 0755 helloworld ${D}${sysconfdir}/init.d/helloworld123
}


INSANE_SKIP_${PN} = "ldflags"


#10

i did in my bb like this below: and its not extract file to the file system
may be problem update-rc.d not working by some reason in sierra yocto

do_install_append() {
install -m 0755 {WORKDIR}/wifi.sh {D}${sysconfdir}/init.d

update-rc.d -r ${D} wifi.sh start 99 S .
}


#11

maybe you can try my bb file and see if it can copy the file to /etc/init.d.


#12

hi!
to my function i added path to /usr/bin and its works
itsa very strange it not working with init.d and rcS.d the problem in sierra software update!!!
i have tryed both sweflash and fwupdate the same result
do_install_append() {
install -d {D}{bindir}
install -m 0755 {WORKDIR}/wifi.sh {D}{bindir} install -m 0755 {WORKDIR}/wifi.sh {D}{sysconfdir}/init.d
update-rc.d -r ${D} wifi.sh start 99 S .
}
./work/swi_mdm9x28_wp-poky-linux-gnueabi/mdm9x28-image-minimal/1.0-r0.0/rootfs/etc/init.d/wifi.sh
./work/swi_mdm9x28_wp-poky-linux-gnueabi/mdm9x28-image-minimal/1.0-r0.0/rootfs/etc/rcS.d/S99wifi.sh
./work/swi_mdm9x28_wp-poky-linux-gnueabi/mdm9x28-image-minimal/1.0-r0.0/rootfs/usr/bin/wifi.sh


#13

Do you mean you cannot put file to /etc/init.d folder?


#14

yes
i see during update prints
realpath: /etc/rcS.d/S99wifi.sh: No such file or directory
/etc/init.d/rcS: line 118: /etc/rcS.d/S99wifi.sh: not found