Skip to content

Commit bbdbc45

Browse files
committed
initial Raspberry Vanilla AOSP 12 commit
* Audio - Based on AOSP hikey audio HAL: https://android.googlesource.com/device/linaro/hikey/+/refs/heads/master/audio/ - ALSA based on Android-x86 - ALSA loop is used to support HDMI audio on Pi 4 because VC4 HDMI audio devices use SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE that is not supported on Android raspberrypi/linux#4651 raspberrypi/linux#4654 * Bluetooth - AOSP Broadcom vendor stack with some additional fixes from android-rpi * Camera - libcamera for official Raspberry Pi CSI camera modules based on GloDroid - AOSP external camera HAL for UVC USB webcams: https://source.android.com/docs/core/camera/external-usb-cameras * Graphics - OpenGL & Vulkan: upstream Mesa with GloDroid patches - Upstream drm_hwcomposer with force resolution patch from Android-x86 and my additional fixes - minigbm based on GloDroid * Health - Based on AOSP cuttlefish health HAL * Kernel - Merge of Raspberry Pi and AOSP common kernel with my additional fixes and configurations https://github.com/raspberrypi/linux https://android.googlesource.com/kernel/common/ * Lights - Based on LineageOS Xiaomi msm8996-common lights HAL * suspend_blocker - Based on AOSP cuttlefish * v4l2_codec2 - Based on AOSP with my Raspberry Pi 4 specific fixes * Wifi - AOSP Broadcom vendor stack with my additional fixes
0 parents  commit bbdbc45

File tree

85 files changed

+3127
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+3127
-0
lines changed

Android.bp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Copyright (C) 2021-2022 KonstaKANG
2+
//
3+
// SPDX-License-Identifier: Apache-2.0
4+
5+
soong_namespace {
6+
}

AndroidProducts.mk

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#
2+
# Copyright (C) 2021-2022 KonstaKANG
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
PRODUCT_MAKEFILES := \
8+
$(LOCAL_DIR)/aosp_rpi4.mk
9+
10+
COMMON_LUNCH_CHOICES := \
11+
aosp_rpi4-userdebug

BoardConfig.mk

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
#
2+
# Copyright (C) 2021-2022 KonstaKANG
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
DEVICE_PATH := device/brcm/rpi4
8+
9+
# Platform
10+
TARGET_NO_BOOTLOADER := true
11+
TARGET_NO_RECOVERY := true
12+
13+
TARGET_BOARD_PLATFORM := rpi
14+
15+
TARGET_ARCH := arm64
16+
TARGET_ARCH_VARIANT := armv8-a
17+
TARGET_CPU_ABI := arm64-v8a
18+
TARGET_CPU_ABI2 :=
19+
TARGET_CPU_VARIANT := cortex-a72
20+
21+
TARGET_2ND_ARCH := arm
22+
TARGET_2ND_ARCH_VARIANT := armv7-a-neon
23+
TARGET_2ND_CPU_ABI := armeabi-v7a
24+
TARGET_2ND_CPU_ABI2 := armeabi
25+
TARGET_2ND_CPU_VARIANT := cortex-a72
26+
27+
# Bluetooth
28+
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(DEVICE_PATH)/bluetooth
29+
BOARD_CUSTOM_BT_CONFIG := $(DEVICE_PATH)/bluetooth/vnd_rpi4.txt
30+
BOARD_HAVE_BLUETOOTH := true
31+
BOARD_HAVE_BLUETOOTH_BCM := true
32+
33+
# Camera
34+
BOARD_LIBCAMERA_IPAS := raspberrypi
35+
BOARD_LIBCAMERA_PIPELINES := raspberrypi
36+
BOARD_LIBCAMERA_USES_MESON_BUILD := true
37+
38+
# Display
39+
TARGET_SCREEN_DENSITY := 240
40+
41+
# Graphics
42+
BOARD_MESA3D_USES_MESON_BUILD := true
43+
BOARD_MESA3D_GALLIUM_DRIVERS := vc4 v3d
44+
BOARD_MESA3D_VULKAN_DRIVERS := broadcom
45+
46+
# Kernel
47+
BOARD_CUSTOM_BOOTIMG := true
48+
BOARD_CUSTOM_BOOTIMG_MK := $(DEVICE_PATH)/mkbootimg.mk
49+
BOARD_KERNEL_CMDLINE := console=ttyS0,115200 no_console_suspend root=/dev/ram0 rootwait androidboot.hardware=rpi4
50+
51+
# Manifest
52+
DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/manifest.xml
53+
DEVICE_MATRIX_FILE := $(DEVICE_PATH)/compatibility_matrix.xml
54+
55+
# Media
56+
TARGET_ENABLE_MEDIADRM_64 := true
57+
58+
# Partition sizes
59+
BOARD_FLASH_BLOCK_SIZE := 4096
60+
BOARD_BOOTIMAGE_PARTITION_SIZE := 134217728 # 128M
61+
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2147483648 # 2048M
62+
BOARD_USERDATAIMAGE_PARTITION_SIZE := 134217728 # 128M
63+
BOARD_VENDORIMAGE_PARTITION_SIZE := 268435456 # 256M
64+
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
65+
TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
66+
TARGET_USERIMAGES_USE_EXT4 := true
67+
68+
# Properties
69+
TARGET_VENDOR_PROP += $(DEVICE_PATH)/vendor.prop
70+
71+
# SELinux
72+
BOARD_SEPOLICY_DIRS += device/brcm/rpi4/sepolicy
73+
BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive
74+
75+
# Treble
76+
BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true
77+
BOARD_VNDK_VERSION := current
78+
PRODUCT_FULL_TREBLE_OVERRIDE := true
79+
TARGET_COPY_OUT_VENDOR := vendor
80+
81+
# Wifi
82+
BOARD_WLAN_DEVICE := bcmdhd
83+
BOARD_HOSTAPD_DRIVER := NL80211
84+
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
85+
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
86+
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
87+
WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
88+
WPA_SUPPLICANT_VERSION := VER_0_8_X

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Raspberry Vanilla AOSP 12 device configuration for Raspberry Pi 4.

aosp_rpi4.mk

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#
2+
# Copyright (C) 2021-2022 KonstaKANG
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
# Inherit device configuration
8+
$(call inherit-product, device/brcm/rpi4/device.mk)
9+
10+
# Device identifier. This must come after all inclusions.
11+
PRODUCT_DEVICE := rpi4
12+
PRODUCT_NAME := aosp_rpi4
13+
PRODUCT_BRAND := Raspberry
14+
PRODUCT_MODEL := Raspberry Pi 4
15+
PRODUCT_MANUFACTURER := Raspberry
16+
PRODUCT_RELEASE_NAME := Raspberry Pi 4

audio/Android.bp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Copyright (C) 2015 The Android Open Source Project
2+
// Copyright (C) 2021-2022 KonstaKANG
3+
//
4+
// SPDX-License-Identifier: Apache-2.0
5+
6+
cc_library_shared {
7+
name: "audio.primary.rpi",
8+
relative_install_path: "hw",
9+
proprietary: true,
10+
srcs: ["audio_hw.c"],
11+
include_dirs: [
12+
"external/expat/lib",
13+
"external/tinyalsa/include",
14+
"system/media/audio_effects/include",
15+
"system/media/audio_utils/include",
16+
],
17+
header_libs: ["libhardware_headers"],
18+
shared_libs: [
19+
"libcutils",
20+
"liblog",
21+
"libtinyalsa",
22+
],
23+
cflags: ["-Wno-unused-parameter"],
24+
}

0 commit comments

Comments
 (0)