Remote firmware update

  • Hello Everybody,


    How can I perform kernel update on a device with efusA9X board and WEC7 when physical access to device is not an option, but only access over IP network is available?


    I have tried to use KernelUpdate tool, but it lacks support for efusA9X board.


    Any suggestion would be appreciated.


    Best regards,


    Miodrag Bazdar

  • Hello,


    efusA9X is included into teh tool since Kernelupdate Version 1.17.

    Which kernel version you are using?

    We will check it.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello ZU,


    I am using KernelUpdate_V118Beta.exe tool with xip.bin image. My current kernel version is "efusA9X V1.40". The tool does not recognise this platform. When I manually modify registry entry HKLM\Platform\KernelVersion to "efusA9 V1.00", tool recognises the platform as supported. Kernel update starts and seems to be going fine until "writing to flash" phase. Then it gets stuck and machine reboots. Most likely, there is a problem with efusA9X support in KernelUpdate_V118Beta.exe, if there is any at all.


    Can you please check it yourself and let me know the progress?


    Best regards,


    Miodrag Bazdar

  • Hello,


    first problem seems to be solved i will send you KernelUpdate Version 1.20 Beta which recognizes efusA9X reliable.

    Before i will check what's the matter with the "writing to flash" issue.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello ZU,


    Thanks a lot, please send me this new version of update tool.


    Please note that "writing to flash" occurred when I "lied" kernel update tool that my platform is "efusA9 V1.00", although real one is "efusA9X V1.40". I've done this only for test, to confirm that KernelUpdate_V118Beta.exe recognises efusA9 and does not recognise efusA9X.


    Best regards,


    Miodrag Bazdar

  • Hello,


    i just send you Kernelupdate V1.20 Beta by email


    I test it several times by switch between the kernel outlined below and it works without any issue. Please test and let me know if any issues may occur.

    Terminate all your applications before launch Kernelupdate! If you load data from BINFS while update this may cause an exception.


    efusA9X V1.40 - Firmware Init

    Copyright (c) 2015 F&S Elektronik Systeme GmbH

    Build: Feb 6 2019/16:31:07


    efusA9X V1.30 - Firmware Init

    Copyright (c) 2015 F&S Elektronik Systeme GmbH

    Build: Jan 30 2019/09:40:36


    PS:

    >> ... "lied" kernel update tool that my platform is "efusA9 V1.00",

    << The IOCTLs should be the same rest is done by kernel so i await your "lie" should work too;)

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Dear Christian,


    Thanks a lot for your valuable help and support!


    Some things came clear to me now, so let me summarize them.


    First of all, you were right, even the version 1.18 of kernel update tool worked when I lied it about platform through registry. Thing is that when xip image is updated, reboot is done automatically. I followed the progress of kernel update through remote display (cerdisp). Writing to flash green progress bar went to the end once, then it started again from beginning and shortly after it got stuck, apparently because update finished and machine went for reboot. I have falsely concluded that something went wrong because of this!


    Kernel update tool V1.20 works the same way, except I don't have to lie it about platform version, which is great. There is one problem that should be addressed though. We use -l option to log update progress to a file. After reboot, this file exists, but is full of zeroes and useless. How can we tell that update went fine?


    Best regards,


    Miodrag Bazdar

  • Hello Miodrag Bazdar,


    >> .... We use -l option to log update progress to a file. After reboot, this file exists, but is full of zeroes and useless ...

    << This problem is resolved with new version I sent you.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Dear Support Team,


    I confirm -l option is working with the latest version of KernelUpdate.exe.


    For our implementation using KernelUpdateLibrary.lib is more appropriate approach. I have few issues with it though:


    1) Linker complains GetRequirementDescription() is unresolved symbol.

    2) How do I reboot efusA9X programatically, as this is necessary step at the end of update process?

    3) When I build my application I get few warnings LNK4099: PDB 'vc80.pdb' was not found with 'KernelUpdateLibrary.lib'. I suppose I can safely neglect these warnings?


    Thanks in advance,


    Best regards,


    Miodrag Bazdar

  • Hello,


    1) Assume this is obsolete according code sampe in the doc:


    2) You can reboot call ndcucfg's "reboot" via "CreateProcess" or ndcucfg.lib (from download->tools section).



    3) Yes.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello,


    Thanks for all help and support. Remote firmware update works now, I've followed your advice.


    FYI I believe there is a bug in KernelUpdateLibrary.lib concerning GetCurrentUpdateProgress() function. Function returns progress correctly until 90%. When it moves above 90% then 1..10 is returned instead of 91..100. This does not affect update process though.


    Best regards,


    Miodrag Bazdar

  • >>FYI I believe there is a bug in KernelUpdateLibrary.lib concerning GetCurrentUpdateProgress() function. Function returns progress correctly until 90%. When it moves above 90% then 1..10 is returned instead of 91..100. This does not affect update process though.

    << Ok, thanks we will check this issue for the next release.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Dear Support Team,


    Because of instability issues with updating XIP image, I have moved to using NK.bin instead. Can you please tell me, if I update NK.bin:


    1) Can my update program run from BINFS partition? I start it from HKLM\init. NK.bin resides on \SDCard.

    2) Is there a obstacle to start winvnc (VNC server for Windows CE) before running update, so I could follow update progress?


    Best regards,


    Miodrag Bazdar

  • Hello,


    >> Because of instability issues with updating XIP image ...

    << We have no feed back from the field about any issuses while update XIP. Have you some more details?


    >> Can my update program run from BINFS Partition?

    << You meant FFSDisk, yes. BINFS is readonly and for kernel.


    >> I start it from HKLM\init. NK.bin resides on \SDCard.

    << You have to ensure that SDCARD is available - this may take some more time after reboot then ffsdisk! Depends on the SDCard.


    >> Is there a obstacle to start winvnc (VNC server for Windows CE) before running update, so I could follow update Progress?

    << I see no obstacle - you may try it. On board is already cerdisp (supports max. 16BPP).

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello,


    >> We have no feed back from the field about any issuses while update XIP. Have you some more details?

    << During XIP update I get exceptions on debug UART. Sometimes no exceptions, but usually few, although update finishes well, at least this is what KernelUpdateLibrary says. But, sometimes, exceptions are numerous, machine freezes and I have to reset it. Sometimes I end up with broken image in the end. When using NK.bin update exceptions do not seem to appear (but I will check this further).


    >> You meant FFSDisk, yes. BINFS is readonly and for kernel.

    << My own KernelUpdate.exe (based on KernelUpdateLibrary.lib) is made as part of image, it resides on BINFS readonly partition. Documentation about kernel update says:


    KernelUpdate program and kernel image to be flashed may *not* be located on NAND flash (FFSDISK).

    This is why I asked if my update program may be part of image. When XIP is updated, it may be an issue, because it would "update" itself. When NK.bin is used it should not be the case, update tool would be executed from RAM. Is it right?


    Documentation also says:


    Please do not start any programs during update process.

    This is why I asked if I can start winvnc before running update. Is it just important not to start it during the update? What about XIP in this case?


    >> You have to ensure that SDCARD is available.

    << Ok, thanks, got it.


    Best regards,


    Miodrag Bazdar

  • Hello,


    the problem is follwing while using XIP image. A XIP image is not completely loaded to RAM in contrast to NK image. While update you write to BINFS and on demand some module may be loaded but this modules may now alrady belong to another image. This may cause exceptions.

    I see no reason to add kernel update into the image. You have to provide new Image always so you can provide the kernelupdate too.


    >>Please do not start any programs during update process.

    << Right, you should not do it. But I did it often e.g. cerdisp does not load any stuff from BINFS started once (I hope;) - but you should not do it!


    >> ...*not* be located on NAND Flash

    << I would also not do this if it is avoidable. But i know some customer which tested this well in their configuration and no issue occurs.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.