Forum Discussion
13 Replies
- Altera_Forum
Honored Contributor
Hi haq,
I'll take a look through your config, etc. In the mean time, a few questions: -What Nios-II version are you using, Nios-II 5.0? -What 1s40 sof are you using, the "standard" sof? -Please post an objdump of u-boot (headers): $ nios2-elf-strip u-boot $ nios2-elf-objdump -h u-boot Regards, --Scott - Altera_Forum
Honored Contributor
Hi scott,
Thanks alot.....I compiled the uclinux code based on marc leeman cross tool chain.....as well as instructions from his home page.........here is the link.... http://scorpius.homelinux.org/~marc/nios2.html (http://scorpius.homelinux.org/~marc/nios2.html) I am using nios-II 5.0. Also...I am using a file that comes with nios-II 5.0 ......under this directory.(C:\altera\kits\nios2\examples\verilog\niosII_stratix_1s40\standard\std_1s40.ptf in order to compile uclinux...here are the steps: $ make ARCH=nios2nommu CROSS_COMPILE=nios2-linux-uclibc- hwselect SYSPTF=std_1s40.ptf $ make ARCH=nios2nommu CROSS_COMPILE=nios2-linux-uclibc- $ make ARCH=nios2nommu CROSS_COMPILE=nios2-linux-uclibc- menuconfig the uclinux compiled...without any error & I used "nios2-download -g vmlinux" to download the kernel to stratix board...it's working fine...except that..I can do any thing.......untill I will able to communicate via u-boot.........then I will start on my research project. ******************************************************************************** here is the output that u wanna see..... ------------------------------------------------ Welcome To Altera SOPC Builder Version 5.00, Built Thu Mar 31 14:21:28 PST 2005 ------------------------------------------------ ------------------------------------------------ Welcome to the Nios II Development Kit Version 5.0, Built Wed Apr 20 19:05:21 PDT 2005 Example designs can be found in /cygdrive/c/altera/kits/nios2/examples ------------------------------------------------ (You may add a startup script: c:/altera/kits/nios2/user.bashrc) /cygdrive/c/altera/kits/nios2/examples/uclinux_nios2 [SOPC Builder]$ nios2-elf-strip u-boot /cygdrive/c/altera/kits/nios2/examples/uclinux_nios2 [SOPC Builder]$ nios2-elf-objdump -h u-boot u-boot: file format elf32-littlenios2 Sections: Idx Name Size VMA LMA File off Algn 0 .text 000134a1 018e0000 018e0000 00000094 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 1 .u_boot_cmd 00000360 018f34a4 018f34a4 00013535 2**2 CONTENTS, ALLOC, LOAD, DATA 2 .data 00000900 018f3804 018f3804 00013895 2**2 CONTENTS, ALLOC, LOAD, DATA 3 .sdata 00000088 018f4110 018f4110 00014195 2**2 CONTENTS, ALLOC, LOAD, DATA, SMALL_DATA 4 .sbss 0000012c 018f4198 018f4198 0001421d 2**2 ALLOC, SMALL_DATA 5 .bss 00003c30 018f42c4 018f42c4 0001421d 2**2 ALLOC 6 .comment 000006e0 00000000 00000000 0001421d 2**0 CONTENTS, READONLY /cygdrive/c/altera/kits/nios2/examples/uclinux_nios2 [SOPC Builder]$ thanks for the help. - Altera_Forum
Honored Contributor
TO_BE_DONE
- Altera_Forum
Honored Contributor
Hi Scott,
Here is the output from U-boot after changing the config files.....and running under Win XP using hyperterminal. once I ran "nios2-download -g u-boot".....I reboot my laptop in debian linux & then I opened a terminal with "kermit -c".program.....I got u-boot prompt....here is the output under debian linux. DK1S40 > printenv baudrate=115200 ethaddr=08:00:3e:26:0a:5b ipaddr=10.0.0.51 serverip=10.0.0.1 netmask=255.0.0.0 stdin=serial stdout=serial stderr=serial bootfile=/tftpboot/uImage bootargs=root=/dev/nfs rw nfsroot=10.0.01:/tftpboot/10.0.0.51 Environment size: 224/65532 bytes After this I ran into this problem...... debian-dell-p3:/home/haq/nios/u-boot-1.1.2# ./tools/mkimage -A nios2 -O linux -T kernel -C gzip -a 0x01000000 -e 0x01000000 -n "Linux Kernel Image" -d linux.bin.gz uImage Image Name: Linux Kernel Image Created: Sun Aug 14 13:59:50 2005 Image Type: NIOS2 32 Bit Linux Kernel Image (gzip compressed) Data Size: 715460 Bytes = 698.69 kB = 0.68 MB Load Address: 0x01000000 Entry Point: 0x01000000 DK1S40 > tftpboot 0x01000000 uImage Using MAC Address 00:07:FFFFFFED:0C:04:FFFFFFBD TFTP from server 10.0.0.1; our IP address is 10.0.0.51 Filename 'uImage'. Load address: 0x1000000 Loading:# It's sitting for ever.......I don't know where I am doing wrong...... Any idea...... BTW...I can't progam flash memory of my EP1s40 board using ur instruction......becuase I can't use nios2-console program ..it can't load the port driver... error "''openport lpt1"...failed no driver loaded. Any idea how to program flash ofr EP1S40 board. Thanks, - Altera_Forum
Honored Contributor
Hi haq,
Just FYI, the latest u-boot sources were posted a few days ago and are available at: http://www.psyent.com/download (http://www.psyent.com/download) And patches were submitted to the main u-boot project at sourceforge.net -- but it usually takes a few months for patches to show up. BTW: it would be very helpful if you downloaded these sources and gave it a quick try using the EP1S40_config. > It's sitting for ever.......I don't know where I am doing wrong...... You might want to check all of your network settings and your tftp server configuration. Your mac address in your environment is different than the one used by tftpboot. If you need a test mac address, you can use the gen_eth_addr tool that comes with u-boot ... it will generate a locally-administered mac for you. > BTW...I can't progam flash memory of my EP1s40 board using ur instruction......becuase I can't > use nios2-console program ..it can't load the port driver... tftpboot is the fastest way to download you images ... but that's not working for you at the moment ... so you can use the loadb command with kermit to get your image into ram. Just be careful not to download over the exception trampoline ;-) Regards, --Scott - Altera_Forum
Honored Contributor
Hi haq,
I see what's happening to your tftpboot now: <div class='quotetop'>QUOTE </div> --- Quote Start --- #define CFG_EXCEPTION_ADDR 0x01000020[/b] --- Quote End --- <div class='quotetop'>QUOTE </div> --- Quote Start --- DK1S40 > tftpboot 0x01000000 uImage[/b] --- Quote End --- When you tftpboot to 0100_0000, you end up overwriting the exception trampoline. Then, when the timer interrupt fires, you end up in the weeds. You should be ok if you use a higher address: DK1S40> tftpboot 1100000 uImage Then you can: DK1S40> imi 1100000 DK1S40> bootm 1100000 Regards, --Scott - Altera_Forum
Honored Contributor
hi scott,
It didn't work properly......here are the steps after I download the u-boot on EP1S40 board using "nios2-download" under XP. after I reboot & start my debian linux...with "kermit -c" ....I followed ur instuction.....& here what I got. DK1S40 > tftpboot 1100000 uImage Using MAC Address 00:07:FFFFFFED:0C:04:FFFFFFBD TFTP from server 10.0.0.1; our IP address is 10.0.0.51 Filename 'uImage'. Load address: 0x1100000 Loading:# ################################################################ # ################################################################ # ######### done Bytes transferred = 715524 (aeb04 hex) DK1S40 > imi 1100000 # # Checking Image at 01100000 ... Image Name: Linux Kernel Image Image Type: Unknown Architecture Linux Kernel Image (gzip compressed) Data Size: 715460 Bytes = 698.7 kB Load Address: 01000000 Entry Point: 01000000 Verifying Checksum ... OK DK1S40 > bootm 1100000# # Booting image at 01100000 ... Image Name: Linux Kernel Image Image Type: Unknown Architecture Linux Kernel Image (gzip compressed) Data Size: 715460 Bytes = 698.7 kB Load Address: 01000000 Entry Point: 01000000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK I am not sure if it's something to do with mkimage utility ........because....if I download the linux kernel alone....using "nios2-download -g vmlinux"....it display the booting process on hyperterminal.....Any idea.....what's wrong???? BTW, here is the command that I used to create uImage. ./tools/mkimage -A nios2 -O linux -T kernel -C gzip -a 0x01000000 -e 0x01000000 -n "Linux Kernel Image" -d linux.bin.gz uImage Thanks, - Altera_Forum
Honored Contributor
Hi haq,
> Image Type: unknown architecture Linux Kernel Image (gzip compressed) Where & when did you get your u-boot source tree? Did you download the u-boot tarball from sourceforge, or did you checkout the sources from CVS? This was fixed in the main source tree in April. --Scott - Altera_Forum
Honored Contributor
Hi scott,
I am using u-boot-1.1.2 source from their wedsite.....I think I download it after april...anyhow..I saw today..they have a new release u-boot-1.1.3. I will try to use that with ur config file........then I will post my results.....any other idea? Thanks, - Altera_Forum
Honored Contributor
hi haq,
> I am using u-boot-1.1.2 source from their wedsite.....I think I download it after april The reason I asked if you downloaded the tarball or directly from CVS is because the tarball for 1.1.2 was produced prior to the changes being included in the source tree. So rather than ask again, I'll just assume you're using the tarball. > I will try to use that with ur config file........then I will post my results.....any other idea? Yes, please get the u-boot sources from http://www.psyent.com/download (http://www.psyent.com/download), configure with EP1S40_config, and run that image. Otherwise, you'll be using old code ... last week there were five Nios-II patches submitted to sourceforge, which may take several months to be incorporated into the source tree. The sources at psyent already have these patches applied. Regards, --Scott