Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

Can I update and save file when n2linux running?

hi all:

I want to update some files( for example: rework the prime IP setting in

`etc/inittab) when the nios2 uclinux is running. Then reset the DVB, the uclinux

will confing the system bases the updated inittab file.

I think to I can use these function :file_open, file_read, file_write to rework the

file of I want to rework. But the nios2 uclinux is ramfs,so the file just a allude file.

The fact file is stored in flash. Can I rework the fact file ? If can, how can I do?

Who can give me some advice? Thanks a lot.

12 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    good.

    the mtd block is working.

    now you can try erase again and mount jffs2 on it.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by hippo@Jul 31 2006, 09:00 AM

    good.

    the mtd block is working.

    now you can try erase again and mount jffs2 on it.

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=17286)

    --- quote end ---

    --- Quote End ---

    I use "# mount -t jffs2 /dev/mtdblock0 /mnt"

    but the erro information is:

    +++++++++++++++++++++++++++++++++++++++++++++++++++++# mount -t jffs2 /dev/mtdblock0 /mnt

    jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x6548 in

    stead

    jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0x6a6f in

    stead

    jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008: 0x3273 in

    stead

    jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000000c: 0x7473 in

    stead

    jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000010: 0x6c69 in

    stead

    jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000014: 0x3a0a in

    stead

    jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000018: 0x6e69 in

    stead

    jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000001c: 0x0a68 in

    stead

    jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000020: 0x6d65 in

    stead

    jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000024: 0x783a in

    stead

    Further such events for this erase block will not be printed

    Eep. No valid nodes for ino# 1#

    +++++++++++++++++++++++++++++++++++++++++++++++++++++

    why?