Forum Discussion
Altera_Forum
Honored Contributor
21 years agoR/W Filesystem?
I'm currently running the stock FS, built following the instructions in the Getting Started manual. Is there any quick way to make this FS read/write? Changing the kernel command line str...
Altera_Forum
Honored Contributor
20 years agoHi friends!
I've make a new partition as you can see by this start sequence: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~creating 5 mtd partitions on "altera ndk flash (amd)":
0x00200000-0x00700000 : "romfs/jffs2"
0x00000000-0x00200000 : "loader/kernel"
0x00800000-0x00c00000 : "user configuration"
0x00c00000-0x01000000 : "safe configuration"
0x00700000-0x00800000 : "part1"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ and by the following command output: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# cat proc/partitions
major minor # blocks name
31 0 5120 mtdblock0
31 1 2048 mtdblock1
31 2 4096 mtdblock2
31 3 4096 mtdblock3
31 4 1024 mtdblock4#
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ For this partition I've generated a block device directly by "@mtdblock4,b,31,4" in the filesystem which I've uploaded. When I try to erase the content of partition part1 alias mtdblock4 by the following program the board reboot.
#include <stdio.h># include "system.h"# include "sys/alt_flash.h"
int main(int argc, char* argv)
{
alt_flash_fd* flash;
int i;
printf("alt_flash_open_dev('../dev/mtdblock4')");
flash=alt_flash_open_dev("../dev/mtdblock4");
/*
for (i=0x700000;i<0x800000;i=i+0x10000)
{
printf("Erase %08x\n",i);
alt_erase_flash_block(flash,i,0x10000);
}
*/
return 0;
} Why does the board reboot by this program? Bye, Lothar.