uboot 如何在不使用 DTS 的情况下将硬件信息传递给内核 [英] How uboot passes hardware information to kernel without using DTS

查看:29
本文介绍了uboot 如何在不使用 DTS 的情况下将硬件信息传递给内核的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是嵌入式 Linux 开发的新手.我必须将 uboot 和自定义 Linux 发行版移植到新的基于 ARM 的主板上.

I am new to embedded Linux development. I have to port uboot and custom Linux distribution to a new ARM based board.

我们使用的 uboot (2009.08) 没有 Arch 和 DTS 文件夹.我想它是一个较旧的版本,它不使用 DTS 将硬件信息传递给内核(v 3.0).我已经阅读了很多关于 DTS 的信息,但是关于这种(过时的?)将硬件信息从 uboot 传递到我们正在使用的内核的方法,互联网上的信息不足.Internet 告诉我,在 uboot 和内核源代码中都有用于此任务的 C 文件必须同步,但是有人可以指出我的方向吗?另外,如果我的假设有误,请纠正我,并在需要时询问更多信息.

The uboot we are using (2009.08) does not have Arch and DTS folders. I suppose it is an older version which does not use use DTS to pass hardware information to the Kernel (v 3.0). I have read a lot about DTS but here is not enough information on internet about this (obsolete?) method of passing hardware information from uboot to kernel that we are using. Internet tells me that there are C files for this task both in uboot and kernel source code that have to be sync'd, but can some one point me in that direction? Also, please correct me if my assumptions are wrong, and ask for more info if needed.

推荐答案

在 U-Boot 和 Linux ARM 内核之间传递数据的(旧)方法称为 ATAG 内存列表.可用内存区域、机器类型和主板信息等信息会使用此数据列表从 U-Boot 传递到 Linux ARM 内核.

The (old) method to pass data between U-Boot and the Linux ARM kernel is called the ATAG memory list. Information such as usable memory regions, machine type and board information are passed from U-Boot to the Linux ARM kernel using this data list.

在 U-Boot 中,ATAGs 内置于 lib_arm/armlinux.c (1.1.5) 或 lib_arm/bootm.c (2009.08) 或 arch/arm/lib/bootm.c (2015.04),并且需要配置选项 CONFIG_SETUP_MEMORY_TAGS 和突出的 CONFIG_xxx_TAG s.
然后 ATAGs 由 Linux 在 arch/arm/kernel/setup.c 中处理.

In U-Boot, ATAGs are built in lib_arm/armlinux.c (1.1.5) or lib_arm/bootm.c (2009.08) or arch/arm/lib/bootm.c (2015.04), and require the configuration options CONFIG_SETUP_MEMORY_TAGS and salient CONFIG_xxx_TAG s.
Then the ATAGs are processed by Linux in arch/arm/kernel/setup.c.

有关文档,请参阅this 的第 8 节或这个替代网站.

For documentation see Section 8 of this or this alt site.

附录

另请参阅本演示文稿的幻灯片 #4,关于 之前-Device_Tree 启动

Also see slide #4 of this presentation about before-Device_Tree booting

这篇关于uboot 如何在不使用 DTS 的情况下将硬件信息传递给内核的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆