Workaround missing machine_resource_init in BSD initialization

BSD compatibility is not optional for the kernel to build, however
platform dependent portion of this configuration, machine_resource_init(),
which is called by nexus_init() is implemented only in the platform
specific library for HiSilicon chips (libhi35xx_bsp.a).
Workaround lack of this library, so that the kernel can be built
for other platforms as well, by excluding it from the compilation.

This change should be removed as soon as the appropriate function
is implemented for other platforms.

Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I66f15b167b9769f17820f5f0edb7ae8b0ebc9246
This commit is contained in:
Zbigniew Bodek 2020-10-09 15:33:49 +08:00 committed by Wojciech Zmuda WX948747
parent 850a566916
commit e559c86d77
1 changed files with 10 additions and 0 deletions

View File

@ -210,7 +210,17 @@ LITE_OS_SEC_TEXT_INIT STATIC VOID OsDriverHiEventInit(VOID)
extern void configure (void);
LITE_OS_SEC_TEXT_INIT STATIC INT32 OsBsdInit(VOID)
{
/*
* WORKAROUND: Inside configure(), nexus_init() function calls
* HiSi-specific, library procedure - machine_resource_init().
* The latter one is defined in libhi35xx_bsp.a which is only
* available for Hi3516 and Hi3518.
* Temporarily ifdef configure until this routine is implemented
* by other platforms.
*/
#if defined(LOSCFG_PLATFORM_HI3516DV300) || defined(LOSCFG_PLATFORM_HI3518EV300)
configure();
#endif
mi_startup(SI_SUB_ARCH_INIT);
return LOS_OK;
}