How all the drivers source code are getting called during boot up ls1021a

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How all the drivers source code are getting called during boot up ls1021a

2,038件の閲覧回数
jiye
Contributor V

Hi,

I have a really basic question want to ask here.

I know how the linux system starts from boot loader to the roofts work.

But how does those kernel source codes function get called for example in board.c, who is calling the functions during the boot up and how does the bootargs get passed to the kernel, there must be an array list of function calls or some other mechanism during boot up to do the job. Who is doing the job to call those fuctions (one good example is the printing information on the console during boot, those functions are called from the C code but who is calling them?

Can anyone explain?

ラベル(2)
4 返答(返信)

1,946件の閲覧回数
jiye
Contributor V

Hi Yiping,

How about the driver source code during boot up in the kernel, for example eth0 ? for example probe, 

static struct platform_driver random_driver = {
.probe = random_probe,
.remove = random_remove,
.driver = {
.owner = THIS_MODULE,
.name = CARDNAME,
.of_match_table = of_match_ptr(random),
},
};

How do these things get called when loading a module in the kernel. i am really wanting to understand as I want to build a module myself for my ethernet

Be more specific:

int (*probe) (struct pci_dev *dev, const struct pci_device_id *id);

this one that is passed to  struct pci_dev *dev, who is filling up this structure ( I think it should be the writer most likely but at which source code (Or calls) to fill up this information (etc. header files or .c file) then passed to the kernel core?

0 件の賞賛
返信

1,946件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport
0 件の賞賛
返信

1,946件の閲覧回数
jiye
Contributor V

this is amazing ! Thanks Yiping

0 件の賞賛
返信