- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/wacko.gif ,
that u-boot is really driving me crazy. This is what I'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 messageCommunication port must be specified.
Use openport <port> to configure the communication port
. And I'm totally lost within that, It's by God bless that I succeded to write this topic Please rescue me
Link Copied
52 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I executed this command in the console: openport sld and I got connected (I think so at least) Then I executed the commands in Using.txt: 1> halt 2> load bin 0x02000000 u-boot.bin 3> exit Then [SOPC Builder]$ nios2-download -g u-boot Using cable "USB-Blaster [USB-0]", device 1, instance 0x00 Pausing target processor: OK Downloaded 99KB in 1.2s (82.5KB/s) Verified OK Starting processor at address 0x01FC0000 /cygdrive/d/u-boot-src/u-boot [SOPC Builder]$ Why it won't launch u-boot !!!!!!!!!!!!!!!!!!!!!!- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by mfm@Apr 28 2006, 02:08 AM hi,
i executed this command in the console: openport sld
and i got connected (i think so at least)
then i executed the commands in using.txt:
1> halt
2> load bin 0x02000000 u-boot.bin
3> exit
then
[sopc builder]$ nios2-download -g u-boot
using cable "usb-blaster [usb-0]", device 1, instance 0x00
pausing target processor: ok
downloaded 99kb in 1.2s (82.5kb/s)
verified ok
starting processor at address 0x01fc0000
/cygdrive/d/u-boot-src/u-boot
[sopc builder]$
why it won't launch u-boot !!!!!!!!!!!!!!!!!!!!!!
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14773)
--- quote end ---
--- Quote End --- If you use jtag uart, you must run nios2-terminal. You have to disable jtag uart and use serial uart, if you want it auto start.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi hippo,
thanks for your reply. <div class='quotetop'>QUOTE </div> --- Quote Start --- You have to disable jtag uart and use serial uart, if you want it auto start.[/b] --- Quote End --- And how to do that?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by mfm@Apr 28 2006, 01:32 PM hi hippo,
thanks for your reply.
<div class='quotetop'>quote
--- quote end ---
--- quote start ---
you have to disable jtag uart and use serial uart, if you want it auto start. --- Quote End --- And how to do that? <div align='right'><{post_snapback}> (index.php?act=findpost&pid=14796)</div> [/b] --- Quote End --- In kernel config, drivers->char->serial-> [*] Nios serial support [*] Support for console on Nios UART [ ] Altera JTAG UART support And in u-boot config, use serial uart instead of jtag uart. You can open a hyperterminal for uart in windows. As pointed out by scott, you can use auto start in u-boot. http://forum.niosforum.com/forum/index.php?showtopic=3779 (http://forum.niosforum.com/forum/index.php?showtopic=3779)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif ,
finally I make it http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/laugh.gif It's like I get stupid for a long while http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/tongue.gif Well, I wanna know how to download µClinux into flash memory for the first time. And as well, if somebody can tell me where to find details of the u-boot commands. Warm Regards- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi MFM,
I'm glad you have things up-and-running and didn't commit suicide! ;-) > I wanna know how to download µClinux into flash memory for the first time. 1. erase the flash There are several ways to do this, the easiest to _understand_ is: ==> protect off all ==> erase 01000000 02ffffff 2. download the image --using tftpboot (e.g. download to linux.img memory location 0100_0000) ==> tftpboot 1000000 linux.img --using loadb (this uses kermit -- so you must start transfer after the following): ==> loadb 1000000 3. program the flash If you downloaded, say 2e_8348 bytes to address 0100_0000, you can simply "copy" the bytes to the flash memory ... u-boot is smart enough to know you're copying to flash. For example, to program flash memory at 0800_0000 ==> protect off all ==> cp.b 1000000 8000000 2e8348 > if somebody can tell me where to find details of the u-boot commands. See Section 5.9: http://www.denx.de/wiki/view/dulg/uboot (http://www.denx.de/wiki/view/dulg/uboot) Regards, --Scott- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Scott,
thanks a lot, I think I'm in the right way. BTW I want to ask you what gzip got to do with the mkimage, do we have to compress the kernel before uploading it to flash? Please explain that a little bit detailed. Warm Regards- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi MFM,
> what gzip got to do with the mkimage, do we have to compress the kernel before > uploading it to flash? Compressing the kernel is up to you ... if you're operating in an embedded environment, it may become a requirement if you have limited non-volatile memory resources. When you generate for example, bzImage, the kernel is already compressed and includes its own decompression/relocation code. In this case you would tell u-boot that the image has compression 'None' since u-boot is not required to perform the decompression. If you choose to compress the kernel yourself (e.g. using gzip) then you should tell u-boot that the image compression is "gzip" -- then u-boot will decompress the kernel as it copies it to its load address. So why not just let the kernel make scripts generate a compressed image? Well, for uClinux/Nios-II it really doesn't matter since (the last time I looked), the uClinux kernel doesn't expect any parameters to be passed into it by the bootloader. In some other architectures (like PowerPC), however, the kernel expects parameters to be passed in (such as the kernel command line, a pointer to a compressed ramdisk image, etc) -- usually referred to as "residual data". When you build a compressed kernel image, the "boot" code that decompresses the kernel usually does not expect any bootloader parameters and instead hard codes the residual data. This eliminates some nice features in u-boot (most notably the kernel command line). So there's a long-winded explanation -- sorry for rambling. But here's the bottom line: The preferred u-boot way: Generate an uncompressed kernel image from the kernel make. Then compress it yourself with bzip/gzip and tell mkimage it's compressed. The Nios-II way: right now it doesn't matter. I do things the u-boot way ... but to be honest, it's only because of habit. If you're using buildroot, there's no need to do things the u-boot way since everything is a single image (with ramdisk) -- so just tell mkimage that compression = 'None'. Regards, --Scott- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Scott,
lots of thanks for you, your explanations make things look clearely. <div class='quotetop'>QUOTE </div> --- Quote Start --- So there's a long-winded explanation -- sorry for rambling[/b] --- Quote End --- Sorry for what http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/dry.gif I love that way to explain things we can't find in any document. Wish everybody in this forum explain things that way and not only give solutions in one or two lines. Thanks again. Warm Regards- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Scott,
well, I've done the following: - I programmed the u-boot.bin in flash memory using the flash programmer at the user space of the flash (0x400000). - 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
==>
Besides, I feel confused between Flash and SDRAM adresses, I can't even decide what adresses to submit to mkimage, is the adress I've programmed u-boot at is suitable and how u-boot proceeds to boot a kernel and a FS images. All adresses matter is troubling me. So if you could explain me that I'm gonna be thankful. PS. I'm using a Stratix Pro 1s40 board Warm Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by mfm@Apr 30 2006, 02:58 AM hi scott,
well, i've done the following:
- i programmed the u-boot.bin in flash memory using the flash programmer at the user space of the flash (0x400000).
- 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
==>
besides, i feel confused between flash and sdram adresses, i can't even decide what adresses to submit to mkimage, is the adress i've programmed u-boot at is suitable and how u-boot proceeds to boot a kernel and a fs images.
all adresses matter is troubling me.
so if you could explain me that i'm gonna be thankful.
ps. i'm using a stratix pro 1s40 board
warm regards
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14852)</div> --- Quote End --- You can find it in u-boot wiki, http://www.denx.de/wiki/view/dulg/linuxnfsroot (http://www.denx.de/wiki/view/dulg/linuxnfsroot) But nios2 uclinux won't expect kernel parameters from boot loader, so it might not work with passed parameters. You can just add them to kernel command line in kernel config.
root=/dev/nfs rw nfsroot=10.0.0.2:/home/mfm/roofs ip=10.0.0.99:10.0.0.2:10.0.0.2:255.0.0.0:tqm::off
In kernel config, check File systems -> Network File Systems [*] NFS file system support [*] Provide NFSv3 client support Another approach, boot with initramfs, mount nfs, then switch root to nfs. You may find an example from www.ltsp.org lbe source cvs, initramfs_src/initramfs_tree/initramfs_tree/init You may take a trial of the ltsp4.2 on PCs to get some idea of it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi hippo,
<div class='quotetop'>QUOTE </div> --- Quote Start --- http://www.denx.de/wiki/view/dulg/linuxnfsroot (http://www.denx.de/wiki/view/dulg/linuxnfsroot)[/b] --- Quote End --- That doesn't explain what's the nuance between flash and ram in using uboot nor how to get their adresses. <div class='quotetop'>QUOTE </div> --- Quote Start --- But nios2 uclinux won't expect kernel parameters from boot loader, so it might not work.[/b] --- Quote End --- Encouraging http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/laugh.gif <div class='quotetop'>QUOTE </div> --- Quote Start --- boot with initramfs, mount nfs, then switch root to nfs.[/b] --- Quote End --- How to do so, and please could you explain what are initramfs and initrd. <div class='quotetop'>QUOTE </div> --- Quote Start --- You may find an example from www.ltsp.org lbe source cvs, initramfs_src/initramfs_tree/initramfs_tree/init You may take a trial of the ltsp4.2 on PCs to get some idea of it.[/b] --- Quote End --- ????????????? BTW, when you talk in other posts about custom board, do you mean a board you make by yourself with different components you routed on ? Warm Regards- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by mfm@Apr 30 2006, 10:01 AM hi hippo,
<div class='quotetop'>quote
--- quote end ---
--- quote start ---
http://www.denx.de/wiki/view/dulg/linuxnfsroot (http://www.denx.de/wiki/view/dulg/linuxnfsroot) --- Quote End --- That doesn't explain what's the nuance between flash and ram in using uboot nor how to get their adresses. <div class='quotetop'>QUOTE </div> --- Quote Start --- But nios2 uclinux won't expect kernel parameters from boot loader, so it might not work.[/b] --- Quote End --- Encouraging http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/laugh.gif <div class='quotetop'>QUOTE </div> --- Quote Start --- boot with initramfs, mount nfs, then switch root to nfs.[/b] --- Quote End --- How to do so, and please could you explain what are initramfs and initrd. <div class='quotetop'>QUOTE </div> --- Quote Start --- You may find an example from www.ltsp.org lbe source cvs, initramfs_src/initramfs_tree/initramfs_tree/init You may take a trial of the ltsp4.2 on PCs to get some idea of it.[/b] --- Quote End --- ????????????? BTW, when you talk in other posts about custom board, do you mean a board you make by yourself with different components you routed on ? Warm Regards <div align='right'><{post_snapback}> (index.php?act=findpost&pid=14855)</div> [/b] --- Quote End --- A custom board is a board that is different from the dev board. It is a product, not for development and prototyping. The LTSP is a project which takes use of tftpboot and nfs root to remote boot diskless Linux PC. We use LTSP to run all the PCs in our company, except for the ones to run quartus. As I have said, you need the Linux know-how to success on nios2 Linux. If you take a trial on it, you can learn a lot, what is necessary for you to root nfs on nios2. So I strongly recommand LTSP as a case study. About u-boot, did you walk through the wiki? did you step into the sources? It would be nice if there is a step-by-step guide, but before we have one, you can find the way and help others in the future. I was a newbie to uClinux, too. I wanted to run uClinux on my nios2 board, which is very different from dev board. There was no cfi flash for mtd. I tried and failed a lot. It was a hard time, but I didn't give up. Finally I worked out the initramfs. And later I wrote the buildroot guide. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi hippo,
<div class='quotetop'>QUOTE </div> --- Quote Start --- So I strongly recommand LTSP as a case study.[/b] --- Quote End --- I'll do so, thanks for the advice. <div class='quotetop'>QUOTE </div> --- Quote Start --- About u-boot, did you walk through the wiki? did you step into the sources? It would be nice if there is a step-by-step guide, but before we have one, you can find the way and help others in the future.[/b] --- Quote End --- You're absolutely right. <div class='quotetop'>QUOTE </div> --- Quote Start --- Finally I worked out the initramfs.[/b] --- Quote End --- That's make me ask what are initramfs and initrd- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
More information about Initramfs can be found on LWN, "Initramfs arrives" and
"Patch: Documentation for ramfs, rootfs, initramfs."- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, all
How can I port U-boot to my board? or is there any web that tell us how to do it? Thank you for your replay.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi scut_ak,
take a look at this topic: http://forum.niosforum.com/forum/index.php...=3571&hl=u-boot (http://forum.niosforum.com/forum/index.php?showtopic=3571&hl=u-boot)- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,MFM
Thank you for your replay. But I can not open the web link http://www.psyent.com/download (http://www.psyent.com/download), I try it many times. Can you send the code to me ? my e-mail is : scut_ak@163.com- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi scut_ak,
<div class='quotetop'>QUOTE </div> --- Quote Start --- Can you send the code to me ? my e-mail is : scut_ak@163.com[/b] --- Quote End --- That's already done. Enjoy !- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,MFM
I have receive it . Thank you for your help.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page