Altera_Forum
Honored Contributor
21 years agoLinux - Change the location of a linux fs in flash
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