android/device-ti-am65xevm.git
2 years agoam65xevm: fastboot.sh: use PRODUCT_OUT to find images d-oreo-mr1-core-release
Jacob Stiffler [Sat, 1 Dec 2018 00:30:08 +0000 (00:30 +0000)]
am65xevm: fastboot.sh: use PRODUCT_OUT to find images

* Follow the precedent set by other images, and use PRODUCT_OUT.

Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
2 years agosepolicy: Allow ueventd to request modules
Ruslan Trofymenko [Thu, 8 Nov 2018 21:40:50 +0000 (21:40 +0000)]
sepolicy: Allow ueventd to request modules

Allow ueventd to request the kernel to load modules

Signed-off-by: Ruslan Trofymenko <ruslan.trofymenko@linaro.org>
Acked-by: Praneeth Bajjuri <praneeth@ti.com>
2 years agosepolicy: Add policy for ion_device
Praneeth Bajjuri [Fri, 2 Nov 2018 06:48:03 +0000 (06:48 +0000)]
sepolicy: Add policy for ion_device

pvr and graphics services uses ion_device now,
update sepolicy to fix denials

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2 years agoAdd ueventd rule to set permissions on /dev/ion
Andrew F. Davis [Thu, 1 Nov 2018 16:29:54 +0000 (11:29 -0500)]
Add ueventd rule to set permissions on /dev/ion

ION can be used from user-space non-root programs and
so should have permissions for such.

Signed-off-by: Andrew F. Davis <afd@ti.com>
2 years agoam65xevm: remove static module installing
Praneeth Bajjuri [Wed, 31 Oct 2018 06:10:48 +0000 (06:10 +0000)]
am65xevm: remove static module installing

with reintroduction of ueventd dynamic kernel module loading,
we dont need to install modules statically, hence removing
this from init.am65xevmboard.rc

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2 years agoam65xevm: sepolicy: Allow ueventd to insert modules
Ruslan Trofymenko [Wed, 31 Oct 2018 06:10:47 +0000 (06:10 +0000)]
am65xevm: sepolicy: Allow ueventd to insert modules

Allow ueventd daemon to load modules in response to modalias events.
This patch makes dynamic kernel module loading work in 'enforcing' mode.

Signed-off-by: Ruslan Trofymenko <ruslan.trofymenko@linaro.org>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2 years agoam65xevm: Fix selinux warnings
Mykhailo Sopiha [Tue, 30 Oct 2018 19:38:18 +0000 (19:38 +0000)]
am65xevm: Fix selinux warnings

This patch fixes selinux warnings during bootup process and
video playback.

Additionally to dontaudit and allow rules for basic objects
one more object was declared - mmc_block_device (data partition)
to include fsck permissions for it.

Signed-off-by: Mykhailo Sopiha <mykhailo.sopiha@linaro.org>
Acked-by: Ruslan Trofymenko <ruslan.trofymenko@linaro.org>
2 years agoam65xevm: Pulling sepolicies from am57xevm
Mykhailo Sopiha [Sat, 27 Oct 2018 00:12:52 +0000 (00:12 +0000)]
am65xevm: Pulling sepolicies from am57xevm

This patch includes minimal sepolicies for enabling boot up in
enforcing mode for trebleized device.

Signed-off-by: Mykhailo Sopiha <mykhailo.sopiha@linaro.org>
Acked-by: Ruslan Trofymenko <ruslan.trofymenko@linaro.org>
2 years agoam65xevm: fastboot.sh: update flashing bootloader images
Praneeth Bajjuri [Wed, 24 Oct 2018 04:50:34 +0000 (04:50 +0000)]
am65xevm: fastboot.sh: update flashing bootloader images

update fastboot flash script to include oem format and reboot-bootloader
command for updating bootloader images.

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2 years agoam65xevm: Add support for 64b and 32b apps
Praneeth Bajjuri [Thu, 25 Oct 2018 22:45:34 +0000 (17:45 -0500)]
am65xevm: Add support for 64b and 32b apps

Set TARGET_SUPPORTS_32_BIT_APPS and TARGET_SUPPORTS_64_BIT_APPS,

TARGET_PREFERS_32_BIT_APPS get apps to build for 32-bit only,
and leaves TARGET_SUPPORTS_64_BIT_APPS unset.

This confuses zygote64 because it finds an empty 64-bit ABI list
and causes zygote* process to fail on android init.

Hence Enabling support for both 32b and 64b apps.
and making 64b as primary , 32b as secondary

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2 years agoam65xevm: Enable dex-preoptimization
Praneeth Bajjuri [Thu, 25 Oct 2018 22:19:12 +0000 (17:19 -0500)]
am65xevm: Enable dex-preoptimization

Enable dex-preoptimization to speed up the first boot sequence

Enabling this feature also increases the system image
size close to 1GB. Increasing the size of system image partition.

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2 years agoRevert "TEMP: Disable optimizing DEX code at build time"
Praneeth Bajjuri [Thu, 25 Oct 2018 22:15:48 +0000 (17:15 -0500)]
Revert "TEMP: Disable optimizing DEX code at build time"

This reverts commit e0535a783ba932377bc2ad580daab578f336ad89.

following commits on the top enables DEXPREOPT

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2 years agoam65xevm: Enable PRODUCT_TREBLE
Praneeth Bajjuri [Thu, 18 Oct 2018 05:52:11 +0000 (05:52 +0000)]
am65xevm: Enable PRODUCT_TREBLE

This patch sets ro.treble.enable=true

- turned on legacy PRODUCT_COMPATIBILITY_MATRIX_LEVEL
- Enabled FULL_TREBLE and vndk support in device*.mk
- Enforced VINFT manifest as part of treble requirements
- Added compatibility matrix to match device manifest and pass prebuild checks
- Added missing services for compatibility matrix
- Extended device manifest with missing hals
- removed unused audio packages
- re-arranged device*.mk and BoardConfig.mk

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2 years agoam65xevm: enable property ro.sf.lcd_density
Praneeth Bajjuri [Thu, 18 Oct 2018 05:52:10 +0000 (05:52 +0000)]
am65xevm: enable property ro.sf.lcd_density

01-01 00:00:09.413   158   219 E SurfaceFlinger: ro.sf.lcd_density
must be defined as a build property.

this message is seen when ro.sf.lcd_density is not set
in device*.mk.
If this build parameter is not set, then xdpi from hwc display is used for density.

when ro.sf.lcd_density is set,it is used as primary for Surfaceflinger DisplayInfo objects

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2 years agoam65xevm: media_codecs.xml: add default codecs
Praneeth Bajjuri [Thu, 18 Oct 2018 05:52:09 +0000 (05:52 +0000)]
am65xevm: media_codecs.xml: add default codecs

add default audio and video codecs

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2 years agoam65xevm: move touchscreen to later boot stage
Praneeth Bajjuri [Thu, 18 Oct 2018 05:52:08 +0000 (05:52 +0000)]
am65xevm: move touchscreen to later boot stage

having touchscreen driver loaded at early-init stage causing
dialog box appear on home screen "System not responding and contact
device manufacturer"

moving touschreen to post boot complete for now.
This issue is seen and reported on touchscreen on am57x gpevm and idk too.
and seems to be due to android input subsystem not ready in time.

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2 years agoam65xevm: Add initial manifest and compatibility_matrix
Praneeth Bajjuri [Thu, 18 Oct 2018 05:52:07 +0000 (05:52 +0000)]
am65xevm: Add initial manifest and compatibility_matrix

Inital manifest and compatibility matrix

Needed to enable treble configuration

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2 years agoam65xevm: Include goodix touchscreen module
Praneeth Bajjuri [Mon, 15 Oct 2018 23:04:27 +0000 (18:04 -0500)]
am65xevm: Include goodix touchscreen module

Include goodix touchscreen module in init.am65xevmboard.rc

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2 years agoam65xevm: Initial fastboot script
Praneeth Bajjuri [Mon, 15 Oct 2018 22:35:11 +0000 (17:35 -0500)]
am65xevm: Initial fastboot script

Initial Fastboot flashing script to flash all
android images on am65xevm

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2 years agoam65xevm: Add 64bit binder
Praneeth Bajjuri [Fri, 12 Oct 2018 17:53:17 +0000 (12:53 -0500)]
am65xevm: Add 64bit binder

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2 years agoAdd device settings overlays
Andrew F. Davis [Mon, 15 Oct 2018 17:28:17 +0000 (12:28 -0500)]
Add device settings overlays

These define some default behaviors and interface settings.

Signed-off-by: Andrew F. Davis <afd@ti.com>
2 years agoAdd device feature permissions
Andrew F. Davis [Mon, 15 Oct 2018 17:27:29 +0000 (12:27 -0500)]
Add device feature permissions

Signed-off-by: Andrew F. Davis <afd@ti.com>
2 years agoTEMP: Disable optimizing DEX code at build time
Andrew F. Davis [Mon, 8 Oct 2018 21:06:06 +0000 (16:06 -0500)]
TEMP: Disable optimizing DEX code at build time

This works around a boot error preventing boot, but
also drastically increases first time boot so this should
be reverted when the error is root-caused.

Signed-off-by: Andrew F. Davis <afd@ti.com>
2 years agoAdd Audio and Security related packages
Andrew F. Davis [Mon, 8 Oct 2018 21:04:36 +0000 (16:04 -0500)]
Add Audio and Security related packages

This also stops a boot error loop when looking for an
audio device for audioserver service.

Signed-off-by: Andrew F. Davis <afd@ti.com>
2 years agoam65x_evm: workaround: Set UDC controller manually
Sam Protsenko [Fri, 5 Oct 2018 04:10:00 +0000 (04:10 +0000)]
am65x_evm: workaround: Set UDC controller manually

Ideally should have been done in Android init.cpp
But due to loading dwc3.ko dynamically we can't rely on it
as set_usb_controller() executed before early-init

This workaround needs to be removed once dwc3 can work as
built-in

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2 years agoam65x-evm: workaround: configure adb as default
Praneeth Bajjuri [Fri, 5 Oct 2018 04:09:59 +0000 (04:09 +0000)]
am65x-evm: workaround: configure adb as default

more details of history from device/ti/am57xevm:
commit dda6d31bf1a2 "workaround: configure adb as default."

Need to configure as adb by default till UI is up.

This needs to be reverted once home screen is up

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2 years agoam65x-evm: Enable USB configuration for ADB support
Praneeth Bajjuri [Fri, 5 Oct 2018 04:09:58 +0000 (04:09 +0000)]
am65x-evm: Enable USB configuration for ADB support

Reference from device/ti/am57xevm:
commit 626cf2cc64be "am57xevm: Sync USB init script with Hikey"

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2 years agoAllow U-Boot to manually apply overlays
Andrew F. Davis [Fri, 5 Oct 2018 00:50:44 +0000 (00:50 +0000)]
Allow U-Boot to manually apply overlays

U-Boot no longer hard-codes the list of overlays to
apply based on the board type (EVM, IDK) rather detects
daughter-cards individually and applies and overlay for
each. To allow the same with FIT keep each overlay as
a separate configuration.

Signed-off-by: Andrew F. Davis <afd@ti.com>
2 years agoRemove ramdisk load address from FIT file
Andrew F. Davis [Sat, 29 Sep 2018 00:36:24 +0000 (00:36 +0000)]
Remove ramdisk load address from FIT file

The ramdisk image does not need to be loaded at a particular
address. To prevent it from getting overwritten do not specify
any load address to let U-Boot manage it for us.

Signed-off-by: Andrew F. Davis <afd@ti.com>
2 years agoMove data partition in fstab to eMMC
Andrew F. Davis [Sat, 29 Sep 2018 01:49:57 +0000 (01:49 +0000)]
Move data partition in fstab to eMMC

The SD card was used for testing. With fastboot support
we can write this partition to eMMC. Also drop the boot
partition as this is not a filesystem type partition.

Signed-off-by: Andrew F. Davis <afd@ti.com>
2 years agoAdd initial SEpolicy files to enable init and pvr services
Andrew F. Davis [Wed, 26 Sep 2018 21:24:00 +0000 (16:24 -0500)]
Add initial SEpolicy files to enable init and pvr services

Even in permissive mode services cannot be launched from
init without a base SE policy string in place. Add this here.

Signed-off-by: Andrew F. Davis <afd@ti.com>
2 years agoAdd minimal fstab file to mount boot and data partitions
Andrew F. Davis [Wed, 26 Sep 2018 21:23:01 +0000 (16:23 -0500)]
Add minimal fstab file to mount boot and data partitions

Signed-off-by: Andrew F. Davis <afd@ti.com>
2 years agoAdd all kernel modules to vendor image
Andrew F. Davis [Fri, 14 Sep 2018 02:46:43 +0000 (02:46 +0000)]
Add all kernel modules to vendor image

Signed-off-by: Andrew F. Davis <afd@ti.com>
2 years agoIncrease vendor partition size to 512MB
Andrew F. Davis [Fri, 14 Sep 2018 02:46:42 +0000 (02:46 +0000)]
Increase vendor partition size to 512MB

The vendor partition hold all the kernel modules, for the
64-bit build these modules take more space than 256MB,
grow the vendor partition accordingly.

Signed-off-by: Andrew F. Davis <afd@ti.com>
2 years agoAdd DT overlays to boot_fit.img
Andrew F. Davis [Wed, 12 Sep 2018 23:36:22 +0000 (23:36 +0000)]
Add DT overlays to boot_fit.img

Signed-off-by: Andrew F. Davis <afd@ti.com>
2 years agoAdd init files needed for graphics support
Andrew F. Davis [Wed, 12 Sep 2018 23:36:21 +0000 (23:36 +0000)]
Add init files needed for graphics support

Start the PVR service and give the created device
nodes proper permissions.

Signed-off-by: Andrew F. Davis <afd@ti.com>
2 years agoRevert "Switch from add_lunch_combo to COMMON_LUNCH_CHOICES"
Praneeth Bajjuri [Wed, 5 Sep 2018 14:07:26 +0000 (09:07 -0500)]
Revert "Switch from add_lunch_combo to COMMON_LUNCH_CHOICES"

This reverts commit 911fc231a4ec417e605fac433c145b4ed1c1c0e6.

The associated changes for COMMON_LUNCH_CHOICES is only available
in AOSP master.

on Oreo-MR1 lunch command doesnt show am65xevm-* as target option.
So reverting the change for Oreo, The original patch is good for AOSP
master

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2 years agoBuild FIT image
Andrew F. Davis [Wed, 15 Aug 2018 23:25:17 +0000 (23:25 +0000)]
Build FIT image

In addition to already generated regular boot.img, build also FIT image
containing:
 - Image
 - ramdisk
 - dtb files
 - dtbo files
 - boards configurations info

Resulting image will be named boot_fit.img and will be placed to
$(PRODUCT_OUT) dir.

One can disable the generation of FIT boot image by disabling TARGET_BOOTIMAGE_FIT option in BoardConfig.mk file.

Based on the same by: Sam Protsenko <semen.protsenko@linaro.org>

Signed-off-by: Andrew F. Davis <afd@ti.com>
2 years agoFix product model name
Andrew F. Davis [Wed, 15 Aug 2018 23:18:18 +0000 (23:18 +0000)]
Fix product model name

Signed-off-by: Andrew F. Davis <afd@ti.com>
2 years agoRemove cache and recovery images
Andrew F. Davis [Wed, 15 Aug 2018 23:18:16 +0000 (23:18 +0000)]
Remove cache and recovery images

Cache is not used anymore and recovery is not needed
as we can boot from an SD card to recover.

Signed-off-by: Andrew F. Davis <afd@ti.com>
2 years agoSwitch from add_lunch_combo to COMMON_LUNCH_CHOICES
Andrew F. Davis [Wed, 15 Aug 2018 23:18:15 +0000 (23:18 +0000)]
Switch from add_lunch_combo to COMMON_LUNCH_CHOICES

Signed-off-by: Andrew F. Davis <afd@ti.com>
2 years agoAdd libgbm to project build
Andrew F. Davis [Wed, 5 Sep 2018 00:19:45 +0000 (00:19 +0000)]
Add libgbm to project build

This is used by our graphics buffer allocator.

Signed-off-by: Andrew F. Davis <afd@ti.com>
2 years agoam65xevm: Initial device project baseline
Andrew F. Davis [Tue, 19 Jun 2018 01:37:40 +0000 (01:37 +0000)]
am65xevm: Initial device project baseline

Initial content is based on am57xevm device project.

AM65x SoC is lead device of K3 Multicore SoC architecture platform
Targeted for broad/catalog market and industrial control to meet
product needs of modern embedded devices and platforms.

More Info on Processor:
http://www.ti.com/lit/ug/spruid7/spruid7.pdf

Signed-off-by: Andrew F. Davis <afd@ti.com>
[praneeth@ti.com: updated commitmsg]
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2 years agoInitial empty commit
Andrew F. Davis [Mon, 18 Jun 2018 19:28:27 +0000 (14:28 -0500)]
Initial empty commit