u-boot只能識別uImage格式的內核。如果使用u-boot來啓動Linux的話就需要生成uImage。在linux 2.6以上的內核中,可以用make uImage去直接生成它,但是linux 2.4或者更早的linux的話,你就要自己手動去生成它。
現在我使用的是linux-2.6-22。在使用make uImage到最後一步時出現如下提示:
No jigdo file or MD5 file specified!
mkimage [OPTIONS]
Options:
-f Specify an input MD5 file. MD5s must be in jigdo's
pseudo-base64 format
-j Specify the input jigdo file
-t Specify the input template file
-m Map to to find the files in the mirror
-M Rather than try to build the image, just check that
all the needed files are available. If any are missing,
list them in this file.
-v Make the output logging more verbose
-l Specify a logfile to append to.
If not specified, will log to stderr
-o Specify a file to write the ISO image to.
If not specified, will write to stdout
-q Quick mode. Don't check MD5sums. Dangerous!
-s Start byte number; will start at 0 if not specified
-e End byte number; will end at EOF if not specified
-z Don't attempt to rebuild the image; simply print its
size in bytes
我查了很久,一直沒有找到原因。後來把u-boot/tools/mkimage拷到/usr/bin/後問題解決。
懷疑是原來使用的那個mkimge版本不對,可能太高或者太低了。換u-boot裏的mkimage就可以了。
內核用以生成uImage的命令語句在這:linux-2.6.22/scripts/mkuboot.sh
附:執行u-boot/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
make uImage 出錯一例
轉自:http://linux.chinaunix.net/techdoc/desktop/2008/12/16/1053042.shtml
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.