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++

u-boot and zImage

Altera_Forum
Honored Contributor II
2,164 Views

Hi, 

Following the hippo's buildroot, I got the zImage file. 

In the other side, I have u-boot working from flash memory. 

Now, I am wondering if that's possible to download the zImage directly with u-boot.
0 Kudos
9 Replies
Altera_Forum
Honored Contributor II
708 Views

 

--- Quote Start ---  

originally posted by mfm@May 8 2006, 02:31 AM 

hi, 

following the hippo's buildroot, i got the zimage file. 

in the other side, i have u-boot working from flash memory. 

now, i am wondering if that's possible to download the zimage directly with u-boot. 

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

--- quote end ---  

 

--- Quote End ---  

 

use tftp boot.
0 Kudos
Altera_Forum
Honored Contributor II
708 Views

 

--- Quote Start ---  

originally posted by hippo+may 8 2006, 03:16 am--><div class='quotetop'>quote (hippo @ may 8 2006, 03:16 am)</div> 

--- quote start ---  

<!--quotebegin-mfm@May 8 2006, 02:31 AM 

hi, 

following the hippo&#39;s buildroot, i got the zimage file. 

in the other side, i have u-boot working from flash memory. 

now, i am wondering if that&#39;s possible to download the zimage directly with u-boot. 

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

--- quote end ---  

 

--- Quote End ---  

 

use tftp boot. 

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

[/b] 

--- Quote End ---  

 

Here I&#39;m talking about if I had to mkimage zImage or not.
0 Kudos
Altera_Forum
Honored Contributor II
708 Views

TO_BE_DONE

0 Kudos
Altera_Forum
Honored Contributor II
708 Views

 

--- Quote Start ---  

originally posted by hippo+may 8 2006, 03:57 am--><div class='quotetop'>quote (hippo @ may 8 2006, 03:57 am)</div> 

--- quote start ---  

 

--- quote start ---  

originally posted by mfm@may 8 2006, 09:46 am 

 

--- quote start ---  

originally posted by hippo@may 8 2006, 03:16 am 

<!--quotebegin-mfm@May 8 2006, 02:31 AM 

hi, 

following the hippo&#39;s buildroot, i got the zimage file. 

in the other side, i have u-boot working from flash memory. 

now, i am wondering if that&#39;s possible to download the zimage directly with u-boot. 

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

--- quote end ---  

 

--- Quote End ---  

 

use tftp boot. 

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

[/b] 

--- Quote End ---  

 

Here I&#39;m talking about if I have to mkimage zImage or not. 

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

[/b] 

--- Quote End ---  

 

You&#39;d better write your questions more clearly. I misunderstand so many times. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif  

 

Don&#39;t mkimage, it is already compressed. 

You should not want to write the zImage to flash with u-boot, either. 

 

Put your zImage file in /tftpboot of your tftp server, and use, 

tftpboot [loadAddress] zImage 

where loadAddress is (your sdram address + boot link offset( default to 0x00800000) ) 

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

[/b] 

--- Quote End ---  

 

Well, what I&#39;m trying to do is to program the flash with the kernel via u-boot, and since u-boot deals with the .img files so I guess I got to transform the zImage with mkimage before downloading it with tftpboot.
0 Kudos
Altera_Forum
Honored Contributor II
708 Views

TO_BE_DONE

0 Kudos
Altera_Forum
Honored Contributor II
708 Views

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

--- Quote Start ---  

Why do you program the flash with u-boot? It is not the right way. Use the nios2-flash-programmer to program the flash.[/b] 

--- Quote End ---  

Cause I want to work only on linux and don&#39;t have the linux version for altera stuff (I&#39;m not going to reboot linux -windows all the time). Besides, I want to through that usb-blaster http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif  

 

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

--- Quote Start ---  

You should use u-boot to download program via tftp to sdram and run. That should be most people want u-boot to do.[/b] 

--- Quote End ---  

And if I can do all that things with u-boot only, why bothering myself with other tools !
0 Kudos
Altera_Forum
Honored Contributor II
708 Views

> Now, I am wondering if that&#39;s possible to download the zImage directly with u-boot. 

 

You can download it, and program it in ram, but you can&#39;t boot it using bootm. 

The &#39;bootm&#39; command requires a valid u-boot image. 

 

> Don&#39;t mkimage zImage, it is already compressed. 

 

Compression has absolutely _nothing_ to do with mkimage. The mkimage utility 

is necessary to properly boot a kernel image using u-boot, regardless of whether 

or not the kernel is compressed. mkimage simply adds (prepends) a header to the 

kernel (or filesystem, or script, etc). The header contains information such as load 

address, entrypoint address, a header CRC-32, data CRC-32, and yes ... a field 

that indicates if the data (the kernel) is compressed. 

 

When the kernel is compressed via the kernel build scripts, you should tell 

mkimage that kernel has compression &#39;None&#39;. 

 

> I guess I got to transform the zImage with mkimage before downloading it 

> with tftpboot. 

 

Correct. 

 

> Why do you program the flash with u-boot? It is not the right way. Use the 

> nios2-flash-programmer to program the flash 

 

Don&#39;t be silly! Programming flash with u-boot is one of its most useful features. 

It is perfectly appropriate (and correct) to do so -- especially when you do not 

want to require xxxBlaster and an exposed JTAG header. 

 

Additionally, if you load your flash image using TFTP, it is _much_, _much_ faster. 

Furthermore, u-boot has been programming flash memory on more architectures 

for a _much_ longer time than the "flash-programmer". 

 

> You should use u-boot to download program via tftp to sdram and run. That 

> should be most people want u-boot to do. 

 

I have been working with u-boot for for well over 7 years now. I&#39;ve done at least a 

dozen board ports using four different architectures. I can tell you from experience, 

_most_ systems use u-boot to boot a kernel that is stored in flash. The TFTP feature 

is used to perform field upgrades (and for testing during development). 

 

> And if I can do all that things with u-boot only, why bothering myself with 

> other tools ! 

 

Exactly! With u-boot you can do almost everything using something as primitive 

as a UART interface and some cheap terminal software. Or as sophisticated as 

loading and executing a script via NFS, that in turn loads a kernel image via 

tftp that gets loaded into flash and eventually booted ... phew ;-) 

 

Regards, 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
708 Views

Scott, 

Thanks a lot. Now I learned more about u-boot. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif  

Could you give some sample scripts for daily usage of u-boot? 

Do you use dhcp and nfs -root ? 

 

Best regards, 

Hippo
0 Kudos
Altera_Forum
Honored Contributor II
708 Views

Hi Scott, 

thanks a lot, that&#39;s really instructive http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif
0 Kudos
Reply