How to Develop Linux kernel?

Source: Internet
Author: User

How to Develop Linux kernel?
?? How to Develop Linux kernel? Below is the output in Ubuntu:

Root @ myhostname # make
Make: Warning: File 'makefile' has modification time 11 s in the future
Make-C/lib/modules/3.20.- 24-generic/build M =/root modules
Make [1]: Entering directory '/usr/src/linux-headers-3.13.0-24-generic'
Make [2]: Warning: File '/root/Makefile' has modification time 10 s in the future
CC [M]/root/hello-1.o
Make [2]: warning: Clock skew detected. Your build may be incomplete.
Building modules, stage 2.
Make [2]: Warning: File '/root/Makefile' has modification time 8.9 s in the future
MODPOST 1 modules
CC/root/hello-1.mod.o
LD [M]/root/hello-1.ko
Make [2]: warning: Clock skew detected. Your build may be incomplete.
Make [1]: Leaving directory '/usr/src/linux-headers-3.13.0-24-generic'
Make: warning: Clock skew detected. Your build may be incomplete.

~
Root @ myhostname # ls
A B. c hello-1.ko hello-1.o modules. order MyFirstJavaProgram. java
A. c. dns hello-1.mod.c IP.txt Module. symvers SumOfN-thPowersIsAnN-thPower
B hello-1.c hello-1.mod.o Makefile MyFirstJavaProgram. class SumOfN-thPowersIsAnN-thPower.c

~
Root @ myhostname # insmod./hello-1.ko

~
Root @ myhostname # cat/var/log/kern. log
Feb 2 00:48:18 cmt-ub14x64-02 kernel: [8216591.312610] hello_1: module license 'Unspecified 'taints kernel.
Feb 2 00:48:18 cmt-ub14x64-02 kernel: [8216591.312617] Disabling lock debugging due to kernel taint
Feb 2 00:48:18 cmt-ub14x64-02 kernel: [8216591.312641] hello_1: module verification failed: signature and/or required key missing-tainting kernel
Feb 2 00:48:18 cmt-ub14x64-02 kernel: [8216591.313139] Hello world 1.

~
Root @ myhostname # cat/proc/modules
Hello_1 12426 0-Live 0xffffffffffa01e9000 (POF)
Nls_iso8859_1 12713 0-Live 0xffffffffa01e4000
Joydev 17381 0-Live 0xffffffffa0183000
Hid_generic 12548 0-Live 0xffffffffffa01db000
Udfs 89723 0-Live 0xffffffffa01c4000
Crc_itu_t 12707 1 udf, Live 0xffffffffa01bf000
Psmouse 102222 0-Live 0xffffffffa01a5000
Serio_raw 13462 0-Live 0xffffffffa017e000
Hid_hyperv 13059 0-Live 0xffffffffffa012e000
Hyperv_keyboard 12777 0-Live 0xffffffffa00c6000
Hid 106148 2 hid_generic, hid_hyperv, Live 0xffffffffa018a000
Nfsd 280297 2-Live 0xffffffffa0135000
Auth_rpcgss 59338 1 nfsd, Live 0xffffffffa011e000
Nfs_acl 12837 1 nfsd, Live 0xffffffffa00c1000
Nfs 236636 0-Live 0xffffffffa00e3000
Hyperv_fb 17593 1-Live 0xffffffffa00bb000
I2c_piix4 22155 0-Live 0xffffffffa00b0000
Lockd 93977 2 nfsd, nfs, Live 0xffffffffa00cb000
Mac_hid 13205 0-Live 0xffffffffa004f000
Sunrpc 284404 6 nfsd, auth_rpcgss, nfs_acl, nfs, lockd, Live 0xffffffffa0069000
Fscache 63988 1 nfs, Live 0xffffffffa0058000
Lp 17759 0-Live 0xffffffffa0028000
Parport 42348 1 lp, Live 0xffffffffa0043000
Hv_utils 19003 0-Live 0xffffffffa003d000
Hv_storvsc 17785 2-Live 0xffffffffffa0010000
Hv_vmbus 50383 5 hid_hyperv, hyperv_keyboard, hyperv_fb, hv_utils, hv_storvsc, Live 0xffffffffa002f000
Floppy 69370 0-Live 0xffffffffa0016000
Tulip 59672 0-Live 0xffffffffa0000000

~
Root @ myhostname # rmmod hello-1

~
Root @ myhostname # cat/proc/modules
Nls_iso8859_1 12713 0-Live 0xffffffffa01e4000
Joydev 17381 0-Live 0xffffffffa0183000
Hid_generic 12548 0-Live 0xffffffffffa01db000
Udfs 89723 0-Live 0xffffffffa01c4000
Crc_itu_t 12707 1 udf, Live 0xffffffffa01bf000
Psmouse 102222 0-Live 0xffffffffa01a5000
Serio_raw 13462 0-Live 0xffffffffa017e000
Hid_hyperv 13059 0-Live 0xffffffffffa012e000
Hyperv_keyboard 12777 0-Live 0xffffffffa00c6000
Hid 106148 2 hid_generic, hid_hyperv, Live 0xffffffffa018a000
Nfsd 280297 2-Live 0xffffffffa0135000
Auth_rpcgss 59338 1 nfsd, Live 0xffffffffa011e000
Nfs_acl 12837 1 nfsd, Live 0xffffffffa00c1000
Nfs 236636 0-Live 0xffffffffa00e3000
Hyperv_fb 17593 1-Live 0xffffffffa00bb000
I2c_piix4 22155 0-Live 0xffffffffa00b0000
Lockd 93977 2 nfsd, nfs, Live 0xffffffffa00cb000
Mac_hid 13205 0-Live 0xffffffffa004f000
Sunrpc 284404 6 nfsd, auth_rpcgss, nfs_acl, nfs, lockd, Live 0xffffffffa0069000
Fscache 63988 1 nfs, Live 0xffffffffa0058000
Lp 17759 0-Live 0xffffffffa0028000
Parport 42348 1 lp, Live 0xffffffffa0043000
Hv_utils 19003 0-Live 0xffffffffa003d000
Hv_storvsc 17785 2-Live 0xffffffffffa0010000
Hv_vmbus 50383 5 hid_hyperv, hyperv_keyboard, hyperv_fb, hv_utils, hv_storvsc, Live 0xffffffffa002f000
Floppy 69370 0-Live 0xffffffffa0016000
Tulip 59672 0-Live 0xffffffffa0000000

~
Root @ myhostname # cat/var/log/kern. log
Feb 2 00:48:18 cmt-ub14x64-02 kernel: [8216591.312610] hello_1: module license 'Unspecified 'taints kernel.
Feb 2 00:48:18 cmt-ub14x64-02 kernel: [8216591.312617] Disabling lock debugging due to kernel taint
Feb 2 00:48:18 cmt-ub14x64-02 kernel: [8216591.312641] hello_1: module verification failed: signature and/or required key missing-tainting kernel
Feb 2 00:48:18 cmt-ub14x64-02 kernel: [8216591.313139] Hello world 1.
Feb 2 00:53:10 cmt-ub14x64-02 kernel: [8216883.303516] Goodbye world 1.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.