预告片在内核黑客俚语中意味着什么?
What trailer means in kernel hacking slang?
通读 raspberry 文档。我找到了这些文字
"Note that DT and ATAGs are mutually exclusive. As a result, passing a DT blob to a kernel that doesn't understand it causes a boot failure. To guard against this, the loader checks kernel images for DT-compatibility, which is marked by a trailer added by the mkknlimg utility; this can be found here, or in the scripts directory of a recent kernel source tree. Any kernel without a trailer is assumed to be non-DT-capable."
在https://www.raspberrypi.org/documentation/configuration/device-tree.md
我很好奇 trailer 在内核黑客俚语中是什么意思?
我不会明确地Raspberry Pi问这个问题。我对一般解释感兴趣。
预告片是附加到其他内容末尾的内容。在这种情况下,它是在内核映像文件末尾添加的一些额外字节。这些字节不影响内核的运行,但加载程序可以检查它们。
将此与 header 进行对比,后者是放在其他内容之前的内容,例如 TCP/IP 中消息数据之前的 IP header 或 header 电子邮件开头的行。
在这种情况下,预告片是在构建过程中附加到图像末尾的几个字节。加载程序在启动时可以查看末尾的几个字节,如果它在那里找到神奇的价值(在你的情况下实际的魔法是 'RPTL' )。然后加载程序采用 DT 兼容内核。
https://github.com/raspberrypi/tools/blob/master/mkimage/mkknlimg#L21
在这里查看:https://github.com/raspberrypi/tools/blob/master/mkimage/mkknlimg#L123 了解如何以及在末尾附加了什么。
通读 raspberry 文档。我找到了这些文字
"Note that DT and ATAGs are mutually exclusive. As a result, passing a DT blob to a kernel that doesn't understand it causes a boot failure. To guard against this, the loader checks kernel images for DT-compatibility, which is marked by a trailer added by the mkknlimg utility; this can be found here, or in the scripts directory of a recent kernel source tree. Any kernel without a trailer is assumed to be non-DT-capable."
在https://www.raspberrypi.org/documentation/configuration/device-tree.md
我很好奇 trailer 在内核黑客俚语中是什么意思?
我不会明确地Raspberry Pi问这个问题。我对一般解释感兴趣。
预告片是附加到其他内容末尾的内容。在这种情况下,它是在内核映像文件末尾添加的一些额外字节。这些字节不影响内核的运行,但加载程序可以检查它们。
将此与 header 进行对比,后者是放在其他内容之前的内容,例如 TCP/IP 中消息数据之前的 IP header 或 header 电子邮件开头的行。
在这种情况下,预告片是在构建过程中附加到图像末尾的几个字节。加载程序在启动时可以查看末尾的几个字节,如果它在那里找到神奇的价值(在你的情况下实际的魔法是 'RPTL' )。然后加载程序采用 DT 兼容内核。
https://github.com/raspberrypi/tools/blob/master/mkimage/mkknlimg#L21
在这里查看:https://github.com/raspberrypi/tools/blob/master/mkimage/mkknlimg#L123 了解如何以及在末尾附加了什么。