RetroBSD

2.11BSD operating system for microcontrollers
It is currently Fri Apr 27, 2018 8:40 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon Oct 26, 2015 3:08 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1079
Location: Sunnyvale, CA
When installing RetroBSD or LiteBSD, the procedure for writing a file to SD card has been a bit tedious. I created a simple command-line utility, which greatly simplifies the process. You invoke it with a single parameter - a name of file with SD image. It prompts to select the target device from a list of SD card readers present on your computer, and then writes the image to it. For example:
Code:
$ sudo sdwriter sdcard.img
Password: ******
SD image writer, Version 1.0.0
Copyright (C) 2015 Serge Vakulenko

  1. /dev/rdisk3 - size 7892 MB, APPLE SD Card Reader
  2. /dev/rdisk4 - size 2030 MB, Generic- SD/MMC
  q. Cancel

Select disk device (1-2, q): 2

     Source: sdcard.img
Destination: /dev/rdisk4
       Size: 104.9 MB
      Write: ################################################## done
      Speed: 6.6 MB/sec

You may need to use sudo utility to get access to the device - it depends on your installation.

The sources are available on GitHub: https://github.com/sergev/sdwriter
Code:
git clone https://github.com/sergev/sdwriter.git

Version for Windows is not ready yet, sorry.


Top
 Profile  
 
PostPosted: Mon Oct 26, 2015 7:40 am 
Contributor

Joined: Mon Nov 12, 2012 1:34 pm
Posts: 1091
Hi Serge,

It will be neat when we can run this on LiteBSD itself.

I guess we need a 2nd SD slot with power control so we can insert and remove SDs while LiteBSD is running. Not a big deal really.

I wonder if Pito will be the first to do this?

Wiz


Top
 Profile  
 
PostPosted: Mon Oct 26, 2015 9:44 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
I would rather use the second socket for mirroring :) or striping :twisted:

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
PostPosted: Mon Oct 26, 2015 10:42 am 
Committer
User avatar

Joined: Thu Oct 11, 2012 8:45 am
Posts: 1801
Location: Room 217, Floor 8, Arm 8, Wheel S7, Mars Base Alpha 3
There should already be a tool in LiteBSD for reading / writing disk images - dd.

_________________
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".


Top
 Profile  
 
PostPosted: Tue Oct 27, 2015 6:43 am 
Committer
User avatar

Joined: Wed Oct 10, 2012 11:01 pm
Posts: 1079
Location: Sunnyvale, CA
Technically, it's possible to write SD image on LiteBSD itself, as well as on RetroBSD. I had tested it on a custom pic32mx board with two SD slots on the same SPI bus. Not all SD cards behave correctly: some work fine, and others cause various kinds of timeouts, i/o errors etc.

Frankly, I don't see a reason why one would need to use LiteBSD to duplicate SD cards. But Matt is right: you can always use dd for it.

My plan is to include the sdwriter binary to the RetroBSD package, so people can easily install the system.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:




Powered by phpBB® Forum Software © phpBB Group

BSD Daemon used with permission