Amit Singh Tomar | 9e5938b | 2020-04-19 19:28:36 +0530 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | .. Copyright (C) 2020 Amit Singh Tomar <amittomer25@gmail.com> |
| 3 | |
| 4 | CUBIEBOARD7 |
| 5 | =========== |
| 6 | |
| 7 | About this |
| 8 | ---------- |
| 9 | |
| 10 | This document describes build and flash steps for Actions S700 SoC based Cubieboard7 |
| 11 | board. |
| 12 | |
| 13 | Cubieboard7 initial configuration |
| 14 | --------------------------------- |
| 15 | |
| 16 | Default Cubieboard7 comes with pre-installed Android where U-Boot is configured with |
| 17 | a bootdelay of 0, entering a prompt by pressing keys does not seem to work. |
| 18 | |
| 19 | Though, one can enter ADFU mode and flash debian image(from host machine) where |
| 20 | getting into u-boot prompt is easy. |
| 21 | |
| 22 | Enter ADFU Mode |
Heinrich Schuchardt | b72160b | 2023-10-28 11:59:32 +0200 | [diff] [blame^] | 23 | --------------- |
Amit Singh Tomar | 9e5938b | 2020-04-19 19:28:36 +0530 | [diff] [blame] | 24 | |
| 25 | Before write the firmware, let the development board entering the ADFU mode: insert |
| 26 | one end of the USB cable to the PC, press and hold the ADFU button, and then connect |
| 27 | the other end of the USB cable to the Mini USB port of the development board, release |
| 28 | the ADFU button, after connecting it will enter the ADFU mode. |
| 29 | |
| 30 | Check whether entered ADFU Mode |
Heinrich Schuchardt | b72160b | 2023-10-28 11:59:32 +0200 | [diff] [blame^] | 31 | ------------------------------- |
Amit Singh Tomar | 9e5938b | 2020-04-19 19:28:36 +0530 | [diff] [blame] | 32 | |
| 33 | The user needs to run the following command on the PC side to check if the ADFU |
| 34 | device is detected. ID realted to "Actions Semiconductor Co., Ltd" means that |
| 35 | the PC side has been correctly detected ADFU device, the development board |
| 36 | also enter into the ADFU mode. |
| 37 | |
| 38 | .. code-block:: none |
| 39 | |
| 40 | $ lsusb |
| 41 | Bus 001 Device 005: ID 04f2:b2eb Chicony Electronics Co., Ltd |
| 42 | Bus 001 Device 004: ID 0a5c:21e6 Broadcom Corp. BCM20702 Bluetooth 4.0 [ThinkPad] |
| 43 | Bus 001 Device 003: ID 046d:c534 Logitech, Inc. Unifying Receiver |
| 44 | Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub |
| 45 | Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub |
| 46 | Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub |
| 47 | Bus 003 Device 013: ID 10d6:10d6 Actions Semiconductor Co., Ltd |
| 48 | Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub |
| 49 | |
| 50 | Flashing debian image |
| 51 | --------------------- |
| 52 | |
| 53 | .. code-block:: none |
| 54 | |
| 55 | $ sudo ./ActionsFWU.py --fw=debian-stretch-desktop-cb7-emmc-v2.0.fw |
| 56 | ActionsFWU.py : 1.0.150828.0830 |
| 57 | libScript.so : 2.3.150825.0951 |
| 58 | libFileSystem.so: 2.3.150825.0952 |
| 59 | libProduction.so: 2.3.150915.1527 |
| 60 | =====burn all partition==== |
| 61 | FW_VER: 3.10.37.180608 |
| 62 | 3% DOWNLOAD ADFUDEC ... |
| 63 | 5% DOWNLOAD BOOT PARA ... |
| 64 | 7% SWITCH ADFUDEC ... |
| 65 | 12% DOWNLOAD BL31 ... |
| 66 | 13% DOWNLOAD BL32 ... |
| 67 | 15% DOWNLOAD VMLINUX ... |
| 68 | 20% DOWNLOAD INITRD ... |
| 69 | 24% DOWNLOAD FDT ... |
| 70 | 27% DOWNLOAD ADFUS ... |
| 71 | 30% SWITCH ADFUS ... |
| 72 | 32% DOWNLOAD MBR ... |
| 73 | 35% DOWNLOAD PARTITIONS ... |
| 74 | WRITE_MBRC_PARTITION |
| 75 | 35% write p0 size = 2048 : ok |
| 76 | WRITE_BOOT_PARTITION |
| 77 | 35% write p1 size = 2048 : ok |
| 78 | WRITE_MISC_PARTITION |
| 79 | 36% write p2 size = 98304 : ok |
| 80 | WRITE_SYSTEM_PARTITION |
| 81 | 94% write p3 size = 4608000 : ok |
| 82 | FORMAT_SWAP_PARTITION |
| 83 | 94% write p4 size = 20480 : ok |
| 84 | 95% TRANSFER OVER ... |
| 85 | Firmware upgrade successfully! |
| 86 | |
| 87 | Debian image can be downloaded from here[1]. |
| 88 | |
| 89 | Once debian image is flashed, one can get into u-boot prompt by pressing any key and from |
| 90 | there run ums command(make sure, usb cable is connected between host and target): |
| 91 | |
| 92 | .. code-block:: none |
| 93 | |
| 94 | owl> ums 0 mmc 1 |
| 95 | |
| 96 | Above command would mount debian image partition on host machine. |
| 97 | |
| 98 | Building U-BOOT proper image |
| 99 | ---------------------------- |
| 100 | |
| 101 | .. code-block:: none |
| 102 | |
| 103 | $ make clean |
| 104 | $ export CROSS_COMPILE=aarch64-linux-gnu- |
Tom Rini | de275c3 | 2020-05-26 14:36:55 -0400 | [diff] [blame] | 105 | $ make cubieboard7_defconfig |
Amit Singh Tomar | 9e5938b | 2020-04-19 19:28:36 +0530 | [diff] [blame] | 106 | $ make u-boot-dtb.img -j16 |
| 107 | |
| 108 | u-boot-dtb.img can now be flashed to debian image partition mounted on host machine. |
| 109 | |
| 110 | .. code-block:: none |
| 111 | |
| 112 | $ sudo dd if=u-boot-dtb.img of=/dev/sdb bs=1024 seek=3072 |
| 113 | |
| 114 | [1]: https://pan.baidu.com/s/1uawPr0Jao2HgWFLZCLzHAg#list/path=%2FCubieBoard_Download%2FBoard%2FCubieBoard7%2F%E6%96%B9%E7%B3%96%E6%96%B9%E6%A1%88%E5%BC%80%E5%8F%91%E8%B5%84%E6%96%99%2FImage%2FDebian%2FV2.1-test&parentPath=%2F |