none
Ran out of space in ROM for... Creating a MUI OS for Windows Embedded Compact 2013. Need to create multiple OS images? RRS feed

  • Question

  • I am currently looking at creating an OS image that takes advantage of MUI. After adding in all the appropriate locales that I need, when I try and build the OS image I get this:

    extract from build.log

    ...

      Failed to find a range for data of size 21767952

    EXEC : error : Ran out of space in ROM for msyh.ttf [C:\WINCE800\public\common\oak\misc\makeimg.proj]

      size 21767952

      Fatal error hit, exiting...

    C:\WINCE800\public\common\oak\misc\makeimg.proj(663,5): error MSB3073: The command "romimage C:\WINCE800\OSDesigns\MT_CEPC\MT_CEPC\RelDir\CEPC_x86_Release\ce.bib  " exited with code 1.

    Done Building Project "C:\WINCE800\public\common\oak\misc\makeimg.proj" (default targets) -- FAILED.

    Build FAILED.

    "C:\WINCE800\public\common\oak\misc\makeimg.proj" (default target) (1) ->

    (RunRomImage target) ->

      EXEC : error : Ran out of space in ROM for msyh.ttf [C:\WINCE800\public\common\oak\misc\makeimg.proj]

      C:\WINCE800\public\common\oak\misc\makeimg.proj(663,5): error MSB3073: The command "romimage C:\WINCE800\OSDesigns\MT_CEPC\MT_CEPC\RelDir\CEPC_x86_Release\ce.bib  " exited with code 1.

        0 Warning(s)

        2 Error(s)

    msyh.ttf is 21MB. I have retried this only adding in English and Chinese, and I get the same error.

    Thanks

    JohnDr


    • Edited by John Dr Wednesday, July 23, 2014 12:15 PM made an assumption about a file size which I mistook for the OS image size
    Wednesday, July 23, 2014 6:37 AM

Answers

  • Here's a the response from the support engineer who is looking into the problem:

    "Status

    I have reproduce the problem locally.

    I played around with some different settings to see what I could learn. I found one configuration that still gave me the error about out of room, but it did so later in the process to allow me to gather more information.

    I rounded up the sizes for the NK and RAM regions to natural boundaries. I then swapped the sizes as well. I gave the NK region 1 GB of space, and the RAM region 42 MBs of space. I then turned off AUTOSIZE.

    NK     80220000  40000000  RAMIMAGE  ; 1 GB

    RAM    C0220000  02A00000  RAM       ; 42 MB

    ;AUTOSIZE

       

    Romimage provided more output with this configuration,

    <romimage>

    ...

    FILES Section

        Raw   Compr Location Filler File

      21622    4811 8305c754  ceconfig.h

    212474  212474 8305da20  wince.nls

                   ...

    21663376 21663376 880bddb4  msjh.ttf

    14512072 14512072 89566c44  msjhbd.ttf

    Failed to find a range for data of size 21767952

    Unfilled ROM holes (address, length):

    8a33dc0c 13427700   82aa600c     4084   802f700c     4084   82312010     4080   <-------------- Last unfilled hole is 0x8a33dc0c

    ...

    total space 14051332 in 388 ranges

    Error: Ran out of space in ROM for msyh.ttf

    size 21767952

    </romimage>

    Romimage complains "Failed to find a range for data of size 21767952", and then it lists the unfilled holes. The largest unfilled hole is at address 0x8a33dc0c, and has a size of 13427700 (10) or 0x00CCE3F4 or about 13 MB. In other words, romimage cannot fit a 21 MB file into a 13 MB hole.

    Why is the largest hole only 13 MBs? I assigned 1 GB to the NK region. I don't believe that all of the modules and files in ce.bib consume almost 1 GB. So, it seems that romimage must cap the size of the NK region.

    What is that maximum size that romimage will allow for NK? Well we know that the greatest address that romimage tries to use is 0x8a33dc0c, and that it has about 13 MB to work with. So, the ending address is 0x8A33DC0C + 0x00CCE3F4 = 0x8B00C000. We also know that the starting address of NK is 0x80220000. So, the maximum size that romimage will create is,

                    0x8B00C000 - 0x80220000 = 0x0ADEC000 or about 174 MB.

    This [seems to be an*] arbitrary size. There is no help documentation that says romimage can only create OS images smaller than 174 MB. So, this should be considered a bug."

    * Johndr Edit.

    I've submitted a business case to them to see whether it will be fixed, and am currently waiting for their response. I believe that a work around would be to add the files to the image as a post setup step, and add in the registry settings etc on first boot. I've not looked into this, but if I can't get that working - I'll be back on here. ;)

    It does seem bad that you can't create a Chinese OS out of the box - what does everyone in China do?

    • Marked as answer by John Dr Wednesday, October 7, 2015 9:06 AM
    Monday, August 11, 2014 9:43 AM

All replies

  • You'll need to adjust your config.bib and image defines to allow for a bigger ROM.

    You can do this all in 1 ROM file, or if you like in multiple region bins (by changing platform.bib to include certain files in different bin than NK).

    See also BinFS.


    Good luck,

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

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Wednesday, July 23, 2014 10:59 PM
    Moderator
  • Thanks!

    I'm having a look at my config.bib now. IMGRAM512=1 and AUTOSIZE is on. I tried with a clean build - no international sections added. When built NK.bin was about 50MB,

    I then added Chinese - rebuilt and I received the above error.

    Maybe I've missed something...

    Thursday, July 24, 2014 6:42 AM
  • What is ROMSIZE set to in your config.bib?

    Increase NK size:

    NK 80200000 0B000000 RAMIMAGE

    adjust RAM start and size accordingly:

    RAM 88200000 0CDFC000 RAM

    set ROMSIZE to NK size:

    ROMSIZE=0B000000 

    The values will of course be different on your platform. You may also need to adjust some defines in some header files. Without knowing what BSP you are using it is difficult to be more specific.


    Good luck,

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

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Thursday, July 24, 2014 6:49 AM
    Moderator
  • I'm using the CEPC BSP. There isn't a ROMSIZE defined. Shouldn't AUTOSIZE sort that out?

    This is the edited version

    ...


        #elif defined IMGRAM512
            ; 512 MB of RAM (note: AUTOSIZE will adjust NK/RAM boundary)
            RAM      82C00000  1D400000  RAM
            nk.exe:dwOEMTotalRAM 0    20000000  FIXUPVAR
        #endif
    #endif


    ; @CESYSGEN IF CE_MODULES_OSAXST0
    nk.exe:dwOEMDrWatsonSize  00000000   0x80000               FIXUPVAR
    ; @CESYSGEN ENDIF

    CONFIG
       AUTOSIZE=ON
       ROMOFFSET=80000000
       KERNELFIXUPS=ON

    ; @CESYSGEN IF !NK_NKNOCOMP
       COMPRESSION=ON
    ; @CESYSGEN ENDIF !NK_NKNOCOMP
    ; @CESYSGEN IF NK_NKNOCOMP
       COMPRESSION=OFF
    ; @CESYSGEN ENDIF NK_NKNOCOMP

    ... sorry I don't understand the figures. You have NK starting address as 802000000, with size 0B000000 which takes it to 8B200000

    Your RAM starts at 88200000 - should that be 8B200000 with the size 0CDFC000, or is this a different area? I'll post this while looking on MSDN to try and work out, will edit shortly.

    • Edited by John Dr Thursday, July 24, 2014 7:08 AM
    Thursday, July 24, 2014 6:57 AM
  • Yes, it should.

    How big is the resulting NK.bin?

    It sounds like you are simply running out of RAM (in CEPC everything needs to fit in RAM of course).

    Can you execute "viewbin nk.bin" and post the output?

    EDIT: Silly me, of course you can't do that if you are unable to generate the nk.bin... It's a strange problem... It seems ROMIMAGE has problems with big files... Can you try to take out the multi language stuff and add a big test file to the image (something of 21 MB) and see if you get the same error?


    Good luck,

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

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.


    Thursday, July 24, 2014 7:06 AM
    Moderator
  • Failed to find a range for data of size 20971520
    Error: Ran out of space in ROM for monsterfile.bin
    size 20971520
    Fatal error hit, exiting...

    Looks like it's a support incident to MS.

    Thursday, July 24, 2014 8:01 AM
  • Yep... Please report back any findings here for future reference.

    Thanks!


    Good luck,

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

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Thursday, July 24, 2014 8:02 AM
    Moderator
  • Here's a the response from the support engineer who is looking into the problem:

    "Status

    I have reproduce the problem locally.

    I played around with some different settings to see what I could learn. I found one configuration that still gave me the error about out of room, but it did so later in the process to allow me to gather more information.

    I rounded up the sizes for the NK and RAM regions to natural boundaries. I then swapped the sizes as well. I gave the NK region 1 GB of space, and the RAM region 42 MBs of space. I then turned off AUTOSIZE.

    NK     80220000  40000000  RAMIMAGE  ; 1 GB

    RAM    C0220000  02A00000  RAM       ; 42 MB

    ;AUTOSIZE

       

    Romimage provided more output with this configuration,

    <romimage>

    ...

    FILES Section

        Raw   Compr Location Filler File

      21622    4811 8305c754  ceconfig.h

    212474  212474 8305da20  wince.nls

                   ...

    21663376 21663376 880bddb4  msjh.ttf

    14512072 14512072 89566c44  msjhbd.ttf

    Failed to find a range for data of size 21767952

    Unfilled ROM holes (address, length):

    8a33dc0c 13427700   82aa600c     4084   802f700c     4084   82312010     4080   <-------------- Last unfilled hole is 0x8a33dc0c

    ...

    total space 14051332 in 388 ranges

    Error: Ran out of space in ROM for msyh.ttf

    size 21767952

    </romimage>

    Romimage complains "Failed to find a range for data of size 21767952", and then it lists the unfilled holes. The largest unfilled hole is at address 0x8a33dc0c, and has a size of 13427700 (10) or 0x00CCE3F4 or about 13 MB. In other words, romimage cannot fit a 21 MB file into a 13 MB hole.

    Why is the largest hole only 13 MBs? I assigned 1 GB to the NK region. I don't believe that all of the modules and files in ce.bib consume almost 1 GB. So, it seems that romimage must cap the size of the NK region.

    What is that maximum size that romimage will allow for NK? Well we know that the greatest address that romimage tries to use is 0x8a33dc0c, and that it has about 13 MB to work with. So, the ending address is 0x8A33DC0C + 0x00CCE3F4 = 0x8B00C000. We also know that the starting address of NK is 0x80220000. So, the maximum size that romimage will create is,

                    0x8B00C000 - 0x80220000 = 0x0ADEC000 or about 174 MB.

    This [seems to be an*] arbitrary size. There is no help documentation that says romimage can only create OS images smaller than 174 MB. So, this should be considered a bug."

    * Johndr Edit.

    I've submitted a business case to them to see whether it will be fixed, and am currently waiting for their response. I believe that a work around would be to add the files to the image as a post setup step, and add in the registry settings etc on first boot. I've not looked into this, but if I can't get that working - I'll be back on here. ;)

    It does seem bad that you can't create a Chinese OS out of the box - what does everyone in China do?

    • Marked as answer by John Dr Wednesday, October 7, 2015 9:06 AM
    Monday, August 11, 2014 9:43 AM