| # Copyright 2021 The Fuchsia Authors. All rights reserved. | |
| # Use of this source code is governed by a BSD-style license that can be | |
| # found in the LICENSE file. | |
| Summary: | |
| ======== | |
| The directory provides a simple script for flashing combined bootloader | |
| images to khadas vim3 devices in update/fastboot mode. Python is required. | |
| For update mode, the script requires the Amlogic usb update tool, which | |
| can be obtained from the public khadas utils repo | |
| https://github.com/khadas/utils/blob/master/aml-flash-tool/tools/linux-x86/update | |
| The combined bootloader image integrates bl2, u-boot and ddr fimrware | |
| components. It can be generated by defining CONFIG_AML_SIGNED_UBOOT=y | |
| when invoking mk build script (see fuchsia_build.py for example). | |
| The following summarizes the main usage: | |
| flash-tool.py \ | |
| update \ | |
| <path to combined bootloader image> \ | |
| -u <path to Amlogic usb update tool> | |
| The above flashes the combined bootloader image from update mode. This can | |
| be useful to recover device from brick/unflashable state or bootstrapping. | |
| In other cases, it is recommended to flash from fasboot mode. If "-u" is | |
| not specified, the script assumes that the "update" tool is in the PATH | |
| environement. To avoid the need of root authority. create a usb device | |
| rule file 70-amlogic.rules under /etc/udev/rules.d with the following | |
| content: | |
| SUBSYSTEMS=="usb",ATTRS{idVendor}=="1b8e",ATTRS{idProduct}=="c003",OWNER="<user name>",MODE="0666",SYMLINK+="worldcup"' | |
| Replace <user name> with your own user name. | |
| flash-tool.py \ | |
| fastboot \ | |
| <path to combined bootloader image> | |
| The above flashes combined bootloader image from fastboot mode. The script | |
| additionally checks and performs unlocking which may be necessary before | |
| flashing. User will be prompted to confirm. Amlogic update tool is not | |
| needed. But it is assumed that the host has fastboot installed. |