platform-bionic's People
platform-bionic's Issues
mmm bionic failed
under aosp source root, run “mmm bionic”, build failed:
In file included from bionic/tests/malloc_test.cpp:17:
external/googletest/googletest/include/gtest/gtest.h:1545:11: error: comparison of integers of different signs: 'const int' and 'const unsigned long' [-Werror,-Wsign-compare]
if (lhs == rhs) {
~~~ ^ ~~~
external/googletest/googletest/include/gtest/gtest.h:1564:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, unsigned long>' requested here
return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
^
bionic/tests/malloc_test.cpp:1345:3: note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<int, unsigned long, nullptr>' requested here
ASSERT_EQ(PR_MTE_TCF_NONE, my_tagged_addr_ctrl & PR_MTE_TCF_MASK);
^
external/googletest/googletest/include/gtest/gtest.h:2073:32: note: expanded from macro 'ASSERT_EQ'
# define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2)
^
external/googletest/googletest/include/gtest/gtest.h:2057:54: note: expanded from macro 'GTEST_ASSERT_EQ'
ASSERT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
^
1 error generated.
09:52:51 ninja failed with: exit status 1
#### failed to build some targets (45 seconds) ####
mmm bionic error
repo init -u [email protected]:riscv-android-src/manifest.git -b riscv64-android-12.0.0_dev
repo sync
cd prebuilts/rust/
git lfs pull
cd ../clang/host/linux-x86/
git lfs pull
cd ../../..
touch packages/modules/ArtPrebuilt/com.android.art-riscv64.apex
. build/envsetup.sh
lunch aosp_riscv64-eng
mmm bionic
16:28:27 Build sandboxing disabled due to nsjail error.
build/make/core/soong_config.mk:195: warning: BOARD_PLAT_PUBLIC_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS instead.
build/make/core/soong_config.mk:196: warning: BOARD_PLAT_PRIVATE_SEPOLICY_DIR has been deprecated. Use SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS instead.
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=12
TARGET_PRODUCT=aosp_riscv64
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=riscv64
TARGET_ARCH_VARIANT=riscv64
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-144-generic-x86_64-Ubuntu-18.04.6-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=SP1A.210812.016
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=device/generic/goldfish device/generic/goldfish-opengl hardware/google/camera hardware/google/camera/devices/EmulatedCamera
============================================
[100% 1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
cd "$(dirname "out/soong/.bootstrap/bin/soong_build")" && BUILDER="$PWD/$(basename "out/soong/.bootstrap/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --out "out/soong" -n "out" -d "out/soong/build.ninja.d" -t -l out/.module_paths/Android.bp.list -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used Android.bp
error: tools/security/fuzzing/orphans/widevine/trusty/Android.bp:31:1: "trusty_widevine_dispatch_fuzzer" depends on undefined module "trusty_fuzzer_defaults"
16:28:30 soong bootstrap failed with: exit status 1
#### failed to build some targets (4 seconds) ####
global auxv returns NULL
CtsNdkBinderTestCases can not run,crash happens at bionic/libc/bionic/getauxval.cpp:41
,__libc_shared_globals()->auxv
returns null pointer
for (ElfW(auxv_t)* v = __libc_shared_globals()->auxv; v->a_type != AT_NULL; ++v) {
...
[bug] libc/versioner-dependencies/riscv64/kernel_uapi_asm-riscv64 is not a sym-link
I find libc/versioner-dependencies/riscv64/kernel_uapi_asm-riscv64
is not a soft link to correct uapi folder as other arch, but is a real folder. Can you please have a double check if it is a bug?
ifunc crash
Detailed analysis please refer to https://gitee.com/aosp-riscv/working-group/issues/I5DNIJ.
Need roll-back https://github.com/riscv-android-src/toolchain-llvm-project/blob/riscv-llvm-r416183_dev/lld/ELF/Arch/RISCV.cpp#L79
[DISCUSS] how to pass unistd.exec_argv0_null
more details please refer to https://gitee.com/aosp-riscv/working-group/issues/I5EGDI
So I think it is not a issue for bionic, but how to pass the unit test cases?
fix the crashes for bionic-unit-test due to padding issue in memcpy
When I use memcpy.S
to replace my originl memcpy.c
, the bionic-unit-test executable crashes with segment fault.
Checked the memcpy.S
and find the problem is triggered by the # define LABLE_ALIGN .balignw 16, 0x00000013
.
When I build in my own environment and objdump the memcoy.o and see following disassembles:
andi a2, a2, 63
1a: 03f67613 andi a2,a2,63
1e: 61980013 addi zero,a6,1561
ld a4, 0(a1)
sd a4, 0(a0)
22: e118 sd a4,0(a0)
The padding is correct, but RISC-V will treat 61980013
as one instruction but not two and crash the logic.
Double checked the RVI upstream code on github and build in RVI environmnet, I see the disassembles as below:
0000000000000020 <.L_dest_aligned>:
20: 00665e93 srli t4,a2,0x6
24: 040e8663 beqz t4,70 <.L_len_less_64bytes>
28: 03f67613 andi a2,a2,63
2c: 00130013 addi zero,t1,1
0000000000000030 <.L_len_larger_64bytes>:
30: 6198 ld a4,0(a1)
32: e118 sd a4,0(a0)
34: 659c ld a5,8(a1)
36: e51c sd a5,8(a0)
38: 0105b803 ld a6,16(a1)
The difference is here are two padding half-word 00130013
, and thus not break the logic.
My solution, change LABLE_ALIGN
:
# define LABLE_ALIGN .balignw 16, 0x00000001
.
And this make the obj in my env becomes and now 0001 and 6198 are recognized as two instructions:
16: 040e8563 beqz t4,60 <memcpy_generic+0x60>
andi a2, a2, 63
1a: 03f67613 andi a2,a2,63
1e: 0001 nop
ld a4, 0(a1)
20: 6198 ld a4,0(a1)
sd a4, 0(a0)
22: e118 sd a4,0(a0)
With this change in RVI env, the obj is below and should still works:
0000000000000020 <.L_dest_aligned>:
20: 00665e93 srli t4,a2,0x6
24: 040e8663 beqz t4,70 <.L_len_less_64bytes>
28: 03f67613 andi a2,a2,63
2c: 0001 nop
2e: 0001 nop
0000000000000030 <.L_len_larger_64bytes>:
30: 6198 ld a4,0(a1)
32: e118 sd a4,0(a0)
Please have a check and let me know if it is ok to you.
[Discussion] about preprocessor definitions for riscv64
riscv64-android-12.0.0_dev for bionic
I find current code use two methods to flag rv64, for example:
#elif __riscv_xlen == 64
......
or
(defined(__riscv) && (__riscv_xlen == 64)
I suggest we should unify the coding style. Which one do you prefer? First one or the second option?
[Discussion] kernel uapi.h for 12
When I compared riscv64-android-12.0.0_dev with android-12.0.0_r2 for the bionic/libc/kernel/uapi
, I find the difference is very large, such as asm-x86, asm-arm also have files different.
What kernel version does current riscv64-android-12.0.0_dev use?
Following the "bionic/libc/kernel/README.md", I find the android-12.0.0_r2 should uses v5.12 kernel headers.
My steps are described as below:
enter repo external/kernel-headers/
, checkout android-12.0.0_r2
run git log
then we can know this 12.0.0_r2 tag corresponds to kernel 5.12
$ git log
commit 607047d7c127efdedf74933bc07361e839114054 (HEAD, tag: android-vts-12.0_r1, tag: android-s-beta-2, tag: android-cts-12.0_r1, tag: android-12.0.0_r3, tag: android-12.0.0_r2, tag: android-12.0.0_r1, tag: m/android-12.0.0_r3, aosp/android12-tests-release, aosp/android12-s1-release, aosp/android12-release)
Merge: 74cb5e0 41e1fe5
Author: android-build-team Robot <[email protected]>
Date: Wed May 5 01:03:34 2021 +0000
Snap for 7336869 from 41e1fe51504e14d2ac81d90f8900478a55d897d8 to sc-release
Change-Id: I60ee4604bb1141f6de28aae7df81dbf93da1ad13
commit 41e1fe51504e14d2ac81d90f8900478a55d897d8 (aosp/android12-dev)
Merge: 1a37206 f684b98
Author: Christopher Ferris <[email protected]>
Date: Tue May 4 19:01:51 2021 +0000
Merge "Update to v5.12 kernel headers." am: fad4f8fd49 am: 0ac04c2374 am: f684b983c7
Original change: https://android-review.googlesource.com/c/platform/external/kernel-headers/+/1694337
Change-Id: I1fb5ec883b2d8adc2a430f22a415ad678513e731
commit f684b983c735ccc4e5d17f529bec50450178859d
Merge: 9335451 0ac04c2
Author: Christopher Ferris <[email protected]>
Date: Tue May 4 18:38:16 2021 +0000
Merge "Update to v5.12 kernel headers." am: fad4f8fd49 am: 0ac04c2374
Original change: https://android-review.googlesource.com/c/platform/external/kernel-headers/+/1694337
......
Download the Android mainline kernel source code:
$ mkdir kernel_src
$ cd kernel_src
$ git clone https://android.googlesource.com/kernel/common/ -b android-mainline
check out a particular tag, this is 5.12
$ cd common
$ git checkout tags/android-mainline-5.12
Before running the command to import the headers, make sure that you have done a lunch TARGET.
After running lunch, run this command to import the headers into the Android
source tree if there is a kernel source tree already checked out:
bionic/libc/kernel/tools/generate_uapi_headers.sh --use-kernel-dir kernel_src/common
After above operations, will copy original kernel header files to external/kernel-header
, I can see except a new folder for riscv original/uapi/asm-riscv/
, other folders for other arch are not changed.
Next, run this command to copy the parsed files to bionic/libc/kernel/uapi:
bionic/libc/kernel/tools/update_all.py
Please double check and let me know if we need update kernel uapi for aosp 12.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.