This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
products:sbc:common:development:kbi [2026/02/23 21:44] gray old revision restored (2025/05/14 22:43) |
products:sbc:common:development:kbi [2026/05/11 02:15] (current) nick |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== KBI - Khadas Bootloader Instructions ====== | ====== KBI - Khadas Bootloader Instructions ====== | ||
| - | This page introduces | + | This page introduces KBI. You will learn how to manage the status of a Khadas SBC through KBI. |
| <WRAP important > | <WRAP important > | ||
| - | Khadas Bootloader Instructions(KBI) can be used to: | + | Khadas Bootloader Instructions (KBI) can be used to: |
| - | * Manage the programmable MCU | + | * Manage the programmable MCU. |
| - | * Carry out low level hardware management | + | * Perform |
| - | * Let developers | + | * Enable |
| </ | </ | ||
| <WRAP info > | <WRAP info > | ||
| - | This page takes VIM2 as an example. | + | This page uses VIM2 as an example. |
| </ | </ | ||
| ===== Uboot usage ===== | ===== Uboot usage ===== | ||
| - | To get started, | + | To get started, |
| ```shell | ```shell | ||
| Line 53: | Line 53: | ||
| ``` | ``` | ||
| - | ==== MCU Verison | + | ==== MCU verison |
| Get the MCU firmware version: | Get the MCU firmware version: | ||
| Line 87: | Line 87: | ||
| ``` | ``` | ||
| - | The ADC value can distinguish between hardware modules. | + | The ADC value can be used to distinguish between |
| - | ==== Power Off ==== | + | ==== Power off ==== |
| Power off the device: | Power off the device: | ||
| Line 96: | Line 96: | ||
| ``` | ``` | ||
| - | ==== MAC Address | + | ==== MAC address |
| Get the Ethernet MAC address: | Get the Ethernet MAC address: | ||
| Line 104: | Line 104: | ||
| ``` | ``` | ||
| - | ==== LED Control | + | ==== LED control |
| - | Setup the blue LED: | + | The blue LED has four operating modes: '' |
| - | The blue LED has 4 working modes: '' | + | The MCU, which handles system power management, controls the blue LED. The CPU controls the white LED. |
| + | Therefore, the blue LED continues to function even when the VIM2 is powered off. | ||
| - | The MCU,in charge of system power management, controls | + | KBI can be used to program |
| - | In this case, the blue LED still work even VIM2 was powered off. | + | |
| - | The KBI can be used to program | + | * system off / idle: Power-off status, |
| + | * system on / working: | ||
| - | * system off / idle: power off status, the CPU is in power-down mode. | + | Example: |
| - | * system on / working: power on status, the CPU is in working mode. | + | |
| - | + | ||
| - | For example: | + | |
| To check the blue LED’s setting for '' | To check the blue LED’s setting for '' | ||
| Line 127: | Line 125: | ||
| ``` | ``` | ||
| - | To check the blue LED’s setting for '' | + | Check the blue LED setting for '' |
| ```shell | ```shell | ||
| Line 133: | Line 131: | ||
| led mode: off [systemon] | led mode: off [systemon] | ||
| ``` | ``` | ||
| - | When VIM2 is powered on,the blue LED is '' | + | When the VIM2 is powered on, the blue LED is set to '' |
| - | You can also reset it to '' | + | You can reset it to '' |
| ```shell | ```shell | ||
| kvim2# kbi led systemon w breathe | kvim2# kbi led systemon w breathe | ||
| Line 146: | Line 144: | ||
| ``` | ``` | ||
| - | ==== Boot Mode ==== | + | ==== Boot mode ==== |
| - | You can flash the images to SPI or eMMC storage | + | You can flash images to either |
| - | + | ||
| - | Set the default boot media as the SPI: | + | |
| + | Set the default boot media to SPI flash: | ||
| ```shell | ```shell | ||
| kvim2# kbi bootmode w spi | kvim2# kbi bootmode w spi | ||
| ``` | ``` | ||
| - | Set default boot media as eMMC storage: | + | Set default boot media to eMMC storage: |
| ```shell | ```shell | ||
| Line 162: | Line 159: | ||
| ``` | ``` | ||
| - | You can take a review on the default boot media by running: | + | You can check the current |
| ```shell | ```shell | ||
| Line 169: | Line 166: | ||
| ``` | ``` | ||
| - | ==== Boot Trigger Events | + | ==== Boot trigger events |
| - | VIM2 supports | + | The VIM2 supports |
| - | * WOL: Wake on Lan | + | * WOL: Wake-on-Lan |
| * RTC: RTC timer | * RTC: RTC timer | ||
| * IR: IR remote controller | * IR: IR remote controller | ||
| Line 178: | Line 175: | ||
| * Key: Power Key/Button | * Key: Power Key/Button | ||
| * GPIO: External GPIO events | * GPIO: External GPIO events | ||
| - | It means any of the above events can trigger VIM2 to power-on after that trigger event has been set to the '' | + | This means any of the above events can trigger |
| For example: | For example: | ||
| - | * Get the status of the WOL trigger event: | + | * Get the status of the WOL trigger event: |
| + | ```shell | ||
| kvim2# kbi trigger wol r | kvim2# kbi trigger wol r | ||
| boot wol: disable | boot wol: disable | ||
| ``` | ``` | ||
| - | * WOL is disabled | + | * WOL is disabled |
| + | ```shell | ||
| kvim2# kbi trigger wol w 1 | kvim2# kbi trigger wol w 1 | ||
| set_wol: 1 | set_wol: 1 | ||
| ``` | ``` | ||
| - | * In general, you will disable | + | * For security reasons, you may want to disable WOL: reasons. : |
| + | ```shell | ||
| kvim2# kbi trigger wol w 0 | kvim2# kbi trigger wol w 0 | ||
| set_wol: 0 | set_wol: 0 | ||