• 快速去掉不用的linux kernel模块


    快速去掉不用的linux kernel模块

    由于要满足尽量多的客户需求,Xilinx的默认linux kernel的配置,包含了尽可能多的常用模块。实际嵌入式产品中,很多模块用不到。

    如果在linux kernel的编译目录,搜索所有目标(.o)文件,就能发现那些模块被编译到linux kernel中。对于不用的模块,可以配置linux kernel,去掉它们。

    PetaLinux工程,修改linux kernel的配置后,保存在文件project-spec/meta-user/recipes-kernel/linux/bsp.cfg里。

    /zcu106-bsp-kernel-cfg-peta/project-spec/meta-user/recipes-kernel/linux$ tree -L  2
        linux-xlnx
                bsp.cfg
            linux-xlnx_%.bbappend
    

    如果想快速去掉不用的模块,可以在文件project-spec/meta-user/recipes-kernel/linux/bsp.cfg里,添加如下内容,去掉不用的无线网络、虚拟化模块等。注意,请检查下面的项目,确保你的产品不会用到。如果要用到某些项目,请从bsp.cfg里中删除。

    # CONFIG_EFI is not set
    # CONFIG_BT is not set
    # CONFIG_CFG80211 is not set
    # CONFIG_RFKILL is not set
    # CONFIG_NET_9P is not set
    # CONFIG_MTD_RAW_NAND is not set
    # CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set
    # CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set
    # CONFIG_MEDIA_RADIO_SUPPORT is not set
    # CONFIG_MEDIA_SDR_SUPPORT is not set
    # CONFIG_MEDIA_PLATFORM_SUPPORT is not set
    # CONFIG_MEDIA_TEST_SUPPORT is not set
    # CONFIG_IOMMU_SUPPORT is not set
    # CONFIG_IIO is not set
    # CONFIG_EXT3_FS is not set
    # CONFIG_BTRFS_FS is not set
    # CONFIG_OVERLAY_FS is not set
    # CONFIG_ECRYPT_FS is not set
    # CONFIG_JFFS2_FS is not set
    # CONFIG_UBIFS_FS is not set
    # CONFIG_CRAMFS is not set
    # CONFIG_NETWORK_FILESYSTEMS is not set
    # CONFIG_PARAVIRT is not set
    # CONFIG_NET_IP_TUNNEL is not set
    # CONFIG_IPV6 is not set
    # CONFIG_NETFILTER is not set
    # CONFIG_OPENVSWITCH is not set
    # CONFIG_MPLS is not set
    # CONFIG_NET_NSH is not set
    # CONFIG_CGROUPS is not set
    # CONFIG_XEN is not set
    # CONFIG_NAMESPACES is not set
    

    如果产品中不使用声音,还可以增加下面两行,去掉声音模块。

    # CONFIG_SND is not set
    # CONFIG_SOUND is not set
    

    测试版本: 2021.2

  • 相关阅读:
    静态数组和动态数组
    C#实现两个时间相减的方法
    360安全卫士为什么无法登录用户,显示网络失败,请检查网络,可是网络连接正常。
    WPS Word查询某些内容的出现次数
    安装安全狗后,MP4无法播放
    图片上传Security Error
    JS 构造图片Image对象
    c#截取图片
    VS2013快捷键
    WPS之替换样式
  • 原文地址:https://www.cnblogs.com/hankfu/p/15668676.html
Copyright © 2020-2023  润新知