none
How to add a folder and file to \windows when creating OS Image RRS feed

  • Question

  • Hi,

    I have a need to create an OS image with a file located within a specific folder within the \windows folder. We have tried to do this via the BIB, but cannot seem to figure out how to create a target folder within the \windows folder, the file ends up in the "root" \windows folder like any other file you add with the BIB. Is there a way to have that file created to a specific subfolder as part of creating the image for WEC2013?

    The reason this is a requirement is we have a third party library (Qt 5.6) that we use that expects a file in '\windows\platform' folder, so we need a way to create the 'platform' folder within \windows and to have that file included in the image in that specific folder. The documentation is not clear (or we missed it) if or how this is possible when we create the NK.bin, so we're looking for help with that.

    Thanks in advance!

    -Tim

    Thursday, January 18, 2018 4:08 PM

Answers

  • .dat files will be helpful.

    Check this blog post by Bruce for details: http://geekswithblogs.net/BruceEitman/archive/2008/06/17/platform-builder-using-dat-files-to-initialize-the-file-system.aspx

    Friday, January 19, 2018 4:21 AM
  • Use a .dat file entry to copy the file into the right folder. Instructions in MSDN: https://msdn.microsoft.com/en-us/library/ee478631.aspx

    My blog post may come in handy too: https://guruce.com/blogpost/filteringdatfiles

    One thing to remember is that using the .dat file copy method, the file in question will take 2x its size in RAM, so it is really not a great solution. If it's only a single file and it's not too big, then it's ok, but for more files or large files there is a better solution; mount your persistent storage as root and create a \Windows folder on it with the Qt files in the \Windows\platform folder. The \Windows folder will be shadowed on your persistent storage (eg your SD card or MMC disk). This allows for very easy upgrade to a later version of Qt, or even update any DLL or file inside the \Windows folder that is included in your NK.BIN.

    Configuring a medium to be mounted as root is very easy if you use the GuruCE iMX6 BSP (just select "Mount as root" option of the medium you want to mount as root under Storage in our BSP catalog). Your experience with other BSPs will vary (you'll need to manually configure the registry and make sure all required drivers are loaded in the correct boot-phase).


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: https://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    NXP Proven Partner
    https://guruce.com
    Consultancy, training and development services.

    Interested in WEC on i.MX6?
    Get the only 100% stable and best performing i.MX6 BSP for WEC7 and WEC2013 here: https://guruce.com/imx6


    Friday, January 19, 2018 5:50 AM
    Moderator

All replies

  • .dat files will be helpful.

    Check this blog post by Bruce for details: http://geekswithblogs.net/BruceEitman/archive/2008/06/17/platform-builder-using-dat-files-to-initialize-the-file-system.aspx

    Friday, January 19, 2018 4:21 AM
  • Use a .dat file entry to copy the file into the right folder. Instructions in MSDN: https://msdn.microsoft.com/en-us/library/ee478631.aspx

    My blog post may come in handy too: https://guruce.com/blogpost/filteringdatfiles

    One thing to remember is that using the .dat file copy method, the file in question will take 2x its size in RAM, so it is really not a great solution. If it's only a single file and it's not too big, then it's ok, but for more files or large files there is a better solution; mount your persistent storage as root and create a \Windows folder on it with the Qt files in the \Windows\platform folder. The \Windows folder will be shadowed on your persistent storage (eg your SD card or MMC disk). This allows for very easy upgrade to a later version of Qt, or even update any DLL or file inside the \Windows folder that is included in your NK.BIN.

    Configuring a medium to be mounted as root is very easy if you use the GuruCE iMX6 BSP (just select "Mount as root" option of the medium you want to mount as root under Storage in our BSP catalog). Your experience with other BSPs will vary (you'll need to manually configure the registry and make sure all required drivers are loaded in the correct boot-phase).


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: https://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    NXP Proven Partner
    https://guruce.com
    Consultancy, training and development services.

    Interested in WEC on i.MX6?
    Get the only 100% stable and best performing i.MX6 BSP for WEC7 and WEC2013 here: https://guruce.com/imx6


    Friday, January 19, 2018 5:50 AM
    Moderator
  • Thank you for your help, the .dat files appear to be the way to go, we will try that out and respond in a day or so if that works.

    Thanks again!

    -Tim


    • Edited by TimKnor Tuesday, January 23, 2018 4:19 PM fixed typo
    Tuesday, January 23, 2018 4:19 PM
  • Thank you for your help, the .dat files appear to be the way to go, we will try that out and respond in a day or so if that works.

    Thanks again!

    -Tim

    Tuesday, January 23, 2018 4:19 PM