News:

Registered a URL and setup a forum as the IPCam stuff really needed its own site vs my irregular blog posts about IPCam hacking at http://www.computersolutions.cn/blog

Author Topic: Linux's mount of romfs ??  (Read 7604 times)

  • *****
July 18, 2011, 01:47:20 pm
Lawrence,

How does linux identify the romfs image for mounting? Is it the image number? If so, then I assume that the romfs image cannot be changed from 6 on a factory linux load. If it is not using the image number, then how is linux determining what flash blocks to load as the romfs?

Thx,
celem

  • No avatar
  • *****
July 19, 2011, 01:31:17 am
It identifies a romfs by the -romfs- header in the filesystem.

The image number in the bootloader does not correlate to anything.
The stuff in the bootloader is ONLY for the bootloader.
eg - the bootinfo partition is ONLY used for the bootloader (although it could be read if wanted from Linux), and used.
The images number of the partitions is irrelevant to the OS, it knows nothing about that.

The important thing is that the area's of memory used are the same as Linux expects.

It works as follows.

The bootloader boots.
It looks for the image marked Active.
It passes control to that image.

Linux boots.
During boot it assigns devices and area's of ram to use.
On our system we use Flash memory, so this is handled by the MTD drivers.
Inside the MTD drivers we set what area of memory  we want to use for whatever.
(Look at my 2.6 post where I talk about this specifically, or the wiki where I go into lots of detail about the boot sequence...)
Linux assigns MTD Blocks to the images it finds (based on what we've told it area's that will have stuff in are), then continues booting.
The user file system (romfs) then handles mounting any filesystems found as appropriate.