码迷,mamicode.com
首页 > 其他好文 > 详细

Add a new module at fortuna source code.

时间:2018-06-08 19:23:26      阅读:199      评论:0      收藏:0      [点我收藏+]

标签:rom   roo   rip   sbin   sdk   image   system   boot   different   

This article describes how to add a new module at the fortuna source code.

 

  1. Change the makefile file at the topdir directory to add a new module compile option :

    技术分享图片

    model variable describe the new module name(eg M2400), zebos variable describe the zebos version which the new module used.

     

  2. Add the board/M2400/kernel directory and following files:

    技术分享图片

    Default.dts : describe the device tree which need to be loaded when the kernel boot up, include cpu, i2c, gpio, clock,when we add the new module, we need change this file。

     

    Defconfig : kernel default config file。

 

Ds_rules.make : the rule file for kernel, describe the cross compile options, include the build path, core jobs ..,when add the new module, need change this file.

 

  1. Add the board/M2400/kernel directory and following files:

    技术分享图片

     

    Binary : when make the rootfs file system ,the makefile will copy the bin/sbin, scripts file from this directory, when add/delete a new command, we should change this directory.

     

    Rule402_MPLS.make : the rule.make file for zebos, the zebos related feature options is controlled at this file.

     

    Default_Rule.make : the rule.make file for ramdisk, the ramdisk compile option is controlled at this file.

     

    Makefile :mainly defined how to install the file when make the rootfs.

     

  2. Add the board/M2400/Rule.make,this file describe which directory is needed to be compile at the topdir:

    技术分享图片

     

    Add board/M2400/ Makefile.switchconfig, this file descript the switch feature options.(ignore this step.)

     

    Add board/M2400/ Makefile.config, this file describe the check options before make config-ramdisk, mainly build some soft links for kernel, zebos, and cpu arch. When add a new module, we should change like below to build soft link for zebos rule.make.

    技术分享图片

     

  3. Add M2400/bcmsdk directory and following files:

    技术分享图片

     

    Makefile.config: this file describe the version and environment for sdk compile,different module need change this part。

    技术分享图片

     

    Other files is sdk makefile and config file copied from related sdk.

     

  4. Under the kernel/drivers/dslib directory, include some peripheral device control method, when add a new module, we should search M2400_SFU_ID at this directory and add related new module.

    技术分享图片

     

  5. Add M2400_peripheral.c file, the file is drive for slot part.:

    技术分享图片

     

  6. Add port map file for new module:

    技术分享图片

Add a new module at fortuna source code.

标签:rom   roo   rip   sbin   sdk   image   system   boot   different   

原文地址:https://www.cnblogs.com/3me-linux/p/9157089.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!