[OE-core] [PATCH 1/1] ddimage: Support Mac OS

Darren Hart dvhart at linux.intel.com
Tue May 27 15:15:25 UTC 2014


On 5/24/14, 7:44, "Koen Kooi" <koen at dominion.thruhere.net> wrote:

>
>Op 23 mei 2014, om 06:28 heeft Darren Hart <dvhart at linux.intel.com> het
>volgende geschreven:
>
>> 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 <dvhart at linux.intel.com>
>> ---
>> scripts/contrib/ddimage | 25 ++++++++++++++++++++-----
>> 1 file changed, 20 insertions(+), 5 deletions(-)
>> 
>> diff --git a/scripts/contrib/ddimage b/scripts/contrib/ddimage
>> index 93ebeaf..b66d0dd 100755
>> --- a/scripts/contrib/ddimage
>> +++ b/scripts/contrib/ddimage
>> @@ -1,7 +1,8 @@
>> #!/bin/sh
>> 
>> -#BLACKLIST_DEVICES="/dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde"
>> -BLACKLIST_DEVICES="/dev/sda"
>> +# Default to avoiding the first two disks on typical Linux and Mac OS
>>installs
>> +# Better safe than sorry :-)
>> +BLACKLIST_DEVICES="/dev/sda /dev/sdb /dev/disk1 /dev/disk3"
>
>s/disk3/disk2/

Bah, indeed. Local change snuck through in my patch. Thanks. Will correct.


-- 
Darren Hart					Open Source Technology Center
darren.hart at intel.com				            Intel Corporation






More information about the Openembedded-core mailing list