How to create an .img file

Post Reply
32teeth
Posts: 29
Joined: Sat May 18, 2019 2:56 am
languages_spoken: english
Has thanked: 19 times
Been thanked: 18 times
Contact:

How to create an .img file

Unread post by 32teeth » Fri Oct 11, 2019 9:49 pm

Hey all

I have been able to successfully create .bin files for updated Odroid Go firmware

Code: Select all

make -j8
which produces
  • bootloader.bin
  • phy_init_data.bin
  • odroid-go-firmware.bin
  • partitions.bin
I am capable of creating a .fw file no probalem

My question is, how do i create an .img file so i can distribute and have users simply flash the .img file using

Code: Select all

esptool.py write_flash 0 some_image_file.img
Thanks in advance for your help

crashoverride
Posts: 4542
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 71 times
Contact:

Re: How to create an .img file

Unread post by crashoverride » Fri Oct 11, 2019 10:48 pm

There is a tool that is part of odroid-go-firmware that simplifies creating an .img file:
https://github.com/OtherCrashOverride/o ... ools/mkimg

Code: Select all

usage: mkimg image_filename offset binary [...]
Where "offset" and "binary" are that same as used in the partition table.

Alternatively, you can flash an ODROID-GO and use esptool to read back the flashed contents starting at offset 0. See the esptool documentation for details.
These users thanked the author crashoverride for the post:
32teeth (Mon Oct 14, 2019 3:22 am)

crashoverride
Posts: 4542
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 71 times
Contact:

Re: How to create an .img file

Unread post by crashoverride » Fri Oct 11, 2019 10:54 pm

There is also a tool that takes a backup of flash and processes it for use as an .img file:
https://github.com/OtherCrashOverride/o ... s/esp32img

Instructions are posted as 'usage':
https://github.com/OtherCrashOverride/o ... #L198-L205

[edit]
The main difference is that only used flash contents are included so the resulting .img file can be smaller than 16MB and flashes faster.
These users thanked the author crashoverride for the post:
32teeth (Mon Oct 14, 2019 3:21 am)

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 0 guests