Forum Discussion

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

U-BOOT !!!!!!!!!!!!

Hi http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/wacko.gif ,

that u-boot is really driving me crazy.

This is what I&#39;ve done:

1- Compiled u-boot (got the .bin and the .srec)

2- Used flash programmer to program the .bin in flash (user zone)

3- Used quartus programmer to program standard.sof

4- Followed those instructions in the Using.txt

But everytime I launch the nios2-console I get an error message

Communication port must be specified.
Use openport <port> to configure the communication port
.

And I&#39;m totally lost within that, It&#39;s by God bless that I succeded to write this topic

Please rescue me

52 Replies

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

    Hi,

    I was thinking of my problem with u-boot/µClinux, and suddenly I got this view: normally to get µClinux working we got to program the nios2linux design in the FPGA firstly.

    So considering my situation: I programmed the standard design in the user zone of flash so to get it launched every time with no intervention and I programmed the u-boot in offset 0 of the flash. This way I&#39;ve got u-boot lauched automatically. But if I&#39;m using the last to launch µClinux, don&#39;t I need that sof of nios2linux ! Obviously yes, but I don&#39;t want to use quartus programmer, and I can&#39;t convert the linux_time_lmited.sof to .flash to program it into flash for once, and even if I could, at which offset will I do !!!!!!!!!!!!!!

    I&#39;m really confuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuused http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/blink.gif
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Scott,

    <div class='quotetop'>QUOTE </div>

    --- Quote Start ---

    Could you explain your memory organization (what RAM/SDRAM you have and where it&#39;s located)[/b]

    --- Quote End ---

    *SRAM (2x512 KB): 0x0200_0000 --> 0x020F_FFFF

    *SDRAM (16 MB): 0x0100_0000 --> 0x01FF_FFFF

    I&#39;ve programmed the 1s40 standard sof in user config zone of flash (0x0040_0000) so I don&#39;t have to use everytime the quartus programmer and u-boot in 0x0000_0000

    <div class='quotetop'>QUOTE </div>

    --- Quote Start ---

    ... and what is the exception address (I&#39;m assuming it&#39;s 0180_0020 ... otherwise the kernel would go belly up on the first interrupt after nios2-download).[/b]

    --- Quote End ---

    Sorry, but I don&#39;t know how nor where to get that.

    <div class='quotetop'>QUOTE </div>

    --- Quote Start ---

    Also, the kernel image you&#39;re using is compressed ... so please post the objdump

    of the uncompressed kernel image -- that&#39;s the one I need to see. When you use this

    image you should use &#39;-C none&#39; with mkimage (since the kernel will decompress itself).[/b]

    --- Quote End ---

    After a strip:

    $ nios2-elf-objdump -h vmlinux
    vmlinux:     file format elf32-littlenios2
    Sections:
    Idx Name          Size      VMA       LMA       File off  Algn
      0 .text         0016f840  01000000  01000000  00000094  2**3
                      CONTENTS, ALLOC, LOAD, READONLY, CODE
      1 .data         0000e7c0  0116f840  0116f840  0016f8d4  2**2
                      CONTENTS, ALLOC, LOAD, DATA
      2 .init         0006bbb8  0117e000  0117e000  0017e094  2**2
                      CONTENTS, ALLOC, LOAD, CODE
      3 .bss          00015318  011e9bc0  011e9bc0  001e9c4c  2**4
                      ALLOC
      4 .sbss         00000032  011feed8  011feed8  001e9c4c  2**0
                      ALLOC, SMALL_DATA
      5 .eram         00000000  02000000  02000000  001e9c4c  2**0
                      CONTENTS
      6 .romfs.data   00000000  00200000  00200000  001e9c4c  2**0
                      CONTENTS
      7 .comment      0000189c  00000000  00000000  001e9c4c  2**0
                      CONTENTS, READONLY

    $ ./mkimage -d vmlinux.bin -A nios2 -O linux -T kernel -n "Welcome to uClinux with MFM" -a 01200000 -e 01200000 -C none vmlinux.img
    Image Name:   Welcome to uClinux with MFM
    Created:      Fri May 12 04:51:42 2006
    Image Type:   Nios-II Linux Kernel Image (uncompressed)
    Data Size:    2005944 Bytes = 1958.93 kB = 1.91 MB
    Load Address: 0x01200000
    Entry Point:  0x01200000
    /cygdrive/d/u-boot-src/u-boot/mkimage
    $

    <div class='quotetop'>QUOTE </div>

    --- Quote Start ---

    Could you also please post the header objdump of u-boot (you can strip it first -- nios2-elf-strip).[/b]

    --- Quote End ---

    $ nios2-elf-strip u-boot
    /cygdrive/d/u-boot-src/u-boot
    $ nios2-elf-objdump -h u-boot
    u-boot:     file format elf32-littlenios2
    Sections:
    Idx Name          Size      VMA       LMA       File off  Algn
      0 .text         000169a1  01fc0000  01fc0000  00000094  2**4
                      CONTENTS, ALLOC, LOAD, READONLY, CODE
      1 .u_boot_cmd   000003a8  01fd69a4  01fd69a4  00016a35  2**2
                      CONTENTS, ALLOC, LOAD, DATA
      2 .data         00000a2c  01fd6d4c  01fd6d4c  00016ddd  2**2
                      CONTENTS, ALLOC, LOAD, DATA
      3 .bss          00003eb4  01fd7780  01fd7780  00017809  2**2
                      ALLOC
      4 .comment      000007ba  00000000  00000000  00017809  2**0
                      CONTENTS, READONLY
    /cygdrive/d/u-boot-src/u-boot
    $