Coder Social home page Coder Social logo

yuravg / image2device Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 71 KB

Script to copy a image-file to a block device(SD card, Flash drive, etc.), it is just a wrapper for the "dd" and "bmaptool" tools.

License: MIT License

Shell 93.49% Makefile 6.51%

image2device's Introduction

Introduction

image2device.sh is a script to copy a image-file to a block device(SD card, Flash drive, etc.), it is just a wrapper for the dd and bmaptool tools.

This script simplify usage dd and it just a bit more useful then alias:

alias dd_sync="dd bs=32M conv=sync status=progress"

For bmap-tools it replaces a couple of commands:

bmaptool create -o <bmap-name.bmap> <image-name.img>
sudo bmaptool copy --bmap <bmap-name.bmap> <image-name.img> </path/to/device>

Usage

Download

To get script image2device.sh:

Download the script

or

Clone Git repository git clone https://github.com/yuravg/image2device.git

Install

  • copy the script file to some PATH directory (~/bin, /user/local/bin, etc.)

  • set the script permission to execute

Example:

$ mv -v image2device.sh ~/bin/
$ sudo chmod +x ~/bin/image2device.sh

or

$ sudo make install

Write image to device

If the script is invoked without command line arguments or with command line argument --help (or -h) then it displays help message and exits.

Template:

$ <script_name> <path-to-image> <path-to-device>

Examples

For use dd

$ image2device.sh ./sdimage.img /dev/sdc

For use bmaptool

$ image2device.sh -b ./sdimage.img /dev/sdc

Screenshot

screenshot

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.