Linux 内核路径和压缩

Linux 内核路径和压缩

我正在尝试找到 Linux 内核路径,以了解它在工业 Raspberry Pi 中使用的压缩类型。

我正在运行命令cat /proc/cmdline并获取输出:

dwc_otg.lpm_enable=0 smsc95xx.macaddr=18:83:C4:04:49:C5 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait noinitrd elevator=deadline bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1080

内容/boot是(Linux内核镜像应该在这里):

total 24948
-rwxr-xr-x 1 root root   15747 Jul 31  2018 bcm2710-rpi-cm3.dtb
-rwxr-xr-x 1 root root    3667 Jul 31  2018 bcm2710-rpi-cm3.dts
-rwxr-xr-x 1 root root   50192 Feb 10  2017 bootcode.bin
-rwxr-xr-x 1 root root     391 Oct  7  2019 boot.scr
-rwxr-xr-x 1 root root     136 Jan  1  1980 cmdline.txt
-rwxr-xr-x 1 root root     103 Jul 31  2018 config.txt
-rwxr-xr-x 1 root root       4 Oct  7  2019 console_status
-rwxr-xr-x 1 root root   18693 Aug 21  2015 COPYING.linux
-rwxr-xr-x 1 root root   39946 Jul 31  2018 dt-blob.bin
-rwxr-xr-x 1 root root   62963 Jul 31  2018 dt-blob.dts
-rwxr-xr-x 1 root root    2527 Nov 25  2016 fixup_cd.dat
-rwxr-xr-x 1 root root    6617 Feb 10  2017 fixup.dat
-rwxr-xr-x 1 root root    9751 Nov 25  2016 fixup_db.dat
-rwxr-xr-x 1 root root    9749 Nov 25  2016 fixup_x.dat
-rwxr-xr-x 1 root root     512 Jan  1  1980 FSCK0000.REC
-rwxr-xr-x 1 root root     512 Jan  1  1980 FSCK0001.REC
-rwxr-xr-x 1 root root     512 Jan  1  1980 FSCK0002.REC
-rwxr-xr-x 1 root root     512 Jan  1  1980 FSCK0003.REC
-rwxr-xr-x 1 root root     145 Nov 25  2016 issue.txt
-rwxr-xr-x 1 root root 4228952 Feb 10  2017 kernel7.img
-rwxr-xr-x 1 root root 4128712 Nov 25  2016 kernel.img
-rwxr-xr-x 1 root root    1494 Nov 18  2015 LICENCE.broadcom
-rwxr-xr-x 1 root root   18974 Nov 25  2016 LICENSE.oracle
drwxr-xr-x 2 root root    8192 Jul 31  2018 overlays
-rwxr-xr-x 1 root root  633636 Nov 25  2016 start_cd.elf
-rwxr-xr-x 1 root root 4954692 Nov 25  2016 start_db.elf
-rwxr-xr-x 1 root root 2830532 Feb 10  2017 start.elf
-rwxr-xr-x 1 root root 3904260 Nov 25  2016 start_x.elf
drwxr-xr-x 2 root root     512 Feb 10  2017 System Volume Information
-rwxr-xr-x 1 root root     383 Jan  1 01:00 tb_config
-rwxr-xr-x 1 root root   35700 Jan  1 01:00 tb_config_tmp
-rwxr-xr-x 1 root root     391 Jul 31  2018 tmp_boot.cmd_servic_off
-rwxr-xr-x 1 root root     438 Jul 31  2018 tmp_boot.cmd_servic_on
-rwxr-xr-x 1 root root  340632 Feb 10  2017 u-boot.bin
-rwxr-xr-x 1 root root 4228672 Feb 10  2017 zImage

但我没有看到它们之间的关系...有人可以帮我识别图像并解释命令的输出cat /proc/cmdline吗?

更新

在我的带有 Arch Linux 的笔记本电脑中,关系很明显:

输入:cat/proc/cmdline

输出:BOOT_IMAGE=/vmlinuz-linux root=UUID=[...] rw quiet

/boot我可以找到:

-rw-r--r-- 1 root root 6289792 oct 18 02:15 vmlinuz-linux

答案1

zImage您正在寻找列表底部名为的文件。

如果我没有记错的话,这是gzip引导加载程序加载的压缩内核映像。

我在快速搜索中找到的最佳参考是https://en.wikipedia.org/wiki/Vmlinux

如果有人有更好的参考,请随时编辑或评论。

相关内容