Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chrome] catch up with upstream #50

Merged
merged 16 commits into from
Jun 4, 2023

Conversation

unicornx
Copy link

@unicornx unicornx commented Jun 2, 2023

Pass build and can run on the board.
ffmpeg/angle/v8 all have the branch of riscv64_android_upstream.

115

The only problem is I find the size of ChromePublic.apk is 663MB, while version 109 is only 290MB.

McKnight22 and others added 15 commits May 24, 2023 13:33
For arch riscv, android supports riscv64 only.
So, only 64bit android/riscv64 llvm runtimes is added.

co-authors: McKnight22 <[email protected]>
            Wang Chen <[email protected]>
            Wang Chen <[email protected]>

co-authors: McKnight22 <[email protected]>
Change-Id: I26d1e5cc76bc0d98a96e74e2e1b2f837226c5903
Bug: 1443443
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4528823
Commit-Queue: Nico Weber <[email protected]>
Reviewed-by: Egor Pasko <[email protected]>
Commit-Queue: Egor Pasko <[email protected]>
Reviewed-by: Nico Weber <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1145313}
(cherry picked from commit 7869750)
Signed-off-by: Wang Chen <[email protected]>
co-authors: McKnight22 <[email protected]>
            Wang Chen <[email protected]>

Bug: 1443443
Change-Id: I29a24a80356926a5437a90ff6e433196683569c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4522370
Reviewed-by: Lei Zhang <[email protected]>
Commit-Queue: Lei Zhang <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1148639}
(cherry picked from commit b0f3f4a)
Signed-off-by: Wang Chen <[email protected]>
This has been submitted upsteram but has not been landed till Jun/2/2023.

https://chromium-review.googlesource.com/c/chromium/src/+/4527062

Signed-off-by: Wang Chen <[email protected]>
(cherry picked from commit 10ee8a3)
Signed-off-by: Wang Chen <[email protected]>
Before riscv introduced into Chromium, every 64-bit
ARCH(aarch64/x86_64)  enables its own 32-bit support
by default.

But for RISCV, Android announced only pure 64-bit
would be supported.

Our solution is to reuse skip_secondary_abi_for_cq and
set it to True for riscv64 by default to support building
64-bits-only and skip the legacy check logic for its 32-bit
ABI.

Signed-off-by: McKnight22 <[email protected]>
co-authors:    Wang Chen <[email protected]>
Since the __atomic_* APIs are now in libclang_rt.builtins-*.a, linking
single libatomic is not needed, otherwise, lld reported error:
unable to find library -latomic.

The solution is: make sure we don't link the libatomic when we are
using clang tool.

Signed-off-by: Wang Chen <[email protected]>
From https://github.com/starfive-tech/riscv-nwjs-patch/commits/main
commit id: d1ec23cafd764616dd7dc99cce88a0600fe0dde1

Signed-off-by: Wang Chen <[email protected]>
applied patch from sifive

sifive chrome patches repo:
https://github.com/starfive-tech/riscv-nwjs-patch
I have download and save it locally.

cd <SRC>
patch -d . -f -p1 --no-backup-if-mismatch \
-i third_party/patches-starfive/0010-sandbox-add-riscv-arch-definition-and-define-syscall.patch

note: there are 3 failures, leave the fix in round 2
sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc.rej
sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc.rej
sandbox/linux/seccomp-bpf-helpers/syscall_sets.h.rej

Signed-off-by: Wang Chen <[email protected]>
fixed the rejection part of patch, note syscall_sets.cc is not
changed due to the function SyscallSets::IsAllowedGetOrModifySocket
is removed in new version of sandox.

Note after round 2, *.rej files are removed.

Signed-off-by: Wang Chen <[email protected]>
Continue fixing due to upstream is upgraded and the
patch form starfive is a bit old.

Signed-off-by: Wang Chen <[email protected]>
co-authors: McKnight22 <[email protected]>
applied crashpad patch from sifive

sifive chrome patches repo:
https://github.com/starfive-tech/riscv-nwjs-patch
I have downloaded and saved it locally.

cd <SRC>
patch -d . -f -p1 --no-backup-if-mismatch \
-i
./third_party/patches-starfive/0043-third_party-crashpad-port-for-RISC-V.patch

Test: autoninja -v -C out/riscv64 third_party/crashpad/crashpad/client:client

Signed-off-by: Wang Chen <[email protected]>
Signed-off-by: McKnight22 <[email protected]>
riscv -> riscv32, learn from
https://build.opensuse.org/package/view_file/openSUSE:Factory:RISCV/chromium/riscv-crashpad.patch
use riscv32 looks more clear.

Test: make ninja T=third_party/crashpad/crashpad/snapshot:snapshot

Signed-off-by: Wang Chen <[email protected]>
(cherry picked from commit 0760bc1)
Signed-off-by: Wang Chen <[email protected]>
logcat:
```
F chromium: [0317/105229.493752:FATAL:cpu_context.cc(190)] Check failed: false.
```

Signed-off-by: Wang Chen <[email protected]>
(cherry picked from commit ee7f0c8)
Signed-off-by: Wang Chen <[email protected]>
logcat:
```
F chromium: [0320/034211.828113:FATAL:minidump_system_info_writer.cc(136)] Check failed: false.
```

Signed-off-by: Wang Chen <[email protected]>
(cherry picked from commit 83f7df3)
Signed-off-by: Wang Chen <[email protected]>
@unicornx unicornx requested a review from McKnight22 June 2, 2023 13:19
@unicornx unicornx self-assigned this Jun 2, 2023
learn config from AOSP, disable emulate tls to enable ELF TLS
https://android.googlesource.com/platform/build/soong/+/refs/heads/master/cc/config/riscv64_device.go

Signed-off-by: Wang Chen <[email protected]>
@unicornx unicornx merged commit e946f2d into aosp-riscv:riscv64_android_upstream Jun 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants