Skip to content

Commit

Permalink
support oreo
Browse files Browse the repository at this point in the history
 - temporarily disable wifi & bt
 - use kernel 4.9.46
  • Loading branch information
peyo-hd committed Sep 4, 2017
1 parent 8366ca3 commit a8c0e4e
Show file tree
Hide file tree
Showing 15 changed files with 107 additions and 38 deletions.
10 changes: 3 additions & 7 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ BOARD_USERDATAIMAGE_PARTITION_SIZE := 134217728 # 128M

BOARD_FLASH_BLOCK_SIZE := 4096

MALLOC_SVELTE := true

USE_XML_AUDIO_POLICY_CONF := 1

BOARD_GPU_DRIVERS := vc4
USE_OPENGL_RENDERER := true
TARGET_USE_PAN_DISPLAY := true
TARGET_USES_HWC2 := true

# Wifi
BOARD_WLAN_DEVICE := bcmdhd
Expand All @@ -33,12 +35,6 @@ BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd
WPA_SUPPLICANT_VERSION := VER_0_8_X
BOARD_WPA_SUPPLICANT_DRIVER := NL80211

# Bluetooth
BOARD_HAVE_BLUETOOTH := true
BOARD_HAVE_BLUETOOTH_BCM := true
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/brcm/rpi3/bluetooth
BOARD_CUSTOM_BT_CONFIG := device/brcm/rpi3/bluetooth/vnd_rpi3.txt

USE_CAMERA_STUB := true

BOARD_SEPOLICY_DIRS := \
Expand Down
12 changes: 3 additions & 9 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,21 @@ Read it first : https://github.com/android-rpi/local_manifests
# Build Kernel
Install gcc-arm-linux-gnueabihf
$ cd kernel/rpi
$ ARCH=arm scripts/kconfig/merge_config.sh arch/arm/configs/bcm2709_defconfig android/configs/android-base.cfg android/configs/android-recommended.cfg
$ ARCH=arm scripts/kconfig/merge_config.sh arch/arm/configs/bcm2709_defconfig kernel/configs/android-base.config kernel/configs/android-recommended.config
$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make zImage
$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make dtbs

# Install python mako module
sudo apt-get install python-mako

# Patch framework source :
https://github.com/android-rpi/device_brcm_rpi3/wiki#use-hal_pixel_format_bgra_8888
https://github.com/android-rpi/device_brcm_rpi3/wiki/Oreo-:-patch-framework-source

# Build Android source
Continue build with http://source.android.com/source/building.html
$ source build/envsetup.sh
$ lunch rpi3-eng
$ make ramdisk systemimage

# Help for build failure :
https://github.com/android-rpi/device_brcm_rpi3/wiki/Build-Errors

# Prepare sd card
Partitions of the card should be set-up like followings.
Expand All @@ -45,6 +42,3 @@ Read it first : https://github.com/android-rpi/local_manifests
# HDMI_MODE : If DVI monitor does not work, try followings for p1:/config.txt
hdmi_group=2
hdmi_mode=85

# How to put Android-TV launcher :
https://github.com/android-rpi/device_brcm_rpi3/wiki#how-to-apply-android-tv-leanback-launcher
Binary file modified boot/bootcode.bin
Binary file not shown.
Binary file modified boot/fixup.dat
Binary file not shown.
Binary file modified boot/start.elf
Binary file not shown.
4 changes: 2 additions & 2 deletions init.rpi3.rc
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ on post-fs-data

# Bluetooth
chmod 0660 /sys/class/rfkill/rfkill0/state
chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state
chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type

# Set indication (checked by vold) that we have finished this action
setprop vold.post_fs_data_done 1
Expand Down
53 changes: 53 additions & 0 deletions manifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<manifest version="1.0" type="device">
<hal format="hidl">
<name>android.hardware.configstore</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>ISurfaceFlingerConfigs</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>android.hardware.graphics.allocator</name>
<transport>hwbinder</transport>
<impl level="generic"></impl>
<version>2.0</version>
<interface>
<name>IAllocator</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>android.hardware.graphics.mapper</name>
<transport arch="32+64">passthrough</transport>
<impl level="generic"></impl>
<version>2.0</version>
<interface>
<name>IMapper</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>android.hardware.graphics.composer</name>
<transport arch="32+64">passthrough</transport>
<version>2.1</version>
<interface>
<name>IComposer</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>android.hardware.media.omx</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IOmx</name>
<instance>default</instance>
</interface>
<interface>
<name>IOmxStore</name>
<instance>default</instance>
</interface>
</hal>
</manifest>
21 changes: 19 additions & 2 deletions overlay/frameworks/base/core/res/res/values/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@
Any other values will have surprising consequences. -->
<integer name="config_defaultUiModeType">4</integer>

<!-- Override long press on home: launch assist intent. -->
<integer name="config_longPressOnHomeBehavior">2</integer>
<!-- Control the behavior when the user long presses the home button.
0 - Nothing
1 - Recent apps view in SystemUI
2 - Launch assist intent
This needs to match the constants in
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
-->
<integer name="config_longPressOnHomeBehavior">0</integer>

<!-- Override configuration check for dpad so that we always appear to have one -->
<bool name="config_hasPermanentDpad">true</bool>
Expand All @@ -48,4 +54,15 @@
<item>"9,1"</item>
</string-array>

<!-- Apps that are authorized to access shared accounts -->
<string name="config_appsAuthorizedForSharedAccounts">;com.android.tv.settings;</string>

<!--
Sets the package names whose certificates should be used to
verify location providers are allowed to be loaded.
-->
<string-array name="config_locationProviderPackageNames" translatable="false">
<item>com.android.location.fused</item>
</string-array>

</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@
<!-- Do not give up on DHCP -->
<integer name="def_max_dhcp_retries">0</integer>

<bool name="def_backup_enabled">false</bool>

</resources>
32 changes: 22 additions & 10 deletions rpi3.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,45 @@ PRODUCT_MANUFACTURER := brcm

include frameworks/native/build/tablet-7in-hdpi-1024-dalvik-heap.mk

PRODUCT_PROPERTY_OVERRIDES += \
debug.drm.mode.force=1280x720 \
ro.opengles.version=131072 \
ro.sf.lcd_density=213 \
wifi.interface=wlan0

# application packages
PRODUCT_PACKAGES += \
Launcher2 \
LeanbackLauncher \
Settings \
Browser2
Settings

# system packages
PRODUCT_PACKAGES += \
libGLES_mesa \
gralloc.$(TARGET_PRODUCT) \
hwcomposer.$(TARGET_PRODUCT) \
audio.primary.$(TARGET_PRODUCT) \
gralloc.rpi3 \
hwcomposer.rpi3 \
audio.primary.rpi3 \
audio.usb.default \
wpa_supplicant \
wpa_supplicant.conf

# hardware/interfaces
PRODUCT_PACKAGES += \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected]

# system configurations
PRODUCT_COPY_FILES := \
hardware/broadcom/wlan/bcmdhd/config/wpa_supplicant_overlay.conf:system/etc/wifi/wpa_supplicant_overlay.conf \
frameworks/native/data/etc/android.hardware.ethernet.xml:system/etc/permissions/android.hardware.ethernet.xml \
frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml \
frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \
frameworks/native/data/etc/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml \
frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \
$(LOCAL_PATH)/manifest.xml:system/vendor/manifest.xml \
$(LOCAL_PATH)/rpi3_core_hardware.xml:system/etc/permissions/rpi3_core_hardware.xml \
$(LOCAL_PATH)/init.rpi3.rc:root/init.rpi3.rc \
$(LOCAL_PATH)/init.usb.rc:root/init.usb.rc \
Expand All @@ -42,8 +56,6 @@ PRODUCT_COPY_FILES := \
$(LOCAL_PATH)/Generic.kl:system/usr/keylayout/Generic.kl \
$(LOCAL_PATH)/firmware/brcm/brcmfmac43430-sdio.bin:root/lib/firmware/brcm/brcmfmac43430-sdio.bin \
$(LOCAL_PATH)/firmware/brcm/brcmfmac43430-sdio.txt:root/lib/firmware/brcm/brcmfmac43430-sdio.txt \
$(LOCAL_PATH)/firmware/brcm/BCM43430A1.hcd:root/lib/firmware/brcm/BCM43430A1.hcd \
$(LOCAL_PATH)/bluetooth/bt_vendor.conf:system/etc/bluetooth/bt_vendor.conf \
$(PRODUCT_COPY_FILES)

# media configurations
Expand Down
1 change: 0 additions & 1 deletion sepolicy/bluetooth.te
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
allow bluetooth rfkill_device:chr_file rw_file_perms;
allow bluetooth self:socket create_socket_perms;
1 change: 1 addition & 0 deletions sepolicy/hal_graphics_allocator.te
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
allow hal_graphics_allocator dri_device:chr_file rw_file_perms;
1 change: 0 additions & 1 deletion sepolicy/wpa.te

This file was deleted.

4 changes: 0 additions & 4 deletions system.prop

This file was deleted.

4 changes: 2 additions & 2 deletions ueventd.rpi3.rc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/dev/ttyAMA0 0660 bluetooth net_bt_stack
/dev/rfkill 0660 bluetooth net_bt_stack
/dev/ttyAMA0 0660 bluetooth bluetooth
/dev/rfkill 0660 bluetooth bluetooth

0 comments on commit a8c0e4e

Please sign in to comment.