uCdot
search uCdot:
 
Embedded Linux and uClinux Developer Forum
 
uCdot
- FAQ
- Dev Boards
- Submit Story
- Submit FAQ
- Submit Dev Board
- Topics
- Authors
- About

- Preferences
- Older Stuff
- Past Polls
- Discussions
- Journals
- Messages

Embedded Linux
Mailing Lists
uClinux-dev (search)
Coldfire (search)
MTD
Microblaze (search)
ELUG
BDM-devel
Blackfin

Embedded Linux
Sites
uClinux.org
uClinux-Dist
uClibc
uClinux Directory
LinuxDevices
ARMulator
uClinux-elf-tools
Colilo
Kernel Archives
H8-uClinux
TLDP
Microblaze uClinux
BDM Tools
SkyEye (emulator)
LOM
SETR live CD
Blackfin uClinux

Embedded Linux
Companies
SecureComputing
SDCS
CodePoet
Arcturus
Cadenux
ARMtwister
uClinux.net
Xiptech
senTec
embedded^cl
Cwlinux
emlix
TimeSys
eSpark Infotech
SSV Embedded Systems
Embedded Minds
PeerSec Networks
Vortech Consulting
swissEmbedded
Synertronixx
Mbedthis Software
.vantronix
Aday
GraceLabs
Pengutronix
metux ITS
Codito Technologies
Firmix Software
PetaLogix
NuDesign
Merritt Technologies
WindRiver
OpenGear
Rubico
Analog Devices
Artila Electronics
Vyatta
Embest Info&Tech
Katalix Systems
WorkWare Systems
Kdev
Intellimetrix
Virtual Cogs
SYSGO
coresystems
ExactCODE
KOAN

 
linux mmap memory problem?
Question advan writes "Hi all, In my embedded MIPS platform with kernel-2.4.25, the root filesystem is jffs2 format its size is 2048k and is on /dev/mtdblock1. Now , I want to write whole root filesystem via the same size as jffs2 file. My steps as below:"
  1. open device file->/dev/mtdblock1 and get file length 2048k
  2. map device file into virtual memory, the size is 2048k
  3. open new jffs2 root file(only file), read its content very time with getpagesize(64k),
  4. write new jffs2 content into map memory address, add one byte sizeof(char) step by step: *pvirtualaddr++ = *pnewjffs2++;
  5. munmap, write back into file and close all resource.
sometimes, it works well and finishes re-write content, but sometimes it will write bad jffs2 inode leading not to mount root file system, why ? and other method does this ? Thank you . advan

MPC8315 reference platform for NAS and digital med

 

 
uCdot Login
Nickname:

Password:

[ Create a new account ]

Related Links
  • Linux
  • More on Question
  • Also by davidm
  • linux mmap memory problem? | Login/Create an Account | Top | 5 moderator points | Search Discussion
    Threshold:
    The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.

    The Embedded Linux and uClinux Developer Forum is hosted by: SnapGear A gift of a flower will soon be made to you.

    [ home | contribute story | older articles | past polls | faq | authors | preferences ]