Giter Site home page Giter Site logo

imagizor's People

Contributors

akoeller avatar aljung avatar pwolfart avatar tobiastu avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

imagizor's Issues

USB Stick support

It would be nice if the tool could write an image to a usb-stick, too!

synchronous write to target device

dd does not seem to write the image data in sync mode to the device. This results in ridiculous high transfer speeds shown to the user. The sdcard I used in this test does not offer write speeds above 60MB/s.

`
Copy process


Copy the File on the SD-Card
[sudo] Passwort für root:
8176000000 bytes (8,2 GB, 7,6 GiB) copied, 68,1704 s, **120 MB/**s
`

Support for download validation

it would be nice if the tool could validate the downloaded file. This could be done by passing an additional URL which points to a checksum file.

clean up partial download, if program gets terminated during download

Sample console log, download cancelled using STRG+C

`0 [patrick@linux-lmem ~/workspace_git/imagizor (master)]$ ./imagizor.sh -d http://download.opensuse.org/distribution/leap/42.3/iso/openSUSE-Leap-42.3-DVD-x86_64.iso


download process and verifikation


Download the Software
--2017-11-20 10:11:44-- http://download.opensuse.org/distribution/leap/42.3/iso/openSUSE-Leap-42.3-DVD-x86_64.iso
Auflösen des Hostnamen »download.opensuse.org (download.opensuse.org)«... 2001:67c:2178:8::13, 195.135.221.134
Verbindungsaufbau zu download.opensuse.org (download.opensuse.org)|2001:67c:2178:8::13|:80... verbunden.
HTTP-Anforderung gesendet, warte auf Antwort... 302 Found
Platz: http://mirror.clarkson.edu/opensuse/distribution/leap/42.3/iso/openSUSE-Leap-42.3-DVD-x86_64.iso[folge]
--2017-11-20 10:11:44-- http://mirror.clarkson.edu/opensuse/distribution/leap/42.3/iso/openSUSE-Leap-42.3-DVD-x86_64.iso
Auflösen des Hostnamen »mirror.clarkson.edu (mirror.clarkson.edu)«... 128.153.145.19
Verbindungsaufbau zu mirror.clarkson.edu (mirror.clarkson.edu)|128.153.145.19|:80... verbunden.
HTTP-Anforderung gesendet, warte auf Antwort... 200 OK
Länge: 4639948800 (4,3G) [application/octet-stream]
In »»openSUSE-Leap-42.3-DVD-x86_64.iso«« speichern.

3% [====> ] 157.600.080 9,48MB/s ETA 7m 57s ^C
130 [p@linux~/workspace_git/imagizor (master)]$ ls
images imagizor imagizor.sh LICENSE openSUSE-Leap-42.3-DVD-x86_64.iso README.md
`

improve error text if validation fails

Tell the user about the source of the problem => faulty image file
Give advice what can be done to solve the problem => new download etc.

Please enter a check value methodik
mdsum, sha256, I dont have a checkvalue [m,s,a]:s
Now enter the Check value number:asdfads

ERROR: Hash values are not the same
Ples try it again
Verifikation Unsuccessfully

develop test scripts and data that simulate a user

I think it is a good idea to have some test scripts that can be run after bigger changes to see if everything is still working fine.

By the way...
this would also give us the chance to let the jenkins server run the tests when it detects changes in the git repo automatically.

update the help text, checksum handling is not documented yet

./imagizor.sh Call: ./image_to_device.sh [-d, --download, -g, --gunzip] [Downloadlink, File to unpack] ./image_to_device.sh -g --gunzip File to unpack ./image_to_device.sh -d --download Downloadlink ./image_to_device.sh -c --copy File to copy Example: ./imagizor.sh -d http://download.opensuse.org/distribution/leap/42.3/iso/openSUSE-Leap-42.3-DVD-x86_64.iso.sha256

non interactive mode (unattended mode)

It would be nice if one could provide the program with all needed information at program start to avoid inquires during runtime. This would give the chance to run the programm unattended.

Imagizor copy problem

imagizor only accepts imagefiles that are located in the same directory where the script is located.

verification process uses to much time and ressources

The verfication process copies back the whole target device. We only need to read as many bytes as we wrote to the target device.
`______________________________________________________________________

Copy process


Copy the File on the SD-Card
24+1 Datensätze ein
24+1 Datensätze aus
194891212 bytes (195 MB, 186 MiB) copied, 4,2006 s, 46,4 MB/s


Verifying


Copy the File from the SD-Card back into an File
13797000000 bytes (14 GB, 13 GiB) copied, 204,006 s, 67,6 MB/s `

provide function header comments that document the function parameters and code

example

#>>==========================================================================>>
# DESCRIPTION:  copies system update to specified installation directory
#
# PARAMETER 1:  system update destination dir
# RETURN:       -
# USAGE:        install_system_update "$DEST_MNT_DATA/update"
#
# AUTHOR:       PW
# REVIEWER(S):  -
#<<==========================================================================<<
install_system_update()
{ 
    local -r SYS_UPDATE_FILE="update_check.sh"
    local -r SYS_UPDATE_SRC_DIR="$BOARD_CTRL_SRC/system_update"
    local -r SYS_UPDATE_DEST_DIR="$1"

    chmod ugo+x $SYS_UPDATE_SRC_DIR/*
    cp -v $SYS_UPDATE_SRC_DIR/* $SYS_UPDATE_DEST_DIR
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.