Flash instructions

1. Flash the Android 6AM.1.3 following: http://omappedia.org/wiki/6AM.1.3_Release_Notes#Flashing_eMMC_images

* Prepare an SD card with MLO and u-boot.img
* Boot J6 EVM with SD card.
* Stop at u-boot prompt
* Run:
	env def -f -a
	setenv partitions $partitions_android
	env save
* BOOT and stop at u-boot prompt
* Type "fastboot 0"

On the computer terminal where the USB cable is connected to, run:
## NOTE: you might want to backup the userdata.img
cp userdata.img userdata.img.orig

sudo ./fastboot.sh

Android should come up, it will take some time as it is first time boot.

====================================================================
RVC-4.0 Add-On package flashing instructions (See release note sec. 4)

1. Update the binaries on Android FS.

After flashing 6AM.1.3 and boot up to Android to make sure the original 6AM.1.3is up and
running; upload omapconf, appA15HeartBeatHost, IPU2 and DSP1 firmwares on Android FS.
[On computer where USB3 is connected]
$ cd <$WORKSPACE/rvc_phase-5/emmc>
$ adb root
$ adb remount
$ adb push omapconf /system/bin
$ adb push appA15HeartBeatHost /system/bin
You need to push the same ipu2 and dsp1 firmwares into Android filesystem.
$ adb push dra74x-ipu2-fw.xem4 /vendor/firmware/dra7-ipu2-fw.xem4
$ adb push dra74x-dsp1-fw.xe66 /vendor/firmware/dra7-dsp1-fw.xe66
$ adb shell sync

2. To flash the RVC configuration of MLO and u-boot.img
Boot the board and STOP at u-boot prompt
Type 'fastboot 0'

3. Connect the EVM to a computer through USB connection.
On the computer, go to the directory where emmc folder is located.
$ cd <$WORKSPACE/rvc_phase-5/emmc>
$ sudo ./rvc_fastboot_one.sh

Reset the Android partitions.
Boot the EVM and stop at u-boot prompt.
Type:
$ env default -f -a
$ setenv partitions $partitions_android
$ env save

!!! Reboot the board and stop at u-boot prompt.
Type 'fastboot 0'

4. Flashes the RVC kernel image, environment, IPU2 and DSP1 firmwares.
On the computer, go to the directory where emmc folder is located.
$ cd <$WORKSPACE/rvc_phase-5/emmc>
$ cp <$WORKSPACE/rvc_phase-5/emmc/userdata.img.orig> <$WORKSPACE/rvc_phase-
5/emmc/userdata.img>
For DRA74x:
$ sudo ./rvc_fastboot_two_dra74x.sh

At this point, the board will boot but you will see errors on TeraTerm:
[    2.298917] ldc3001 0-0018: ldc3001_read_reg: i2c transfer failed (-121)
[    2.305678] ldc3001 0-0018: i2c_read len failed ffffff87
[    2.311115] ldc3001 0-0018: ldc3001_read_reg: i2c transfer failed (-121)
[    2.317864] ldc3001 0-0018: i2c_read len failed ffffff87
[    2.323299] ldc3001 0-0018: ldc3001_read_reg: i2c transfer failed (-121)
[    2.330046] ldc3001 0-0018: i2c_read len failed ffffff87
[    2.335494] ldc3001 0-0018: ldc3001_read_reg: i2c transfer failed (-121)
[    2.342225] ldc3001 0-0018: i2c_read len failed ffffff87
[    2.347674] ldc3001 0-0018: ldc3001_read_reg: i2c transfer failed (-121)
[    2.354422] ldc3001 0-0018: i2c_read len failed ffffff87

Because RVC by default is not working on OSD panel.

5. Reboot the board and stop at u-boot prompt.
Type 'fastboot 0'

On the computer, go to the directory where emmc folder is located.
$ sudo ./fastboot flash ipu2 dra74x-ipu2-fw.xem4
$ sudo ./fastboot flash dsp1 dra74x-dsp1-fw.xe66
$ sudo ./fastboot flash environment dra7-evm-robust-rvc.dtb

Reboot the board.

To hide the RVC window, on J6 EVM only, the GPIO can be toggled by switching the SYSBOOT pin "SW3 pin#1" after boot up.
RVC is displayed when SW3 pin#1 is ON
RVC is hidden when SW3 pin#1 is OFF
NOTE: You will need to switch SW3 pin#1 to On before booting.