Add a new module at fortuna source code.
This article describes how to add a new module at the fortuna source code.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- Add M2400_peripheral.c file, the file is drive for slot part.:
- Add port map file for new module:
Add a new module at fortuna source code.