uCLinux, memory mapping large files

Hi,

I was wondering whether anyone out there would be able to provide me with some information about memory mapping in uCLinux. I have done a fair bit of searching for information and so far i understand that there is some support for mmap() in the uCLinux kernel however i have so far been unable to get it to work.

I have an application which was written using mmap() to map a large data file (120MB) into virtual memory. The application was initially written with desktop/server linux in mind and therefore the assumption that there would be MMU support on the platform.

I am currently trying to port this application to an embedded platform which currently runs uCLinux. The hardware in question is the KB9202B from KwikByte and consists of an Arm core with 64MB SDRAM. It also has a SD/MMC card reader which is where i would like to store the data file. The application only needs read access to the data.

I have read

formatting link
that memory mapping is possible if the filesystem from which the mapped file comes from is ROMFS and the mapping is readonly. If this is the case, would it be feasible to store my data file on an SD card using ROMFS and memory map this into the address space?

Regards,

Nick Vaughan.

Reply to
n.vaughan
Loading thread data ...

Hi,

I was wondering whether anyone out there would be able to provide me with some information about memory mapping in uCLinux. I have done a fair bit of searching for information and so far i understand that there is some support for mmap() in the uCLinux kernel however i have so far been unable to get it to work.

I have an application which was written using mmap() to map a large data file (120MB) into virtual memory. The application was initially written with desktop/server linux in mind and therefore the assumption that there would be MMU support on the platform.

I am currently trying to port this application to an embedded platform which currently runs uCLinux. The hardware in question is the KB9202B from KwikByte and consists of an Arm core with 64MB SDRAM. It also has a SD/MMC card reader which is where i would like to store the data file. The application only needs read access to the data.

I have read

formatting link
that memory mapping is possible if the filesystem from which the mapped file comes from is ROMFS and the mapping is readonly. If this is the case, would it be feasible to store my data file on an SD card using ROMFS and memory map this into the address space?

Regards,

Nick Vaughan.

Reply to
n.vaughan

As there is no such thing as "virtual Memory" and "mapping" in µCLinux, I doubt that this is possible.

If your SD-Card content is _completely_ memory-mapped by hardware, you just need the address of this array. If it's not memory-mapped by hardware, you need to provide code to read the data into a RAM array. If you don't have that much RAM of course you need to work on the data in some bock based manner and organize your own swapping.

-Michael

Reply to
Michael Schnell

"n.vaughan" skrev i meddelandet news: snipped-for-privacy@c18g2000prb.googlegroups.com...

Isn't the KB9202 based on the AT91RM9200 which has an MMU???

You may want to reconsider using uCLinux. Full linux runs on that chip.

Best Regards, Ulf Samuelsson This is intended to be my personal opinion which may, or may not be shared by my employer Atmel Nordic AB

Reply to
Ulf Samuelsson

Hi,

I was wondering whether anyone out there would be able to provide me with some information about memory mapping in uCLinux. I have done a fair bit of searching for information and so far i understand that there is some support for mmap() in the uCLinux kernel however i have so far been unable to get it to work.

I have an application which was written using mmap() to map a large data file (120MB) into virtual memory. The application was initially written with desktop/server linux in mind and therefore the assumption that there would be MMU support on the platform.

I am currently trying to port this application to an embedded platform which currently runs uCLinux. The hardware in question is the KB9202B from KwikByte and consists of an Arm core with 64MB SDRAM. It also has a SD/MMC card reader which is where i would like to store the data file. The application only needs read access to the data.

I have read

formatting link
that memory mapping is possible if the filesystem from which the mapped file comes from is ROMFS and the mapping is readonly. If this is the case, would it be feasible to store my data file on an SD card using ROMFS and memory map this into the address space?

Regards,

Nick Vaughan.

Reply to
n.vaughan

Sorry about the multiple posts in this group!

Nick

Reply to
n.vaughan

Thanks for that, I had considered using a different kernel, however I was hoping to get things running with the default install on the board.

Reply to
n.vaughan

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.