Change "vendor" to "device" where the latest
version of MR puts stuff related to Qemu ARM Virt.
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Update only those configuration files that are used
during build (clang and clang+debug).
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I5639b0074e8c4e0fef4e21d9f3b8c1582bb038d5
High resolution timer can now be excluded from the build.
There is currently no HR Timer implementation for other
platform than HiSi.
Note: HR Timer will be enabled by default
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I5daf8e0ceec2a17025b579513e3bd74db1040916
The macros assume that constants that are compared against
"addr" are either unsigned or less than INT_MAX.
In some cases it is not true so change costants to unsigned
using U32_C macros.
The correct solution would be to change teh MEM_ADDR, PMM_BASE, etc.
to be unsigned long but currently "U" suffix is appended in various
places so the assumption is that those macros use default definition
(which is int).
Put "addr" into brackets by the way since it could be an expression
rather than one variable.
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: Ife9bc5863b4934ecaab64b24faa084b87d7d7ea5
The macro to append "U" suffix should be named
according to what it actually does which is defining U32 constant.
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I55701f0650c88bd083c062581af5c7a1b966bc0b
For some reason more brackets is worse than no brackets
and warning is generated that is threated as error.
Therefore remove brackets to fix the build when
LOSCFG_PLATFORM_ROOTFS is defined
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I610a5893217039a36d894641c54a83ff4d4b7822
Minimal system configuration for Qemu ARM Virtual platform
based on Cortex-A7, with GICv2.
Some debugging options are enabled to allow for shell bring-up,
hence debug configuration type.
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: Ifa01cd44733fd0154044013f45772d178e19e78e
Mainly adding missing headers, removing redundant headers that
induce undefined symbols or rearranging existing headers
according to dependencies betheen them.
Also add missing include paths to makefiles and make configs.
Note: direct inclusion of pthread.h in disk.h is caused by the
latter being used almost everywhere, including third_party libraries.
Putting pthread.h there releases us from affecting more code.
Basically fixes build for anything that is not default HiSi
configuration.
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: Icdcb0874d9fed34d01fa282d33bd2e041c2ac436
If the platform doesn't support rootfs but shell and serial
console are enabled, create Shell task in kernel.
Note that normally, shell task is created by /bin/init.
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: If3bf55313d897569b59902b07eaa042eee71a8df
Currently unused but when rootfs is enabled
we should get this error and quickly narrow down
where to add proper bootargs handling.
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: Ie8d96fc3b6ad7cc33abe67530ca8ff9526b46855
Allows to disable NET_LWIP_SACK in the kernel configuration.
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: Ibcde4a811e67d61bc713d405414c4991cbc1bdd3
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
During LiteOS consolidation, system_init.o object that contains
SystemInit() doesn't exist yet as it is being built later
and linked in ./vendor directory when OHOS_Image is created.
This is not the case when building for HiSilicon platforms as
SystemInit is provided for them in precompiled libraries.
Workaround this issue by creating "weak" function in LiteOS
that will be replaced by the "strong" symbol from ./vendor
in linking phase of the OHOS_Image.
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I39f327a350722a3e41a370ee93ba3b734c5681b0
Disable LTO to avoid undefined __stack_chk_guard symbol
problem. "externally_visible" attribute could be a fix for
that but it is not known to our LLVM.
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I39e0ccaee5897c696a7a9a235e433cf9113853ce
Fix unused function warning treated as error
when KERNEL_DYNLOAD option is switched off.
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I21a01ff3d7ecb7b2e65bacbaa985c6390f5e4be7
Fix build when BASE_CORE_HILOG option is disabled.
Use similar printing function to output missing HILOG
logs.
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: Id5c63568ccb1ba90daadddf7e26d3e0f6c9f30ce
HiSilicon-specific randomization routine for the __stack_chk_guard
should not be called for other platforms that don't implement
this function.
Fix build for targets that don't link with HiSi libraries when
stack smashing protector is enabled.
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I1843c897b32991fddc3d0ba362d188c4a621d052
Currently disabling stack protector will cause build to fail.
This commit will fix that problem and allow to toggle feature
when needed.
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: Iee8ccfdb9fce4ba69aa557e2ac915ddc45b2f21e
Remove some dependencies on HiSilicon and add new platform to build.
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: I8504bcc9a1bf1756e1e20694986d7774156f8b8e
Qemu ARM virtual platform emulates an ARM machine
with configurable, ARM components. This commit adds
configuration option for Cortex-A7 based virtual machine.
qemu_arm_virt_ca7 name is derived from a command
to invoke Qemu:
qemu-system-arm -M virt -cpu cortex-a7
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: Ia267ee7c989b8c22e6c19d6f11ff3ee2eef8148b
conf --silentoldconfig generates required autoconf.h file
but when invoked on modified Kconfig it will ask for user
input which breaks the build. To automatically regenerate
config structure and then autogenerate headers run
config --olddefconfig first.
Signed-off-by: Zbigniew Bodek <zbigniew.bodek@huawei.com>
Change-Id: If7f7653c80cc0c5c0d84015b8e50fcb66568d00a