My system includes PXA320, which has a nand controller.
In order to save RAM i made a BINFS partition in my bootloader and i
would like to download nk.bin + apps.bin + chain.bin to the nand.
At bootup, i am extracting the nk.bin from NAND, parse it to RAM, and
i would like the OS load all other necessary DLLs on demand. I have
included all necessary BinFS + blockdriver registry settings.
The Bin files which i am downloading are chunks of memory with RAM
addresses/lengths.
I am putting all those Bin Files one after the other in NAND as
downloaded from PB(as is).
My questions are:
1. How does the OS extract the DLL list which resides
in those Bin files? i mean there is not even one continuous file
there, only a large number of memory chunks which should be put in
ram.
2. The BinFs registry settings. Should they be put in the boot hive
or
in system hive.
Thanks for your help.
Oren.
Hope it helps.
Ryan
I am not positive, but i think the RomChain has nothing to do with it.
RomChain helps in cases of RAM XIP chains or XIP ROM. in my case,
which is NAND flash the RomChain cann't help. The BinFS should read
the Bin Files and determine which DLLs they contain by itself.
Thanks for you help.
Oren.
Ryan
The source for BINFS could be found under
$(_WINCEROOT)PRIVATE\WINCEOS\COREOS\FSD\BINFS\
For registry setting, it will be a good idea to put them in boot hive while
we would like the BINFS be mounted in very early phase, further more, the
nk.bin should contain enough modules (driver, filesystem, storage manager,
WINCE.NLS when devmgr loaded in boot phase 0 and etc) for mounting the BinFS
properly. You may want to start from a huge NK.BIN with a tiny BINFS and
then try to move file back and forth for finding a minimum nk.
After that you may want to start on fine tuning the performance of BinFS
while files are loaded from Flash on-demand but not at once, if RAM is
plenty on your device try to enlarge the cbNKPagingPoolSize value in OAL
could improve the overall performance. In most case, having a 4 to 5 MB
should get a significant improvement.
"Oren" <oro...@gmail.com> wrote in message
news:1182802564....@k79g2000hse.googlegroups.com...
I am downloading the files one by one through PB using the chain.lst.
I put them exactly as they arrive to the NAND flash. So they will lay
one followed by the other. I even leave the 7 character header (in HEX
it is "BOOOF.."). So I have 4 files concatenated, exactly as in my PC
release dir.
When launching my system, I start reading the first file from the
binfs, and parse it to memory. Than the OS runs and loads the rest?
My questions are:
1. The binFS that the OS loads. How can it find the DLLs which reside
in the Bin files which have no file-system format? After all they are
still in their raw format as they would be in my PC in the workspaces
\myproject\realesedir.
2. Should I omit the 7 characet header in the bin files in the nand?
or the binfs knows how to ignore them?
Another point is the relocation table in the NAND:
The bootloader can create a relocation table.
When it does that all the NAND blocks are mapped.
The bootloader bootpart.c. function BP_CreatePartiion format the nand
again, and make a binfs partition which has nothing to do with the
relocation table. It writes linear data, so it just skips bad blocks
to the one after it.
When loading the OS afterwards, my fmd loads, and trys to read the
relocation table. But now after the BinFS owns his own blocks, it is
irrelevant.
Can you explain me that issue?
Thanks a lot for your help!
Oren
"Oren" <oro...@gmail.com> wrote in message
news:1182970168.5...@k79g2000hse.googlegroups.com...
How do we solve that conflict?
Thanks a lot,
Oren.
"Oren" <oro...@gmail.com> wrote in message
news:1183476400.2...@n60g2000hse.googlegroups.com...
My situation is as follows
As I previously elaborated. I am making a multi bin image.
Nk.bin apps.bin shell.bin chain.bin
1.I am downloading (flattening ) the bin files to RAM
2. I create a binfs partition at the size of all of the whole image in
ram and I copy the ram content to nand. So now I have a mirror of the
ram in the nand.
My config.bib is as follows:
MEMORY
; Name Start Size Type
; ------- -------- -------- ----
ARGS 80060000 00001000 RESERVED
NK 800B0000 02000000 RAMIMAGE
SHELL 820B0000 00100000 NANDIMAGE
APPS 821B0000 00100000 NANDIMAGE
CHAIN 822B0000 00002000 RESERVED ; XIP chain info
RAM 822B2000 04D4E000 RAM
pdwXIPLoc 00000000 822B0000 FIXUPVAR ; XIP pTOC
CONFIG
PROFILE=OFF
RAM_AUTOSIZE=OFF
AUTOSIZE=ON
KERNELFIXUPS=ON
COMPRESSION=ON
XIPSCHAIN=822B0000
DLLADDR_AUTOSIZE=ON
ROMFLAGS=0
ROMSTART=800B0000
ROMWIDTH=32
ROMSIZE=22B2000
ROM_AUTOSIZE=OFF
AUTOSIZE_ROMGAP=10000
AUTOSIZE_DLLADDRGAP=0
AUTOSIZE_DLLDATAADDRGAP=0
AUTOSIZE_DLLCODEADDRGAP=0
In OemInit() I deleted the InitRomChain().
In my bootloader I load the nk.bin content (which i flattened) by
myself from Nand, and I expect that when the o.s. launches it will
find the binfs, recognize the rest of the dll which is there, and use
it in demand page. But it doesn't' work.
Am I right to eliminate the chain? I was thinking that if I put
NANDIMAGE type in the APPS region, the chain will actually become
empty, because there are no realy sdram content but it will use this
space to load dlls from the binfs.
So I tried something else:
Same config.bib but:
NK 800B0000 02000000 RAMIMAGE
SHELL 820B0000 00100000 RAMIMAGE
APPS 821B0000 00100000 RAMIMAGE
I downloaded all files again, wrote the flattened image to nand. And
added the initromchain()
Now ofcourse the image loads, and I can see the binfs partition which
includes the content of apps.bin only (nothing from the nk.bin!)
Why is that? The binfs partition actually contain all system dlls. Why
do I see only the ones from apps.bin.
So please, how can I make the first configuration work?
In terms of initromchain(), what is the right way do with binfs?
Anything else missing?
Thanks a lot!
Oren.
by the way :
my reg files is:
all part of the boothive.
; Profile entry for flash driver
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Nand]
"Dll"="NandFlsh.DLL" ; Name of block driver dll
"Order"=dword:2
"Prefix"="DSK" ; Prefix for device name, not
needed??
"Profile"="Nand" ; Name of profile, FAL returns this
from IOCTL_DISK_DEVICE_INFO
; "IClass"="{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"
"BlockSize"=dword:4000
"SectorSize"=dword:200
; "MemBase"=dword:1EFC000
; "MemLen"=dword:100000
; "Flags"=dword:1000 ; If loading in Boot phase 0 is required.
;orenr begin
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash]
"DefaultFileSystem"="BINFS"
"PartitionDriver"="mspart.dll"
; "MountHidden"=dword:1
"MountAsROM"=dword:1
"Folder"="Storage" ; Specify folder name
"Name"= "FLASH Disk Block Device"
"AutoMount"=dword:1
"AutoPart"=dword:1
"AutoFormat"=dword:1
[HKEY_LOCAL_MACHINE\System\StorageManager\BinFS]
"FriendlyName"="BIN Filesystem"
"Dll"="binfs.dll"
"Paging"=dword:1
"MountAsROM"=dword:1
[HKEY_LOCAL_MACHINE\System\StorageManager\PartitionTable]
"20"="BOOT"
"21"="BINFS"
;orenr end
And for the registry setting, while your Flash driver's registry assigned
the "Profile" as "Nand", so that you should confirm there is a
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\Nand] in your registry
and contain the data simialr to
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MSFlash] key.
"Oren" <oro...@gmail.com> wrote in message
news:1184182680....@n60g2000hse.googlegroups.com...
I wonder, if i dowlnoad xip.bin, doesn't it include the chain?
I pretty much sure my reg is ok. that is because, if i download the
whole image from PB and run it, i can clearly see the binfs partition
is working, both through the partition manager and if i "unhidden it"
i can see the files inside. even though only part of them
once again, can you please clarify: if i am using NANDIMAGE, the chain
infomation is not relevant?
Thanks a lot!
Thanks again.
Orenl.
And I think you did use the NANDIMAGE instead of RAMIMAGE (except to the NK
section of course), right?
NANDIMAGE will bit consume any memory but freeing up more RAM for the
system, as the whole idea, BinFS will access the proper data to kernel when
accessing the modules in these section.
"Oren" <oro...@gmail.com> wrote in message
news:1184245355.0...@57g2000hsv.googlegroups.com...
I did use the NANDIMAGE instead of RAMIMAGE.
Thanks
Oren.