ODROID Flashing Tool development

Share here your ideas for new projects

Moderators: odroid, meveric, mdrjr

ODROID Flashing Tool development

Unread postby odroid » Wed May 11, 2016 1:47 pm

Around 7 years ago, we used the original Win32DiskImager to flash the OS images for Windows PC users.
I added a VERIFY function on that to detect the SD card problem or USB card reader problem.
But it had some weird compatibility issues with Windows 8 and 10.
So I switched to the latest Win32DiskImager 0.9.5 https://sourceforge.net/projects/win32d ... rce=navbar and added the VERIFY function on it.
We call it Hardkernel's modified Win32DiskImager Version 1.3
It has reduced the flashing issues dramatically since we released it early last year.

But some people still have the flashing issues.
1. Did not umcompress the compressed OS image xz or zip to an img file.
2. Flash an OS image for other platforms
Naturally users' board didn't boot at all. :evil:

So a few talented developers in this forum have started a discussion to make an improved flashing tool a couple of days ago.
viewtopic.php?f=54&t=21037

We want to keep talking about the new features and development direction on this new thread.
Please feel free to join this development party. :)
User avatar
odroid
Site Admin
 
Posts: 21806
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: ODROID Flashing Tool development

Unread postby Tpimp » Wed May 11, 2016 2:12 pm

Definitely plan to have the ability to flash from commandline or script.
Tpimp
 
Posts: 355
Joined: Thu Jul 16, 2015 5:57 am
languages_spoken: english
ODROIDs: U3, C1+, XU4

Re: ODROID Flashing Tool development

Unread postby odroid » Wed May 11, 2016 3:00 pm

Tpimp wrote:Definitely plan to have the ability to flash from commandline or script.


In that case, please consider adding this kind of verification option.
http://odroid.com/dokuwiki/doku.php?id= ... with_linux
User avatar
odroid
Site Admin
 
Posts: 21806
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: ODROID Flashing Tool development

Unread postby Tpimp » Thu May 12, 2016 6:34 am

I plan to have all features of original (including verify). The visual mock-up does not show a verify option though. I hope to turn some code out tonight.
Tpimp
 
Posts: 355
Joined: Thu Jul 16, 2015 5:57 am
languages_spoken: english
ODROIDs: U3, C1+, XU4

Re: ODROID Flashing Tool development

Unread postby odroid » Thu May 12, 2016 12:57 pm

Great! I am ready to try your trial code. :D
User avatar
odroid
Site Admin
 
Posts: 21806
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: ODROID Flashing Tool development

Unread postby tchiwam » Wed May 18, 2016 7:00 am

Under linux I use 'tee' to a 'mkfifo' buffer to run md5sum at the same time I compress/decompress, then I simply reread the card and compare the result. Probably possible to do the same on windows somehow.
tchiwam
 
Posts: 74
Joined: Wed Dec 30, 2015 4:53 am
Location: Greenland
languages_spoken: english, French, Finnish, Greenlandic(little)
ODROIDs: 5x XU4, 3x C2, 2 cloudshell, 1 VU7, 1 VU7+, UPS1, UPS2, UPS3, USB/SATA, and many other fine bits from Odroid

Re: ODROID Flashing Tool development

Unread postby Tpimp » Wed May 18, 2016 11:07 am

Everything will be handled in the process without running other processes.

I.e. The tool will do these things without the help of an outside command-line based tool. Compression ended up being super easy. Im hoping to have feature parity with v1.3 by next Monday.

It wasn't posted in this thread but development is ongoing here: https://github.com/Tpimp/OdroidFlashTool always looking for feedback and help.
Tpimp
 
Posts: 355
Joined: Thu Jul 16, 2015 5:57 am
languages_spoken: english
ODROIDs: U3, C1+, XU4

Re: ODROID Flashing Tool development

Unread postby odroid » Wed May 18, 2016 12:26 pm

Very nice progress. :o
I like the Krypton colored GUI especially. ;)
User avatar
odroid
Site Admin
 
Posts: 21806
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: ODROID Flashing Tool development

Unread postby Tpimp » Wed May 18, 2016 12:44 pm

Thank you - I do have some changes to be made for the GUI layout but glad overall it isn't "ugly". I hope to have the UI code done sometime tonight (mostly). The actual ability to flash will take few days longer. I can quickly reconnect the old logic at any time but am working towards a "threaded" effort for compression and flashing.

Note: I am an Agile developer so the application will always compile and always run anytime you pull it down (features just might not function). If it does not - please P.M. or make a bug report on Github.

Edit: And down the road I plan to support themes for distributions that want to include it into their image.
Tpimp
 
Posts: 355
Joined: Thu Jul 16, 2015 5:57 am
languages_spoken: english
ODROIDs: U3, C1+, XU4

Re: ODROID Flashing Tool development

Unread postby Tpimp » Sat May 21, 2016 5:15 am

Anyone wanting to demo the user interface - it is now ready for feedback.

To build:

Code: Select all
git clone https://github.com/tpimp/odroidflashtool
cd OdroidFlashTool/src
qmake DiskImager.pro
make -j4

If you don't have git on your machine you can download a .zip of the project from https://github.com/Tpimp/OdroidFlashToo ... master.zip
If you are using windows or linux I recommend just opening the project file in QtCreator and building then running it.

It uses Qt5.6 and will required qtdeclarative so make sure you have a complete Qt build. Downloading it from http://download.qt.io is probably your best bet. Im using mingw32 version on windows and either linux version should build.

Right now the backend is not connected up so you will only be able to play with the front-end. But I am looking for feedback.

Mostly, I want feedback on "readability" and "usability". Does it seem like this UX will fit our needs? I expect changes down the road either way. The Settings menu is empty at the moment and the file browser has not been connected yet.

Also note the translations have not been connected yet either. So we only have english at the moment.

Thanks, I hope everyone enjoys the animations and "feel" of components so far! :D
Tpimp
 
Posts: 355
Joined: Thu Jul 16, 2015 5:57 am
languages_spoken: english
ODROIDs: U3, C1+, XU4

Re: ODROID Flashing Tool development

Unread postby Tpimp » Sat May 21, 2016 10:17 am

I realized no one will likely test if they have to build from source.

Here is a built version for windows - please test and give feedback.

You just unzip the whole folder and launch OdroidFlashTool.exe.
Tpimp
 
Posts: 355
Joined: Thu Jul 16, 2015 5:57 am
languages_spoken: english
ODROIDs: U3, C1+, XU4

Re: ODROID Flashing Tool development

Unread postby odroid » Sat May 21, 2016 11:04 am

Sorry for our laziness.;) We will try your prebuilt version Monday and get back to you. :D
User avatar
odroid
Site Admin
 
Posts: 21806
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: ODROID Flashing Tool development

Unread postby Tpimp » Sun May 22, 2016 5:41 pm

Added the file browser and new icons for images and image archives.
Image Image

Looking for feedback and/or alternatives from the community. These are displayed when the file browser finds an image file or image archive.
Tpimp
 
Posts: 355
Joined: Thu Jul 16, 2015 5:57 am
languages_spoken: english
ODROIDs: U3, C1+, XU4

Re: ODROID Flashing Tool development

Unread postby lsc1117 » Mon May 23, 2016 3:51 pm

Hi tpimp,

I tried to test your flashing tool on W10, W7 and Ubuntu 15.10, but some buttons are not working properly.
and When I connected an eMMC or sdcard, it was mounted on "E:" but the Drive listbox on UI showed only Drive:Z, A, D.

Please check the above contents

Thank you.
Attachments
flashtools.png
flashtools.png (30.16 KiB) Viewed 1722 times
lsc1117
 
Posts: 33
Joined: Thu Aug 22, 2013 12:46 am
Location: South Korea
languages_spoken: english

Re: ODROID Flashing Tool development

Unread postby Tpimp » Mon May 23, 2016 7:51 pm

:D Right as mentioned in my post this was simply to get feedback on the front-end. I only started the tool two weeks ago. However I did get decompression added. And will work on reaching feature parity this week.

Oh and linux back-end will still take some time to develop.

There have been many changes to the tool since that binary zip folder. In the current state of change it is best to build from source or hold off on testing.

Until an announcement is made this tool should NOT be used instead of the current diskimager.
Tpimp
 
Posts: 355
Joined: Thu Jul 16, 2015 5:57 am
languages_spoken: english
ODROIDs: U3, C1+, XU4

Re: ODROID Flashing Tool development

Unread postby Tpimp » Wed May 25, 2016 11:20 am

So compression and decompression now working on Windows. Ive been moving a lot of the drive work to Qt (cross-platform) methods. Already finding logical drives is working.

Image reading and writing next, then installer by this weekend for release.
Tpimp
 
Posts: 355
Joined: Thu Jul 16, 2015 5:57 am
languages_spoken: english
ODROIDs: U3, C1+, XU4

Re: ODROID Flashing Tool development

Unread postby odroid » Wed May 25, 2016 11:50 am

Great progress. :D
Please make a prebuilt image for lazy men like me and lsc1117. ;)
User avatar
odroid
Site Admin
 
Posts: 21806
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: ODROID Flashing Tool development

Unread postby Tpimp » Fri May 27, 2016 9:30 am

I have basically finished the installer for the tool. But currently Read image algorithm is stuck on one line I don't quite understand the "magic". Ill look for a practical method tonight but in case there are any ideas.

Code: Select all
int volumeID = cboxDevice->currentText().at(1).toLatin1() - 'A';


Which equates to:
Code: Select all
subtracting 'A' (dec 65) from the drive letter 'M'(from the text in cboxDevice  "[M:/]" )


That calculation ends up with a "volumeID" of 12 (decimal). (77 - 65)

I replaced this with
Code: Select all
int volumeID = read_path.at(0).toLatin1() - 'A';


And it produces the same value - 12 decimal. But for some reason "volumeID" is rejected the next line.
Code: Select all
mVolumeHandle = getHandleOnVolume(volumeID, GENERIC_READ);
if (mVolumeHandle == INVALID_HANDLE_VALUE)


Well - off to research some win32 volume stuff.

-nevermind I found it :) - onto WRITE functions this evening
Tpimp
 
Posts: 355
Joined: Thu Jul 16, 2015 5:57 am
languages_spoken: english
ODROIDs: U3, C1+, XU4

Re: ODROID Flashing Tool development

Unread postby Tpimp » Wed Jun 01, 2016 1:39 pm

Some News -

The first successful Read image, then compress image - to Decompress image and then flash image back on disk is complete!

Image

We made it round trip. Oh and it uses multiple threads where possible. Seems like this was a good idea over all as the tool is much better (in my opinion). - I completely rewrote the volume and disk management stuff. :D


Working on adding md5 hash verification.

Im excited to share it but at the same time won't release until it is solid enough to get love instead of "So broken" haha.
Last edited by Tpimp on Wed Jun 01, 2016 2:15 pm, edited 1 time in total.
Tpimp
 
Posts: 355
Joined: Thu Jul 16, 2015 5:57 am
languages_spoken: english
ODROIDs: U3, C1+, XU4

Re: ODROID Flashing Tool development

Unread postby odroid » Wed Jun 01, 2016 1:58 pm

Impressive progress! The multi-threads processing gives us much better user experience.
I hope we can test a RC version in June. :D
User avatar
odroid
Site Admin
 
Posts: 21806
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: ODROID Flashing Tool development

Unread postby Tpimp » Thu Jun 02, 2016 9:34 am

So I've been comparing around different features of different tools. Also researching a bit more about what all is involved in "flashing".

Long story short - the diskimager tool did a "blind" flash where it really did not understand the content in the flash. Add intelligence to alter "boot.ini" and GUID table - creates the desire for a "smart flash". One particular features would be the ability make an image boot record compatible with another ODroid device.

So the feature would work like so:


Xu4 image -> Loads into ODF Tool -> User selects "C1" as target device. The Xu4 image is loaded in, then live patched with the ODROID C1 boot record information. Also .dtb, and kernel would need swapped. Maybe this is more work than necessary, but I would like to make it to where image developers could generate multiple kernels (for each odroid), and a matching filesystem. Then simply say ODF -> build me 3 images with these 3 kernels, all using the same filesystem.

And out comes

image.c1.img
image.xu4.img
image.c2.img
etc.

I don't know what the goals will be for the tool after feature parity. But if it does not do anything "ODROID" specific, we might as well use Rufus or Lili to flash our images. Though we do have compression/decompression so thats cool.
Tpimp
 
Posts: 355
Joined: Thu Jul 16, 2015 5:57 am
languages_spoken: english
ODROIDs: U3, C1+, XU4

Re: ODROID Flashing Tool development

Unread postby mariakatosvich » Sat Jun 11, 2016 7:24 pm

Impressive progress! The multi-threads processing gives us much better user experience.
mariakatosvich
 
Posts: 3
Joined: Sat Jun 11, 2016 4:43 pm
languages_spoken: english

Re: ODROID Flashing Tool development

Unread postby bitterandstout » Sun Jun 12, 2016 11:25 am

mariakatosvich wrote:Impressive progress! The multi-threads processing gives us much better user experience.


Indeed, I'm quite excited about this actually :D
User avatar
bitterandstout
 
Posts: 12
Joined: Sun May 08, 2016 5:23 am
languages_spoken: english
ODROIDs: a pair of odroid c2's, so far


Return to The Ideas

Who is online

Users browsing this forum: No registered users and 1 guest