Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

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

Altera_Forum
Honored Contributor II
4,848 Views

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
0 Kudos
52 Replies
Altera_Forum
Honored Contributor II
1,125 Views

Hi MFM, 

 

==> flinfo Bank# 1:   Size: 0 KB in 0 Sectors Sector Start Addresses: 

It&#39;s time to implement your flash driver. If you have a CFI flash (and are _not_ 

using a data cache) you may want to try the default CFI flash driver. However, 

depending on the command set and your flash geometry you may have to 

disable the toggle bit polling (since it won&#39;t work with avalon). 

 

Otherwise, you can grab an existing driver from another project. Please post your 

flash configuration (and part numbers) and I&#39;ll see if there&#39;s one I can recommend. 

 

Best Regards, 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
1,125 Views

Hi MFM, 

 

I&#39;m trying to re-synchronize with this thread since I&#39;ve been away, please excuse 

the multiple posts ... 

 

> Besides, I feel confused between Flash and SDRAM adresses, I can&#39;t even decide 

> what adresses to submit to mkimage, is the adress I&#39;ve programmed u-boot at is  

 

Always use the address where you want the image to be loaded and executed from. 

In your case, SDRAM. There are two addresses you need to specify: (1) the load 

address, and (2) the entry point address. 

 

The load address is address where you want u-boot to copy the kernel image. It 

is _not_ the addres where the .img file is loaded. You can put the .img file anywhere 

in memory (flash, tftp into sdram, whatever). When you run bootm, you specify the 

address of the .img, u-boot will then copy the kernel from the .img to the load 

address. If the kernel image is compressed, u-boot will decompress as it copies. 

 

The entry point address is the address that u-boot jumps to after loading the kernel 

to its load address (and flushing cache, and disabling interrupts, etc). Normally, for 

Nios-II/uClinux, the entry point address and the load address are the same. Since 

the kernel start code is usually placed at the beginning of the kernel image. For 

other architectures/kernels the entry point may actually be at some offset from 

the start of the kernel image -- that&#39;s why you have the option of setting it with 

mkimage. 

 

Hope this helps. 

 

Regards, 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
1,125 Views

Hi Scott, 

thanks for your reply http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif  

 

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

--- Quote Start ---  

It&#39;s time to implement your flash driver.[/b] 

--- Quote End ---  

I&#39;m sorry but I don&#39;t know how to do that http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif . 

 

 

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

--- Quote Start ---  

Please post your flash configuration (and part numbers) and I&#39;ll see if there&#39;s one I can recommend.[/b] 

--- Quote End ---  

My flash is an AMD AM29LV065D-120R 8 MB x 8 bits
0 Kudos
Altera_Forum
Honored Contributor II
1,125 Views

Hi, 

could somebody tell me where to get my flash base adress http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/dry.gif  

The fact is that when I looked in the standard design, I&#39;ve found that ext_flash is adressed at 0x00000000 and SDRAM at 0x01000000, but when I tryed to use the nios2-flash-programmer to upload the u-boot.flash (made with bin2flash) it&#39;s always failing with the 0x00000000 base adress, contrariwise, when I choose a 0x00800000 base adress, it works but the u-boot is apparently not in the user zone (I specified --location=0x00400000) since the green led of User il not lightened and u-boot not working. 

I&#39;ve made that manipulation in the IDE, programmed flash in the user zone and it worked fine.
0 Kudos
Altera_Forum
Honored Contributor II
1,125 Views

Hi MFM, 

 

> > Please post your flash configuration (and part numbers) and I&#39;ll see if there&#39;s one 

> > I can recommend. 

 

> My flash is an AMD AM29LV065D-120R 8 MB x 8 bits 

 

You should be able to use the existing flash driver in board/altera/common/AMDLV065D.c. 

If you started with the ep1c20 configuration -- it would already be built for you. Otherwise, 

you need to include the driver in your build -- copy the file into your board directory and 

add it to your makefile. Then set the flash configuration macros in your configuration 

header file. Here are the settings from other boards that use 065D: 

# define cfg_flash_base 0xwhatever /* flash base addr */# define cfg_flash_size 0x00800000 /* 8 mbyte */# define cfg_max_flash_sect 128 /* max# sects per bank */# define cfg_max_flash_banks 1 /* max# of flash banks */# define cfg_flash_erase_tout 8000 /* erase timeout (msec) */# define cfg_flash_write_tout 100 /* write timeout (msec) */# define cfg_flash_word_size unsigned char /* flash word size */ 

 

Did I tell you (in some other thread) to stub-out flash_init? For some reason I thought you 

were using an Altera stratix 2 development board -- which uses the LV128. 

 

Regards, 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
1,125 Views

 

--- Quote Start ---  

originally posted by smcnutt@May 3 2006, 02:01 AM 

hi mfm, 

 

> > please post your flash configuration (and part numbers) and i&#39;ll see if there&#39;s one 

> > i can recommend. 

 

> my flash is an amd am29lv065d-120r 8 mb x 8 bits 

 

you should be able to use the existing flash driver in board/altera/common/amdlv065d.c. 

if you started with the ep1c20 configuration -- it would already be built for you. otherwise, 

you need to include the driver in your build -- copy the file into your board directory and 

add it to your makefile. then set the flash configuration macros in your configuration 

header file. here are the settings from other boards that use 065d: 

# define CFG_FLASH_BASE  0xWHATEVER /* FLASH base addr */# define CFG_FLASH_SIZE  0x00800000 /* 8 MByte  */# define CFG_MAX_FLASH_SECT 128  /* Max# sects per bank */# define CFG_MAX_FLASH_BANKS 1  /* Max# of flash banks */# define CFG_FLASH_ERASE_TOUT 8000  /* Erase timeout (msec) */# define CFG_FLASH_WRITE_TOUT 100  /* Write timeout (msec) */# define CFG_FLASH_WORD_SIZE unsigned char /* flash word size */[/b] 

 

Did I tell you (in some other thread) to stub-out flash_init? For some reason I thought you 

were using an Altera stratix 2 development board -- which uses the LV128. 

 

Regards, 

--Scott 

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

--- Quote End ---  

[/b] 

--- Quote End ---  

 

Hi Scott, 

you are right, I&#39;ve been using a Stratix II board, but all I&#39;m asking now for is for a Stratix Pro Edition 1s40
0 Kudos
Altera_Forum
Honored Contributor II
1,125 Views

 

--- Quote Start ---  

originally posted by mfm@May 3 2006, 01:42 AM 

hi, 

could somebody tell me where to get my flash base adress  http://forum.niosforum.com/work2/style_emoticons/<#emo_dir#>/dry.gif  

the fact is that when i looked in the standard design, i&#39;ve found that ext_flash is adressed at 0x00000000 and sdram at 0x01000000, but when i tryed to use the nios2-flash-programmer to upload the u-boot.flash (made with bin2flash) it&#39;s always failing with the 0x00000000 base adress, contrariwise, when i choose a 0x00800000 base adress, it works but the u-boot is apparently not in the user zone (i specified --location=0x00400000) since the green led of user il not lightened and u-boot not working. 

i&#39;ve made that manipulation in the ide, programmed flash in the user zone and it worked fine. 

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

--- quote end ---  

 

--- Quote End ---  

 

Hi,  

seemingly my flash base adress is 0x800000, don&#39;t ask how I get it, I just tried it and it&#39;s fine, where to get that information remains then a mystery to me.
0 Kudos
Altera_Forum
Honored Contributor II
1,125 Views

 

--- Quote Start ---  

originally posted by mfm@Apr 29 2006, 08:58 PM 

hi scott, 

 

- u-boot works fine but when i type flinfo this is what i get 

==> flinfo bank# 1:   size: 0 kb in 0 sectors  sector start addresses: ==> 

- when i try to save my variables with saveenv: 

==> saveenv saving environment to flash... error: start address not on sector boundary ==> 

 

ps. i&#39;m using a stratix pro 1s40 board 

--- Quote End ---  

 

 

Still not solved http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif
0 Kudos
Altera_Forum
Honored Contributor II
1,125 Views

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

--- Quote Start ---  

flash base adress??[/b] 

--- Quote End ---  

 

 

Do you just develop SW in NiosII system? Who develops NiosII in Quartus/SOPC builder?  

All informatioins about modules of NiosII, including flash, SDRAM..., can be found in SOPC builder. The file-- <NiosII Name>.ptf records all information about "HW" of NiosII system. Yes, of course the BASE ADDRESS.  

Then all your SW works should deal with the information about "HW".  

--------------------------------------- 

1. uClinux 

nios2linux.h (which is generated according to *.ptf automatically) deals with the information. 

Any other drivers could take a reference from nios2linux.h or add "BASE ADDRESS" in DRIVER.c/.h directly. 

--------------------------------------- 

2. u-boot 

<u-boot-src>/include/configs/"board".h should deal with the information manually.
0 Kudos
Altera_Forum
Honored Contributor II
1,125 Views

Hi,Scott  

 

My flash is AM29LV160DB and it locates in 0x800000 ,how can I choose a flash drive for it. 

 

I use the u-boot-1.1.4 and choose the PK1C20 board . but the flash used is AM29LV065D-120R 8 MB x 8 bits. 

 

 

 

how can I modify it to meet my Cyclone Board?
0 Kudos
Altera_Forum
Honored Contributor II
1,125 Views

Hi MFM, 

 

> seemingly my flash base adress is 0x800000, don&#39;t ask how I get it, I just tried it and it&#39;s fine, 

> where to get that information remains then a mystery to me. 

 

If you&#39;re using Nios 5.1 and the 1s40 standard configuration, your flash base address should 

be 0000_0000. The best bet is to follow mountain8848&#39;s suggestions and review your ptf file. 

 

> Bank# 1: Size: 0 KB in 0 Sectors 

 

Check your flash_init() routine in board/altera/common/AMDLV065D.c -- you probably still have 

the routine contents commented out -- I believe that&#39;s what I suggested you do to get started 

on the other board you were using (since you were using a different flash device). Normally, 

u-boot will report an error if flash_init() reports zero memory. 

 

Regards, 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
1,125 Views

Hi scut_ak, 

 

> My flash is AM29LV160DB and it locates in 0x800000 ,how can I choose a flash drive for it. 

 

The best bet is to copy an existing driver and make whatever modifications you like. The one 

I would suggest is board/mvblue/flash.c -- you&#39;ll have to grab it from the u-boot project since it&#39;s 

not included in the sources from psyent (because it&#39;s not a nios board). The mvblue flash driver 

includes support for the 160D (and a few others). 

 

I will be updating the psyent sources soon and hope to have the CFI driver fixed to work 

with the avalon bus (and Nios II configurations with dcache). There has been alot of churn in 

the u-boot CFI implementation over the past several months, but things finally seem stable. 

Hopefully, the CFI driver will eliminate the need for any custom flash drivers -- so it will be 

easier to port u-boot to a custom board. 

 

I&#39;ll make a post once I have things ready. 

 

Regards, 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
1,125 Views

Hi mountain8848, 

 

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

--- Quote Start ---  

Do you just develop SW in NiosII system? Who develops NiosII in Quartus/SOPC builder?[/b] 

--- Quote End ---  

?????????????????????????? 

 

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

--- Quote Start ---  

All informatioins about modules of NiosII, including flash, SDRAM..., can be found in SOPC builder.[/b] 

--- Quote End ---  

I told that when I open the standard reference design in SoPC builder, I found the flas adress at 0x00000000 which is not correct!  

 

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

--- Quote Start ---  

The file-- <NiosII Name>.ptf records all information about "HW" of NiosII system. Yes, of course the BASE ADDRESS. [/b] 

--- Quote End ---  

I checked that out and you&#39;re right, I found the following 

        REFDES U5         {            base = "0x00800000";         } 

0x00800000 is the right base adress. 

 

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

--- Quote Start ---  

<u-boot-src>/include/configs/"board".h should deal with the information manually.[/b] 

--- Quote End ---  

That&#39;s what I found: 

/*------------------------------------------------------------------------ * MEMORY BASE ADDRESSES *----------------------------------------------------------------------*/# define CFG_FLASH_BASE  0x00000000    /* FLASH base addr    */# define CFG_FLASH_SIZE  0x00800000    /* 8 MByte  */# define CFG_SDRAM_BASE  0x01000000    /* SDRAM base addr    */# define CFG_SDRAM_SIZE  0x01000000    /* 16 MByte  */# define CFG_SRAM_BASE  0x02000000    /* SRAM base addr    */# define CFG_SRAM_SIZE  0x00100000    /* 1 MB      */ 

And again the base adress is wrong!!!!!!!!!!!!!!!!!!!!!!!! 

 

I concluded that I got to look only in the .ptf file.
0 Kudos
Altera_Forum
Honored Contributor II
1,125 Views

Hi Scott, 

 

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

--- Quote Start ---  

If you&#39;re using Nios 5.1 and the 1s40 standard configuration, your flash base address should 

be 0000_0000.[/b] 

--- Quote End ---  

I&#39;m using Nios II 5.0 and 1s40 standard configuration. 

 

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

--- Quote Start ---  

The best bet is to follow mountain8848&#39;s suggestions and review your ptf file[/b] 

--- Quote End ---  

That&#39;s right I found the correct information there. 

 

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

--- Quote Start ---  

> Bank# 1: Size: 0 KB in 0 Sectors 

 

Check your flash_init() routine in board/altera/common/AMDLV065D.c -- you probably still have 

the routine contents commented out -- I believe that&#39;s what I suggested you do to get started 

on the other board you were using (since you were using a different flash device). Normally, 

u-boot will report an error if flash_init() reports zero memory.[/b] 

--- Quote End ---  

 

That&#39;s already done without my intervention, this is the content of the AMDLV065D.c file: 

/* * (C) Copyright 2000-2004 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * See file CREDITS for list of people who contributed to this * project. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ # include <common.h># if defined(CONFIG_NIOS)# include <nios.h># else# include <asm/io.h># endif # define SECTSZ  (64 * 1024) flash_info_t flash_info; /*----------------------------------------------------------------------*/ unsigned long flash_init (void) {     return (CFG_FLASH_SIZE); } /*--------------------------------------------------------------------*/ void flash_print_info (flash_info_t * info) {     int i, k;     int erased;     unsigned long *addr;     printf ("  Size: %ld KB in %d Sectors\n",  info->size >> 10, info->sector_count);     printf ("  Sector Start Addresses:");     for (i = 0; i < info->sector_count; ++i) {  /* Check if whole sector is erased */  erased = 1;  addr = (unsigned long *) info->start;  for (k = 0; k < SECTSZ/sizeof(unsigned long); k++) {      if ( readl(addr++) != (unsigned long)-1) {    erased = 0;    break;      }  }  /* Print the info */  if ((i % 5) == 0)      printf ("\n   ");  printf (" %08lX%s%s",      info->start,      erased ? " E" : "  ",      info->protect ? "RO " : "   ");     }     printf ("\n"); } /*-------------------------------------------------------------------*/ int flash_erase (flash_info_t * info, int s_first, int s_last) {     unsigned char *addr = (unsigned char *) info->start;     unsigned char *addr2;     int prot, sect;     ulong start;     /* Some sanity checking */     if ((s_first < 0) || (s_first > s_last)) {  printf ("- no sectors to erase\n");  return 1;     }     prot = 0;     for (sect = s_first; sect <= s_last; ++sect) {  if (info->protect) {      prot++;  }     }     if (prot) {  printf ("- Warning: %d protected sectors will not be erased!\n",      prot);     } else {  printf ("\n");     }     /* It&#39;s ok to erase multiple sectors provided we don&#39;t delay more  * than 50 usec between cmds ... at which point the erase time-out  * occurs. So don&#39;t go and put printf() calls in the loop ... it  * won&#39;t be very helpful;-)  */     for (sect = s_first; sect <= s_last; sect++) {  if (info->protect == 0) {    /* not protected */      addr2 = (unsigned char *) info->start;      writeb (addr, 0xaa);      writeb (addr,  0x55);      writeb (addr,  0x80);      writeb (addr,  0xaa);      writeb (addr,  0x55);      writeb (addr2, 0x30);      /* Now just wait for 0xff & provide some user    * feedback while we wait.    */      start = get_timer (0);      while ( readb (addr2) != 0xff) {    udelay (1000 * 1000);    putc (&#39;.&#39;);    if (get_timer (start) > CFG_FLASH_ERASE_TOUT) {        printf ("timeout\n");        return 1;    }      }  }     }     printf ("\n");     return 0; } /*----------------------------------------------------------------------- * Copy memory to flash, returns: * 0 - OK * 1 - write timeout * 2 - Flash not erased */ int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt) {     vu_char *cmd = (vu_char *) info->start;     vu_char *dst = (vu_char *) addr;     unsigned char b;     ulong start;     while (cnt) {  /* Check for sufficient erase */  b = *src;  if ((readb (dst) & b) != b) {      printf ("%02x : %02x\n", readb (dst), b);      return (2);  }  writeb (cmd,  0xaa);  writeb (cmd,  0x55);  writeb (cmd,  0xa0);  writeb (dst, b);  /* Verify write */  start = get_timer (0);  while (readb (dst) != b) {      if (get_timer (start) > CFG_FLASH_WRITE_TOUT) {    return 1;      }  }  dst++;  src++;  cnt--;     }     return (0); }
0 Kudos
Altera_Forum
Honored Contributor II
1,125 Views

Hi MFM, 

 

Your problem is:unsigned long flash_init (void) { return (CFG_FLASH_SIZE); }Which is undoubtedly due to my suggestion in an other thread to stub out that routine. 

See: http://forum.niosforum.com/forum/index.php...700&#entry13700 (http://forum.niosforum.com/forum/index.php?showtopic=3571&st=0&p=13700&#entry13700) 

 

You need to restore the routine to its original state now that you&#39;re using a board with an LV065D flash 

device:unsigned long flash_init (void) {     int i;     unsigned long addr;     flash_info_t *fli = &flash_info;     fli->size = CFG_FLASH_SIZE;     fli->sector_count = CFG_MAX_FLASH_SECT;     fli->flash_id = FLASH_MAN_AMD + FLASH_AMDLV065D;     addr = CFG_FLASH_BASE;     for (i = 0; i < fli->sector_count; ++i) {  fli->start = addr;  addr += SECTSZ;  fli->protect = 1;     }     return (CFG_FLASH_SIZE); }This will always succeed at startup -- even if you don&#39;t provide the correct base address. 

If the base address is incorrect, the utilities just won&#39;t work. 

 

Regards, 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
1,125 Views

Hi Scott, 

that fix it, thanks a lot http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif
0 Kudos
Altera_Forum
Honored Contributor II
1,125 Views

Hi, 

this is my u-boot configuration: 

U-Boot 1.1.3 (May  5 2006 - 00:38:14) CPU   : Nios-II SYSID : f7b67000, Thu Apr 21 03:45:55 2005 BOARD : Altera EP-1S40 ==> bd mem start   = 0x01000000 mem size    = 0x01000000 flash start = 0x00000000 flash size  = 0x00800000 flash offset= 0x00000000 sram start  = 0x02000000 sram size   = 0x00100000 ethaddr     = 08:00:3E:26:0A:5B ip_addr     = 192.168.0.62 baudrate    = 115200 bps ==> mem start   = 0x01000000 mem size    = 0x01000000 flash start = 0x00000000 flash size  = 0x00800000 flash offset= 0x00000000 sram start  = 0x02000000 sram size   = 0x00100000 ethaddr     = 08:00:3E:26:0A:5B ip_addr     = 192.168.0.62 baudrate    = 115200 bps ==> pri baudrate=115200 ethaddr=08:00:3e:26:0a:5b bootdelay=-1 serverip=192.168.0.183 netmask=255.255.252.0 ipaddr=192.168.0.62 gatewayip=192.168.3.1 autostart=yes loadaddr=1100000 hostname=FC5 bootfile=vmlinux.img stdin=serial stdout=serial stderr=serial Environment size: 248/65532 bytes ==> 

Question: why is my board info printed twice with one bdinfo ? 

 

I used mkimage to convert the /home/MFM/linux-2.6.x/arch/nios2nommu/boot/compressed/vmlinux.bin generated using hippo&#39;s buildroot: 

 

* with a gzip compression: gzip --best vmlinux.bin 

and: 

./mkimage -d vmlinux.bin.gz -A nios2 -O linux -T kernel -n "Welcome to uClinux with MFM" -a 01100000 -e 01100000 -C gzip vmlinux.img 

==> tftpboot Using MAC Address 08:00:3E:26:0A:5B TFTP from server 192.168.0.183; our IP address is 192.168.0.62 Filename &#39;vmlinux.img&#39;. Load address: 0x1100000 Loading:# ################################################################ # ################################################################ # ################################################################ # ############# done Bytes transferred = 1069702 (105286 hex) Automatic boot of image at addr 0x01100000 ... # # Booting image at 01100000 ...   Image Name:   Welcome to uClinux with MFM   Image Type:   Nios-II Linux Kernel Image (gzip compressed)   Data Size:    1069638 Bytes =  1 MB   Load Address: 01100000   Entry Point:  01100000   Verifying Checksum ... OK   Uncompressing Kernel Image ... Error: inflate() returned -3 GUNZIP ERROR - must RESET board to recover U-Boot 1.1.3 (May  5 2006 - 00:38:14) CPU   : Nios-II SYSID : f7b67000, Thu Apr 21 03:45:55 2005 BOARD : Altera EP-1S40 ==> 

 

*with a bz2 compression: bzip2 --best vmlinux.bin 

and : 

./mkimage -d vmlinux.bin.bz2 -A nios2 -O linux -T kernel -n "Welcome to uClinux with MFM" -a 01100000 -e 01100000 -C bzip2 vmlinux.img 

 

==> tftpboot 1100000 vmlinux.img Using MAC Address 08:00:3E:26:0A:5B TFTP from server 192.168.0.183; our IP address is 192.168.0.62 Filename &#39;vmlinux.img&#39;. Load address: 0x1100000 Loading:# ################################################################ # ################################################################ # ################################################################ done Bytes transferred = 994728 (f2da8 hex) Automatic boot of image at addr 0x01100000 ... # # Booting image at 01100000 ...   Image Name:   Welcome to uClinux with MFM   Image Type:   Nios-II Linux Kernel Image (bzip2 compressed)   Data Size:    994664 Bytes = 971.4 kB   Load Address: 01100000   Entry Point:  01100000   Verifying Checksum ... OK Unimplemented compression type 2 ==> 

 

* with no compression: 

$ ./mkimage -d vmlinux.bin -A nios2 -O linux -T kernel -n "Welcome to uClinux with MFM" -a 01100000 -e 01100000 vmlinux.img Image Name:   Welcome to uClinux with MFM Created:      Wed May 10 00:01:59 2006 Image Type:   NIOS II Linux Kernel Image (gzip compressed) Data Size:    2005944 Bytes = 1958.93 kB = 1.91 MB Load Address: 0x01100000 Entry Point:  0x01100000 

==> tftpboot 1100000 vmlinux.img Using MAC Address 08:00:3E:26:0A:5B TFTP from server 192.168.0.183; our IP address is 192.168.0.62 Filename &#39;vmlinux.img&#39;. Load address: 0x1100000 Loading: T# ################################################################ # ################################################################ # ################################################################ # ################################################################ # ################################################################ # ################################################################ # # done Bytes transferred = 2006008 (1e9bf8 hex) Automatic boot of image at addr 0x01100000 ... # # Booting image at 01100000 ...   Image Name:   Welcome to uClinux with MFM   Image Type:   Nios-II Linux Kernel Image (gzip compressed)   Data Size:    2005944 Bytes =  1.9 MB   Load Address: 01100000   Entry Point:  01100000   Verifying Checksum ... OK   Uncompressing Kernel Image ... Error: Bad gzipped data GUNZIP ERROR - must RESET board to recover U-Boot 1.1.3 (May  5 2006 - 00:38:14) CPU   : Nios-II SYSID : f7b67000, Thu Apr 21 03:45:55 2005 BOARD : Altera EP-1S40 ==> 

 

* with the zImage file: 

$ ./mkimage -d zImage -A nios2 -O linux -T kernel -n "Welcome to uClinux with MFM" -a 01100000 -e 01100000 vmlinux.img Image Name:   Welcome to uClinux with MFM Created:      Wed May 10 00:07:30 2006 Image Type:   NIOS II Linux Kernel Image (gzip compressed) Data Size:    1096043 Bytes = 1070.35 kB = 1.05 MB Load Address: 0x01100000 Entry Point:  0x01100000 

==> tftpboot 1100000 vmlinux.img Using MAC Address 08:00:3E:26:0A:5B TFTP from server 192.168.0.183; our IP address is 192.168.0.62 Filename &#39;vmlinux.img&#39;. Load address: 0x1100000 Loading: T# ################################################################ # ################################################################ # ################################################################ # ################### done Bytes transferred = 1096107 (10b9ab hex) Automatic boot of image at addr 0x01100000 ... # # Booting image at 01100000 ...   Image Name:   Welcome to uClinux with MFM   Image Type:   Nios-II Linux Kernel Image (gzip compressed)   Data Size:    1096043 Bytes =  1 MB   Load Address: 01100000   Entry Point:  01100000   Verifying Checksum ... OK   Uncompressing Kernel Image ... Error: Bad gzipped data GUNZIP ERROR - must RESET board to recover U-Boot 1.1.3 (May  5 2006 - 00:38:14) CPU   : Nios-II SYSID : f7b67000, Thu Apr 21 03:45:55 2005 BOARD : Altera EP-1S40 ==> 

 

Another question: I&#39;ve set the bootfile and loadaddr variables and saved the environment, I type first time only tftpboot to load the kernel, but the second time I get this 

==> tftpboot Using MAC Address 08:00:3E:26:0A:5B *** Warning: no boot file name; using &#39;C0A8003E.img&#39; TFTP from server 192.168.0.183; our IP address is 192.168.0.62 Filename &#39;C0A8003E.img&#39;. Load address: 0x1100000 Loading: *T TFTP error: &#39;File not found&#39; (1) Starting again 

and I got to type the full command tftpboot 1100000 vmlinux.img to make it work. 

Is there any explanation ? 

PS: I&#39;m working with the GtkTerm terminal
0 Kudos
Altera_Forum
Honored Contributor II
1,125 Views

Hi, 

well, I&#39;ve figured out the following: I was overwriting the compressed image with the uncompressed one, so I changed the loadaddr to 0x0150 0000. To be carefull, I changed also the load adress and entry point to 0x0120 0000. 

That&#39;s fixed up the gzip compressed kernel image issue, now it&#39;s uncompressing successfully but then it hangs up: 

==> tftpboot 1500000 vmlinux.img Using MAC Address 08:00:3E:26:0A:5B TFTP from server 192.168.0.183; our IP address is 192.168.0.62 Filename &#39;vmlinux.img&#39;. Load address: 0x1500000 Loading:# ################################################################ # ################################################################ # ################################################################ # ############# done Bytes transferred = 1067691 (104aab hex) Automatic boot of image at addr 0x01500000 ... # # Booting image at 01500000 ...   Image Name:   Welcome to uClinux with MFM   Image Type:   Nios-II Linux Kernel Image (gzip compressed)   Data Size:    1067627 Bytes =  1 MB   Load Address: 01200000   Entry Point:  01200000   Verifying Checksum ... OK   Uncompressing Kernel Image ... OK 

The other problems remain with no change although I corrected the adresses for too. 

PS: I&#39;m using UART for both u-boot and the kernel.
0 Kudos
Altera_Forum
Honored Contributor II
1,125 Views

Hi MFM, 

 

> Question: why is my board info printed twice with one bdinfo ? 

 

Your terminal software is probably configured to send line feeds. Just turn them off. 

 

> well, I&#39;ve figured out the following: I was overwriting the compressed image with 

> the uncompressed one 

 

That&#39;s a common scenario ... especially when bringing up a new board 8-P 

 

> I used mkimage to convert the 

> /home/MFM/linux-2.6.x/arch/nios2nommu/boot/compressed/vmlinux.bin 

> generated using hippo&#39;s buildroot 

 

Just to be sure ... is that the _uncompressed_ binary image? I currently don&#39;t use 

buildroot ... and I haven&#39;t looked buildroot through the build scripts/makefiles yet. 

 

Regards, 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
1,109 Views

Hi Scott 

 

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

--- Quote Start ---  

> Question: why is my board info printed twice with one bdinfo ? 

 

Your terminal software is probably configured to send line feeds. Just turn them off.[/b] 

--- Quote End ---  

You &#39;re absolutely right http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/wink.gif  

 

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

--- Quote Start ---  

> I used mkimage to convert the 

> /home/MFM/linux-2.6.x/arch/nios2nommu/boot/compressed/vmlinux.bin 

> generated using hippo&#39;s buildroot 

 

Just to be sure ... is that the _uncompressed_ binary image? I currently don&#39;t use 

buildroot ... and I haven&#39;t looked buildroot through the build scripts/makefiles yet.[/b] 

--- Quote End ---  

I think so (1.9 MB), the compressed image is the zImage file (1 MB).
0 Kudos
Altera_Forum
Honored Contributor II
1,109 Views

 

--- Quote Start ---  

originally posted by mfm@May 11 2006, 08:46 AM 

hi scott 

 

<div class='quotetop'>quote  

--- quote end ---  

 

--- quote start ---  

> question: why is my board info printed twice with one bdinfo ? 

 

your terminal software is probably configured to send line feeds. just turn them off. 

--- Quote End ---  

You &#39;re absolutely right http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/wink.gif  

 

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

--- Quote Start ---  

> I used mkimage to convert the 

> /home/MFM/linux-2.6.x/arch/nios2nommu/boot/compressed/vmlinux.bin 

> generated using hippo&#39;s buildroot 

 

Just to be sure ... is that the _uncompressed_ binary image? I currently don&#39;t use 

buildroot ... and I haven&#39;t looked buildroot through the build scripts/makefiles yet.[/b] 

--- Quote End ---  

I think so (1.9 MB), the compressed image is the zImage file (1 MB). 

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

[/b] 

--- Quote End ---  

 

The uncompressed kernel is ~/linux-2.6.x/vmlinux .
0 Kudos
Reply