Skip to content

Commit 25f8ee0

Browse files
glaroquepraneethbajjuri
authored andcommitted
feat(android): AM67A: add new android platform
Copy from AM62PX Android platform documentation and rename to add AM67A support. Signed-off-by: Guillaume La Roque <[email protected]>
1 parent 1cc973c commit 25f8ee0

18 files changed

+601
-3
lines changed

Makefile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,20 @@ $(info ROOTDIR is $(ROOTDIR))
2121

2222
$(info DEVFAMILY is $(DEVFAMILY_UP))
2323

24-
ifeq ($(DEVFAMILY_UP), $(filter $(DEVFAMILY_UP), J721E J7200 J721S2 J784S4 AM68 AM69 J722S AM67 J742S2 AM68A AM67A AM69A TDA4VM))
25-
CONFDIR = source/devices/J7_Family/${OS_LOW}
24+
ifeq ($(OS_LOW), android)
25+
# For Android, AM67A and AM67 have their own device directories
26+
ifeq ($(DEVFAMILY_UP), $(filter $(DEVFAMILY_UP), J721E J7200 J721S2 J784S4 AM68 AM69 J722S J742S2 AM68A AM69A TDA4VM))
27+
CONFDIR = source/devices/J7_Family/${OS_LOW}
28+
else
29+
CONFDIR = source/devices/$(DEVFAMILY_UP)/${OS_LOW}
30+
endif
2631
else
27-
CONFDIR = source/devices/$(DEVFAMILY_UP)/${OS_LOW}
32+
# For Linux and other OSes, use J7_Family grouping including AM67A and AM67
33+
ifeq ($(DEVFAMILY_UP), $(filter $(DEVFAMILY_UP), J721E J7200 J721S2 J784S4 AM68 AM69 J722S AM67 J742S2 AM68A AM67A AM69A TDA4VM))
34+
CONFDIR = source/devices/J7_Family/${OS_LOW}
35+
else
36+
CONFDIR = source/devices/$(DEVFAMILY_UP)/${OS_LOW}
37+
endif
2838
endif
2939

3040
$(info CONFDIR is $(CONFDIR))
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# General family replacement variables and configuration values for Android build
2+
3+
# This file is processed by Python scripts to define both replacement
4+
# variable and configuration values for a device family build.
5+
# For replacement variables, all variables should be listed on a single
6+
# line, and all the variables should be listed on consecutive lines
7+
# (i.e. no additional blank lines between the replacement variables).
8+
# Similarly, all the configuration values should be listed on individual,
9+
# consecutive lines (with no blank linues between the configuration values).
10+
#
11+
# Note that neither replacement variables nor configuration values may contain
12+
# a colon (i.e. ":") in their name. However, values may contain colons.
13+
14+
Replacement Variables
15+
---------------------
16+
'__PART_FAMILY_NAME__' : 'AM67A'
17+
'__PART_FAMILY_DEVICE_NAMES__' : 'AM67A'
18+
'__PRODUCT_LINE_NAME__' : 'Sitara MPU'
19+
'__SDK_OS_NAME__' : 'Processor SDK Android'
20+
'__SDK_FULL_NAME__' : 'Processor SDK Android AM67A'
21+
'__SDK_SHORT_NAME__' : 'PSDKA'
22+
'__LINUX_UBUNTU_VERSION_LONG__' : '22.04 (64-bit)'
23+
'__LINUX_UBUNTU_VERSION_SHORT__' : '22.04'
24+
'__RTOS_UBUNTU_VERSION_LONG__' : '22.04 (64-bit), 16.04 (64-bit)'
25+
'__WINDOWS_SUPPORTED_LONG__' : '10 (64-bit)'
26+
'__FEATURINGMATRIX__' : \
27+
'__SYSFW_CORE_NAME__' : 'TIFS'
28+
29+
Configuration Values
30+
--------------------
31+
'CONFIG_part_family' : 'AM67A_family'
32+
'CONFIG_part_variant' : 'AM67A'
33+
'CONFIG_sdk' : 'PSDKA'
34+
'CONFIG_icss_support' : 'no'
35+
'CONFIG_rt_linux_support' : 'no'
36+
'CONFIG_gpu_ip' : 'Rogue_BXS'
37+
'CONFIG_crypto' : 'sa2ul'
38+
'CONFIG_mcrc' : 'mcrc'
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Device Family name
2+
fam_name = 'AM67A'
3+
4+
# Project name and HTML title
5+
project = u'Processor SDK Android for AM67A'
6+
html_title = 'Processor SDK AM67A Documentation'
7+
8+
# The master toctree document.
9+
master_doc = 'devices/AM67A/android/index'
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
devices/AM67A/android/index
2+
devices/AM67A/android/Release_Specific
3+
devices/AM67A/android/Release_Specific_Release_Notes
4+
devices/AM67A/android/Application_Notes
5+
devices/AM67A/android/Application_Notes_dtbo_support
6+
devices/AM67A/android/Application_Notes_BeagleY_AI
7+
8+
android/Application_Notes_Android_Bootloader_SD_Card
9+
android/Application_Notes_Android_Dual_Screen
10+
android/Application_Notes_Android_Multimedia_Video
11+
android/Application_Notes_Android_SD_CARD
12+
android/Application_Notes_Android_Secure_Build
13+
android/Application_Notes_Camera
14+
android/Application_Notes_Partitions
15+
android/Application_Notes_Sample_Maps_App
16+
android/Application_Notes_Simple_UI_App
17+
android/Overview_Getting_Started_Guide
18+
android/Overview_Building_the_SDK
19+
android/Overview
20+
android/Overview_Technical_Support
21+
android/Overview_Flashing
22+
23+
android/Foundational_Components
24+
android/Foundational_Components_Kernel
25+
android/Foundational_Components_Bootloaders
26+
android/Foundational_Components_OTA

source/android/Application_Notes_Android_Bootloader_SD_Card.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,20 @@ the images are built from source.
134134
- 01000000
135135
- 11000010
136136

137+
.. ifconfig:: CONFIG_part_variant in ('AM67A')
138+
139+
.. list-table::
140+
:widths: 16 16 16
141+
:header-rows: 1
142+
143+
* - Switch Label
144+
- SW3: 12345678
145+
- SW4: 12345678
146+
147+
* - SD
148+
- 11000010
149+
- 01000000
150+
137151
2. Insert the SD card into the |__PART_FAMILY_NAME__| SK EVM.
138152

139153
3. Ensure the device is plugged in with USB host and debug UART/serial debug
@@ -146,6 +160,12 @@ the images are built from source.
146160
147161
$ sudo picocom -b 115200 -r -l /dev/ttyUSB0
148162
163+
.. ifconfig:: CONFIG_part_variant in ('AM67A')
164+
165+
.. code-block:: console
166+
167+
$ sudo picocom -b 115200 -r -l /dev/ttyUSB2
168+
149169
5. Boot the board with SD card.
150170

151171
6. Stop at U-Boot console (interrupt the auto-boot countdown) and do below commands to setup Android

source/android/Application_Notes_Android_Secure_Build.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ The bootloaders scripts will detect that ``avb_pub.key`` is present and will inc
7676

7777
The user can also specify the absolute path of the avb_pub key in yaml config (``build/config/boards/am62p-sk.yaml``):
7878

79+
.. ifconfig:: CONFIG_part_variant in ('AM67A')
80+
81+
The user can also specify the absolute path of the avb_pub key in yaml config (``build/config/boards/am67a-evm.yaml``):
82+
7983
.. code-block:: yaml
8084
8185
secure:
@@ -199,6 +203,17 @@ Build Android
199203
$ export FACTORY_BUILD=true
200204
$ m -j$(nproc) # OR nice -n19 build/soong/soong_ui.bash --make-mode -j$(nproc)
201205
206+
.. ifconfig:: CONFIG_part_variant in ('AM67A')
207+
208+
.. code-block:: console
209+
210+
$ cd ${YOUR_PATH}/ti-aosp-16
211+
$ source build/envsetup.sh
212+
$ lunch am67a-bp2a-user
213+
214+
$ export FACTORY_BUILD=true
215+
$ m -j$(nproc) # OR nice -n19 build/soong/soong_ui.bash --make-mode -j$(nproc)
216+
202217
Flash Android
203218
-------------
204219

@@ -233,6 +248,15 @@ Flash using the script: in a different terminal,
233248
# for AM62P SK EVM
234249
$ sudo ./flashall.sh --board am62px-sk
235250
251+
.. ifconfig:: CONFIG_part_variant in ('AM67A')
252+
253+
change directory to ``out/target/product/am67a`` and run the ``flashall.sh`` script:
254+
255+
.. code-block:: console
256+
257+
# for AM67A EVM
258+
$ sudo ./flashall.sh --board am67a-evm
259+
236260
.. warning::
237261

238262
**Device Locking and Unlock Capability**

source/android/Overview_Building_the_SDK.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
Building the SDK
55
################
66

7+
.. ifconfig:: CONFIG_part_variant in ('AM67A')
8+
9+
.. note::
10+
11+
The android images generated for the AM67A-EVM are not compatible with the BeagleY-AI board.
12+
For building and flashing the BeagleY-AI, see the :ref:`beagley-ai-app-note`.
13+
714
**************
815
Build PC setup
916
**************
@@ -98,6 +105,19 @@ Where ``<BUILD_TARGET>`` is listed in the table below :
98105

99106
The recommended ``<BUILD_TARGET>`` is ``am62p-bp2a-userdebug``.
100107

108+
.. ifconfig:: CONFIG_part_variant in ('AM67A')
109+
110+
============================= ============================
111+
Android Build type Build target
112+
============================= ============================
113+
AM67A-EVM Tablet userdebug ``am67a-bp2a-userdebug``
114+
AM67A-EVM Tablet user ``am67a-bp2a-user``
115+
AM67A-EVM Car userdebug ``am67a_car-bp2a-userdebug``
116+
AM67A-EVM Car user ``am67a_car-bp2a-user``
117+
============================= ============================
118+
119+
The recommended ``<BUILD_TARGET>`` is ``am67a-bp2a-userdebug``.
120+
101121
It's possible to customize the standard build (``m``), by passing build flags.
102122
For example, the following enables ADB on user builds:
103123

source/android/Overview_Flashing.rst

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ Flashing Instruction
99
These instructions are for the AM62x SK EVM.
1010
For flashing the Beagle Play, see the :ref:`beagleplay-app-note`.
1111

12+
.. ifconfig:: CONFIG_part_variant in ('AM67A')
13+
14+
These instructions are for the AM67A EVM.
15+
For flashing the BeagleY-AI, see the :ref:`beagley-ai-app-note`.
16+
1217

1318
************
1419
DFU Recovery
@@ -54,6 +59,10 @@ Once the build is complete, follow the steps below to flash the images to eMMC.
5459

5560
.. Image:: ../images/am62px_sk_evm_setup.png
5661

62+
.. ifconfig:: CONFIG_part_variant in ('AM67A')
63+
64+
.. Image:: ../images/am67a_evm_setup.jpg
65+
5766
1. Change the boot mode DIP switches to DFU mode:
5867

5968
.. ifconfig:: CONFIG_part_variant in ('AM62X')
@@ -84,6 +93,20 @@ Once the build is complete, follow the steps below to flash the images to eMMC.
8493
- 00000000
8594
- 11001010
8695

96+
.. ifconfig:: CONFIG_part_variant in ('AM67A')
97+
98+
.. list-table::
99+
:widths: 16 16 16
100+
:header-rows: 1
101+
102+
* - Switch Label
103+
- SW3: 12345678
104+
- SW4: 12345678
105+
106+
* - USB DFU
107+
- 11001010
108+
- 00000000
109+
87110
2. Ensure the device is plugged in with USB host and debug UART/serial debug
88111

89112
3. Open a terminal debugger to view console output from the device:
@@ -142,6 +165,21 @@ Once the build is complete, follow the steps below to flash the images to eMMC.
142165
143166
$ snagrecover -s am625 -f ./am62px-sk-evm-hsfs.yaml
144167
168+
.. ifconfig:: CONFIG_part_variant in ('AM67A')
169+
170+
.. code-block:: console
171+
172+
# If you are using binaries built locally
173+
$ cd out/target/product/am67a
174+
175+
(OR)
176+
177+
# If you are using pre-built binaries from SDK download page
178+
$ cd AM67A_11.00.00_emmc
179+
180+
# for AM67A EVM (HS-FS only: by default)
181+
$ snagrecover -s am62p5 -f ./am67a-evm-hsfs.yaml
182+
145183
produces::
146184

147185
Starting recovery of am625 board
@@ -296,6 +334,28 @@ Once the build is complete, follow the steps below to flash the images to eMMC.
296334
Create GPT partition table
297335
OKAY [ 0.032s]
298336
337+
.. ifconfig:: CONFIG_part_variant in ('AM67A')
338+
339+
.. code-block:: console
340+
341+
# If you are using binaries built locally
342+
$ cd out/target/product/am67a
343+
344+
(OR)
345+
346+
# If you are using pre-built binaries from SDK download page
347+
$ cd AM67A_11.00.00_emmc
348+
349+
# for AM67A EVM (HS-FS only: by default)
350+
$ sudo ./flashall.sh --board am67a-evm
351+
board: am67a-evm
352+
Fastboot: ./fastboot
353+
Generating bootloader-am67a-evm.img ...
354+
mkfs.fat 4.2 (2021-01-31)
355+
Generating bootloader-am67a-evm.img: DONE
356+
Create GPT partition table
357+
OKAY [ 0.032s]
358+
299359
- ::
300360

301361
Writing GPT: success!
@@ -362,6 +422,20 @@ Once the build is complete, follow the steps below to flash the images to eMMC.
362422
- 00000000
363423
- 11000010
364424

425+
.. ifconfig:: CONFIG_part_variant in ('AM67A')
426+
427+
.. list-table::
428+
:widths: 16 16 16
429+
:header-rows: 1
430+
431+
* - Switch Label
432+
- SW3: 12345678
433+
- SW4: 12345678
434+
435+
* - EMMC (with UDA)
436+
- 11010010
437+
- 00000000
438+
365439

366440
7. Board should boot the Android images now.
367441

source/android/Overview_Getting_Started_Guide.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,14 @@ Using Prebuilt binaries
2828
2929
$ tar -zxvf AM62Px_XX.YY.ZZ_emmc.tgz
3030
31+
32+
.. ifconfig:: CONFIG_part_variant in ('AM67A')
33+
34+
The SDK download page provides pre-built Android binaries (:file:`AM67A_{XX}.{YY}.{ZZ}_emmc.tgz`) which can be readily used to flash the |__PART_FAMILY_DEVICE_NAMES__| EVM and boot Android.
35+
36+
Extract the contents of the pre-built images tarball and follow the procedure mentioned in :ref:`android-flashing` page to flash these binaries to the EVM.
37+
38+
.. code-block:: console
39+
40+
$ tar -zxvf AM67A_XX.YY.ZZ_emmc.tgz
41+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.. _android-application-notes:
2+
3+
#################
4+
Application Notes
5+
#################
6+
7+
.. toctree::
8+
:maxdepth: 5
9+
10+
/android/Application_Notes_Partitions
11+
Application_Notes_dtbo_support
12+
/android/Application_Notes_Android_Bootloader_SD_Card
13+
/android/Application_Notes_Android_SD_CARD
14+
/android/Application_Notes_Android_Dual_Screen
15+
/android/Application_Notes_Camera
16+
/android/Application_Notes_Android_Multimedia_Video
17+
/android/Application_Notes_Sample_Maps_App
18+
/android/Application_Notes_Simple_UI_App
19+
Application_Notes_BeagleY_AI
20+
/android/Application_Notes_Android_Secure_Build

0 commit comments

Comments
 (0)