<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openembedded-core.git/scripts/contrib/ddimage, branch master</title>
<subtitle>Mirror of openembedded-core</subtitle>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/'/>
<entry>
<title>ddimage: if 'pv' is installed, use it</title>
<updated>2016-05-06T09:30:59+00:00</updated>
<author>
<name>Christopher Larson</name>
<email>chris_larson@mentor.com</email>
</author>
<published>2016-04-26T04:56:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=5b20cb2db929daaf0bf81c05368174e9c364ffab'/>
<id>5b20cb2db929daaf0bf81c05368174e9c364ffab</id>
<content type='text'>
This gives us a progress bar for the image write, which is quite helpful. See
https://www.ivarch.com/programs/pv.shtml.

Signed-off-by: Christopher Larson &lt;chris_larson@mentor.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This gives us a progress bar for the image write, which is quite helpful. See
https://www.ivarch.com/programs/pv.shtml.

Signed-off-by: Christopher Larson &lt;chris_larson@mentor.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ddimage: Support Mac OS</title>
<updated>2014-05-28T07:19:01+00:00</updated>
<author>
<name>Darren Hart</name>
<email>dvhart@linux.intel.com</email>
</author>
<published>2014-05-27T19:47:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=8962fe11a0697348affb8a1ab95abca4995470a6'/>
<id>8962fe11a0697348affb8a1ab95abca4995470a6</id>
<content type='text'>
Update the ddimage script to allow it to work on Mac OS too. The biggest
difference is sysfs vs diskutil and in the syntax of the stat command
between Mac OS and Linux, unfortunately. Workarounds using ls, cut, and
columns got really fragile really quickly. Relying on stat and switching
on uname seemed the more robust solution.

Signed-off-by: Darren Hart &lt;dvhart@linux.intel.com&gt;
Cc: Koen Kooi &lt;koen@dominion.thruhere.net&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update the ddimage script to allow it to work on Mac OS too. The biggest
difference is sysfs vs diskutil and in the syntax of the stat command
between Mac OS and Linux, unfortunately. Workarounds using ls, cut, and
columns got really fragile really quickly. Relying on stat and switching
on uname seemed the more robust solution.

Signed-off-by: Darren Hart &lt;dvhart@linux.intel.com&gt;
Cc: Koen Kooi &lt;koen@dominion.thruhere.net&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/contrib/*: fix arithmetic bashism</title>
<updated>2013-07-18T19:21:13+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@linux.intel.com</email>
</author>
<published>2013-07-17T17:29:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=d509739ca54e6b70f2dcc216b831fc02c64293a6'/>
<id>d509739ca54e6b70f2dcc216b831fc02c64293a6</id>
<content type='text'>
Apparently $[...] isn't valid in dash, so use $((...)) instead for
mkefidisk.sh and ddimage that both start with $!/bin/sh.

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
Signed-off-by: Saul Wold &lt;sgw@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Apparently $[...] isn't valid in dash, so use $((...)) instead for
mkefidisk.sh and ddimage that both start with $!/bin/sh.

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
Signed-off-by: Saul Wold &lt;sgw@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ddimage: fix incompatibility with dash</title>
<updated>2013-06-10T21:51:25+00:00</updated>
<author>
<name>Hongxu Jia</name>
<email>hongxu.jia@windriver.com</email>
</author>
<published>2013-06-06T06:53:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=4c6f7a5d8bd6ada434b91037ecd5db06f3eac814'/>
<id>4c6f7a5d8bd6ada434b91037ecd5db06f3eac814</id>
<content type='text'>
On systems with dash as /bin/sh there were failures while invoking ddimage.
Fix to let it work with both bash and dash shells.

[YOCTO #4617]

Signed-off-by: Hongxu Jia &lt;hongxu.jia@windriver.com&gt;
Signed-off-by: Saul Wold &lt;sgw@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On systems with dash as /bin/sh there were failures while invoking ddimage.
Fix to let it work with both bash and dash shells.

[YOCTO #4617]

Signed-off-by: Hongxu Jia &lt;hongxu.jia@windriver.com&gt;
Signed-off-by: Saul Wold &lt;sgw@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace "echo -e" with "printf" to have the same behavior in dash or bash</title>
<updated>2012-09-20T12:18:19+00:00</updated>
<author>
<name>Andrei Gherzan</name>
<email>andrei@gherzan.ro</email>
</author>
<published>2012-09-20T09:56:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=a19880ad10ccb5d7d909dcf9de5c3dc58a0ebcd3'/>
<id>a19880ad10ccb5d7d909dcf9de5c3dc58a0ebcd3</id>
<content type='text'>
oe-core removed the prerequisite to have sh as bash. POSIX doesn't define
any options and furthermore allows 'echo -e' to be the default behavior.
This means that in dash 'echo -e' will actually print '-e' and interpret
backslashes by default. We use instead 'printf' builtin command with or
without '\n' to simulate 'echo -e' or 'echo -n'.
'printf' needs format while 'echo' can be used without any arguments. So
'echo &gt;' was replaced by 'printf "" &gt;'.
'echo' without '-n' flag adds a new line by default so to keep the same
behavior of two new lines while using 'echo "\n"', 'printf "\n\n"' is
used.

[YOCTO #3138]

Signed-off-by: Andrei Gherzan &lt;andrei@gherzan.ro&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
oe-core removed the prerequisite to have sh as bash. POSIX doesn't define
any options and furthermore allows 'echo -e' to be the default behavior.
This means that in dash 'echo -e' will actually print '-e' and interpret
backslashes by default. We use instead 'printf' builtin command with or
without '\n' to simulate 'echo -e' or 'echo -n'.
'printf' needs format while 'echo' can be used without any arguments. So
'echo &gt;' was replaced by 'printf "" &gt;'.
'echo' without '-n' flag adds a new line by default so to keep the same
behavior of two new lines while using 'echo "\n"', 'printf "\n\n"' is
used.

[YOCTO #3138]

Signed-off-by: Andrei Gherzan &lt;andrei@gherzan.ro&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ddimage: Add script for writing images to boot media</title>
<updated>2012-03-22T19:17:54+00:00</updated>
<author>
<name>Darren Hart</name>
<email>dvhart@linux.intel.com</email>
</author>
<published>2012-03-13T19:02:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=87e581bb7da9f1530d190cd023fcf892c8b858f5'/>
<id>87e581bb7da9f1530d190cd023fcf892c8b858f5</id>
<content type='text'>
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' -&gt; `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 &gt; 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 &lt;dvhart@linux.intel.com&gt;
CC: Dexuan Cui &lt;dexuan.cui@intel.com&gt;
CC: Joshua Lock &lt;josh@linux.intel.com&gt;
CC: Kishore K Bodke &lt;kishore.k.bodke@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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' -&gt; `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 &gt; 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 &lt;dvhart@linux.intel.com&gt;
CC: Dexuan Cui &lt;dexuan.cui@intel.com&gt;
CC: Joshua Lock &lt;josh@linux.intel.com&gt;
CC: Kishore K Bodke &lt;kishore.k.bodke@intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
