ARM Linux系统中如何查看系统内核版本?

ARM Linux系统中如何查看系统内核版本?,第1张

查看系统内核版本,使用

uname

命令。

以致远电子的M3352核心板为例,输入以下命令即可:

[root@M3352

~]#

uname

-a

Linux

M3352

3.2.0

#134

Thu

Aug

8

15:47:17

CST

2013

armv7l

GNU/Linux

1. 内核启动地址

ZTEXTADDR

解压代码运行的开始地址。没有物理地址和虚拟地址之分,因为此时MMU处于关闭状态。这个地址不一定时RAM的地址,可以是支持读写寻址的flash等存储中介。

Start address of decompressor. here's no point in talking about virtual or physical addresses here, since the MMU will be off at the time when you call the decompressor code. You normally call the kernel at this address to start it booting. This doesn't have to be located in RAM, it can be in flash or other read-only or read-write addressable medium.

在arch/arm/boot/compressed/Makefile中说的很明确

#

# We now have a PIC decompressor implementation. Decompressors running

# from RAM should not define ZTEXTADDR. Decompressors running directly

# from ROM or Flash must define ZTEXTADDR (preferably via the config)

# FIXME: Previous assignment to ztextaddr-y is lost here. See SHARK

ifeq ($(CONFIG_ZBOOT_ROM),y)

ZTEXTADDR := $(CONFIG_ZBOOT_ROM_TEXT)

ZBSSADDR:= $(CONFIG_ZBOOT_ROM_BSS)

else

ZTEXTADDR := 0

ZBSSADDR:= ALIGN(8)

endif

ZRELADDR

内核启动在RAM中的地址。压缩的内核映像被解压到这个地址,然后执行。

This is the address where the decompressed kernel will be written, and eventually executed. The following constraint must be valid:

__virt_to_phys(TEXTADDR) == ZRELADDR

The initial part of the kernel is carefully coded to be position independent.

一般定义在项目目录下,比如:

arch/arm/mach-at91/Makefile.boot: zreladdr-y += 0x70008000

arch/arm/mach-at91/Makefile.boot: zreladdr-y += 0x20008000

arch/arm/mach-cns3xxx/Makefile.boot: zreladdr-y += 0x00008000

arch/arm/mach-davinci/Makefile.boot: zreladdr-y += 0xc0008000

arch/arm/mach-davinci/Makefile.boot: zreladdr-y += 0x80008000

arch/arm/mach-dove/Makefile.boot: zreladdr-y += 0x00008000

arch/arm/mach-ebsa110/Makefile.boot: zreladdr-y += 0x00008000

arch/arm/mach-exynos/Makefile.boot: zreladdr-y += 0x40008000

arch/arm/mach-footbridge/Makefile.boot: zreladdr-y += 0x00008000

arch/arm/mach-gemini/Makefile.boot: zreladdr-y += 0x00008000

arch/arm/mach-gemini/Makefile.boot: zreladdr-y += 0x10008000

arch/arm/mach-integrator/Makefile.boot: zreladdr-y += 0x00008000

arch/arm/mach-iop13xx/Makefile.boot: zreladdr-y += 0x00008000

在arch/arm/boot/Makefile中被赋值:

ZRELADDR := $(zreladdr-y)

PARAMS_PHYS := $(params_phys-y)

INITRD_PHYS := $(initrd_phys-y)

... ...

ifneq ($(LOADADDR),)

UIMAGE_LOADADDR=$(LOADADDR)

else

ifeq ($(CONFIG_ZBOOT_ROM),y)

UIMAGE_LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT)


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/yw/7624480.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-04-07
下一篇2023-04-07

发表评论

登录后才能评论

评论列表(0条)

    保存