# Bootloader barebox

- [https://source.mnt.re/reform/mnt-reform-barebox](https://source.mnt.re/reform/mnt-reform-barebox)
- [barebox 2026.08.0-dirty documentation](https://www.barebox.org/doc/latest/user/introduction.html)
- [README-mnt.md](https://source.mnt.re/reform/mnt-reform-barebox/-/blob/main/README-mnt.md)

## Installation

<p class="callout warning">Always check `if` and `of` paths are correct. Use `lsblk` to verify.</p>

### Setup SD card

```bash
sudo dd if=pocket-reform-system-rk3588.img of=/dev/mmcblk0 bs=1M oflag=direct status=progress
sudo dd if=barebox-mnt-pocket-reform-rk3588.img of=/dev/mmcblk0 seek=64 oflag=direct status=progress
```

### Test bootloader from SD card

1. Boot from SD card
2. Make backup of MMC bootloader:  
    ```bash
    sudo dd if=/dev/mmcblk0 bs=1M count=10 of=emmc-backup.bin
    ```
3. Erase MMC bootloader first stage to force boot form SD card bootloader:  
    ```bash
    sudo dd if=/dev/zero bs=512 seek=64 of=/dev/mmcblk0 count=2 oflag=direct
    ```
4. Turn off and on again.
5. Press `m` to get barebox boot menu
6. Press `2` Detect bootsources and test if you can boot your normal OS.

### From main OS install new bootloader to MMC

```bash
sudo dd if=/dev/mmcblk1 of=/dev/mmcblk0 bs=1M count=10 oflag=direct
```

1. Turn it off.
2. Take out SD card.
3. Boot again - it should boot your normal OS using barebox.