# 启动时的小秘密

内核启动的过程不是一蹴而就的，而且其中还包含了不少让人不太好找的小秘密。

每次我看到相关的代码，都要从头再找一遍，感觉非常费事。这次干脆就记录下来，以备后用。

## INIT\_CALL

在内核代码中经常会看到core\_initcall(), subsys\_initcall()这样xxx\_initcall()的函数。

这些函数可以理解为c++中的构造函数，只是内核对这些函数做了分类，并且在特定的地方调用他们。

[INIT\_CALLS的秘密](/kernel-exploring/00_index-1/01_init_call.md)

## 内核参数

启动时我们可以通过[内核参数](/kernel-exploring/00_index-1/02_command_line_parse.md)来调整系统行为。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://richardweiyang-2.gitbook.io/kernel-exploring/00_index-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
