zImage.img的制作?

elesun8 2015-01-17 09:42:47
zImage.img的制作?

mini2440 Linux
norFlash启动
uboot

bootcmd=nfs 0x30008000 192.168.0.1:/home/tekkaman/working/nfs/zImage.img;bootm

zImage.img这个镜像如何得到,用什么软件,哪里可以下载到?
为什么必须要用zImage.img,而不能用uImage或者zImage文件?
多谢指教。
...全文
259 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
elesun8 2015-01-23
  • 打赏
  • 举报
回复
mkimage制作zImage.img下载启动Linux 1.生成zImage.img [root@localhost tftpboot]# ls uImage zImage [root@localhost tftpboot]# mkimage -n 'linux-2.6.32.2' -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008000 -d zImage zImage.img Image Name: linux-2.6.32.2 Created: Thu Jan 22 16:36:52 2015 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 2286756 Bytes = 2233.16 kB = 2.18 MB Load Address: 30008000 Entry Point: 30008000 [root@localhost tftpboot]# ls uImage zImage zImage.img ( 介绍使用mkimage生成镜像文件并下载运行的方法。 1、首先,用u-boot/tools/mkimage这个工具为你的内核加上u-boot引导所需要的文件头,具体做法如下: [root@localhost tftpboot]#mkimage -n 'linux-2.6.14' -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008000 -d zImage zImage.img Image Name: linux-2.6.14 Created: Fri Jan 12 17:14:50 2007 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 1262504 Bytes = 1232.91 kB = 1.20 MB Load Address: 0x30008000 Entry Point: 0x30008000 这里解释一下参数的意义: -A ==> set architecture to 'arch' -O ==> set operating system to 'os' -T ==> set image type to 'type' -C ==> set compression type 'comp' -a ==> set load address to 'addr' (hex) -e ==> set entry point to 'ep' (hex) -n ==> set image name to 'name' -d ==> use image data from 'datafile' -x ==> set XIP (execute in place) ) 2.下载运行zImage.img U-Boot 2009.11 (04 2010 - 12:09:25) modified by tekkamanninja (tekkamanninja@163.com) Love Linux forever!! I2C: ready DRAM: 64 MB Flash: 2 MB NAND: 256 MiB Video: 240x320x16 20kHz 62Hz In: serial Out: serial Err: serial Net: dm9000 U-Boot 2009.11 ( 4??? 04 2010 - 12:09:25) modified by tekkamanninja (tekkamanninja@163.com) Love Linux forever!! Hit any key to stop autoboot: 0 [u-boot@MINI2440]# [u-boot@MINI2440]# tftp 31000000 zImage.img dm9000 i/o: 0x20000300, id: 0x90000a46 DM9000: running in 16 bit mode MAC: 08:08:11:18:12:27 operating at 100M full duplex mode Using dm9000 device TFTP from server 192.168.0.101; our IP address is 192.168.0.105 Filename 'zImage.img'. Load address: 0x31000000 Loading: T ################################################################# ################################################################# ########################## done Bytes transferred = 2286820 (22e4e4 hex) [u-boot@MINI2440]#bootm 31000000 ## Booting kernel from Legacy Image at 31000000 ... Image Name: linux-2.6.32.2 Created: 2015-01-22 8:36:52 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 2286756 Bytes = 2.2 MB Load Address: 30008000 Entry Point: 30008000 Verifying Checksum ... OK Loading Kernel Image ... OK OK Starting kernel ... Uncompressing Linux............................................................. ................................................................................ ........ done, booting the kernel. Linux version 2.6.32.2-FriendlyARM (root@localhost.localdomain) (gcc version 4.3 .2 (Sourcery G++ Lite 2008q3-72) ) #1 Wed Jan 21 10:07:44 CST 2015
elesun8 2015-01-22
  • 打赏
  • 举报
回复
在u-boot-2010.03-tekkaman-master\tools文件夹下有mkimage.c和mkimage.h make后生成mkimage 但是我在开发板输入mkimage出现以下 [u-boot@MINI2440]# mkimage Unknown command 'mkimage' - try 'help' 我在PC虚拟机redhat Linux下出现以下 /U-boot-2009.11_tekkaman-master/tools [root@localhost tools]# ./mkimage [root@localhost tools]# ./mkimage Usage: ./mkimage -l image -l ==> list image header information ./mkimage [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image -A ==> set architecture to 'arch' -O ==> set operating system to 'os' -T ==> set image type to 'type' -C ==> set compression type 'comp' -a ==> set load address to 'addr' (hex) -e ==> set entry point to 'ep' (hex) -n ==> set image name to 'name' -d ==> use image data from 'datafile' -x ==> set XIP (execute in place) ./mkimage [-D dtc_options] -f fit-image.its fit-image 如何使用啊

4,436

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 内核源代码研究区
社区管理员
  • 内核源代码研究区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧