Linux Kernel Programming

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Linux Kernel Programming

Linux Kernel Programming

Linux Kernel Developing

U-boot and Kernel Compilation

  1. Get right toolchain for your platform.

            a. Ubuntu: sudo apt-get install gcc-arm-linux-gnueabi/gcc-arm-linux-gnueabihf

or

           b.  Get from linaro.org : wget -c https://releases.linaro.org/14.04/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.8-2...

   2. Get U-boot code source

    1. git clone http://git.denx.de/u-boot-imx.git
    2. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- wandboard_quad_config
    3. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-

   3. Get Kernel source with Wandboard support

    1. Wandboard repo:
      1. git clone https://github.com/wandboard-org/linux.git
      2. Select the right branch:
      3. git checkout wandboard_imx_3.10.17_1.0.0_beta    

                              or     

                           git checkout wandboard_imx_3.0.35_4.1.0

             b. Kernel Configuration ( load the wandboard  config )

                     make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- wandboard_defconfig

                                    or

                           make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- menuconfig

             c. Kernel Compilation

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-

     4. Prepare the sdcard:

            I. Copy the u-boot on the sdcard

      1. Determine the sdcard device name : sudo df -h
      2. sudo umount /dev/sdd*
      3. sudo dd if=/<path>/u-boot.imx of=/dev/sdd bs=512 seek=2

          II. Partitionating the sdcard

    • sudo fdisk /dev/sdd
      • o
      • n
      • p
      • 1
      • 2048
      • +1G
      • t
      • c
      • n
      • p
      • 2
      • 12288
      • +5G
      •   P
    • sudo mkfs.vfat -n KERNEL /dev/sdd1
    • sudo mkfs.ext3 -L RFS /dev/sdd2
    • cd /media/
    • sudo mkdir KERNEL
    • sudo mkdir RFS
    • sudo mount /dev/sdd1 KERNEL/
    • v. sudo mount /dev/sdd2 RFS/

         |||. Download a RFS and put on the sdcard

IV. Setup the u-boot:

    • run loadimage
    • run loadfdt
    • setenv bootargs console=ttymxc0,115200 root=/dev/mmcblk0p2 rootwait rw
    • bootz ${loadaddr} - ${fdt_addr}

Kernel devices

Realise a kernel device controlled from user space. The following steps will be done on the virtual machine.

NEEDED: Get the Virtual Box softwarte:  https://www.virtualbox.org/wiki/Downloads

  1. Realize a kernel device which prints “Hello World” starting from you’re the attached code.

   a . First determine the kernel version from target platform:

    • uname –a
    • Get the kernel sources or kernel headers using one of the following methods. On the current virtual machine this step is already done.
      • For kernel headers: sudo apt-get install linux-headers-$(uname -r)
      • For kernel sources:
        • sudo apt-get install linux-source

   b. Now go to the directory tasks/kernel. Create a function void hello() which prints “Hello World”.  It should be called when the device is inserted.

   c.  Compile the module : make

   d.  Insert the module on the virtual machine : insmod lec_cdev.ko

   e.  See if the module  is inserted

    • lsmod
    • dmesg

   f. Remove the kernel module :  rmmod lec_cdev.ko

   2. Create the device lec_cdev using  mknod  /dev/lec_cdev c 243 0

   3. Implement the read function of the device in order to have the following effect:

  1. cat /dev/lec_cdev =>  print to infinit “a”
  2. Modify the previous module in order to be commanded using ioctl from userspace.
    1. In function lec_cdev_ioctl  detect the command sent  from userspace and

If command is

  • MY_IOCTL_HELLO prints “HELLO WORLD”;
  • MY_IOCTL_SET_BUFFER – prints the buffer received from userspace.
  • MY_IOCTL_GET_BUFFER – prints the data from the char device driver buffer
        HINT: use functions 
* copy_to_user(user_buffer, kernel_buffer, size)
* copy_from_user(kernel_buffer, user_buffer , size)
 
标签 (1)
%3CLINGO-SUB%20id%3D%22lingo-sub-1113069%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ELinux%E5%86%85%E6%A0%B8%E7%BC%96%E7%A8%8B%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1113069%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3Dutf-8%22%20%2F%26gt%3B%0A%3CP%20align%3D%22center%22%20style%3D%22text-align%3A%20center%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%2014pt%3B%22%3E%3CSTRONG%3ELinux%E5%86%85%E6%A0%B8%E5%BC%80%E5%8F%91%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EU-boot%E5%92%8C%E5%86%85%E6%A0%B8%E7%BC%96%E8%AF%91%20%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3COL%20style%3D%22list-style-type%3A%20decimal%3B%22%3E%3CLI%3E%E4%B8%BA%E6%82%A8%E7%9A%84%E5%B9%B3%E5%8F%B0%E8%8E%B7%E5%8F%96%E6%AD%A3%E7%A1%AE%E7%9A%84%E5%B7%A5%E5%85%B7%E9%93%BE%E3%80%82%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20a.%20Ubuntu%3A%20%3CSTRONG%3Esudo%20apt-get%20install%20gcc-arm-linux-gnueabi%2F%3CSTRONG%3Egcc-arm-linux-gnueabihf%3C%2FSTRONG%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%20style%3D%22margin-left%3A%201.0in%3B%22%3E%3CSTRONG%3E%E6%88%96%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSTRONG%3Eb.%E4%BB%8E%20linaro.org%20%E8%8E%B7%E5%8F%96%3CSTRONG%3E%EF%BC%9A%3C%2FSTRONG%3E%3CCODE%20translate%3D%22no%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.5pt%3B%22%3E%3CSTRONG%3E%3CSPAN%3Ewget%20-c%20%3C%2FSPAN%3E%3CA%20class%3D%22jive-link-external-small%22%20href%3D%22https%3A%2F%2Freleases.linaro.org%2F14.04%2Fcomponents%2Ftoolchain%2Fbinaries%2Fgcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux.tar.xz%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Freleases.linaro.org%2F14.04%2Fcomponents%2Ftoolchain%2Fbinaries%2Fgcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux.tar.xz%3C%2FA%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FP%3E%3CP%3E2.%E8%8E%B7%E5%8F%96U-boot%E4%BB%A3%E7%A0%81%E6%BA%90%3C%2FP%3E%3COL%20style%3D%22list-style-type%3A%20lower-alpha%3B%22%3E%3COL%20style%3D%22list-style-type%3A%20lower-alpha%3B%22%3E%3CLI%3Egit%20clone%20%3CA%20href%3D%22http%3A%2F%2Fgit.denx.de%2Fu-boot-imx.git%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3E%3CSPAN%20style%3D%22font-size%3A%2010pt%3B%20font-family%3A%20Arial%2C%20sans-serif%3B%20background%3A%20white%3B%22%3E%3C%2FSPAN%3E%3C%2FA%3E%3CA%20href%3D%22http%3A%2F%2Fgit.denx.de%2Fu-boot-imx.git%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22test_blank%22%3Ehttp%3A%2F%2Fgit.denx.de%2Fu-boot-imx.git%3C%2FA%3E%3C%2FLI%3E%3CLI%3E%E4%BD%BF%20ARCH%3Darm%20CROSS_COMPILE%3Darm-linux-gnueabi-wandboard_quad_config%3C%2FLI%3E%3CLI%3E%E4%BD%BF%20ARCH%3Darm%20CROSS_COMPILE%3Darm-linux-gnueabi-%3C%2FLI%3E%3C%2FOL%3E%3C%2FOL%3E%3CP%3E%3C%2FP%3E%3CP%3E3.%E8%8E%B7%E5%8F%96%E6%94%AF%E6%8C%81%20Wandboard%20%E7%9A%84%E5%86%85%E6%A0%B8%E6%BA%90%E4%BB%A3%E7%A0%81%3C%2FP%3E%3COL%20style%3D%22list-style-type%3A%20decimal%3B%22%3E%3COL%20style%3D%22list-style-type%3A%20lower-alpha%3B%22%3E%3CLI%3EWandboard%20repo%3A%3COL%20style%3D%22list-style-type%3A%20lower-roman%3B%22%3E%3CLI%3E%3CSTRONG%3Egit%20%E5%85%8B%E9%9A%86%3C%2FSTRONG%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fwandboard-org%2Flinux.git%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3E%3CSTRONG%3E%3C%2FSTRONG%3E%3C%2FA%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fwandboard-org%2Flinux.git%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22test_blank%22%3Ehttps%3A%2F%2Fgithub.com%2Fwandboard-org%2Flinux.git%3C%2FA%3E%3C%2FLI%3E%3CLI%3E%E9%80%89%E6%8B%A9%E6%AD%A3%E7%A1%AE%E7%9A%84%E5%88%86%E6%94%AF%EF%BC%9A%3C%2FLI%3E%3CLI%3E%3CSTRONG%3Egit%20checkout%20wandboard_imx_3.10.17_1.0.0_beta%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2FSTRONG%3E%3C%2FLI%3E%3C%2FOL%3E%3C%2FLI%3E%3C%2FOL%3E%3C%2FOL%3E%3CP%3E%3CSTRONG%3E%E6%88%96%E8%80%85%20%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20git%20checkout%20wandboard_imx_3.0.35_4.1.0%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3Eb.%E5%86%85%E6%A0%B8%E9%85%8D%E7%BD%AE%3CSTRONG%3E%EF%BC%88%E5%8A%A0%E8%BD%BD%E9%AD%94%E6%9D%96%E6%9D%BF%E9%85%8D%E7%BD%AE%EF%BC%89%3C%2FSTRONG%3E%3C%2FP%3E%3CP%20style%3D%22margin-left%3A%20.25in%3B%22%3E%3CSTRONG%3E%E4%BD%BF%20ARCH%3Darm%20CROSS_COMPILE%3Darm-linux-gnueabi-wandboard_defconfig%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%E6%88%96%E8%80%85%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%E4%BD%BF%20ARCH%3Darm%20CROSS_COMPILE%3Darm-linux-gnueabi-menuconfig%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3Ec.%E5%86%85%E6%A0%B8%E7%BC%96%E8%AF%91%3C%2FP%3E%3CP%20style%3D%22margin-left%3A%201.0in%3B%22%3E%3CSTRONG%3E%E4%BD%BF%20ARCH%3Darm%20CROSS_COMPILE%3Darm-linux-gnueabi-%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E4.%E5%87%86%E5%A4%87%20SD%20%E5%8D%A1%EF%BC%9A%3C%2FP%3E%3CP%3E%E4%B8%80%E3%80%81%3CSTRONG%3E%E5%B0%86u-boot%E5%A4%8D%E5%88%B6%E5%88%B0sdcard%E4%B8%8A%3C%2FSTRONG%3E%3C%2FP%3E%3COL%20style%3D%22list-style-type%3A%20decimal%3B%22%3E%3COL%20style%3D%22list-style-type%3A%20decimal%3B%22%3E%3COL%20style%3D%22list-style-type%3A%20lower-alpha%3B%22%3E%3CLI%3E%E7%A1%AE%E5%AE%9A%20SD%20%E5%8D%A1%E8%AE%BE%E5%A4%87%E5%90%8D%E7%A7%B0%EF%BC%9Asudo%20df%20-h%3C%2FLI%3E%3CLI%3Esudo%20%E5%8D%B8%E8%BD%BD%20%2Fdev%2Fsdd*%3C%2FLI%3E%3CLI%3Esudo%20dd%20if%3D%2F%3CPATH%3E%20%2Fu-boot.imx%20of%3D%2Fdev%2Fsdd%20bs%3D512%20seek%3D2%3C%2FPATH%3E%3C%2FLI%3E%3C%2FOL%3E%3C%2FOL%3E%3C%2FOL%3E%3CP%3E%E4%BA%8C.%3CSTRONG%3E%E5%AF%B9%20SD%20%E5%8D%A1%E8%BF%9B%E8%A1%8C%E5%88%86%E5%8C%BA%3C%2FSTRONG%3E%3C%2FP%3E%3CUL%3E%3CUL%3E%3CLI%3Esudo%20fdisk%20%2Fdev%2Fsdd%3CUL%3E%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%2010pt%3B%20line-height%3A%201.5em%3B%22%3Eo%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%2010pt%3B%20line-height%3A%201.5em%3B%22%3En%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%2010pt%3B%20line-height%3A%201.5em%3B%22%3Ep%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%2010pt%3B%20line-height%3A%201.5em%3B%22%3E1%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%2010pt%3B%20line-height%3A%201.5em%3B%22%3E2048%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%2010pt%3B%20line-height%3A%201.5em%3B%22%3E%2B1G%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%2010pt%3B%20line-height%3A%201.5em%3B%22%3Et%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%2010pt%3B%20line-height%3A%201.5em%3B%22%3Ec%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%2010pt%3B%20line-height%3A%201.5em%3B%22%3En%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%2010pt%3B%20line-height%3A%201.5em%3B%22%3Ep%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%2010pt%3B%20line-height%3A%201.5em%3B%22%3E2%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%2010pt%3B%20line-height%3A%201.5em%3B%22%3E12288%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%2010pt%3B%20line-height%3A%201.5em%3B%22%3E%2B5G%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%2010pt%3B%20line-height%3A%201.5em%3B%22%3E%E7%A3%B7%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3CLI%3Esudo%20mkfs.vfat%20-n%20KERNEL%20%2Fdev%2Fsdd1%3C%2FLI%3E%3CLI%3Esudo%20mkfs.ext3%20-L%20RFS%20%2Fdev%2Fsdd2%3C%2FLI%3E%3CLI%3Ecd%20%2F%E5%AA%92%E4%BD%93%2F%3C%2FLI%3E%3CLI%3Esudo%20mkdir%20KERNEL%3C%2FLI%3E%3CLI%3Esudo%20mkdir%20RFS%3C%2FLI%3E%3CLI%3Esudo%20mount%20%2Fdev%2Fsdd1%20%E5%86%85%E6%A0%B8%2F%3C%2FLI%3E%3CLI%3Ev.%20sudo%20mount%20%2Fdev%2Fsdd2%20RFS%2F%3C%2FLI%3E%3C%2FUL%3E%3C%2FUL%3E%3CP%3E%3CSTRONG%3E%7C%7C%7C%E3%80%82%E4%B8%8B%E8%BD%BD%20RFS%20%E5%B9%B6%E6%94%BE%E5%9C%A8%20SD%20%E5%8D%A1%E4%B8%8A%3C%2FSTRONG%3E%3C%2FP%3E%3CUL%3E%3CUL%3E%3CLI%3E%3CSTRONG%3E%3CCODE%20translate%3D%22no%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.5pt%3B%22%3Ewget%20-c%20%3C%2FSPAN%3E%3C%2FCODE%3E%3C%2FSTRONG%3E%3CA%20href%3D%22https%3A%2F%2Frcn-ee.net%2Fdeb%2Fminfs%2Fwheezy%2Fdebian-7.5-minimal-armhf-2014-07-07.tar.xz%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3E%3CSPAN%20style%3D%22font-size%3A%2010.5pt%3B%20font-family%3A%20'Courier%20New'%3B%22%3E%3CSTRONG%3E%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FA%3E%20%3CA%20href%3D%22https%3A%2F%2Frcn-ee.net%2Fdeb%2Fminfs%2Fwheezy%2Fdebian-7.5-minimal-armhf-2014-07-07.tar.xz%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22test_blank%22%3Ehttps%3A%2F%2Frcn-ee.net%2Fdeb%2Fminfs%2Fwheezy%2Fdebian-7.5-minimal-armhf-2014-07-07.tar.xz%3C%2FA%3E%3C%2FLI%3E%3CLI%3Esudo%20tar%20-xvf%20debian-7.5-minimal-armhf-2014-07-07.tar.xz-C%20RFS%2F%3C%2FLI%3E%3CLI%3E%E5%B0%86%20dtb%20%E6%96%87%E4%BB%B6%E5%92%8C%20zImage%20%E6%94%BE%E5%9C%A8%20sdcard%EF%BC%88KERNEL%20%E5%88%86%E5%8C%BA%EF%BC%89%E4%B8%8A%E3%80%82%3C%2FLI%3E%3CLI%3Esudo%20cp%3CKERNEL_PATH%3E%20%2Farch%2Farm%2Fboot%2FuImage%20%2Fmedia%2FKERNEL%3C%2FKERNEL_PATH%3E%3C%2FLI%3E%3CLI%3Esudo%20cp%20%3CKERNEL_PATH%3E%2Farch%2Farm%2Fboot%2Fimx6q_wandboard.dtb%20%2Fmedia%2FKERNEL%3C%2FKERNEL_PATH%3E%3C%2FLI%3E%3C%2FUL%3E%3C%2FUL%3E%3CP%3E%3C%2FP%3E%3CP%20style%3D%22padding-left%3A%2030px%3B%22%3E%3CSTRONG%3EIV.%20%E8%AE%BE%E7%BD%AE%20u-boot%EF%BC%9A%3C%2FSTRONG%3E%3C%2FP%3E%3CUL%3E%3CUL%3E%3CLI%3E%E8%BF%90%E8%A1%8C%20loadimage%3C%2FLI%3E%3CLI%3E%E8%BF%90%E8%A1%8C%20loadfdt%3C%2FLI%3E%3CLI%3Esetenv%20bootargs%E6%8E%A7%E5%88%B6%E5%8F%B0%3Dttymxc0%2C115200%20root%3D%2Fdev%2Fmmcblk0p2%20rootwait%20rw%3C%2FLI%3E%3CLI%3Ebootz%20%24%7Bloadaddr%7D%20-%20%24%7Bfdt_addr%7D%3C%2FLI%3E%3C%2FUL%3E%3C%2FUL%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%E5%86%85%E6%A0%B8%E8%AE%BE%E5%A4%87%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%E5%AE%9E%E7%8E%B0%E4%B8%80%E4%B8%AA%E7%94%B1%E7%94%A8%E6%88%B7%E7%A9%BA%E9%97%B4%E6%8E%A7%E5%88%B6%E7%9A%84%E5%86%85%E6%A0%B8%E8%AE%BE%E5%A4%87%E3%80%82%E4%BB%A5%E4%B8%8B%E6%AD%A5%E9%AA%A4%E5%B0%86%E5%9C%A8%E8%99%9A%E6%8B%9F%E6%9C%BA%E4%B8%8A%E5%AE%8C%E6%88%90%E3%80%82%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CSPAN%3E%E9%9C%80%E8%A6%81%EF%BC%9A%E8%8E%B7%E5%8F%96%20Virtual%20Box%20%E8%BD%AF%E4%BB%B6%EF%BC%9A%3C%2FSPAN%3E%20%3CA%20class%3D%22jive-link-external-small%22%20href%3D%22https%3A%2F%2Fwww.virtualbox.org%2Fwiki%2FDownloads%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fwww.virtualbox.org%2Fwiki%2FDownloads%3C%2FA%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3COL%20style%3D%22list-style-type%3A%20decimal%3B%22%3E%3CLI%3E%E4%BB%8E%E6%89%80%E9%99%84%E4%BB%A3%E7%A0%81%E5%BC%80%E5%A7%8B%E5%AE%9E%E7%8E%B0%E4%B8%80%E4%B8%AA%E6%89%93%E5%8D%B0%E2%80%9CHello%20World%E2%80%9D%E7%9A%84%E5%86%85%E6%A0%B8%E8%AE%BE%E5%A4%87%E3%80%82%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%E4%B8%80%E4%B8%AA%E3%80%82%E9%A6%96%E5%85%88%E7%A1%AE%E5%AE%9A%E7%9B%AE%E6%A0%87%E5%B9%B3%E5%8F%B0%E7%9A%84%E5%86%85%E6%A0%B8%E7%89%88%E6%9C%AC%EF%BC%9A%3C%2FP%3E%3CUL%20style%3D%22list-style-type%3A%20disc%3B%22%3E%3CUL%20style%3D%22list-style-type%3A%20circle%3B%22%3E%3CLI%3Euname%20%E2%80%93a%3C%2FLI%3E%3CLI%3E%3CSTRONG%3E%E4%BD%BF%E7%94%A8%E4%B8%8B%E5%88%97%E6%96%B9%E6%B3%95%E4%B9%8B%E4%B8%80%3C%2FSTRONG%3E%E8%8E%B7%E5%8F%96%E5%86%85%E6%A0%B8%E6%BA%90%E4%BB%A3%E7%A0%81%E6%88%96%E5%86%85%E6%A0%B8%E5%A4%B4%E6%96%87%E4%BB%B6%E3%80%82%3CSPAN%20style%3D%22color%3A%20red%3B%22%3E%E5%9C%A8%E5%BD%93%E5%89%8D%E8%99%9A%E6%8B%9F%E6%9C%BA%E4%B8%8A%E6%AD%A4%E6%AD%A5%E9%AA%A4%E5%B7%B2%E7%BB%8F%E5%AE%8C%E6%88%90%3C%2FSPAN%3E%E3%80%82%3CUL%20style%3D%22list-style-type%3A%20disc%3B%22%3E%3CLI%3E%E5%AF%B9%E4%BA%8E%E5%86%85%E6%A0%B8%E5%A4%B4%E6%96%87%E4%BB%B6%EF%BC%9A%20%3CSTRONG%3Esudo%20apt-get%20install%20linux-headers-%24(uname%20-r)%3C%2FSTRONG%3E%3C%2FLI%3E%3CLI%3E%E5%AF%B9%E4%BA%8E%E5%86%85%E6%A0%B8%E6%BA%90%E4%BB%A3%E7%A0%81%EF%BC%9A%3CUL%3E%3CLI%3E%3CSTRONG%3Esudo%20apt-get%20%E5%AE%89%E8%A3%85%20linux-source%3C%2FSTRONG%3E%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3C%2FUL%3E%3C%2FUL%3E%3CP%3Eb.%E7%8E%B0%E5%9C%A8%E8%BD%AC%E5%88%B0%E7%9B%AE%E5%BD%95%3CSTRONG%3Etasks%2Fkernel%E3%80%82%3C%2FSTRONG%3E%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AA%E5%87%BD%E6%95%B0%20void%20hello()%EF%BC%8C%E6%89%93%E5%8D%B0%E2%80%9CHello%20World%E2%80%9D%E3%80%82%E5%BD%93%E8%AE%BE%E5%A4%87%E6%8F%92%E5%85%A5%E6%97%B6%E5%BA%94%E8%AF%A5%E8%B0%83%E7%94%A8%E5%AE%83%E3%80%82%3C%2FP%3E%3CP%3Ec.%E7%BC%96%E8%AF%91%E6%A8%A1%E5%9D%97%EF%BC%9Amake%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010pt%3B%20line-height%3A%201.5em%3B%22%3Ed.%E5%9C%A8%E8%99%9A%E6%8B%9F%E6%9C%BA%E4%B8%8A%E6%8F%92%E5%85%A5%E6%A8%A1%E5%9D%97%EF%BC%9Ainsmod%20lec_cdev.ko%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%E4%BE%8B%E5%A6%82%E6%9F%A5%E7%9C%8B%E6%A8%A1%E5%9D%97%E6%98%AF%E5%90%A6%E6%8F%92%E5%85%A5%3C%2FP%3E%3CUL%20style%3D%22list-style-type%3A%20disc%3B%22%3E%3CUL%3E%3CLI%3Elsmod%3C%2FLI%3E%3CLI%3Edmesg%3C%2FLI%3E%3C%2FUL%3E%3C%2FUL%3E%3CP%3E%3C%2FP%3E%3CP%3Ef.%E5%88%A0%E9%99%A4%E5%86%85%E6%A0%B8%E6%A8%A1%E5%9D%97%EF%BC%9Armmod%20lec_cdev.ko%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E2.%E4%BD%BF%E7%94%A8%20mknod%20%2Fdev%2Flec_cdev%20c%20243%200%20%E5%88%9B%E5%BB%BA%E8%AE%BE%E5%A4%87%20lec_cdev%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E3.%E5%AE%9E%E7%8E%B0%E8%AE%BE%E5%A4%87%E7%9A%84%E8%AF%BB%E5%8F%96%E5%8A%9F%E8%83%BD%EF%BC%8C%E4%BB%A5%E4%BE%BF%E8%BE%BE%E5%88%B0%E4%BB%A5%E4%B8%8B%E6%95%88%E6%9E%9C%EF%BC%9A%3C%2FP%3E%3COL%20style%3D%22list-style-type%3A%20lower-alpha%3B%22%3E%3CLI%3Ecat%20%2Fdev%2Flec_cdev%20%3D%26gt%3B%20%E6%89%93%E5%8D%B0%E5%88%B0%E6%97%A0%E9%99%90%E2%80%9Ca%E2%80%9D%3C%2FLI%3E%3CLI%3E%E4%BF%AE%E6%94%B9%E4%BB%A5%E5%89%8D%E7%9A%84%E6%A8%A1%E5%9D%97%E4%BB%A5%E4%BE%BF%E4%BB%8E%E7%94%A8%E6%88%B7%E7%A9%BA%E9%97%B4%E4%BD%BF%E7%94%A8%20ioctl%20%E8%BF%9B%E8%A1%8C%E5%91%BD%E4%BB%A4%E3%80%82%3COL%20style%3D%22list-style-type%3A%20lower-alpha%3B%22%3E%3CLI%3E%E5%9C%A8%E5%87%BD%E6%95%B0%3CSTRONG%3Elec_cdev_ioctl%3C%2FSTRONG%3E%E4%B8%AD%E6%A3%80%E6%B5%8B%E4%BB%8E%E7%94%A8%E6%88%B7%E7%A9%BA%E9%97%B4%E5%8F%91%E9%80%81%E7%9A%84%E5%91%BD%E4%BB%A4%EF%BC%8C%E5%B9%B6%3C%2FLI%3E%3C%2FOL%3E%3C%2FLI%3E%3C%2FOL%3E%3CP%20style%3D%22margin-left%3A%201.75in%3B%20text-align%3A%20justify%3B%22%3E%E5%A6%82%E6%9E%9C%E5%91%BD%E4%BB%A4%E6%98%AF%3C%2FP%3E%3CUL%20style%3D%22list-style-type%3A%20disc%3B%22%3E%3CLI%3EMY_IOCTL_HELLO%20%E6%89%93%E5%8D%B0%E2%80%9CHELLO%20WORLD%E2%80%9D%EF%BC%9B%3C%2FLI%3E%3CLI%3EMY_IOCTL_SET_BUFFER%20%E2%80%93%20%E6%89%93%E5%8D%B0%E4%BB%8E%E7%94%A8%E6%88%B7%E7%A9%BA%E9%97%B4%E6%8E%A5%E6%94%B6%E7%9A%84%E7%BC%93%E5%86%B2%E5%8C%BA%E3%80%82%3C%2FLI%3E%3CLI%3EMY_IOCTL_GET_BUFFER%20%E2%80%93%20%E6%89%93%E5%8D%B0%E5%AD%97%E7%AC%A6%E8%AE%BE%E5%A4%87%E9%A9%B1%E5%8A%A8%E7%A8%8B%E5%BA%8F%E7%BC%93%E5%86%B2%E5%8C%BA%E4%B8%AD%E7%9A%84%E6%95%B0%E6%8D%AE%3C%2FLI%3E%3C%2FUL%3E%3CPRE%20style%3D%22text-align%3A%20justify%3B%20background%3A%20%23F7F9FA%3B%20padding%3A%206.0pt%206.0pt%206.0pt%206.0pt%3B%22%3E%3CSTRONG%3E%E6%8F%90%E7%A4%BA%3C%2FSTRONG%3E%EF%BC%9A%E4%BD%BF%E7%94%A8%E5%87%BD%E6%95%B0%20%3C%2FPRE%3E%3CPRE%20style%3D%22text-align%3A%20justify%3B%20background%3A%20%23F7F9FA%3B%20padding%3A%206.0pt%206.0pt%206.0pt%206.0pt%3B%22%3E*%20%3CSPAN%20style%3D%22color%3A%20%23333333%3B%22%3Ecopy_to_user%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%2366cc66%3B%22%3E%EF%BC%88%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23333333%3B%22%3E%E7%94%A8%E6%88%B7%E7%BC%93%E5%86%B2%E5%8C%BA%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2366cc66%3B%22%3E%EF%BC%8C%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23333333%3B%22%3E%E5%86%85%E6%A0%B8%E7%BC%93%E5%86%B2%E5%8C%BA%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2366cc66%3B%22%3E%EF%BC%8C%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23333333%3B%22%3E%E5%A4%A7%E5%B0%8F%EF%BC%89%3C%2FSPAN%3E%3C%2FPRE%3E%3CPRE%20style%3D%22text-align%3A%20justify%3B%20background%3A%20%23F7F9FA%3B%20padding%3A%206.0pt%206.0pt%206.0pt%206.0pt%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23333333%3B%22%3E*%20copy_from_user%3C%2FSPAN%3E%20%3CSPAN%20style%3D%22color%3A%20%2366cc66%3B%22%3E%EF%BC%88%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23333333%3B%22%3E%E5%86%85%E6%A0%B8%E7%BC%93%E5%86%B2%E5%8C%BA%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2366cc66%3B%22%3E%EF%BC%8C%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23333333%3B%22%3E%E7%94%A8%E6%88%B7%E7%BC%93%E5%86%B2%E5%8C%BA%EF%BC%8C%E5%A4%A7%E5%B0%8F%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%2366cc66%3B%22%3E%EF%BC%89%3C%2FSPAN%3E%3C%2FPRE%3E%3CPRE%20style%3D%22text-align%3A%20justify%3B%20background%3A%20%23F7F9FA%3B%20padding%3A%206.0pt%206.0pt%206.0pt%206.0pt%3B%22%3E%20%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1113069%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3E2014%E5%B9%B4Linux%E5%B5%8C%E5%85%A5%E5%BC%8F%E6%8C%91%E6%88%98%E8%B5%9B%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
无评分
版本历史
最后更新:
‎09-10-2020 02:20 AM
更新人: