Hive-based Registry on SDMemory (i.MX283 and WINCE 6.0 R3)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Hive-based Registry on SDMemory (i.MX283 and WINCE 6.0 R3)

2,561 Views
ismaelinfante
Contributor I

Hi everybody!

 

I’m working on a project that doesn’t have a NAND memory. It has only an SD Memory card of 4GB. This card is attached to the SSP0 controller of the i.MX283.

 

I’m trying to following what other guys have been done for the i.MX5X but I didn’t get it working for the i.MX283 yet.

 

I included the “Hive-based Registry” item into the CATALOG, changed the “platform.reg”, “common.reg” and “sdhc.reg” registry files as follows (the changes are in bold):

 

================================================================================================================

PLATFORM.REG

=============

 

IF BSP_NOPMU !

; @XIPREGION IF PACKAGE_OEMDRIVERS

; HIVE BOOT SECTION

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PMI]

   "Prefix"="PMI"

   "Dll"="pmupdk.dll"

   "Index"=dword:1

   "Order"=dword:3

"IClass"="{A32942B7-920C-486b-B0E6-92A702A99B35}"    ; PMCLASS_GENERIC_DEVICE

; END HIVE BOOT SECTION

; @XIPREGION ENDIF PACKAGE_OEMDRIVERS

ENDIF BSP_NOPMU!

 

; @CESYSGEN IF CE_MODULES_SDBUS

; HIVE BOOT SECTION

#include "$(_TARGETPLATROOT)\SRC\Drivers\SDHC\sdhc.reg"

IF BSP_AR6102_SDIO

#include "$(_FLATRELEASEDIR)\AR6102.reg"

ENDIF BSP_AR6102_SDIO

; END HIVE BOOT SECTION

; @CESYSGEN ENDIF CE_MODULES_SDBUS

 

IF BSP_SDBUS_FSL

; HIVE BOOT SECTION

[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\MMC_Class]

   "Dll"="SDMemory_fsl.dll"

"Profile"="MMC"

"Prefix"="DSK"

"BlockTransferSize"=dword:40

"IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}","{8DD679CE-8AB4-43c8-A14A-EA4963FAA715}"

[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\SDMemory_Class\High_Capacity]

   "Dll"="SDMemory.dll"

"Profile"="SDMemory"

"Prefix"="DSK"

"BlockTransferSize"=dword:40

"IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}","{8DD679CE-8AB4-43c8-A14A-EA4963FAA715}"

[HKEY_LOCAL_MACHINE\Drivers\SDCARD\ClientDrivers\Class\SDMemory_Class]

   "Dll"="SDMemory_fsl.dll"

"Profile"="SDMemory"

"Prefix"="DSK"

"BlockTransferSize"=dword:40

"IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}","{8DD679CE-8AB4-43c8-A14A-EA4963FAA715}"

; END HIVE BOOT SECTION

 

[HKEY_LOCAL_MACHINE\init\BootVars]

    "Flags"=dword:3

    "NoDefaultUser"=dword:0

    "RegistryFlags"=dword:1

"SystemHive"="System.hv"

"ProfileDir"="Documents and Settings"

"Start DevMgr"=dword:1

 

================================================================================================================

SDHC.REG

=========

IF BSP_SSP1_SDHC

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\SDHC1]

    "Order"=dword:19   

    "Dll"="sdhc.dll"

    "Prefix"="SHC"

    "Index"=dword:1

    "Flags"=dword:1000

ENDIF ;BSP_SSP1_SDHC

[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MMC]

    "Name"="MMC Card"

    "Folder"="MMCMemory"

   ;"MountAsBootable"=dword:1

;"MountPermanent"=dword:1

[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\SDMemory]

    "Name"="SD Memory Card"

    "Folder"="SDMemory"

                "AutoFormat"=dword:1

                "AutoMount"=dword:1

                "DefaultFileSystem"="FATFS"

    "MountAsBootable"=dword:1

    "MountPermanent"=dword:1

 

================================================================================================================

COMMON.REG

=============

IF PRJ_ENABLE_FSREGHIVE

; @CESYSGEN IF  FILESYS_FSREGHIVE

; HIVE BOOT SECTION

IF PRJ_BOOTDEVICE_MSFLASH

[HKEY_LOCAL_MACHINE\init\BootVars]

   "Flags"=dword:1

[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash]

    "MountAsBootable"=dword:1

ELSE

[HKEY_LOCAL_MACHINE\init\BootVars]

   "Flags"=dword:3

[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\HDProfile]

   "MountAsBootable"=-

ENDIF

; END HIVE BOOT SECTION

; @CESYSGEN ELSE

#error PRJ_ENABLE_FSREGHIVE defined without including HIVE based component.  Add SYSGEN_FSREGHIVE to your configuration

; @CESYSGEN ENDIF FILESYS_FSREGHIVE

ENDIF

 

; @CESYSGEN IF FILESYS_FSYSRAM

; HIVE BOOT SECTION

[HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\ObjectStore]

    "Dll"="filesys.dll"

    "Paging"=dword:1

    "LoadFlags"=dword:1

    "BootPhase"=dword:0

   ;"MountPermanent"=dword:1

IF PRJ_ENABLE_FSREGHIVE !

    ; Only mount ObjectStore FS as bootable if PRJ_ENABLE_FSREGHIVE is NOT set

    ; in order to preserve backwards compatibility (hive files go on

    ; ObjectStore FS by default).

    "MountAsBootable"=dword:1

ENDIF

IF PRJ_ENABLE_FSMOUNTASROOT !

    ; Only mount ObjectStore FS as root if PRJ_ENABLE_FSMOUNTASROOT is NOT set

    ; in order to preserve backwards compatibility (ObjectStore is root of

    ; virtual file system by default).

    ;"MountAsRoot"=dword:1

ENDIF

IF PRJ_DISABLE_RAMFS_COMPRESSION

    "DisableFileCompression"=dword:1

ENDIF

; END HIVE BOOT SECTION

; @CESYSGEN ENDIF FILESYS_FSYSRAM

 

; @CESYSGEN IF CE_MODULES_SDBUS

; HIVE BOOT SECTION

[HKEY_LOCAL_MACHINE\Drivers\Builtin\SDBusDriver]

   "Order"=dword:15

   "Dll"="SDBus.dll"

   "Prefix"="SDC"

   "ThreadPriority"=dword:64     ; default thread priority for dispatch thread

   "RequestListDepth"=dword:30   ; pre-allocated requests

   "Flags"=dword:10000 ; DEVFLAGS_TRUSTEDCALLERONLY

   "IClass"=multi_sz:"{20FA98A8-B298-4b32-8D72-C716AEE2FA84}=%b","{6F40791D-300E-44E4-BC38-E0E63CA8375C}=%b"

   "Flags"=dword:1000

   "BootPhase"=dword:1

; END HIVE BOOT SECTION

; @CESYSGEN ENDIF CE_MODULES_SDBUS

 

; @CESYSGEN IF CE_MODULES_NOTIFY

; HIVE BOOT SECTION

[HKEY_LOCAL_MACHINE\SYSTEM\Events]

    "system/events/notify/APIReady"="Notifications API set ready"

 

[HKEY_LOCAL_MACHINE\notify]

   "Dll"="NOTIFY.Dll"

   "Order"=dword:0

   "Keep"=dword:1

   "Prefix"="NFY"

   "Index"=dword:0

   ; DEVFLAGS_LOAD_AS_USERPROC | DEVFLAGS_LOADLIBRARY

   "Flags"=dword:12

   "UserProcGroup"=dword:3 ; // default to group 3

   ; this is the IOCTL_SERVICE_STARTED ioctl used as post-init ioctl

   "Ioctl"=dword:1040038

; END HIVE BOOT SECTION

; @CESYSGEN ENDIF

 

================================================================================================================

 

After these changes and a “Rebuild Solution” the new NK.BIN was flashed into the SDMemory card. The boot log is in the attached file.

 

The system just doesn’t boot. It stays waiting for “bootable file system to be mounted.”

 

Can anybody help me with this issue? Any hint or suggestion is welcomed.

 

Thanks,


Original Attachment has been moved to: Hive-based-registry-sdmemory.txt.zip

Labels (2)
0 Kudos
3 Replies

850 Views
markwilliams
Senior Contributor I

Hi Ismael,

I have been trying to achieve the same thing on my board! I posted a similar thread the other day. I actually got mine to boot and read the registry correctly.

Unfortunately you will then run into another problem if you have a touchscreen - it seems that the touchscreen calibration struggles with the hive registry in the SD card and throws an error.

After temporarily bypassing the autoload of the touchscreen calibration I also found that after getting the hive registry to load from the SD card (got past the waiting for bootable file system... messages) that the display would go black after the boot splash screen.

I have reverted back to the RAM/ROM filesystem without registry hive for now as it appears there may be a few more issues with trying to use an SD hive registry that I need to overcome. I found a reply in one of the posts from Adeneo for another i.MX device saying SD boot hive was not supported in that BSP. If they also wrote the i.MX28 BSP maybe it is not fully supported here either?

I had a similar problem to you but changed the flags in the following registry entry to 3. This loads both device manager and storage manager in the first phase.

[HKEY_LOCAL_MACHINE\init\BootVars]

   "Flags"=dword:3

In the bootvars you should also set up your hive location as shown in: http://msdn.microsoft.com/en-US/library/ee490554(v=winembedded.60).aspx

Although I think it defaults them to the suggested location if not already setup.

If you follow the SD registry setup in this link (even though for different processor) it helped me get mine to boot:

http://processors.wiki.ti.com/index.php/Persistent_Registry_in_ARM-A8_BSP#SD.2FMMC_Persistent_Storag...

There are quite a few SD settings that you need to copy over to your project.reg file to override the defaults from Microsoft to put them in the boothive section.

Regards, Mark

0 Kudos

850 Views
ismaelinfante
Contributor I

Hi Mark,

I’ve tried to follow those links but, until now, I'm not able to boot my device.

So, I removed the Hive-based Registry CATALOG item from my OS Design and implemented a small software that makes use of RegCopyFile() and RegRestoreFile() functions. For a temporary solution this works fine.

I’ll continue to investigate how to implement the Hive-based Registry on SDMemory, and if I have any news I’ll shared it here.

Thanks


0 Kudos

850 Views
markwilliams
Senior Contributor I

Ismael,

I found some reference documents for the i.MX28 and they stated ‘Support for Hive Registry (NAND)’ – I think there may be something more than just registry changes to get this to work fully with SD.

Hopefully someone from Adeneo will see this thread and shed some light on what is required.

Mark

0 Kudos