How to support MultiBIN(BINFS) on SDMMC for Freescale IMX5x WinCE 6.0/7.0 BSP -blog archive

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to support MultiBIN(BINFS) on SDMMC for Freescale IMX5x WinCE 6.0/7.0 BSP -blog archive

10,735 次查看
qiang_li-mpu_se
NXP Employee
NXP Employee

    For MultiBIN system, the EBOOT don't need read the full NK from SDMMC card to memory for WinCE running. It just need to read the RAMIMAGE bin to memory for boot, and this bin is only 3MB, so it can reduce the WinCE boot time.

    The followed is the example to support MultiBIN on SDMMC device, as we know, for BINFS solution, the block device driver(sdmemory.dll) should be loaded by storage manager, but the original SDMMC driver architecture can't meet such requirement, so here we customerized the SDMMC driver for the boot ESDHC port.

    The followed is the pacth which can support both IMX51 and IMX50. Details please check the attached readme file.

 

For MultiBIN on NAND, please reference to

https://community.freescale.com/thread/280556

 

2013/04/27: added WinCE 7.0 support for iMX51 EVK and iMX53 SMD board, based on WCE700_MX53_ER_1105 and WCE700_MX51_ER_1106 BSP. BINFS for SDMMC WinCE7.zip

 

2013/05/06: missed "WINCE700\PLATFORM\iMX53_SMD\SRC\DRIVERS\PMIC\DA9052\FILES\DA9052.bib", which will get makeimg failure for iMX53 SMD. Please remove the followed red lines from DA9052.bib.

 

IF IMGMULTIXIP !
#define XIPKERNEL   NK
ENDIF IMGMULTIXIP !

IF IMGMULTIXIP
#define XIPKERNEL   XIPKERNEL
ENDIF IMGMULTIXIP

MODULES
;   Name                    Path                                    Memory Type
;   --------------          ----------------------------------      ------ ----


;------------------------------------------------------------------------------
; Device.exe drivers
;------------------------------------------------------------------------------

 

 

2013/05/07: How to use the cfimager.exe to burn the binfs image to SD card, the followed is the example for iMX51 EVK and iMX53 SMD, based on WinCE 7.0 BSP, the offset is same as ucl.xml in MFGTool.

 

For iMX51 EVK (Disk F is the SD card):

cfimager -f eboot.nb0 -d F -raw -offset 0x400

cfimager -f xip.nb0 -d F -raw -offset 0xA0400

 

For iMX53 SMD (Disk F is the SD card):

cfimager -f eboot.nb0 -d F -raw -offset 0x400

cfimager -f xip.nb0 -d F -raw -offset 0x120400

 

2014/07/16: Updated the WINCE600 patch for iMX51 EVK, WINCE600_ER1104_BINFS+HIVEREG+ROMFS_2014_07_16.zip, the followed is the update:

1. Sometimes in sdmemmain.cpp, function SMC_Init(), it will fail to get the card ready event from SDBUS driver, this will make boot up hang. Added a workaround to use watch dog service, if the failure happens, a watchdog reboot will happen. I think the sdhc + sdbus + sdmemory three drivers mode is not good for binfs solution, if there is a simple SDMMC disk driver, the issue should not happen. Unfuture, we don't have such a driver, so I used the watch dog reset workaround, it will increase about 1.2s boot up time when the issue happens.

 

2. Added SDHC DMA support and BSP_LOADDRIVER_LATER to load the USB driver later, the binfs system can boot into Wince desktop in 8 seconds.

 

3. Added clean boot menu in EBoot whcih can be used to clean the HIVE registry.

 

4. XIP.nb0 image size had been changed back to 94MB.


5. The same solution can be used in WinCE700 BSP, please do the porting by yourself.

Original Attachment has been moved to: README.txt.zip

Original Attachment has been moved to: Mfgtools-Rel-WCE600_11.04.00_update.zip

Original Attachment has been moved to: WINCE600_ER1104_BINFS+HIVEREG+ROMFS.zip

Original Attachment has been moved to: WINCE600_ER1104_BINFS.zip

Original Attachment has been moved to: BINFS-for-SDMMC-WinCE7.zip

Original Attachment has been moved to: WINCE600_ER1104_BINFS-HIVEREG-ROMFS_2014_07_16.zip

标签 (3)
标记 (4)
44 回复数

1,704 次查看
qiang_li-mpu_se
NXP Employee
NXP Employee

I had never see such issue, I just used a clean WCE700_MX53_ER_1105 BSP to verified it again, just used "Build" -> "Advanced Build Commands" -> "Sysgen (build demo -q)".

By the way, did you updated the file "wince700\platform\common\src\soc\COMMON_FSL_V3\sources.inc", if this file was not updated, there will be compiling error for foler "wince700\platform\common\src\soc\COMMON_FSL_V3\BINFS_SDCARD".

0 项奖励
回复

1,704 次查看
holyyuan
Contributor II

The same files as in “WINCE700_ER1105_BINFS.zip” for my BSP for U to review  in the attachment.

thank you!

0 项奖励
回复

1,704 次查看
qiang_li-mpu_se
NXP Employee
NXP Employee

The modification is OK. Some other one also told me the BINFS_SDCARD will get building failure, you can rebuild that folder manually, then it is OK.

0 项奖励
回复

1,703 次查看
holyyuan
Contributor II

thanks for your answer. I have tried to rebuild it.

But I rebuild the (:\wince700\platform\common\src\soc\COMMON_FSL_V3\BINFS_SDCARD) mannually, but it still build failed.However, its four sub-directories all build succeed. The build failure information is like  before. I once send the build log to U by email.

Despite of this ,

Just now, I move  the folder “BINFS_SDCARD” from “platform\common\src\soc\COMMON_FSL_V3” to BSP folder “platform\iMX53_SMD\SRC\DRIVERS”.

there still build errors,  in the build log in the attachement.

0 项奖励
回复

1,703 次查看
qiang_li-mpu_se
NXP Employee
NXP Employee

A workround for you:

1. manually build the folder "platform\common\src\soc\COMMON_FSL_V3\BINFS_SDCARD" and "PLATFORM\iMX53_SMD\SRC\DRIVERS\BINFS_ESDHC".

2. copy the followed manually built files to folder "PLATFORM\iMX53_SMD\FILES".

     binfs_esdhc.dll

     binfs_esdhc.map

     binfs_esdhc.pdb

     binfs_esdhc.rel

     binfs_formatfat.exe

     binfs_formatfat.map

     binfs_formatfat.pdb

     binfs_sdbus.dll

     binfs_sdbus.map

     binfs_sdbus.pdb

     binfs_sdbus.rel

     binfs_SDMemory.dll

     binfs_SDMemory.map

     binfs_SDMemory.pdb

     binfs_SDMemory.rel

3. Removed the source code folder "platform\common\src\soc\COMMON_FSL_V3\BINFS_SDCARD" and "PLATFORM\iMX53_SMD\SRC\DRIVERS\BINFS_ESDHC".

4. modify the file "PLATFORM\iMX53_SMD\SRC\DRIVERS\DIRS", remove the line for BINFS_ESDHC.

5. Sysgen

0 项奖励
回复

1,709 次查看
holyyuan
Contributor II

Dear Li ,

   I come across the same problem in

I reference your advice "2013/05/06: missed "WINCE700\PLATFORM\iMX53_SMD\SRC\DRIVERS\PMIC\DA9052\FILES\DA9052.bib", which will get makeimg failure for iMX53 SMD. Please remove the followed red lines from DA9052.bib." then I delete the red word follow your advice. But I still came across the problem while build the project.

the output log reads :

BUILD: [02:0000014443:ERRORE] Error(s) in directory "F:\WINCE700\platform\common\src\soc\COMMON_FSL_V3\BINFS_SDCARD\SDMEMORY\". {log="F:\WINCE700\build.log(45710)"}

BUILD: [02:0000014444:ERRORE] NMAKE : fatal error U1073: don't know how to make 'F:\WINCE700\osdesigns\iMX53_SMD_Mobility\Wince700\iMX53_SMD_ARMV7_Retail\cesysgen\platcomm\iMX53_SMD\lib\ARMV7\retail\binfs_sdbus.lib' {log="F:\WINCE700\build.log(45711)"}

BUILD: [02:0000014446:ERRORE] TargetExpLibFiles  -nologo BUILDMSG=Stop.  BUILDROOT=F:\WINCE700\platform\common CLEANBUILD=1 LINKONLY=1 NOPASS0=1 failed - rc = 2. {log="F:\WINCE700\build.log(45713)"}

BUILD: [01:0000014447:PROGC ] Linking F:\WINCE700\osdesigns\iMX53_SMD_Mobility\Wince700\iMX53_SMD_ARMV7_Retail\cesysgen\platcomm\iMX53_SMD\lib\ARMV7\retail\binfs_sdbus.lib

But i reall dont know how to debug . Can you find any other debugs or solve the problem? please help me analyze the problem. I am still confused . Thank you in advance.

0 项奖励
回复

1,709 次查看
qiang_li-mpu_se
NXP Employee
NXP Employee

Maybe you goto the folder and use command line to build that folder, then we can know why it can't be built. I had never used the "clean sysgen" to rebuild all Microsoft public code.

"command line to build that folder": VS2008 menu: "Build" -> "Open Release Directory in Build Window", then goto the code folder, such as "F:\WINCE700\platform\common\src\soc\COMMON_FSL_V3\BINFS_SDCARD" and run command "build -c".

For your "Sysgen -build failed.log", can you attach your "ce.bib" and "iMX53_SMD_Mobility.pbxml" here?

0 项奖励
回复

1,709 次查看
holyyuan
Contributor II

Sir ,

   I have upload the two files in the attachement. Pls check. thank you for your help.

Best

0 项奖励
回复

1,709 次查看
qiang_li-mpu_se
NXP Employee
NXP Employee

From the attached two files, I think you haven't updated all my patch files into your BSP. please double check it.

In the iMX53_SMD_Mobility.pbxml, there should be the followed two parameters:

      <StringDictionary Name="EnvironmentVariables">

        <Entry Name="imgcompressall">1</Entry>

        <Entry Name="bsp_support_multibin">1</Entry>

Without them, binfs image xip.nb0 will not be generated.

1,709 次查看
holyyuan
Contributor II

Dear Qiang.Li,

    Thanks for your answers.

    Now  I have another question to ask  you. I want to save the WinCE7 OS(iMX53) setttings without diappear after power off & reboot. Can I realize this function without using the BINFS method to only use the HIVE-based  registry? I find it's hard to change others'  changes in our Projects which made by my workmates if i use the BinFS to realize hive registy.

So I want to save the systems all setttings without diappearing even caught in power failure via just change the platform.reg, esdhc_MX53.reg & HIVE Registry -ralated to  Catalog Items. Sir, will this scheme be efficient in the IMX53 WinCE7 OS?

Looking forward to ur repley!

Thanks.

Best Regards.

0 项奖励
回复

1,709 次查看
qiang_li-mpu_se
NXP Employee
NXP Employee

On WinCE7, without binfs, some other customers had enabled the HIVE registry on SDMMC, but there will be many strage issues, for example, switch WiFi connection will make system hangup; set hive registry to "aggressive flushing" will fail to boot. We don't know the root casue, the same setting works fine on WinCE6, but it will get failure on WinCE7.

Those issues were not found on the HIVE + BINFS solution.

0 项奖励
回复

1,709 次查看
holyyuan
Contributor II

Dear Qiang.Li,

Before seeing your reply, I try to realize the HIVE registry   on SDMMC for iMX53 WinCE7 adapting some material from the Internet, but the effect is bad and hive doesn't works well. Today, I follow your advice to use the BINFS+HIVE solution tosave the system's settings on storage. But ,I came across the mistakes like before, and the build logs are in the attachment. May you help me to find the problems?

(1) In the Catalog Items, I select 

"Core OS"->"Windows Compact Embedded "->"File Systems and Data Store"->"Storage Manager"->"Binary Rom Image File System"

... " Registry Storage"->"Hive-based Registry"

... "File System - Internal"->"ROM-only File System"

(2) overwrite the corresponding Source Codes in attachment : "BINFS for SDMMC WinCE7.zip (7.8 MB) ", especially override the corresponding  files in WINCE700\PLATFORM\COMMON\SRC\SOC\COMMON_FSL_V3\... and in

WINCE700\PLATFORM\iMX53_SMD.

(3) the three files in OSdesigns directory, In order to match our iMX53 board,  I use our own project files:

iMX53_SMD_Mobility.pbxml

iMX53_SMD_Mobility.pbxml.user

iMX53_SMD_Mobility.sln

but I add the 3 project environment variables,

     IMGSDMMC=1

    BSP_SUPPORT_MULTIBIN=1

    IMGCOMPRESSALL=1

(4)In the project properties, I change the directory to "iMX53_SMD_Mobility Release" and In "Locale" add the Chinese support.

Still I remove the parts in DA9052.bib following your advice.

At last ,I "sysgen" the project ,but it still build failed. The build logs are in the attachement,Pls check them.

0 项奖励
回复

1,709 次查看
holyyuan
Contributor II

Due to the errors as below :

Error(s) in directory "F:\WINCE700\platform\common\src\soc\COMMON_FSL_V3\BINFS_SDCARD\SDMEMORY\".

I input the command "build -c" in the console window, but it still build failed.

--------------------------------------------------------------------------------------------------------------------------------

NMAKE : fatal error U1073: don't know how to make 'F:\WINCE700\osdesigns\iMX53_SMD_Mobility\Wince700\iMX53_SMD_ARMV7_Retail\cesysgen\platcomm\iMX53_SMD\lib\ARMV7\retail\binfs_sdbus.lib'

BUILD: [02:0000009733:INFO  ] Stop.

BUILD: [02:0000009734:ERRORE] TargetExpLibFiles  -nologo BUILDMSG=Stop.  BUILDROOT=F:\WINCE700\platform\common LINKONLY=1 NOPASS0=1 failed - rc = 2.

---------------------------------------------------------------------------------------------------------------------------------

I can find the binfs_sdbus.lib in the above directory. why the compiler still remind me of this "fatal error U1073"?


what's the reason coming across the same build errors in the attachement build logs while sysgen or "Clean sysgen".

Share your experience . Thx ~.~


Best regards.

the attachments are as follows:

消息编辑者为:Holy Yuan

0 项奖励
回复

1,709 次查看
holyyuan
Contributor II

Hi , Qiang,
Sorry to see your reply so late.

Certainly, I can upload my "ce.bib " & "iMX53_SMD_Mobility.pbxml". but I attend Freescale's Marketing Solution today. and the two files are not in my laptop. Then , tomorrow I will upload them to the website forum.

  Thanks for your answers. 

0 项奖励
回复

1,709 次查看
holyyuan
Contributor II

At one time, I burn the system to SD card in the Windows XP console with the cfimager.exe tools, and the commands are

" cfimager -f eboot.nb0 -d E -imx53 -a

  cfimager -f NK.nb0 -d E -imx53 -a "

and now I follow the instructions in" BINFS for SDMMC WinCE7.zip",after Sysgen phase generate the image :XIP.nb0 & eboot.nb0 ,

so I burn the system image to SD card with the commands as follows:

cfimager -f eboot.nb0 -d M -raw -offset 0x400

cfimager -f xip.nb0 -d M -raw -offset 0x120400

but after I burn xip.nb0 and eboot.nb0, the hardware platform can not start up to the WinCE7 OS except that the screen light a second  when I power on and then the screen become black.

I find in the zip file in the above attachement contains the directory"BINFS for SDMMC WinCE7\Mfgtools-Rel-WinCE7-BINFS". So I doubt whther my methods is wrong, and I should use the MFGtools to burn the xip.nb0 & eboot.nb0. But I still don't know how to use Mfgtools to burn system . Might you provide me the instructions or readme documents? Therefore, I can reference your new style to try once in order to realize Saving systems settings by the BINFS on SDMMC method.

   The problem confused me for some days ,pls help me ,Sir! Thank you in advance !

0 项奖励
回复

1,709 次查看
qiang_li-mpu_se
NXP Employee
NXP Employee

The cfimager burn command is right, but your image file eboot.nb0 is wrong, it had linked some old lib built for non-multibin, that's why the boot will hang up.

So I suggest you to use a clean BSP, re-build it, or change to another PC to make "Advance Build Commands -> Rebuild current BSP and Subprojects " work.

If your are using the iMX53 SMD board, you can use my attached eboot.nb0 directly, it is verified work. It will not hang up in eboot.

0 项奖励
回复

1,709 次查看
holyyuan
Contributor II

Sir,

Thanks for your reply letter!

Now I still have a problem.I use the iMX53 smd .

I see 4 files in your attachment under the directory: <>BINFS for SDMMC WinCE7\Mfgtools-Rel-WinCE7-BINFS\Profiles\MX53 WinCE Update\OS Firmware\mx53-smd, As follows:

As you can see, the capacity of eboot.nb0 & xip.nb0 are just 0KB,maybe using this eboot.nb0 can not meet my need. And I try to burn the mx53smd.eboot_uut.nb0 (change its name to eboot.nb0) to SD card, but the boot phase is still hung up. so

Is the eboot.nb0 in your attachment in the directory .is the right one? Or my method have faults? So could you resend one for me ? Pls help me !

Thank you !

Best regards.

在 2013-05-08 11:43:21,"Qiang Li" <admin@community.freescale.com> 写道:

|

|

|

|

How to support MultiBIN(BINFS) on SDMMC for Freescale IMX5x WinCE 6.0/7.0 BSP -blog archive

created by Qiang Li in i.MX Community - View the full discussion

The cfimager burn command is right, but your image file eboot.nb0 is wrong, it had linked some old lib built for non-multibin, that's why the boot will hang up.

So I suggest you to use a clean BSP, re-build it, or change to another PC to make "Advance Build Commands -> Rebuild current BSP and Subprojects " work.

If your are using the iMX53 SMD board, you can use my attached eboot.nb0 directly, it is verified work. It will not hang up in eboot.

Reply to this message by replying to this email -or- go to the message on Freescale Community

Start a new discussion in i.MX Community by email or at Freescale Community

|

|

0 项奖励
回复

1,709 次查看
qiang_li-mpu_se
NXP Employee
NXP Employee

In the MFGTool "Mfgtools-Rel-WinCE7-BINFS", there is no runtime image files. The workable eboot.nb0 was attached in my today's answer, such as "The cfimager burn command is right ... ...", you need unzip it before using, after unzipped, you can get a 512KB eboot.nb0, then use command "cfimager -f eboot.nb0 -d M -raw -offset 0x400" to burn it to SD card. Then put this SD card to iMX53 SMD board's SD card slot, set iMX53 SMD board to boot from SD card (SW26: bit 7 on, others all off; SW28: all off).

This EBoot can work on iMX53 SMD board well with SD boot mode. Of course, you should make sure your board is a Freescale iMX53 SMD board first.

0 项奖励
回复

1,709 次查看
holyyuan
Contributor II

Thanks for your detailed explanation. Months ago, I use the imx53_smd, which is designed by our own compacy but much of the design refereced Freescale's iMX53 Demo board (the SW is changed ,but the function is the same). So I think the hardware platform is not the major problem, for we use the board for weeks. so I decide to re-configure the software development.

Thank you.

在 2013-05-08 15:02:48,"Qiang Li" <admin@community.freescale.com> 写道:

|

|

|

|

How to support MultiBIN(BINFS) on SDMMC for Freescale IMX5x WinCE 6.0/7.0 BSP -blog archive

created by Qiang Li in i.MX Community - View the full discussion

In the MFGTool "Mfgtools-Rel-WinCE7-BINFS", there is no runtime image files. The workable eboot.nb0 was attached in my today's answer, such as "The cfimager burn command is right ... ...", you need unzip it before using, after unzipped, you can get a 512KB eboot.nb0, then use command "cfimager -f eboot.nb0 -d M -raw -offset 0x400" to burn it to SD card. Then put this SD card to iMX53 SMD board's SD card slot, set iMX53 SMD board to boot from SD card (SW26: bit 7 on, others all off; SW28: all off).

This EBoot can work on iMX53 SMD board well with SD boot mode. Of course, you should make sure your board is a Freescale iMX53 SMD board first.

Reply to this message by replying to this email -or- go to the message on Freescale Community

Start a new discussion in i.MX Community by email or at Freescale Community

|

|

0 项奖励
回复

1,709 次查看
lee_ee
Contributor II

Dear,Qiang.li:

I according to WINCE600_ER1104_BINFS.zip to generate multibin, but system startup consume long time now, It does not improved no matter what I do. I trace of the debug log to find that OS run OAL layer and then stop here for long time before Explorer started. It seems like loading the FSDMGR,FILESYS and FSVOL,but I have never met problem like this before.

why does OS boot up so slow,and What should I do?

Thanks ahead

0 项奖励
回复

1,709 次查看
qiang_li-mpu_se
NXP Employee
NXP Employee

This solution only reduced the NK copy time, to reduce the boot time more, we can move some drivers from Buildin to later load. The followed is the platform.reg modification, I used USB driver as the example, loaddriver.zip is the example application for how to load the drivers later.

I had already given the example for how to load drivers later. On iMX51 EVK WinCE600, by move some drivers to later load and removed unused WinCE catalog features, it can boot into Windows CE desktop in 8 seconds.

0 项奖励
回复