Linux内核文件的查找和修改

使用的是ubuntu14.04系统,采用VMware虚拟机安装的。

从内核稍作修改的内容看起,联想到的,以后可能需要自己修改某些内核的代码来匹配硬件。

虚拟机的内核文件位置:/usr/src/linux-headers-4.2.0-27-generic/kernel/

现在使用的是海思3519和3516A的系统,用以做视频监控。

原文的连接如下:点击打开链接(3519下的内核稍作修改)

现在找找3516A开发板的内核位置,文件系统已经存在,但是打开文件系统是找不到内核的,内核文件在开发板给的资料中,

xxx@ubuntu14:~/project_Hi3519/linux-3.18.y/arch/arm/boot/dts$ 

内核文件就在改目录下,按照链接也能找到文件,但是具体内容不太一样。

不过想要以后查看内核的话文件都在这里。

链接中所说的文件内如下:

---------------------------------------------------------------------------------------------------------------------------------------------------------------------

Kernel:
修改文件:
arch/arm/boot/dts/hisi-hi3519v101-hmp-demb.dts

                   &higmac {
         compatible = "hisilicon,higmac-v3", "hisilicon,higmac";
         phy-handle = <ðphy>;
         phy-mode = "rgmii";
};

----------------------------------------------------------------------------------------------------------------------------------------------------------------------

 * Copyright (c) 2013-2014 Linaro Ltd.
 * Copyright (c) 2015 HiSilicon Technologies Co., Ltd.
 *
 * This program is free software; you can redistribute  it and/or modify it
 * under  the terms of  the GNU General  Public License as published by the
 * Free Software Foundation;  either version 2 of the  License, or (at your
 * option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 *
 */


/dts-v1/;
#include "hisi-hi3519.dtsi"


/ {
        model = "Hisilicon HI3519 DEMO Board";
        compatible = "hisilicon,hi3519";


        chosen {
                bootargs = "console=ttyAMA0,115200 early_printk
root=/dev/mtdblock2 rootfstype=jffs2 mtdparts=hi_sfc:1M(boot),
4M(kernel),11M(rootfs)";
        };


        cpus {
                #address-cells = <1>;
                #size-cells = <0>;
                enable-method = "hisilicon,hi3519-smp";


                cpu@0 {
                        compatible = "arm,cortex-a7";
                        device_type = "cpu";
                        clock-frequency = ;
                        reg = <0>;
                        cci-control-port = <&cci_control0>;
                };


                cpu@100 {
                        compatible = "arm,cortex-a17";
                        device_type = "cpu";
                        clock-frequency = ;
                        reg = <0x100>;
                        cci-control-port = <&cci_control1>;
                };
        };


        memory {
                device_type = "memory";
                reg = <0x80000000 0x40000000>;
        };
};


&uart0 {
        status = "okay";
};
&dual_timer0 {
        status = "okay";
};


你可能感兴趣的:(Linux)