Update old kernel with SDHC driver

  • After adding support for SDHC card on PicoCOM1 we received a lot of request if it is possible to add this feature on an existing system without the need to reflash the complete kernel image. This HowTo will describe one solution we have preprared to arrange this.


    The basic problem with SDHC update is that there where involved a lot of DLLs in this updated. These DLLs are located in the Windows directory by default. These Dlls are not only referenced in registry settings but there also some directly interconnectiones (with LoadLibrary). To avoid that there appears a mixup between old and new versions of these DLLs it is required to replace them in Windows directory. But as this directory is virtual only it is required to repeat this copying on every bootup. Therefore we needed to implement a small patch driver that replaces the DLLS in Windows directory on startup.


    The ZIP package attached to this thread includes all DLLS and settings to patch an older kernel image. Just copy the SDHC directory into \FFSDISK\ and apply the settings in the included NDCUCFG script (SDCH-Update.txt). This script will ajdust all registry settings required to get the new SDHC driver working.


    After booting up the you should see debug messages similiar to following:

    Code
    1. SDP: \FFSDISK\SDHC\sdbus.dll -> \Windows\sdbus.dll (over)
    2. SDP: \FFSDISK\SDHC\sdbus2.dll -> \Windows\sdbus2.dll (over)
    3. SDP: \FFSDISK\SDHC\sdmemory.dll -> \Windows\sdmemory.dll (over)
    4. SDP: \FFSDISK\SDHC\pc1_sdmemory.dll -> \Windows\pc1_sdmemory.dll (over)
    5. SDP: \FFSDISK\SDHC\pc1_sdhc.dll -> \Windows\pc1_sdhc.dll (over)
    6. SDP: \FFSDISK\SDHC\pc1_sdmmcloader.dll -> \Windows\pc1_sdmmcloader.dll (over)


    Of course you can adjust the Update-Script according to your needs.


    If you want to put the new SD card libraries into another location please adjust the following settings according:

    • Modify the location of the SDHC-Patch driver

      Code
      1. reg open \Drivers\Builtin\SDHCPatch
      2. reg set val Dll string <The locatoion of the SDHCPatch.dll (default: "\FFSDISK\SDHC\sdhcpatch.dll")>


    • Tell SDHC Patch driver to copy the files from a different location

      Code
      1. reg open \Drivers\Builtin\SDHCPatch
      2. reg set val SourceDir string <Your source directory (default: "\FFSDISK\SDHC")>


    Please note that this fix is posted without warrenty, We advise to to test this fix before applying it to modules in the field.

    Files

    Software developer, F&amp;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.