This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Nand Hive

I am trying to boot WINEC7 on Dm8148 custom board with NAND enabled.

Nand details- its an 8 bit NAND with 8k page size and redundant bytes of 32 bytes in every 256 pages.though the WINEC7 BSP does not support 8 bit Nand device ,when i referred to WINEC7 persistent hive user guide i got to know this bsp supports the NAND manufacture which is in my board.

So i thought i ll try making the required changes for the driver to detect the 8 bit nand device and I made the following changes in the BSP.

BSPcfg.c

FMd.c

img_cgf.h

cfg.c

flashmenu.c

enabled hive based registry settings and persistent hive based storage in catalog items.

I was able to detect nand Manufacture ID and device ID and even able to read and write to it.but when i tried hive settings on it.

I am able to get  Winec7 booted up with filesystem on NAND(system.hv and user.hv show the timestamp changes when i make any changes to the desktop wallpaper) but it is not able to survive the reboot .But when i erase 0-5 blocks using Eboot menu options of erasing NAND it boots up but with no folders saved created by me in the mounted volume region/folder.

these are my NAND.reg file settings.

As i am using Smart NAnd (I am using MDD+PDD layer).

; All rights reserved ADENEO EMBEDDED 2010

;-------------------------------------------------------------------------------
; @CESYSGEN IF FILESYS_FSREGHIVE
; HIVE BOOT SECTION
;
; We want start both storage and device manager. Flags value is combination of
;   0x0001  Start storage manager in boot phases 0 and 1 to load the boot
;           file system.
;   0x0002  Start device manager in boot phase 1 to load the boot file system.
;
[HKEY_LOCAL_MACHINE\Init\BootVars]
    "Flags"=dword:3

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\FlashDisk]
 ; "Flags"=dword:00011000  ; load driver in boot phase 1; do not load again later

; END HIVE BOOT SECTION
; @CESYSGEN ELSE

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\FlashDisk]
  ; "Flags"=dword:00010000

; @CESYSGEN ENDIF FILESYS_FSREGHIVE
;-------------------------------------------------------------------------------

; @CESYSGEN IF CE_MODULES_FSDMGR
IF BSP_NAND
; HIVE BOOT SECTION

[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\FlashDisk\FATFS]
    "Dll"="exfat.dll"
;    "FormatExfat"=dword:1
     "Util"="fatutil.dll"
    "Flags"=dword:14                
    "EnableCache"=dword:1
    "DisableAutoScan"=dword:1
    "CheckForFormat"=dword:1
       "FormatTFAT"=dword:1
    "MountAsRoot"=dword:1
;;IF SYSGEN_FSREGHIVE
    "MountAsBootable"=dword:1
;;ENDIF SYSGEN_FSREGHIVE

[HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\FlashDisk]
    "DriverPath"="Drivers\\BuiltIn\\FlashDisk"
    "LoadFlags"=dword:1            ; load synchronously
    "BootPhase"=dword:0
;;IF SYSGEN_FSREGHIVE
    "MountAsBootable"=dword:1
;;ENDIF SYSGEN_FSREGHIVE
   
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\FlashDisk]
    "Folder"="Mounted_Volume"
    ;"FileSystem"="fatfsd.dll"
    "DefaultFileSystem"="FATFS"
;    "PartitionDriver"="mspart.dll"
    "PartitionDriver"="flashpart.dll"
    "AutoPart"=dword:1
    "AutoFormat"=dword:1
    "AutoMount"=dword:1
    "Name"="SmartNAND"
;;IF SYSGEN_FSREGHIVE
    "MountAsBootable"=dword:1
;;ENDIF SYSGEN_FSREGHIVE
   
   
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\FlashDisk]
    "Dll"="flashmdd.dll"
        "FlashPddDll"="am387x_nand.dll"
    "Prefix"="DSK"
    "Index"=dword:1
    "Order"=dword:0
    "MemBase"=multi_sz:"50000000","08000000"
       "MemLen"=multi_sz:"00001000","00001000"
       "Prefetch"=dword:1
    "IClass"="{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"
    "Profile"="FlashDisk"
;;IF SYSGEN_FSREGHIVE
    "Flags"=dword:1000
;;ENDIF SYSGEN_FSREGHIVE

;;IF SYSGEN_FSREGHIVE
[HKEY_LOCAL_MACHINE\init\BootVars]
    "SystemHive"="Documents and Settings\\system.hv"
    "ProfileDir"="Documents and Settings"
    "DefaultUser" = "user"
        "RegistryFlags" = dword:1
    "Flags"=dword:3
;;ENDIF SYSGEN_FSREGHIVE

; END HIVE BOOT SECTION
ENDIF BSP_NAND
; @CESYSGEN ENDIF CE_MODULES_FSDMGR

Could anyone please help me in getting NAND hive based settings survive reboot..

  • Hi,

    Please check

    http://processors.wiki.ti.com/index.php/Persistent_Registry_in_ARM-A8_BSP

    Regards,

    Jayaram

  • hey rajat... 

    can u pls share files fmd.c, bsp_def.h, bspcfg.c, cfg.c, flashmenu.c,,......whch made the 8bit nand work.... pls pls pls... im also trying to bring up 8bit nand... but have not seen much success... im able to read the device ID  n manufac id... but after reading the boot hangs... unable to boot... pls can u share...... 

    pls pls pls...........

  • Hi Suhas.

    1) Which Nand are you using if you are MDD+PDD layer Nand it will not work in FMD layer.so if you can make it clear then i can help you out just blindly changing parameters in these files will not help NAND work u need to structurally make changes in both common area and on driver side .I was using Toshiba NAND which was not supporting the current FMD layer...

  • hi rajat.......

    thnx for ur timely reply....

    wat does a MDD+PDD layer Nand mean??????? by the way im using a HYNIX nand flash....how can we come to know that is a MDD+PDD layer Nand or FMD layer nand???

    the part number of this nand is H27UEG8YEA.... data sheet is attached below........

    0410.nand datasheet.rar

    by the way im able to read the nand device ID and manufac ID...this means communication beytween nand and processor is happening....BUT BUT BUT.... still EBOOT is getting stuck at  memcpy(pData, (BYTE*)pDevice->pFifo, FIFO_THRESHOLD) line in  in the function NAND_Read().

  • Goggle it or look in Windows support you will have better understanding of these.

    You have to contact the vendor for the kind of layer supported by NAND , most are FMD but some are MDD.So get the details from them !!

    Reading the manufacture ID and device ID s pretty simple to read/write  to the nand that s when you are in need of the layer abstraction and configure your settings as per that.

    Looking at your NAND datasheet i feel it follows FAL+FMD layer it should be pretty straight forward to make it work.gve a try once with following file changes.

      1) bspcfg.c

       2) fmd.c

       3) nand.reg

    Try building the image in Debug mode and try seeing the logs you will get more information .open the NK.bin file in Visual studio and view it whther the driver is getting loaded or not this will help you in debugging it better.

  • hi rajat.........

    frm our nand vendor i came to know our nand is fmd oly not MDD... thnk god.. ( thank u :p )... some hope..... :)

    can u pls share bspcfg.c,fmd.c,nand.reg files pls pls..... im very eager n critical situation....its urgent pls da...

    i hav done most of the changes in bspcfg.c and fmd.c..... but not altered even a single line in nand.reg..... can pls share those file ..ill be grateful to u....

    in bspcfg.c i hav added nand's device id,manufac id,sector size, no of blocks etc etc...in fmd.c i have made 16bit read/writes to 8 bit rd/wr etc etc.. if u share ur working files ill be most thankful to u... 

    pls share ur knowledge... :)

  • 0447.fmd.c3124.bspcfg.c

    see now my nand configuration and your nand configurations will vary i have implemented for MDD layer.you send me your files with both BLOCK files from common and driver end i will try debugging the issue.

  • thnx rajat...

    ill try ur files.... below is a link to my nand related driver files.... can u pls go through it .

    3312.nand driver files.zip