Skip to content

Commit

Permalink
add u-boot docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorde627 committed Jul 17, 2024
1 parent 76fc869 commit 5a555f5
Show file tree
Hide file tree
Showing 18 changed files with 1,844 additions and 2,302 deletions.
10 changes: 0 additions & 10 deletions docs/3.Flashing the Fydetab Duo.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,6 @@ Here is a step-by-step guide for flashing a new OS onto your Fydetab Duo.
- If successful, your flashing device should be able to connect to the Fydetab Duo.The device’s LED will remain off, and the screen will stay completely dark.
- Occasionally, the screen may display an image indicating that the device is in Loader Mode. Note that this image may not always appear due to display issues.

### 4. Enter Maskrom mode in case of brick

If for some reason an unsupported image has been flashed or something has been corrupted making it impossible to access Loader/Maskrom mode with the button combination explained in step 2, there is the possibility to use the Maskrom button on the Fydetab's PCB.

![](/img/fydetab_maskrom_button_pcb.jpg)

- Force a shutdown by pressing and holding the power button for 10 seconds.
- Press and hold MASKROM mode button from the PCB. While holding down the button connect the USB from the tablet to the PC.
- Open the flashing tool from the next section and you will see that a device is detected in MASKROM mode.

## Utilising the image flash tool provided by Rockchip

### Using Linux
Expand Down
7 changes: 0 additions & 7 deletions docs/4.Hacking your Fydetab Duo.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
---
id: u-boot
title: Fydetab Duo Boot Modes & Bootloader Guide
---

## Entering Loader / Recovery Mode

![Loader Mode Image](/img/u-boot/fydetab_recovery.jpeg)

To access the Loader Mode on your Fydetab Duo, follow these steps:

1. **Shut down the Device**
- Ensure your Fydetab Duo is completely powered off.

2. **Connect USB Cable**
- Insert a USB cable into the Fydetab Duo and the host device.

3. **Activate Loader Mode**
- Press and hold both the Volume Up button and the Power button simultaneously.

4. **Confirm Loader Mode**
- The Fydetab Duo will boot into Loader Mode, allowing firmware updates and other maintenance tasks.

## Entering USB Mass Storage(UMS) Mode

![UMS Image](/img/u-boot/fydetab_usb.jpeg)

To put your Fydetab Duo into UMS Mode, proceed with the following:

1. **Shut down the Device**
- Ensure the Fydetab Duo is turned off.

2. **Prepare for UMS Mode**
- Press and hold the Volume Down button and the Power button simultaneously.

3. **Connect USB Cable**
- Plug in a USB cable to the Fydetab Duo and the host device.

4. **Confirm UMS Mode**
- The device will enter UMS Mode, acting as a USB disk that can be accessed by the host computer.

## Low Power Charge Mode

Understanding the low power charging behaviour in U-Boot:

1. **Critical Battery Level `<3%`**
- If the battery capacity falls below 3% and the device is not connected to a charger, U-Boot will automatically shut down the system to protect the battery and your data.

2. **Low Battery Level `<8%`**
![Low Battery Image](/img/u-boot/fydetab_batt.jpeg)
- If the battery capacity is below 8%, U-Boot will remain on the charging screen until the battery charges to at least 8%, preventing the device from booting until it reaches a safer charge level.

## Compiling and Replacing U-Boot

Follow these instructions to compile U-Boot and replace the original firmware on your Fydetab Duo:

1. **Update Overlay**
- Ensure you have the [latest version](https://github.com/openFyde/overlay-fydetab_duo-openfyde/commit/42dd10c82cd0fdbb8880dd1e00cc7dfd7b32f4cd#diff-93ad86d362c5df27f11a47c79972d465f70f322c92b4ae25798364bd1ce8614e) of [overlay-fydetab_duo-openfyde](https://github.com/openFyde/overlay-fydetab_duo-openfyde).

2. **Compile U-Boot**
- Enter the `cros_sdk` environment.
- Execute the following command:
```
emerge-${your_board} virtual/u-boot
```

3. **Locate Compiled Files**
- If the compilation is successful, uboot.img and resource.img will be created in `/build/${your_board}/boot`.

4. **Transfer Files to Device**
- Copy the uboot.img and resource.img files to your Fydetab Duo.

5. **Flash Images to eMMC**
- Use the following commands to flash the images:
```
dd if=uboot.img of=/dev/mmcblk0p11 conv=fsync
dd if=resource.img of=/dev/mmcblk0p10 conv=fsync
```

## Customising U-Boot Display Images

To personalise the splash images (they are exported as bitmap images in the file system) used in U-Boot, follow these steps:

1. **Replace BMP Files**
- In the [overlay-fydetab_duo-openfyde/sys-boot/rk-uboot-resource/files/](https://github.com/openFyde/overlay-fydetab_duo-openfyde/tree/main/sys-boot/rk-uboot-resource/files) directory, replace the existing BMP files with your own (ensure the filenames remain unchanged).

2. **Rebuild U-Boot Resource**
- Enter the `cros_sdk` environment.
- Run the following command:
```
emerge-${your_board} rk-uboot-resource
```

3. **Transfer New Resource Image**
- Copy the newly created resource.img from `/build/${your_board}/boot` to your Fydetab Duo.

4. **Flash New Resource Image**
- Use the following command to replace the original resource image on partition 10:
```
dd if=resource.img of=/dev/mmcblk0p10 conv=fsync
```

The following is our [design file](/img/u-boot/fydetab_batt.psd) for the BMP images. Please note that there is a 90-degree rotation in the design file to fit the screen.
7 changes: 7 additions & 0 deletions docs/Hacking your Fydetab Duo/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"label": "🛠️ Hacking your Fydetab Duo" ,
"position": 4,
"link": {
"type": "generated-index"
}
}
Loading

0 comments on commit 5a555f5

Please sign in to comment.