Forum Discussion
Altera_Forum
Honored Contributor
20 years agou-boot and zImage
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 di...
Altera_Forum
Honored Contributor
20 years ago> Now, I am wondering if that's possible to download the zImage directly with u-boot.
You can download it, and program it in ram, but you can't boot it using bootm. The 'bootm' command requires a valid u-boot image. > Don'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 'None'. > 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'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'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