Merge "Add initial files for aosp_riscv64 target" am: a4e13d8866
Original change: https://android-review.googlesource.com/c/platform/build/+/2241477 Change-Id: I0a4d8297477f7bdcef94102380d61b718d09ca59 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
10
core/clang/TARGET_riscv64.mk
Normal file
10
core/clang/TARGET_riscv64.mk
Normal file
@@ -0,0 +1,10 @@
|
||||
RS_TRIPLE := renderscript64-linux-android
|
||||
RS_TRIPLE_CFLAGS := -D__riscv64__
|
||||
RS_COMPAT_TRIPLE := riscv64-linux-android
|
||||
|
||||
TARGET_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.profile-riscv64-android.a
|
||||
TARGET_LIBCRT_BUILTINS := $(LLVM_RTLIB_PATH)/libclang_rt.builtins-riscv64-android.a
|
||||
|
||||
# Address sanitizer clang config
|
||||
ADDRESS_SANITIZER_LINKER := /system/bin/linker_asan64
|
||||
ADDRESS_SANITIZER_LINKER_FILE := /system/bin/bootstrap/linker_asan64
|
40
core/combo/TARGET_linux-riscv64.mk
Normal file
40
core/combo/TARGET_linux-riscv64.mk
Normal file
@@ -0,0 +1,40 @@
|
||||
#
|
||||
# Copyright (C) 2022 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# Configuration for Linux on riscv64 as a target.
|
||||
# Included by combo/select.mk
|
||||
|
||||
# Provide a default variant.
|
||||
ifeq ($(strip $(TARGET_ARCH_VARIANT)),)
|
||||
TARGET_ARCH_VARIANT := riscv64
|
||||
endif
|
||||
|
||||
# Include the arch-variant-specific configuration file.
|
||||
# Its role is to define various ARCH_X86_HAVE_XXX feature macros,
|
||||
# plus initial values for TARGET_GLOBAL_CFLAGS
|
||||
#
|
||||
TARGET_ARCH_SPECIFIC_MAKEFILE := $(BUILD_COMBOS)/arch/$(TARGET_ARCH)/$(TARGET_ARCH_VARIANT).mk
|
||||
ifeq ($(strip $(wildcard $(TARGET_ARCH_SPECIFIC_MAKEFILE))),)
|
||||
$(error Unknown $(TARGET_ARCH) architecture version: $(TARGET_ARCH_VARIANT))
|
||||
endif
|
||||
|
||||
include $(TARGET_ARCH_SPECIFIC_MAKEFILE)
|
||||
|
||||
define $(combo_var_prefix)transform-shared-lib-to-toc
|
||||
$(call _gen_toc_command_for_elf,$(1),$(2))
|
||||
endef
|
||||
|
||||
TARGET_LINKER := /system/bin/linker64
|
2
core/combo/arch/riscv64/riscv64.mk
Normal file
2
core/combo/arch/riscv64/riscv64.mk
Normal file
@@ -0,0 +1,2 @@
|
||||
# This file contains feature macro definitions specific to the
|
||||
# base 'riscv64' platform ABI.
|
25
target/board/generic_riscv64/BoardConfig.mk
Normal file
25
target/board/generic_riscv64/BoardConfig.mk
Normal file
@@ -0,0 +1,25 @@
|
||||
# Copyright (C) 2022 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# riscv64 emulator specific definitions
|
||||
TARGET_ARCH := riscv64
|
||||
TARGET_ARCH_VARIANT :=
|
||||
TARGET_CPU_VARIANT := generic
|
||||
TARGET_CPU_ABI := riscv64
|
||||
|
||||
# Include 64-bit mediaserver to support 64-bit only devices
|
||||
TARGET_DYNAMIC_64_32_MEDIASERVER := true
|
||||
|
||||
include build/make/target/board/BoardConfigGsiCommon.mk
|
7
target/board/generic_riscv64/README.txt
Normal file
7
target/board/generic_riscv64/README.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
The "generic_riscv64" product defines a non-hardware-specific riscv64 target
|
||||
without a bootloader.
|
||||
|
||||
It is also the target to build the generic kernel image (GKI).
|
||||
|
||||
It is not a product "base class"; no other products inherit
|
||||
from it or use it in any way.
|
15
target/board/generic_riscv64/device.mk
Normal file
15
target/board/generic_riscv64/device.mk
Normal file
@@ -0,0 +1,15 @@
|
||||
#
|
||||
# Copyright (C) 2022 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
5
target/board/generic_riscv64/system_ext.prop
Normal file
5
target/board/generic_riscv64/system_ext.prop
Normal file
@@ -0,0 +1,5 @@
|
||||
#
|
||||
# system.prop for generic riscv64 sdk
|
||||
#
|
||||
|
||||
rild.libpath=/vendor/lib64/libreference-ril.so
|
@@ -46,6 +46,7 @@ PRODUCT_MAKEFILES := \
|
||||
$(LOCAL_DIR)/aosp_64bitonly_x86_64.mk \
|
||||
$(LOCAL_DIR)/aosp_arm64.mk \
|
||||
$(LOCAL_DIR)/aosp_arm.mk \
|
||||
$(LOCAL_DIR)/aosp_riscv64.mk \
|
||||
$(LOCAL_DIR)/aosp_x86_64.mk \
|
||||
$(LOCAL_DIR)/aosp_x86_arm.mk \
|
||||
$(LOCAL_DIR)/aosp_x86.mk \
|
||||
|
67
target/product/aosp_riscv64.mk
Normal file
67
target/product/aosp_riscv64.mk
Normal file
@@ -0,0 +1,67 @@
|
||||
#
|
||||
# Copyright 2022 The Android Open-Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
PRODUCT_USE_DYNAMIC_PARTITIONS := true
|
||||
|
||||
# The system image of aosp_riscv64-userdebug is a GSI for the devices with:
|
||||
# - riscv64 user space
|
||||
# - 64 bits binder interface
|
||||
# - system-as-root
|
||||
# - VNDK enforcement
|
||||
# - compatible property override enabled
|
||||
|
||||
# This is a build configuration for a full-featured build of the
|
||||
# Open-Source part of the tree. It's geared toward a US-centric
|
||||
# build quite specifically for the emulator, and might not be
|
||||
# entirely appropriate to inherit from for on-device configurations.
|
||||
|
||||
# GSI for system/product & support 64-bit apps only
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk)
|
||||
|
||||
#
|
||||
# All components inherited here go to system_ext image
|
||||
#
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_system_ext.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_system_ext.mk)
|
||||
|
||||
#
|
||||
# All components inherited here go to product image
|
||||
#
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
|
||||
|
||||
#
|
||||
# All components inherited here go to vendor image
|
||||
#
|
||||
#$(call inherit-product-if-exists, device/generic/goldfish/riscv64-vendor.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/emulator_vendor.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_riscv64/device.mk)
|
||||
|
||||
#
|
||||
# Special settings for GSI releasing
|
||||
#
|
||||
ifeq (aosp_riscv64,$(TARGET_PRODUCT))
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_release.mk)
|
||||
endif
|
||||
|
||||
PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \
|
||||
root/init.zygote64.rc
|
||||
|
||||
# This build configuration supports 64-bit apps only
|
||||
PRODUCT_NAME := aosp_riscv64
|
||||
PRODUCT_DEVICE := generic_riscv64
|
||||
PRODUCT_BRAND := Android
|
||||
PRODUCT_MODEL := AOSP on Riscv64
|
Reference in New Issue
Block a user