diff options
author | Darren Hart <dvhart@linux.intel.com> | 2012-03-13 12:02:51 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-22 19:17:54 +0000 |
commit | 87e581bb7da9f1530d190cd023fcf892c8b858f5 (patch) | |
tree | 383d9ad3890a1f2bfd74ce3a5e724f8b1561fcd7 /meta/recipes-extended/blktool | |
parent | 2f8c8beec3c6054bf4047f23184ae0ab873c6ce5 (diff) | |
download | openembedded-core-87e581bb7da9f1530d190cd023fcf892c8b858f5.tar.gz openembedded-core-87e581bb7da9f1530d190cd023fcf892c8b858f5.tar.bz2 openembedded-core-87e581bb7da9f1530d190cd023fcf892c8b858f5.tar.xz openembedded-core-87e581bb7da9f1530d190cd023fcf892c8b858f5.zip |
ddimage: Add script for writing images to boot media
Fixes [YOCTO #1806]
Standard practice is to use the Linux "dd" command to write images to boot
media. This can be error prone and the results of sloppy usage can be
disastrous. Locating the device you want to use is a clumsy process, especially
on a headless build system.
The ddimage script does the following:
o Check the image and device exist
o Check the device is writable
o Compare the device to a blacklist and abort if it's listed
Blacklist defaults to "/dev/sda"
o Display useful identifying information about the image and device
o Prompt the user before commencing the write
The output looks something like this:
$ sudo ~/bin/ddimage tmp/deploy/images/core-image-sato-fri2-noemgd.hddimg /dev/sdk
Image details
=============
image: `tmp/deploy/images/core-image-sato-fri2-noemgd.hddimg' -> `core-image-sato-fri2-noemgd-20111202214038.hddimg'
size: 318568448 bytes
modified: 2011-12-02 13:45:05.298897861 -0800
type: x86 boot sector, code offset 0x58, OEM-ID "SYSLINUX", sectors/cluster 16, root entries 512, Media descriptor 0xf8, sectors/FAT 152, heads 64, hidden sectors 32, sectors 622204 (volumes > 32 MB) , serial number 0x4ed946e0, label: "boot ", FAT (16 bit)
Device details
==============
device: /dev/sdk
vendor: Kingston
model: DT 101 G2
Write tmp/deploy/images/core-image-sato-fri2-noemgd.hddimg to /dev/sdk [y/N]? y
Writing image...
303+1 records in
303+1 records out
318568448 bytes (319 MB) copied, 53.6766 s, 5.9 MB/s
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Dexuan Cui <dexuan.cui@intel.com>
CC: Joshua Lock <josh@linux.intel.com>
CC: Kishore K Bodke <kishore.k.bodke@intel.com>
Diffstat (limited to 'meta/recipes-extended/blktool')
0 files changed, 0 insertions, 0 deletions