How to create an .img file

Post Reply
32teeth
Posts: 56
Joined: Sat May 18, 2019 2:56 am
languages_spoken: english
ODROIDs: Odroid Go
Game Boy Pocket Retro ESP32
Has thanked: 30 times
Been thanked: 26 times
Contact:

How to create an .img file

Post by 32teeth »

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
Although we do this for ๐Ÿ’• of ๐Ÿ•น๏ธ

We Also Like Coffee!
Please Consider Supporting

Image

Check out our work
Retro ESP32 - GitHub
Retro ESP32 - Store

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

Re: How to create an .img file

Post by crashoverride »

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: 5109
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 368 times
Contact:

Re: How to create an .img file

Post by crashoverride »

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