Compare commits

...

No commits in common. "android-13.0" and "android-12.0" have entirely different histories.

13 changed files with 43 additions and 207 deletions

View File

@ -1,7 +1,6 @@
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/rpi4_car.mk \
PRODUCT_MAKEFILES := $(LOCAL_DIR)/rpi4_car.mk
COMMON_LUNCH_CHOICES := \
rpi4_car-eng \
rpi4_car-userdebug \
rpi4_car-user \
rpi4_car-eng \
rpi4_car-userdebug \
rpi4_car-user \

View File

@ -35,10 +35,11 @@ TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
TARGET_USERIMAGES_USE_EXT4 := true
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2147483648 # 2GB
BOARD_USERDATAIMAGE_PARTITION_SIZE := 134217728 # 128M
BOARD_USERDATAIMAGE_PARTITION_SIZE := 1073741824 # 1GB
TARGET_COPY_OUT_VENDOR := vendor
BOARD_VENDORIMAGE_PARTITION_SIZE := 1073741824 # 1GB
BOARD_VENDORIMAGE_PARTITION_SIZE := 134217728 # 128MB
#BOARD_VENDORIMAGE_PARTITION_SIZE := 1073741824 # 1GB
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_FLASH_BLOCK_SIZE := 4096
@ -61,7 +62,6 @@ BOARD_WPA_SUPPLICANT_DRIVER := NL80211
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd
BOARD_HOSTAPD_DRIVER := NL80211
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd
WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
# Bluetooth
BOARD_HAVE_BLUETOOTH := true
@ -73,5 +73,3 @@ BOARD_SEPOLICY_DIRS := \
device/ln/rpi4_car/sepolicy
DEVICE_MANIFEST_FILE := device/ln/rpi4_car/manifest.xml
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true

10
README
View File

@ -3,10 +3,10 @@
$ sudo apt install libssl-dev python3-setuptools
# Download Android source
https://github.com/android-rpi/local_manifests
https://github.com/snappautomotive/local_manifests/tree/sa-arpi-12
# Patch the source
https://github.com/android-rpi/device_arpi_rpi4/wiki/arpi-13-:-framework-patch
https://github.com/android-rpi/device_arpi_rpi4/wiki/arpi-12-:-framework-patch
# Build Android
Refer to http://source.android.com/source/building.html
@ -22,7 +22,7 @@
Partitions of the card should be set-up like followings.
p1 128MB for boot : Do fdisk, set W95 FAT32(LBA) & Bootable type, mkfs.vfat
p2 2048MB for /system : Do fdisk, new primary partition
p3 128MB for /vendor : Do fdisk, new primary partition
p3 1024MB for /vendor : Do fdisk, new primary partition
p4 remainings for /data : Do fdisk, mkfs.ext4
Set volume label of /data partition as userdata
: use -L option for mkfs.ext4
@ -33,12 +33,12 @@
$ sudo dd if=vendor.img of=/dev/<p3> bs=1M
# Copy firmware & ramdisk to boot partition
device/snappautomotive/rpi4/boot/* to p1:/
device/snappautomotive/rpi4_car/boot/* to p1:/
out/target/product/rpi4/ramdisk.img to p1:/
# Download & Build kernel source
https://github.com/android-rpi/kernel_manifest
https://github.com/android-rpi/kernel_manifest/tree/arpi-5.10
# Copy kernel binaries to boot partition
<kernel directory>/out/arpi-5.10/dist/Image.gz to p1:/

View File

@ -1 +1 @@
console=serial0,115200 no_console_suspend root=/dev/ram0 androidboot.hardware=rpi4 androidboot.selinux=permissive
console=serial0,115200 no_console_suspend root=/dev/ram0 elevator=deadline rootwait androidboot.hardware=rpi4 androidboot.selinux=permissive

Binary file not shown.

Binary file not shown.

View File

@ -12,7 +12,7 @@ rm $SDCARD -R
mkdir -p $SDCARD
mkdir $SDCARD/boot
cp device/arpi/rpi4/boot/* $SDCARD/boot
cp device/ln/rpi4_car/boot/* $SDCARD/boot
cp $TARGETDIR/ramdisk.img $SDCARD/boot
cp $TARGETDIR/system.img $SDCARD
cp $TARGETDIR/vendor.img $SDCARD

View File

@ -1,7 +0,0 @@
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/sda2 /system ext4 ro,barrier=1 wait,first_stage_mount
/dev/sda3 /vendor ext4 ro,barrier=1 wait,first_stage_mount
/dev/sda4 /data ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait
/devices/platform/soc/*.usb/usb* auto auto defaults voldmanaged=usb:auto

View File

@ -43,3 +43,14 @@ on boot
setprop service.adb.tcp.port 5555
start adbd
service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
-iwlan0 -Dnl80211 -c/vendor/etc/wifi/wpa_supplicant.conf \
-I/vendor/etc/wifi/wpa_supplicant_overlay.conf \
-O/data/vendor/wifi/wpa/sockets -g@android:wpa_wlan0
interface android.hardware.wifi.supplicant@1.0::ISupplicant default
interface android.hardware.wifi.supplicant@1.1::ISupplicant default
interface android.hardware.wifi.supplicant@1.2::ISupplicant default
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot

View File

@ -120,5 +120,5 @@
<name>ICameraProvider</name>
<instance>external/0</instance>
</interface>
</hal>
</hal>
</manifest>

View File

@ -1,131 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2020 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.
-->
<com.android.systemui.car.systembar.CarSystemBarView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/system_bar_background"
android:gravity="center"
android:orientation="horizontal">
<RelativeLayout
android:id="@+id/nav_buttons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layoutDirection="ltr">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:layout_weight="1"
android:gravity="center"
android:layoutDirection="ltr"
android:paddingEnd="@dimen/system_bar_button_group_padding"
android:paddingStart="@dimen/system_bar_button_group_padding">
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
<com.android.systemui.car.systembar.CarSystemBarButton
android:id="@+id/home"
android:contentDescription="@string/system_bar_home_label"
style="@style/SystemBarButton"
systemui:componentNames="com.android.car.carlauncher/.CarLauncher"
systemui:highlightWhenSelected="true"
systemui:icon="@drawable/car_ic_home"
systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"/>
<com.android.systemui.car.systembar.CarSystemBarButton
android:id="@+id/phone_nav"
android:contentDescription="@string/system_bar_phone_label"
style="@style/SystemBarButton"
systemui:highlightWhenSelected="true"
systemui:icon="@drawable/car_ic_phone"
systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;package=com.android.car.dialer;launchFlags=0x10000000;end"
systemui:packages="com.android.car.dialer"
systemui:clearBackStack="true"/>
<com.android.systemui.car.systembar.CarSystemBarButton
android:id="@+id/grid_nav"
android:contentDescription="@string/system_bar_applications_label"
style="@style/SystemBarButton"
systemui:componentNames="@string/config_appGridComponentName"
systemui:highlightWhenSelected="true"
systemui:icon="@drawable/car_ic_apps"
systemui:intent="intent:#Intent;action=com.android.car.carlauncher.ACTION_APP_GRID;package=com.android.car.carlauncher;launchFlags=0x24000000;end"
systemui:clearBackStack="true"/>
<com.android.systemui.car.systembar.HvacButton
android:id="@+id/hvac"
android:contentDescription="@string/system_bar_climate_control_label"
style="@style/SystemBarButton"
systemui:highlightWhenSelected="true"
systemui:icon="@drawable/car_ic_hvac"
systemui:broadcast="true"/>
<com.android.systemui.car.systembar.CarSystemBarButton
android:id="@+id/notifications"
android:contentDescription="@string/system_bar_notifications_label"
style="@style/SystemBarButton"
systemui:highlightWhenSelected="true"
systemui:icon="@drawable/car_ic_notification"
systemui:longIntent="intent:#Intent;action=com.android.car.bugreport.action.START_AUDIO_FIRST;component=com.android.car.bugreport/.BugReportActivity;end"/>
<Space
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
</LinearLayout>
</RelativeLayout>
<LinearLayout
android:id="@+id/lock_screen_nav_buttons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:layoutDirection="ltr"
android:paddingEnd="@dimen/car_keyline_1"
android:paddingStart="@dimen/car_keyline_1"
android:visibility="gone"/>
<LinearLayout
android:id="@+id/occlusion_buttons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:layoutDirection="ltr"
android:paddingEnd="@dimen/car_keyline_1"
android:paddingStart="@dimen/car_keyline_1"
android:visibility="gone">
<com.android.systemui.car.systembar.CarSystemBarButton
android:id="@+id/home"
android:contentDescription="@string/system_bar_home_label"
style="@style/SystemBarButton"
systemui:componentNames="com.android.car.carlauncher/.CarLauncher"
systemui:highlightWhenSelected="true"
systemui:icon="@drawable/car_ic_home"
systemui:intent="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.HOME;launchFlags=0x14000000;end"/>
</LinearLayout>
</com.android.systemui.car.systembar.CarSystemBarView>

View File

@ -26,27 +26,27 @@ PRODUCT_MANUFACTURER := L--N.DE
PRODUCT_MODEL := Raspberry Pi 4
include frameworks/native/build/tablet-10in-xhdpi-2048-dalvik-heap.mk
include vendor/gapps/arm64/arm64-vendor.mk
# PRODUCT_SUPPORTS_CAMERA := false
PRODUCT_PACKAGE_OVERLAYS += \
$(LOCAL_PATH)/overlay \
device/generic/car/common/overlay \
PRODUCT_SUPPORTS_CAMERA := true
PRODUCT_PROPERTY_OVERRIDES += \
gralloc.drm.kms=/dev/dri/card0 \
ro.opengles.version=196609 \
ro.hardware.vulkan=broadcom \
wifi.interface=wlan0 \
ro.rfkilldisabled=1
ro.rfkilldisabled=1 \
dalvik.vm.dex2oat64.enabled=true \
keyguard.no_require_sim=true \
ro.logd.size=1m \
# debug.drm.mode.force=1280x800 \
# overlay packages
PRODUCT_PACKAGES += \
RpCarFrameworkOverlay \
CarConnectivityOverlay \
CarConnectivityOverlay
# system packages
PRODUCT_PACKAGES += \
@ -55,6 +55,7 @@ PRODUCT_PACKAGES += \
memtrack.rpi4 \
audio.primary.rpi4 \
audio.usb.default \
audio.a2dp.default \
audio.r_submix.default \
wificond \
wifilogd \
@ -91,15 +92,12 @@ PRODUCT_PACKAGES += \
android.hardware.health@2.1-impl \
android.hardware.health.storage@1.0-service \
android.hardware.wifi@1.0-service \
android.hardware.bluetooth@1.1-impl \
android.hardware.bluetooth@1.1-service \
android.hardware.bluetooth@1.0-service \
android.hardware.bluetooth@1.0-impl \
android.hardware.configstore@1.1-service \
android.hardware.tv.cec@1.0-service.mock \
vndservicemanager
# android.hardware.bluetooth@1.0-service \
# android.hardware.bluetooth@1.0-impl \
# Auto modules
PRODUCT_PACKAGES += \
android.hardware.broadcastradio@2.0-service \
@ -123,10 +121,10 @@ PRODUCT_COPY_FILES += \
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.broadcastradio.xml:system/etc/permissions/android.hardware.broadcastradio.xml
TARGET_USES_CAR_FUTURE_FEATURES := true
#TARGET_USES_CAR_FUTURE_FEATURES := true
# Include EVS reference implementations
ENABLE_EVS_SAMPLE := true
#ENABLE_EVS_SAMPLE := true
# system configurations
PRODUCT_COPY_FILES := \
@ -145,6 +143,8 @@ PRODUCT_COPY_FILES := \
$(LOCAL_PATH)/init.rpi4.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.rpi4.rc \
$(LOCAL_PATH)/init.rpi4.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.rpi4.usb.rc \
$(LOCAL_PATH)/ueventd.rc:$(TARGET_COPY_OUT_VENDOR)/etc/ueventd.rc \
$(LOCAL_PATH)/fstab.rpi4:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.rpi4 \
$(LOCAL_PATH)/fstab.rpi4:$(TARGET_COPY_OUT_RAMDISK)/fstab.rpi4 \
$(LOCAL_PATH)/Generic.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/Generic.kl \
$(LOCAL_PATH)/firmware/brcm/brcmfmac43455-sdio.bin:root/lib/firmware/brcm/brcmfmac43455-sdio.bin \
$(LOCAL_PATH)/firmware/brcm/brcmfmac43455-sdio.bin:$(TARGET_COPY_OUT_RAMDISK)/lib/firmware/brcm/brcmfmac43455-sdio.bin \
@ -163,22 +163,6 @@ PRODUCT_COPY_FILES := \
$(LOCAL_PATH)/bluetooth/bt_vendor.conf:system/etc/bluetooth/bt_vendor.conf \
$(PRODUCT_COPY_FILES)
ifeq ($(ENABLE_RPI4_BOOT_FROM_USB), true)
PRODUCT_COPY_FILES := \
$(LOCAL_PATH)/fstab.usb.rpi4:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.rpi4 \
$(LOCAL_PATH)/fstab.usb.rpi4:$(TARGET_COPY_OUT_RAMDISK)/fstab.rpi4 \
$(PRODUCT_COPY_FILES)
else
PRODUCT_COPY_FILES := \
$(LOCAL_PATH)/fstab.rpi4:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.rpi4 \
$(LOCAL_PATH)/fstab.rpi4:$(TARGET_COPY_OUT_RAMDISK)/fstab.rpi4 \
$(PRODUCT_COPY_FILES)
endif
# media configurations
PRODUCT_COPY_FILES := \
device/generic/goldfish/camera/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles.xml \
@ -206,7 +190,7 @@ PRODUCT_COPY_FILES += \
PRODUCT_CHARACTERISTICS := automotive
# These are things from atv_base, which android-rpi is based on,
# These are things from atv_base, which android-rpi is based on,
# that aren't in automotive builds.
$(call inherit-product-if-exists, frameworks/base/data/fonts/fonts.mk)
@ -222,25 +206,6 @@ $(call inherit-product-if-exists, frameworks/webview/chromium/chromium.mk)
PRODUCT_PACKAGES += \
librs_jni \
# cameraserver
PRODUCT_PACKAGES += \
UniversalMediaPlayer \
Gallery2 \
Calendar \
Contacts \
DeskClock \
Music \
Launcher3 \
# CarSetupWizard \
# SetupWizard \
# OneTimeInitializer \
ENABLE_CARTELEMETRY_SERVICE := true
cameraserver
$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk)

1
sepolicy/file.te 100644
View File

@ -0,0 +1 @@
type sysfs_gpu, fs_type, sysfs_type;