- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, does anybody know how to change the location of the linux romfs in flash. I have a small custom board with only 1 MByte flash "available" and therefor i'm currently running my kernel directly from SDRAM (just while i'm testing). How do I change the location of the romfs to begin from addr. 0x0 (in flash) instead of 0x200000???
I've modified the location_on_target in <filesystem>.stf to the following:<location_on_target offset='0x0'>
then i've modified the following lines in asm-offsets.c: from: DEFINE(KERNEL_FLASH_START, na_flash_kernel);
to: DEFINE(KERNEL_FLASH_START, na_flash_kernel+0x200000);
from: DEFINE(LINUX_ROMFS_START, na_flash_kernel+0x200000);
to: DEFINE(LINUX_ROMFS_START, na_flash_kernel+0x0);
from: DEFINE(LINUX_ROMFS_END, na_flash_kernel_end);
to: DEFINE(LINUX_ROMFS_END, na_flash_kernel+0x200000);
but still I get the following kernel panic error: Using deadline io scheduler
microtronix: RAM probe address=0x200000 size=0x4005000
Creating 1 MTD partitions on "RAM":
0x00000000-0x04005000 : "ROMfs"
microtronix: set ROMfs to be root filesystem
Kernel panic: VFS: Unable to mount root fs on mtdblock0
I guess it's got something to do with the very large address 0x04005000 but where it comes from I do not know......weird! The custom board contains: 16Mbit flash (<-unfortunately on the test-board i'm working with the highest address pin from the flash are NOT connected to the Nios II - processor, so for now i'm just running it as a 1MByte flash)/2MByte SDRAM/Cyclone EP1C6/LAN91C113 (<-the same as LAN91C111, but it only operates in 16bit mode) Hope you can help me! Regards Goon
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Goon,
The mtd map for romfs is defined in drivers/mtd/maps/microtronix.c. It is actually hardcoded there (it would be nicer to use the symbol LINUX_ROMFS_START you modified, but unfortunately it is left out). The size of the romfs is read from the romfs image on the fly, it is the third word of the romfs image. Regards, wentao- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, wentao.
Thank you very much. It was just the piece of information I needed to make it work. ....of course I had to comment out a couple of lines from the microtronix.c file because ioremap_nocache returned 0x0 (NULL), which further on in the file was interpreted as an error. Silly me, I should just have placed my file system at a location different from 0x0 - but it works yeehaa :-) Regards Goon- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Goon,
I think commenting them out is the right solution under uClinux. Glad to hear you made it work. regards, wentao
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page