Forum Discussion

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

MTD support build wrong

hi hippo:

when i add mtd support , there is the message(DE2 board ) :

uClinux/Nios II

Altera Nios II support © 2004 Microtronix Datacom Ltd.

setup_arch: No persistant network settings signature at 008F0000

Built 1 zonelists

Kernel command line:

PID hash table entries: 64 (order: 6, 1024 bytes)

Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)

Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)

Memory available: 6484k/8192k RAM, 0k/0k ROM (1127k kernel code, 461k data)

Mount-cache hash table entries: 512 (order: 0, 4096 bytes)

NET: Registered protocol family 16

JFFS2 version 2.2. © 2001-2003 Red Hat, Inc.

NIOS serial driver version 0.0

ttyS0 (irq = 2) is a builtin NIOS UART

Serial: JTAG UART driver $Revision: 1.4 $

ttyJ0 at MMIO 0x81004000 (irq = 1) is a jtag_uart

io scheduler noop registered

io scheduler deadline registered

dmfe_probe:eth0, 50000 Khz Nios

<DM9000> eth0 I/O: 80900090, VID: 90000a46

ADDR: 00:07:ed:00:00:00

dmfe_probe:eth1, 50000 Khz Nios

FPS-Tech EPCS MTD Driver (fps-tech.net)

16 Mbit EPCS Chip found

cmdlinepart partition parsing not available

RedBoot partition parsing not available

Creating 2 MTD partitions on "Altera EPCS Flash":

0x00400000-0x00600000 : "small_part"

mtd: partition "small_part" is out of reach -- disabled

0x00600000-0x00800000 : "big_part"

mtd: partition "big_part" is out of reach -- disabled

NET: Registered protocol family 2

IP: routing cache hash table of 512 buckets, 4Kbytes

TCP established hash table entries: 512 (order: 0, 4096 bytes)

TCP bind hash table entries: 512 (order: -1, 2048 bytes)

TCP: Hash tables configured (established 512 bind 512)

NET: Registered protocol family 17

Freeing unused kernel memory: 348k freed (0x128000 - 0x17e000)

Kernel panic - not syncing: No init found. Try passing init= option to kernel.

how can i do now ?

thanks!!!

8 Replies

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

    It looks like you have to edit the partitions, they are too big for your current chip.

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

    --- Quote Start ---

    originally posted by hippo+jun 5 2006, 09:45 pm--><div class='quotetop'>quote (hippo @ jun 5 2006, 09:45 pm)</div>

    --- quote start ---

    <!--quotebegin-andylei@Jun 5 2006, 09:32 PM

    my board is de2 and flash is epcs16 thanks!!!

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

    --- quote end ---

    --- Quote End ---

    read wiki about DE2

    http://nioswiki.jot.com/wikihome/operating...flashprogrammer (http://nioswiki.jot.com/wikihome/operatingsystems/flashprogrammer)

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

    [/b]

    --- Quote End ---

    The DE2 is different from other Altera Nios dev boards.

    The DE2 &#39;s fpga configs from EPCS16 (not CFI), is 2MB.

    The sof is not written directly to EPCS, it will be converted to RBF (raw binary file).

    The compress configuration data of 2C35 size around 300K-400K, typically.

    So you will have around 1.6MB unused space in EPCS16.

    You should store zImage after the RBF on EPCS.

    That is, you should use EPCS for fpga config and zImage.

    Then the CFI 4MB will be available for jffs2.

    Look at this thread too,

    http://forum.niosforum.com/forum/index.php?showtopic=4009 (http://forum.niosforum.com/forum/index.php?showtopic=4009)

    post#12# 13
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    hi hippo:

    I read wiki about DE2

    (http://nioswiki.jot.com/wikihome/operating...flashprogrammer) and do as it says. But the booting message is also :

    uClinux/Nios II

    Altera Nios II support © 2004 Microtronix Datacom Ltd.

    setup_arch: No persistant network settings signature at 008F0000

    Built 1 zonelists

    Kernel command line:

    PID hash table entries: 64 (order: 6, 1024 bytes)

    Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)

    Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)

    Memory available: 6484k/8192k RAM, 0k/0k ROM (1127k kernel code, 461k data)

    Mount-cache hash table entries: 512 (order: 0, 4096 bytes)

    NET: Registered protocol family 16

    JFFS2 version 2.2. © 2001-2003 Red Hat, Inc.

    NIOS serial driver version 0.0

    ttyS0 (irq = 2) is a builtin NIOS UART

    Serial: JTAG UART driver $Revision: 1.4 $

    ttyJ0 at MMIO 0x81004000 (irq = 1) is a jtag_uart

    io scheduler noop registered

    io scheduler deadline registered

    dmfe_probe:eth0, 50000 Khz Nios

    <DM9000> eth0 I/O: 80900090, VID: 90000a46

    ADDR: 00:07:ed:00:00:00

    dmfe_probe:eth1, 50000 Khz Nios

    FPS-Tech EPCS MTD Driver (fps-tech.net)

    16 Mbit EPCS Chip found

    cmdlinepart partition parsing not available

    RedBoot partition parsing not available

    Creating 2 MTD partitions on "Altera EPCS Flash":

    0x00400000-0x00600000 : "small_part"

    mtd: partition "small_part" is out of reach -- disabled

    0x00600000-0x00800000 : "big_part"

    mtd: partition "big_part" is out of reach -- disabled

    NET: Registered protocol family 2

    IP: routing cache hash table of 512 buckets, 4Kbytes

    TCP established hash table entries: 512 (order: 0, 4096 bytes)

    TCP bind hash table entries: 512 (order: -1, 2048 bytes)

    TCP: Hash tables configured (established 512 bind 512)

    NET: Registered protocol family 17

    Freeing unused kernel memory: 348k freed (0x128000 - 0x17e000)

    Kernel panic - not syncing: No init found. Try passing init= option to kernel.

    and the RBF (raw binary file) how to convert ? from which file to convert ?

    Thanks very much!! http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You should read the actual error messages; it is trying to create a partition at 0x00800000. Now, if you plug this in calculator, you will see that this is 8 Megabytes, or 64 Mbit. As hippo said, you do not have this much space on your configuration device. You need to go into ./drivers/mtd/maps/epcs_map.c and edit the partitions to suite your needs. Then, you will have to create a filesystem on the EPCS device since you are trying to mount root on it. Read the EPCS Guide in the Wiki, or this one:

    http://www.fps-tech.net/docs/epcs-ug.pdf (http://www.fps-tech.net/docs/epcs-ug.pdf)
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You need to learn flash programmer before using mtd.

    First, resize your cfi flash to 4M base addr 0 ,in sopc builder, and regenerate sof.

    Then enable epcs mtd and cfi mtd,

    in drivers/mtd/maps/

    edit epcs_map.c

    static struct mtd_partition epcs_partitions =
    {
        {
      .name = "sof_kernel",
      .size = 0x200000,
      .offset = 0x000000,
        }
    };
    static const char *part_probes __initdata = {NULL};

    edit altera.c

    static struct mtd_partition alteramap_partitions = {
        {
      .name =  "romfs/jffs2",
      .size =  0x400000,
      .offset =    0x000000,
        }
    };

    Rebuild kernel image from the start "make clean", "make linux_hwselect...."....

    Follow the wiki,

    http://nioswiki.jot.com/wikihome/operating...flashprogrammer (http://nioswiki.jot.com/wikihome/operatingsystems/%c2%b5clinux/flashprogrammer)

    To program sof and zImage to your EPCS.

    And erase cfi flash.