From 25ce6dba64490fec9d43c97a4207cddf684efdac Mon Sep 17 00:00:00 2001 From: Laowang-BearPi Date: Thu, 9 Jun 2022 11:29:31 +0800 Subject: [PATCH] add porting-stm32mp15xx-on-smallsystem-demo.md Signed-off-by: Laowang-BearPi --- zh-cn/device-dev/porting/Readme-CN.md | 3 +- .../figures/bearpi_hm_micro_hb_env.png | Bin 0 -> 12045 bytes .../figures/bearpi_hm_micro_hb_set.png | Bin 0 -> 4576 bytes .../porting-stm32mp15xx-on-smallsystem.md | 606 ++++++++++++++++++ 4 files changed, 608 insertions(+), 1 deletion(-) create mode 100644 zh-cn/device-dev/porting/figures/bearpi_hm_micro_hb_env.png create mode 100644 zh-cn/device-dev/porting/figures/bearpi_hm_micro_hb_set.png create mode 100644 zh-cn/device-dev/porting/porting-stm32mp15xx-on-smallsystem.md diff --git a/zh-cn/device-dev/porting/Readme-CN.md b/zh-cn/device-dev/porting/Readme-CN.md index 8bc2b0e682..ae54c69dc6 100644 --- a/zh-cn/device-dev/porting/Readme-CN.md +++ b/zh-cn/device-dev/porting/Readme-CN.md @@ -65,4 +65,5 @@ repo init -u https://gitee.com/openharmony-sig/manifest.git -b master -m devboar - [物联网解决方案之芯海cst85芯片移植案例](porting-cst85f01-combo-demo.md) - [轻量系统STM32F407芯片移植案例](porting-stm32f407-on-minisystem-eth.md) - [Combo解决方案之W800芯片移植案例](porting-w800-combo-demo.md) - +- 小型系统芯片移植案例 + - [小型设备STM32MP1芯片移植案例](porting-stm32mp15xx-on-smallsystem.md) diff --git a/zh-cn/device-dev/porting/figures/bearpi_hm_micro_hb_env.png b/zh-cn/device-dev/porting/figures/bearpi_hm_micro_hb_env.png new file mode 100644 index 0000000000000000000000000000000000000000..6b5ca398edb1586f6b6a732279765d6767254849 GIT binary patch literal 12045 zcmaia2UJtrwl<0$K@^ZGf!J^#Dbs#M(NUmAkxH$bO_lNkWN&pv?xkZnslTE zLy3Y&lOiYqA|Oo?N(d=?zl3w%eRquizV~Mg2s^B-HCL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)){iWHR{ZM)uy37btm*^~L_FdO;vwXv7-YzS$;$97<(=C{zcumIj#%FtKyBdqIGHeA zWr|EX*xh&&pRXJLc~`9FZiBu?g@ducOq-x|0FD%3RPgirv{CmpWES7LZ(uWUX z4MJ{_6jE3MUL1xDyTONeWb;XGNTCvcX^EQOZjSdwmytnj&;nQ^Q?1x$Az>z0GHf(0 zyIk=SKnq?8@mh!@7^kRljXrf;Z~~6--WzfDBysp)X3?_tm5gv=0*b|p2VbO2`3XR5 z>oujx#A%xvvi8?!`Hd1m`(3`EydO$F+wN2ZubjysliZQ73c-+s(=g;6`|B@maAsA} z{h{$pQvy|INVH@7bY1RhQ&Y`i%_NFWT)9LhaO7IEO*M%_{c$83boOH;c&SG&GiiBC zNNh*GvZ}R0@818zT?$)q-KC|^w58jzZ+9;t`385!_?Nhe1k&E=1TgmnuuG@|Vj$z) z30~t^JZysMA5VIAq&XwZIP6l!xWE2;tp$yhS*kTV)`oz@A|IaGB&;cdf9tfeG4ekG za~f^?q#Pw)gLnw@ywKE)S|>3&B5g zQqJ__2G3@V^#cuF&d1{}8#rhKDgKsQMn`$et+^&qYFGc1)CaO1790RL`EI3R_94G_ zVCa@0IdJfjGfpmgd%H}v%fX$-?68=7ISR7ttK=dd#@UI{sx#dJEXl>uP?n}+U(;)_b^&Fd q@(mwXAWu7OCdK*w`0$fjsB{ literal 0 HcmV?d00001 diff --git a/zh-cn/device-dev/porting/figures/bearpi_hm_micro_hb_set.png b/zh-cn/device-dev/porting/figures/bearpi_hm_micro_hb_set.png new file mode 100644 index 0000000000000000000000000000000000000000..e61f118b06ccf3ae04f2cc48f277fa90cc6817e3 GIT binary patch literal 4576 zcmcIn`9G9z_a9M6wiGRDlnN1*GL@RC5GtlDk!=#K)>4)*V-49p8A6t!Vl0&igOSmc zeajYRXfPvhg~pL3n}>%?8NG?m@FYcm7_ku^6n zwt_&!0MXt~YLjT4meC-Heqw%BrWYX}yH#gJg2cTG78f9p@?;r->qe0*?Q3?^4+4?< z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`(Y@wucAOB~Wzb/`目录下的`config.json`,给出可选产品编译选项,`config.json`的`product_name`用于显示产品名,`device_company`和`board`用于关联出`//device/board//`目录,并且匹配`/config.gni`文件,如果能够匹配多个文件,表示该单板适配了多个内核,那么可以根据`config.json`的`kernel_type`和`kernel_version`来唯一匹配`config.gni`的`kernel_type`和`kernel_version`,即可确定了需要编译适配了哪个内核的单板。 + + ![hb set](figures/bearpi_hm_micro_hb_set.png) + + 选择好产品后,输入回车就会在根目录下自动生成ohos_config.json文件,这里会将要编译的产品信息列出。通过`hb env`也可以查看选择出来的预编译环境变量。 + + ![hb env](figures/bearpi_hm_micro_hb_env.png) + + + +## 内核移植 + +内核移植需要完成`LiteOS-A Kconfig`适配、`gn`的编译构建和内核启动最小适配。 + +详细移植步骤参考:[LiteOS-A内核移植](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/porting/porting-smallchip-kernel-a.md) +### Kconfig适配 +1. 在//device/board/bearpi/bearpi_hm_micro/liteos_a/drivers/Kconfig中添加芯片、产品名称、厂商名称相关配置。 + ``` + source "../../device/soc/st/common/platform/Kconfig" + + config PLATFORM + string + default "stm32mp157" if PLATFORM_STM32MP157 + + config PRODUCT_NAME + string "product name" + default "bearpi_hm_micro" if PRODUCT_BEARPI_HM_MICRO + + config DEVICE_COMPANY + string "vendor name" + default "st" if PLATFORM_STM32MP157 + + config TEE_ENABLE + bool "Enable TEE" + default n + depends on PLATFORM_STM32MP157 + help + Enable teeos in platform + ``` +2. 在//device/soc/st/common/platform/Kconfig中添加驱动相关配置。 + ``` + config DRIVERS_MMC + depends on DRIVERS + bool "Enable MMC" + default y + depends on DRIVERS && FS_VFS + help + Answer Y to enable LiteOS support MMC driver. + + config DRIVERS_EMMC + depends on DRIVERS_MMC && PLATFORM_STM32MP157 + bool "Enable MMC0 support eMMC type" + + config DRIVERS_HI3881 + bool "Enable Hi3881 Host driver" + default n + depends on DRIVERS_HDF_WIFI + help + Answer Y to enable Hi3881 Host driver. + config HW_RANDOM_ENABLE + depends on DRIVERS_RANDOM + bool "Select hw random" + default y + help + Answer Y to select hw random. + ``` +3. 在//vendor/bearpi/bearpi_hm_micro/kernel_configs/debug_tee.config中使能相关配置。 + ``` + ... + LOSCFG_PLATFORM="stm32mp157" + LOSCFG_PRODUCT_NAME="bearpi_hm_micro" + LOSCFG_DEVICE_COMPANY="st" + # LOSCFG_PLATFORM_HI3516DV300 is not set + # LOSCFG_PLATFORM_HI3518EV300 is not set + # LOSCFG_PLATFORM_QEMU_ARM_VIRT_CA7 is not set + LOSCFG_PLATFORM_STM32MP157=y + LOSCFG_PRODUCT_BEARPI_HM_MICRO=y + LOSCFG_BOARD_CONFIG_PATH="device/board/bearpi/bearpi_hm_micro/liteos_a/board" + LOSCFG_TEE_ENABLE=y + ... + ``` +### gn编译适配 +1. 在//device/board/bearpi/bearpi_hm_micro/liteos_a中新建BUILD.gn,添加代码如下,此模块依赖board、drivers、hdf_config。 + ``` + cmd = "if [ -f $product_path/hdf_config/BUILD.gn ]; then echo true; else echo false; fi" + HAVE_PRODUCT_CONFIG = + exec_script("//build/lite/run_shell_cmd.py", [ cmd ], "value") + + group("liteos_a") { + deps = [ + "board", + "drivers", + ] + if (HAVE_PRODUCT_CONFIG) { + deps += [ "$product_path/hdf_config" ] + } else { + deps += [ "hdf_config" ] + } + } + + config("public") { + configs = [ + "board:public", + "drivers:public", + ] + } + ``` +2. 在//device/board/bearpi/bearpi_hm_micro/liteos_a/board中新建BUILD.gn,添加代码如下。将os_adapt.c内核启动相关代码编译进系统。 + ``` + import("//kernel/liteos_a/liteos.gni") + + module_name = "bsp_config" + + kernel_module(module_name) { + sources = [] + if (defined(LOSCFG_PLATFORM_ADAPT)) { + sources += [ "os_adapt/os_adapt.c" ] + } + } + + config("public") { + include_dirs = [ "." ] + include_dirs += [ "include" ] + include_dirs += [ "$LITEOSTOPDIR/drivers/block/disk/include" ] + include_dirs += + [ "$LITEOSTOPDIR/../../drivers/adapter/khdf/liteos/osal/include" ] + } + ``` +3. 在//device/board/bearpi/bearpi_hm_micro/liteos_a/drivers中新建BUILD.gn,添加代码如下,将device/soc/st/common/platform路径下的HDF驱动编译进系统。 + ``` + import("//drivers/adapter/khdf/liteos/hdf.gni") + + group("drivers") { + public_deps = [ "//device/soc/st/common/platform:drivers" ] + } + + config("public") { + configs = [ "//device/soc/st/common/platform:public" ] + } + + ``` +4. 在//vendor/bearpi/bearpi_hm_micro/hdf_config中新建BUILD.gn,添加代码如下,将HCS配置文件编译进系统。 + ``` + module_switch = defined(LOSCFG_DRIVERS_HDF) && !defined(LOSCFG_DRIVERS_HDF_TEST) + module_name = "libhdf_config" + hdf_driver(module_name) { + hcs_sources = [ "hdf.hcs" ] + } + + group("hdf_config") { + public_deps = [ ":$module_name" ] + deps = [ + "hdf_test", + "hdf_test/hcs_macro_test", + ] + } + ``` +### 内核启动适配 +1. 在//device/board/bearpi/bearpi_hm_micro/liteos_a/board/os_adapt.c中添加以下内核启动相关代码,详细解释参考[LiteOS-A内核移植](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/porting/porting-smallchip-kernel-a.md)。 + ``` + ... + void SystemInit(void) + { + #ifdef LOSCFG_DRIVERS_RANDOM + dprintf("dev random init ...\n"); + Mp1xxRngInit(); + #endif + #ifdef LOSCFG_DRIVERS_MEM + dprintf("mem dev init ...\n"); + extern int mem_dev_register(void); + mem_dev_register(); + #endif + + dprintf("Date:%s.\n", __DATE__); + dprintf("Time:%s.\n", __TIME__); + + #ifdef LOSCFG_DRIVERS_HDF + dprintf("DeviceManagerStart start ...\n"); + if (DeviceManagerStart()) { + PRINT_ERR("No drivers need load by hdf manager!"); + } + dprintf("DeviceManagerStart end ...\n"); + #endif + net_init(); + + #ifdef LOSCFG_PLATFORM_ROOTFS + dprintf("OsMountRootfs start ...\n"); + if (LOS_GetCmdLine()) { + dprintf("get cmdline error!\n"); + } + if (LOS_ParseBootargs()) { + dprintf("parse bootargs error!\n"); + } + if (OsMountRootfs()) { + dprintf("mount rootfs error!\n"); + } + dprintf("OsMountRootfs end ...\n"); + #endif + + dprintf("Before PLATFORM_UART ...\n"); + + #ifdef LOSCFG_DRIVERS_HDF_PLATFORM_UART + if (virtual_serial_init(TTY_DEVICE) != 0) { + PRINT_ERR("virtual_serial_init failed"); + } + if (system_console_init(SERIAL) != 0) { + PRINT_ERR("system_console_init failed\n"); + } + #endif + + dprintf("After PLATFORM_UART ...\n"); + + if (OsUserInitProcess()) { + PRINT_ERR("Create user init process failed!\n"); + return; + } + dprintf("cat log shell end\n"); + return; + } + ... + ``` + + +## 板级系统移植 + +### SoC芯片平台HDF驱动移植 + +驱动适配相关文件放置在`device/soc/st/common/platform`中,所有的驱动都是通过`HDF`机制加载,本章节以`gpio`为例进行详细说明。 + +#### GPIO驱动适配 + + +1. 在`//device/soc/st/common/platform/gpio/BUILD.gn`文件中,描述了stm32mp1xx `gpio`驱动的编译适配。如下: + + ``` + module_switch = defined(LOSCFG_DRIVERS_HDF_PLATFORM_GPIO) --- 如果打开HDF的GPIO配置开关,才进行如下编译。 + module_name = get_path_info(rebase_path("."), "name") + + hdf_driver("hdf_gpio") { + sources = [ + "stm32mp1_gpio.c", ---gpio驱动源文件。 + ] + include_dirs = [ ---依赖的.h路径。 + "." , + "../stm32mp1xx_hal/STM32MP1xx_HAL_Driver/Inc", + ] + } + ``` + +2. 在`//device/soc/st/common/platform/gpio/stm32mp1_gpio.c`文件中,描述了stm32mp1xx `gpio`驱动的源码适配。 +首先,按照`OpenHarmony`的`HDF`驱动框架加载驱动基本适配框架,如下: + + ``` + struct HdfDriverEntry g_GpioDriverEntry = { + .moduleVersion = 1, + .moduleName = "HDF_PLATFORM_GPIO", + .Bind = GpioDriverBind, + .Init = GpioDriverInit, + .Release = GpioDriverRelease, + }; + HDF_INIT(g_GpioDriverEntry); --- 通过HDF_INIT 加载GPIO驱动。 + ``` +3. 在//device/soc/st/stm32mp1xx/sdk_liteos/hdf_config/gpio中添加gpio硬件描述信息文件gpio_config.hcs,在该文件中添加驱动私有配置信息。 + ``` + root { + platform { + gpio_config { + controller_0x50002000 { + match_attr = "st_stm32mp1_gpio"; + groupNum = 11; + bitNum = 16; + gpioRegBase = 0x50002000; + gpioRegStep = 0x1000; + irqRegBase = 0x5000D000; + irqRegStep = 0x400; + } + } + } + } + ``` +4. 配置产品加载驱动,产品的所有设备信息被定义在源码文件//vendor/bearpi/bearpi_hm_micro/hdf_config/device_info/device_info.hcs中。 + + 平台驱动请添加到platform的host中。 + + > ![icon-note.gif](public_sys-resources/icon-note.gif) **说明:** + > moduleName要与驱动文件中定义的相同,deviceMatchAttr要与驱动私有配置信息文件gpio_config.hcs中定义match_attr的相同。 + + + ``` + root { + ... + platform :: host { + device_gpio :: device { + device0 :: deviceNode { + policy = 2; + priority = 10; + permission = 0644; + moduleName = "HDF_PLATFORM_GPIO_MANAGER"; + serviceName = "HDF_PLATFORM_GPIO_MANAGER"; + } + device1 :: deviceNode { + policy = 0; + priority = 10; + permission = 0644; + moduleName = "HDF_PLATFORM_GPIO"; + serviceName = "HDF_PLATFORM_GPIO"; + deviceMatchAttr = "st_stm32mp1_gpio"; + } + } + } + } + ``` +5. 完善驱动代码,gpio_config.hcs的配置信息会在GpioDriverInit中加载。 + ``` + static int32_t GpioDriverInit(struct HdfDeviceObject *device) + { + + int32_t ret; + struct Mp1xxGpioCntlr *stm32gpio = &g_Mp1xxGpioCntlr; + + dprintf("%s: Enter", __func__); + if (device == NULL || device->property == NULL) { + HDF_LOGE("%s: device or property NULL!", __func__); + return HDF_ERR_INVALID_OBJECT; + } + //获取属性数据 + ret = Mp1xxGpioReadDrs(stm32gpio, device->property); + if (ret != HDF_SUCCESS) { + HDF_LOGE("%s: get gpio device resource fail:%d", __func__, ret); + return ret; + } + ... + } + ``` + +### OpenHarmony子系统适配 + +`OpenHarmony`子系统适配只需要在`config.json`中增加对应子系统和部件,这样编译系统会将该部件纳入编译目标中。 + +#### 启动恢复子系统适配 + +启动恢复子系统需要适配`bootstrap_lite`、`syspara_lite`、`appspawn_lite`、`init_lite`四个部件。请在`vendor/bearpi/bearpi_hm_micro/config.json`中新增对应的配置选项。 + +``` + { + "subsystem": "startup", + "components": [ + { "component": "syspara_lite", "features":[] }, + { "component": "bootstrap_lite", "features":[] }, + { "component": "appspawn_lite", "features":[] }, + { "component": "init_lite", "features":[] } + ] + }, +``` +系统启动时会根据//vendor/bearpi/bearpi_hm_micro/init_configs中的启动配置来启动系统。 + + +#### DFX子系统适配 + +进行`DFX`子系统适配需要添加`hilog_featured_lite`、`hidumper_lite`部件,直接在`config.json`文件配置即可。 + +``` + { + "subsystem": "hiviewdfx", + "components": [ + { "component": "hilog_featured_lite", "features":[] }, + { "component": "hidumper_lite", "features":[] } + ] + }, +``` + +#### 系统服务管理子系统适配 + +进行系统服务管理子系统适配需要添加`samgr_lite`、`safwk_lite`、`dmsfwk_lite`三个部件,直接在`config.json`配置即可。 + +``` + { + "subsystem": "distributed_schedule", + "components": [ + { "component": "samgr_lite", "features":[] }, + { "component": "safwk_lite", "features":[] }, + { "component": "dmsfwk_lite", "features":[] } + ] + }, +``` + +#### 安全子系统适配 + +进行安全子系统适配需要添加`permission_lite`、`appverify`、`deviceauth_standard`、`huks`四个部件,直接在`config.json`配置即可。 + +``` + { + "subsystem": "security", + "components": [ + { "component": "permission_lite", "features":[] }, + { "component": "appverify", "features":[] }, + { "component": "deviceauth_standard", "features":[] }, + { "component": "huks", "features": + [ + "huks_config_file = \"hks_config_small.h\"" + ] + } + ] + }, +``` + + +#### 公共基础库子系统适配 + +进行公共基础库子系统适配需要添加`kv_store`、`os_dump`两个部件,直接在`config.json`配置即可。 + +``` + { + "subsystem": "utils", + "components": [ + { "component": "kv_store", "features":[] }, + { "component": "os_dump", "features":[] } + ] + }, +``` + +#### 图形子系统适配 + +进行图形子系统适配需要添加`graphic_utils`部件,直接在`config.json`配置即可。 + +``` + { + "subsystem": "graphic", + "components": [ + { "component": "graphic_utils", + "features": [ "enable_ohos_graphic_utils_product_config = true" + ] + }, + { "component": "graphic_hals", "features":[] }, + { "component": "ui", "features":[ "enable_graphic_font = true","enable_video_component=false"] }, + { "component": "surface", "features":[] }, + { "component": "wms", "features":[] } + ] + }, +``` + +`graphic`配置文件见 `//vendor/bearpi/bearpi_hm_micro/graphic_config/product_graphic_lite_config.h`。 + + +#### ACE开发框架子系统适配 + +进行`ACE`开发框架子系统适配需要添加`ace_engine_lite`部件,直接在`config.json`配置即可。 + +``` + { + "subsystem": "ace", + "components": [ + { + "component": "ace_engine_lite", + "features": [ + "enable_ohos_ace_engine_lite_product_config = true" + ] + } + ] + }, +``` +`ace_engine_lite`部件配置文件见 `//vendor/bearpi/bearpi_hm_micro/ace_lite_config/product_acelite_config.h`。 + +#### 元能力子系统适配 + +进行元能力子系统适配需要添加`aafwk_lite`部件,直接在`config.json`配置即可。 + +``` + { + "subsystem": "aafwk", + "components": [ + { + "component": "aafwk_lite", + "features": [ + "enable_ohos_appexecfwk_feature_ability = true" --- 支持FA特性,即包含图形能力。 + ] + } + ] + }, +``` + + +#### 包管理子系统适配 + +进行包管理子系统适配需要添加`appexecfwk_lite`部件,直接在`config.json`配置即可。 + +``` + { + "subsystem": "appexecfwk", + "components": [ + { + "component": "appexecfwk_lite" + } + ] + }, +``` \ No newline at end of file -- GitLab