Rootfs update from cwe image

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

fwupdate tool only supports CWE/SPK file.

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

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

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?!?

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

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

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

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"

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 .
}

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

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

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

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

my .bb code has no problem to put file into /etc/init.d folder.
you can try my bb file.

a relaated question.

I have used the offered way (update file on /usr/bin) and it works great for sh and txt files

but, when I try the same with .ko files the ko files are created in a smaller size in the image and can not be used.
I assum they are somehow compressed when the image creation process happen

please advice how to propelly (in a similar way) include precompiled ko files

You can see this document on how to put own file in yocto image:

[WP76xx] Example on putting own files and building helloworld application into yocto image.docx (20.9 KB)

BTW, do you mean if you rename the .ko file to be xxx.txt, it will work fine?

no , when I use the same image as you used to deploy .txt or .sh files to /usr/bin/ it’s deployed OK

but when it’s a .ko file (changing the extenstion does not change the result)

root@1Pm_0080_abroad:~# ls -l /usr/bin/compat.txt
-rwxrwxrwx 1 root root 14976 Dec 30 17:11 /usr/bin/compat.ko <— small size, unusable
root@1Pm_0080_abroad:~# ls -l /lib/firmware/brcm/compat.ko
-rwxrwxrwx 1 root root 1548268 Sep 12 13:50 /lib/firmware/brcm/compat.ko ← deployed OK
root@1Pm_0080_abroad:~#

meaning , when I deploy the file using Yocto build to the ubifs, it’s deployed OK, but when I deploy to /usr/bin/ it’s not deployed OK

please advice

my end goal is to include a precompiled *.ko file in the built YOcto image, any way to achive that is OK

How about you zip it first

great idea, exactlly what I wanted

but, when I try to include a zip file the build fails …

I am uploading my bb file , if you know how to add zip it wwould be great!

DESCRIPTION = "The calibrator and other useful utilities for TI wireless solution based on wl12xx driver"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=4725015cb0be7be389cf06deeae3683d"

DEPENDS = "libnl"
RDEPENDS_${PN} = "wl18xx-firmware"

PV = "R8.6+git${SRCPV}"

PR = "r5"

#Tag: R8.6
SRCREV = "cf8965aad73764022669647fa33852558a657930"
SRC_URI = "git://git.ti.com/wilink8-wlan/18xx-ti-utils.git \
	   file://wl18xx-conf.bin \
	   file://brcmfmac43430-sdio.bin \
	   file://brcmfmac43430-sdio.clm_blob \
	   file://brcmfmac43430-sdio.txt \
	   file://brcm.sh \
	   file://setup.sh \
	   file://brcmfmac.ko \
           file://brcmutil.ko \
           file://cfg80211.ko \
           file://compat.ko \
           file://compat.txt \
"

PROVIDES += "ti-wifi-utils"
RPROVIDES_${PN} += "ti-wifi-utils"
RREPLACES_${PN} +=  "ti-wifi-utils"
RCONFLICTS_${PN} +=  "ti-wifi-utils"

S = "${WORKDIR}/git"

export CROSS_COMPILE = "${TARGET_PREFIX}"

EXTRA_OEMAKE = 'CFLAGS="${CFLAGS} -I${STAGING_INCDIR}/libnl3/ -DCONFIG_LIBNL32 " \
                LDFLAGS="${LDFLAGS} -L${STAGING_LIBDIR}" \
                CC="${CC}" \
                NLVER=3'
kmoddir = "/lib/modules/${KERNEL_VERSION}/wlan"

do_install() {
    install -d ${D}${bindir}
    install -m 0755 calibrator ${D}${bindir}/
    install -d ${D}/lib/firmware/ti-connectivity
    install -m 0644 ${WORKDIR}/wl18xx-conf.bin ${D}/lib/firmware/ti-connectivity
    install -d ${D}/lib/firmware/
    install -d ${D}/lib/firmware/brcm
    install -m 0777 ${WORKDIR}/brcmfmac43430-sdio.bin ${D}/lib/firmware/brcm
    install -m 0777 ${WORKDIR}/brcmfmac43430-sdio.clm_blob ${D}/lib/firmware/brcm
    install -m 0777 ${WORKDIR}/brcmfmac43430-sdio.txt ${D}/lib/firmware/brcm
    install -m 0777 ${WORKDIR}/brcm.sh ${D}/lib/firmware/brcm
    install -m 0777 ${WORKDIR}/brcmfmac.ko ${D}/lib/firmware/brcm
    install -m 0777 ${WORKDIR}/brcmutil.ko ${D}/lib/firmware/brcm
    install -m 0777 ${WORKDIR}/cfg80211.ko ${D}/lib/firmware/brcm
    install -m 0777 ${WORKDIR}/compat.ko ${D}/lib/firmware/brcm
    install -d ${D}${bindir}/
    install -m 0777 ${WORKDIR}/brcmfmac43430-sdio.bin  ${D}${bindir}/
    install -m 0777 ${WORKDIR}/brcmfmac43430-sdio.clm_blob  ${D}${bindir}/
    install -m 0777 ${WORKDIR}/brcmfmac43430-sdio.txt  ${D}${bindir}/
    install -m 0777 ${WORKDIR}/brcm.sh  ${D}${bindir}/
    install -m 0777 ${WORKDIR}/compat.txt  ${D}${bindir}/
}

FILES_${PN} += " /lib/firmware/ti-connectivity/*"
FILES_${PN} += " /lib/firmware/brcm/*"