Forum Discussion

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

Flash generated using sof2flash fails to configure fpga

Hi ,

I have Stratix IV development kit ,

I want to load Flash file converted using sof2flash utility.

when i use nios2-flash-programmer it works fine .

but it fails to configure FPGA from flash when i cycle power the board .

Anybody have idea ?

7 Replies

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

    Thanks , but i am currently working with EDS 9.1 SP2 . Is there any PFL or optionbit issue ?

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

    I used sof2flash with the following options:

    sof2flash --input=stratix_iv.sof --output=stratix_iv.flash --offset=0xC20000 --pfl --optionbit=0x18000 --programmingmode=FPP

    Success, Ton
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks Ton,

    i successfully flashed .sof using that , actually i was using programmingmode=PS .

    But you are flashing the sof using factory default CFI flash map.

    when i tried to boot from software flash(elf2flash) it goes to Kernel Panic.

    sof2flash -------- as u shown

    nios2-flash-programmer --base=0x08000000 <yourfile>_hw.flash

    Up to this it works fine , now i am converting linux image,

    elf2flash --base=0x0a000000 --end=0x0bffffff --reset=0x0a820000

    --input=<yourfile>_sw.elf --output=<yourfile>_sw.flash

    --boot=path/boot_loader_cfi.srec

    nios2-flash-programmer --base=0x0a000000 <yourfile>_sw.flash

    now , i powercycle the board , it boots but comes kernel panic.

    And if i want to load my custom sof and linux image without the factory default settings , is it possible ?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    when i run nios2-terminal, it shows like this ,

    linux/nios ii-mmu

    init_bootmem_node(?,0x105a2, 0x10000, 0x18000)

    free_bootmem(0x105a2000, 0x7a5e000)

    reserve_bootmem(0x105a2000, 0x1000)

    built 1 zonelists in zone order, mobility grouping on. total pages: 32512

    kernel command line:

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

    dentry cache hash table entries: 16384 (order: 4, 65536 bytes)

    inode-cache hash table entries: 8192 (order: 3, 32768 bytes)

    we have 98304 pages of ram

    memory available: 124140k/5767k ram, 0k/0k rom (2077k kernel code, 3690k data)

    hierarchical rcu implementation.

    nr_irqs:32

    calibrating delay loop... 74.75 bogomips (lpj=373760)

    mount-cache hash table entries: 512

    net: registered protocol family 16

    init_bsp(): registering device resources

    bio: create slab <bio-0> at 0

    ------------[ cut here ]------------

    warning: at /opt/dipen/nios2-linux/linux_source/linux-2.6/fs/sysfs/dir.c:451 sys

    fs_add_one+0xb0/0xe0()

    sysfs: cannot create duplicate filename '/class/net/lo/statistics/'

    modules linked in:

    stack from d7c16d94:

    d7c16dd8

    d0012548

    ffffffef

    d7c1e000

    d7c5fd74

    d0588db4

    d00125cc

    d0555b18

    d7c16dc0

    00000001

    d00c04f0

    d7c1e000

    d7c5fd74

    fffffff4

    d05890b4

    0000000e

    d0151a9c

    d0588f3c

    d7c4cdfc

    d0588d80

    00000000

    00000001

    d0152330

    00000000

    d01342e4

    d7c16e64

    d7c4ce04

    00000000

    00000000

    d0588dc0

    d7c4cc00

    d7c4cdfc

    call trace:

    [<d0197cf0>]

    [<d0188944>]

    [<d0188b3c>]

    [<d01830fc>]

    [<d01830fc>]

    [<d01832e8>]

    [<d018338c>]

    [<d0000210>]

    [<d00b0000>]

    [<d0002294>]

    [<d000e250>]

    [<d00021f8>]

    [<d0001074>]

    [<d0002288>]

    ---[ end trace 4eaa2a86a8e2da22 ]---

    kernel panic - not syncing: loopback: failed to register netdevice: -17

    I can not understand ..why this happen ?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Dipen,

    Although I also used the Stratix IV development kit, I didn't use NIOS on it. My last NIOS experience is from some years ago, so I'm afraid I can't help you with the kernel panic problem. Well, at least you've set one step. Maybe for the next one, it's better to make a thread in a NIOS forum. I will follow it with interest.

    Good luck, Ton