{"id":8057,"date":"2020-06-22T15:59:15","date_gmt":"2020-06-22T07:59:15","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=8057"},"modified":"2020-06-22T16:01:15","modified_gmt":"2020-06-22T08:01:15","slug":"mkimage","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/mkimage","title":{"rendered":"mkimage\u547d\u4ee4 – \u5236\u4f5c\u53ef\u542f\u52a8\u6620\u8c61\u6587\u4ef6"},"content":{"rendered":"\n

mkimage\u5de5\u5177\u662fu-boot\u7528\u6765\u5236\u4f5c\u955c\u50cf\u6587\u4ef6\u7684\u5de5\u5177\uff0c\u5176\u6e90\u4ee3\u7801\u5728u-boot\u6e90\u7801\u7684tools\u76ee\u5f55\u4e0b\uff1amkimage.c\u3002\u6211\u4eec\u4f7f\u7528bootm\u547d\u4ee4\u52a0\u8f7d\u7684\u5185\u6838\u548c\u6839\u6587\u4ef6\u7cfb\u7edf\uff0c\u90fd\u8981\u7528\u8fd9\u4e2a\u5de5\u5177\u52a0\u4e0a\u4e2a\u5934\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>mkimage [\u53c2\u6570]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

-A


<\/td>
CPU \u67b6\u6784\uff0c\u53ef\u9009\u7684\u503c\u6709\uff1a
“alpha”,”arm”,”x86″,”ia64″,”m6k8″,”microblaze”,”mips”,”mips64″,”nios”,”nios2″,”ppc”,”s390″,”sh”,”sparc”,”sparc64″,
“blackfin”,”avr32″<\/td><\/tr>
-O<\/td>\u64cd\u4f5c\u7cfb\u7edf\u3002\u53ef\u9009\u7684\u503c\u6709\uff1a
“4_4bsd”,”artos”,”esix”,”freebsd”,”irix”,”linux”,”lynxos”,”ncr”,”netbsd”,”openbsd”,”psos”,”qnx”,”rtems”,”sco”,”sloaris”,
“u-boot”,vxworks”<\/td><\/tr>
-T<\/td>\u955c\u50cf\u7c7b\u578b\u3002\u53ef\u9009\u7684\u503c\u6709\uff1a
“filesystem”,”firmware”,”firmware”,”kernel”,”multi”,”ramdisk”,”script”,”standalone”,”flat_dt”<\/td><\/tr>
-C<\/td>\u955c\u50cf\u538b\u7f29\u7c7b\u578b\u3002\u53ef\u9009\u7684\u503c\u6709\uff1a
“none”,”bzip2″,”gzip” none\u4e3a\u6ca1\u6709\u538b\u7f29<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u4e3a\u5185\u6838\u52a0\u4e0au-boot\u5f15\u5bfc\u6240\u9700\u8981\u7684\u6587\u4ef6\u5934\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# mkimage -n 'linux-2.6.14' -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008000 -d zImage zImage.img<\/pre>\n\n\n\n

\u6307\u5b9aCPU\u67b6\u6784\u548c\u64cd\u4f5c\u7cfb\u7edf\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# mkimage -A arm -O linux -a 0x20008000 -e 0x20008000 -d linux.bin.gz uImage<\/pre>\n\n\n\n

\u6307\u5b9a\u538b\u7f29\u683c\u5f0f\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# mkimage -A arm -O linux -C bzip2 -a 0x20008000 -e 0x20008000 -d linux.bin.gz uImage<\/pre>\n","protected":false},"excerpt":{"rendered":"

mkimage\u5de5\u5177\u662fu-boot\u7528\u6765\u5236\u4f5c\u955c\u50cf\u6587\u4ef6\u7684\u5de5\u5177\uff0c\u5176\u6e90\u4ee3\u7801\u5728u-boot\u6e90\u7801\u7684tools\u76ee\u5f55\u4e0b\uff1amkim […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8057"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=8057"}],"version-history":[{"count":1,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8057\/revisions"}],"predecessor-version":[{"id":8058,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8057\/revisions\/8058"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=8057"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=8057"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=8057"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}