Hi,

I am trying to script out creating of android partitions on different
size of sdcard. While going through android-media-create scripts, I
found the following:

        return '%s,%s,%s,*\n%s,%s,L\n%s,%s,L\n%s,-,E\n%s,%s,L\n%s,,,-' % (
            boot_start, boot_len, partition_type, system_start, _system_len,
            cache_start, _cache_len, userdata_start, userdata_start,
            _userdata_len, sdcard_start)

The scripts itself has calculate the alignment through the start/len
of the different partition. However, the first logical partition
created under the extended partition has the same starting sector. If
I do a test using sfdisk, I get an bad parition start for the logical
partition.

Anyone has any advice on this?

with best regards,
 Hock.

On Fri, Jul 8, 2011 at 10:27 PM, Jaswinder Singh
<jaswinder.si...@linaro.org> wrote:
> On 30 June 2011 04:10, AJ ONeal <coola...@gmail.com> wrote:
>> The cards are from the same manufacturer, and exactly the same size.
>> I've tried dd and not only does it take closer to 2.5 hours instead of 10
>> minutes, it yields the same results.
>> dd if=/dev/sde of=/dev/sdf bs=8M
>
> <Though I don't think it will solve the problem if Tom's suggestion
> didn't already help.
> But still a few points to note>
>
> This bs=8M doesn't seem the best/useful option.
> Also we need to remember 'dd' runs beneath the file-system layer
> and will copy bytes from image to the disk.
> Most of which(as per 2.5hours/10min) seems non-relevant data in this case.
>
> Assuming you create only primary partitions and you have the working
> 'master-copy' in /dev/sde, maybe you could try
>  $ dd if=/dev/sde of=master_mbr.img bs=512 count=1
> Then 'burn' only the good master mbr on all cards.
>  $ dd if=master_mbr.img of=/dev/sdf     //and other cards
>
> Once you unplug->plug the cards, it should be possible to have a script
> that formats the newly detected partitions(albeit malformed[*]) and do rysnc
> to copy the load.
> Btw, there just might be a way to emulate 'soft' unplug->plug of storage
> over USB using sysfs or somthing, that I am not aware of, which could
> make the whole process scripted.
>
>> The duplication process is a usb hub with many card readers attached and a 
>> script that > creates a fake raid 1 (/dev/md0 sans raid info) out of the 
>> cards and copies the used
>> bytes.
> If I had money to burn I would bet this scripted raid + usb hub thing
> has unveiled some
> bug that fails the almighty dd method.
>
> [*] It might be prudent to also script the capture first sector of
> each partition of the
> 'master' card. And burn them respectively after the unplug-plug of 'copy' 
> cards.
>
> Rgds,
> -j
>
> --
> Linaro.org │ Open source software for ARM SoCs | Follow Linaro
> http://facebook.com/pages/Linaro/155974581091106  -
> http://twitter.com/#!/linaroorg - http://linaro.org/linaro-blog
>
> _______________________________________________
> linaro-dev mailing list
> linaro-dev@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-dev
>

_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to