Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streamline U-Boot installation instructions #892

Merged
merged 4 commits into from
Jan 29, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions hacks/flashinguboot.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,32 @@ i.e. you have a device with 128 Mb RAM.
## Flashing the U-Boot bootloader:

1. Login via SSH
2. Get the correct [bootloader](https://github.com/Dafang-Hacks/uboot/tree/master/compiled_bootloader) for your device and RAM size.
3. Put the bootloader file in the root of your microsd card. It will get mounted to /system/sdcard on your camera.
2. Get the correct [bootloader](https://github.com/Dafang-Hacks/uboot/tree/master/compiled_bootloader) for your device and RAM size. NOTE: if you're going to use wget, you need to use the RAW link to the .bin so that you don't accidentally download html.
3. Put the bootloader file in the root of your microsd card `/system/sdcard`.
4. **Verify the MD5 hash of the file!! Do not skip this step or you may brick your camera!**
3. Run the following commands
5. Write the bootloader to flash
6. Rename the uEnv.bootfromnand.txt in your minisd card root to uEnv.txt

```bash
flash_eraseall /dev/mtd0
cd /system/sdcard/

wget https://github.com/Dafang-Hacks/uboot/raw/master/compiled_bootloader/NAME_OF_YOUR_BOOTLOADER_FILE.bin

md5sum NAME_OF_YOUR_BOOTLOADER_FILE.bin
```

Again, do not proceed unless the MD5 matches the version you downloaded. Now erase and write to flash. Do not do anything else between these commands as once you erase, your device will be bricked until you write the .bin.


```bash
flash_eraseall /dev/mtd0

dd if=/system/sdcard/NAME_OF_YOUR_BOOTLOADER_FILE.bin of=/dev/mtd0

mv uEnv.bootfromnand.txt uEnv.txt

```

For example, if you're flashing dafang_128mb_v2.bin, your command should look like this:

```bash
Expand All @@ -56,8 +71,8 @@ Don't do anything stupid inbetween.
If you crash your camera, you end up without a working bootloader.

## Verify that the U-Boot-Loader works correctly
1. Rename the uEnv.bootfromnand.txt in your minisd card root to uEnv.txt
2. Reboot your camera

Reboot your camera

The bootloader is configured to enable the blue led if it has found a valid uEnv.txt during boot up.
Take a look at your LED when it first turns on.
Expand Down