Once you have the boot.img, recovery.img, vendor.img, and system.img already generated, you can use them to update your Android system from U-Boot.
See Build the Android firmware for more information about building the Android system. You can also download pre-built images from: |
To flash the Android firmware from U-Boot, you must program a kernel (boot.img), a recovery boot image (recovery.img), a vendor image (vendor.img), and a root file system image (system.img) in the device’s eMMC. Follow these steps to program Android in the eMMC of your ConnectCore 6:
-
Power off the device.
-
Change the boot mode configuration to boot from the internal eMMC. To do so, set the boot mode micro-switches as follows:
-
SW3.1 OFF
-
SW3.2 OFF
-
-
Place the system.img, the boot.img, the vendor.img and the recovery.img in the root of a FAT-formatted microSD card and insert it in the microSD socket of the ConnectCore 6 SBC.
After you build the Android firmware, these images are located inside the sources directory at out/target/product/ccimx6sbc.
-
Connect the serial adapter cable to the console port [CONS]. Connect a serial cable from the adapter to the development computer.
-
Open a serial connection to the serial port to which the ConnectCore 6 is connected. Use the following settings:
-
Port: Serial port to which ConnectCore 6 SBC is attached
-
Baud rate: 115200
-
Data Bits: 8
-
Parity: None
-
Stop Bits: 1
-
Flow control: None
-
-
Power on the device and immediately press a key in the serial terminal to stop the auto-boot process. You will be stopped at the U-Boot bootloader prompt:
-
Configure the partition table of the eMMC to hold Android images by executing these commands:
=> setenv mmcdev 0 => run partition_mmc_android
-
Update the kernel partition issuing this command:
=> update boot mmc 1 fat boot.img
-
Update the vendor partition issuing this command:
=> update vendor mmc 1 fat vendor.img
-
Wait until the process ends, then execute the following command to update the Android file system:
=> update system mmc 1 fat system.img
-
Wait until the process ends, then update the recovery partition issuing this command:
=> update recovery mmc 1 fat recovery.img
-
To clean the data and cache partitions, enter these commands in U-Boot:
=> setenv boot_recovery yes => setenv recovery_command recovery --wipe_data => saveenv => reset
If the cache and data partitions are already formatted or you wish to preserve their contents, you can skip these commands. The above process will boot your device into recovery mode, will format the cache and data partitions and will reboot your device. The first Android boot takes several minutes due to system deployment.