[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Patch-gnuradio] Re: [Discuss-gnuradio] USRP2 SD Card rewrite
From: |
Eric Blossom |
Subject: |
Re: [Patch-gnuradio] Re: [Discuss-gnuradio] USRP2 SD Card rewrite |
Date: |
Sun, 28 Dec 2008 06:16:17 -0800 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Sun, Dec 28, 2008 at 04:05:13AM -0800, Dan Halperin wrote:
> On Nov 2, 2008, at 4:01 PM, Robert McGwier wrote:
>> The correct instructions seem to be
>>
>> cd usrp2/firmware
>> Run "sudo ./u2_flash_tool --dev=/dev/XXXX -t s/w ./apps/txrx.bin -w"
>>
>> with the rest which I emphasize again. If you get the wrong XXXX for
>> the device, you can wipe out your hard drive. Most people will have
>> their hard drive as /dev/sda and on my computer it seems the device
>> is, like Matt's computer, to be /dev/sdb.
>
> An obvious thing to do here is to read the size of the device and abort
> if it's > 2 or 4 GB. It's simple to get the device size (this works on
> /dev/sda1 in ubuntu 8.10 using python 2.6 at least):
>
> dev = open(devname, "r")
> dev.seek(0, os.SEEK_END)
> size_in_gigs = dev.tell() / (2.0**30)
>
> Thanks,
> Dan
Good idea Dan!
Thanks,
Eric