美文网首页
What is the difference between t

What is the difference between t

作者: HAPPYers | 来源:发表于2019-07-19 17:39 被阅读0次

原文
https://unix.stackexchange.com/questions/5518/what-is-the-difference-between-the-following-kernel-makefile-terms-vmlinux-vml

  • vmLinux
    是静态编译,未经过压缩的 kernel 文件
    原vmlinux文件对于调试过程非常有用。
  • vmlinux.bin
    和vmlinux类似,这是一个可以直接启动的可执行二进制文件。所有的符号表和重定位信息都被去除了。
    这个类型的文件可以用过objcopy -O binary vmlinux vmlinux.binvmlinux文件生成。
  • vmlinuz
    通常用zlib来压缩vmlinux文件,产生的可引导的、压缩的内核格式为vmlinuz。
    vmlinux文件压缩可以产生zImage或者bzImage文件。
    decompress_kernel()函数来负责在启动的时候对vmlinuz进行解压.
    通常有如下提示
Decompressing Linux... done
Booting the kernel.
  • zimage
    创建方式make zImage
    这是对小型内核的老格式(压缩后大小小于512KB)。启动的时候,这个镜像被加载到内存的低地址(内存的起始640KB部分)。
  • bzimage
    创建方式make bzImage
    对于更大的内核(压缩后大小大于512KB).启动的时候,镜像被加载到高端内存中。(1M以上)

zImage(vmlinuz)和bzImage(vmlinuz)都是用gzip压缩的。它们不仅是一个压缩文件,而且在这两个文件的开头部分内嵌有gzip解压缩代码。所以你不能用gunzipgzip -dc解包vmlinuz。

相关文章

网友评论

      本文标题:What is the difference between t

      本文链接:https://www.haomeiwen.com/subject/rojslctx.html