SX280 / 275 / 270 porting - page 12 - DryOS Development - CHDK Forum

SX280 / 275 / 270 porting

  • 365 Replies
  • 224532 Views
*

Offline zeno

  • *****
  • 891
Re: SX280 / 275 / 270 porting
« Reply #110 on: 29 / November / 2014, 06:14:31 »
Advertisements
Just a brief note to say that I haven't been able to solve NetLLama's problem with STICK. The problem is due to the different ways linux systems refer to attached drives/disks/cards. The logic STICK uses to decipher the results of commands getting info about drive sizes and partitions turns out to fail for some naming schemes and my attempts to write a 'one-size-fits-all' linux module have not been successful to date.
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit

*

Offline ahull

  • *****
  • 634
Re: SX280 / 275 / 270 porting
« Reply #111 on: 29 / November / 2014, 10:39:30 »
Hmm zeno.. I feel your pain. What methods have you tried? looking at /proc/partitions would be by starting point, but I suspect its not as simple as that, since not all Linux's work the same way.

Re: SX280 / 275 / 270 porting
« Reply #112 on: 29 / November / 2014, 11:55:01 »
Hmm zeno.. I feel your pain. What methods have you tried? looking at /proc/partitions would be by starting point, but I suspect its not as simple as that, since not all Linux's work the same way.
@zeno : It might be worth informally collecting a list of which Linux's work?  Poll the membership here for responses - the STICK web page mentions Ubuntu.  I can add Fedora to that list and I'm sure a few of the active members will have other additions?
Ported :   A1200    SD940   G10    Powershot N    G16

Re: SX280 / 275 / 270 porting
« Reply #113 on: 29 / November / 2014, 12:00:34 »
Fedora is what I'm using which did not work.  Something to keep in mind is that the naming scheme for the SD card is determined both by the age of the Linux distribution, and what kind of (SD) card reader is in use.  In my case, I was running Fedora20 (basically latest version), and a laptop's builtin PCI bus card reader.  My speculation is that STICK works fine as long as the SD card is detected as a SCSI device (sdX) (in some kind of USB card reader).  However, when the SD card is in a card reader that's on the PCI bus (like in a laptop), its detected as /dev/mmcblk0 then STICK gets confused, and ignores the device altogether.  While it may not be the most elegant of solutions perhaps STICK should just use a hard coded list of devices as a fallback, or perhaps simply let the user manually specify their device as an option?


Re: SX280 / 275 / 270 porting
« Reply #114 on: 29 / November / 2014, 12:24:30 »
Fedora is what I'm using which did not work.  Something to keep in mind is that the naming scheme for the SD card is determined both by the age of the Linux distribution, and what kind of (SD) card reader is in use. 
Makes sense - I'm using Fedora 20 but the "built-in" card reader is really a USB device internally  ( i.e. mounts as /dev/sdxn ).
Quote
While it may not be the most elegant of solutions perhaps STICK should just use a hard coded list of devices as a fallback, or perhaps simply let the user manually specify their device as an option?
I'd suggest the later option.  I'm assuming that it would be easiest for zeno to add an option to his config file that could be manually edited as a last resort - skipping the need to add to the GUI.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline zeno

  • *****
  • 891
Re: SX280 / 275 / 270 porting
« Reply #115 on: 29 / November / 2014, 15:47:58 »
What the Linux module in STICK does is issue a series of commands and tries to parse the results to determine the name, size, format and number of partitions on each drive. The first command it issues is:
   mount -l -t vfat, fat, msdos
which returns a series of entries like this:
    "/dev/DEVNAMEn on /medial/LABEL type vfat (r,..."
where DEVNAMEn might be of the form 'sdb1' or 'sdbp1' or 'mmcblk0p1' or ???

Then for each entry it issues the command:
   fdisk /dev/DEVNAMEn'

At least that's what I think the code does!

In netllama's case, the device name returned seems to be of the form:
  'mmcblk0'
and I think my code just doesn't parse it correctly.

I'd be grateful if those of you with linux systems would issue the mount command and then an fdisk command for the card drive and email the results to me for analysis.

daveATzenoshrdluDOTcom
 
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit

Re: SX280 / 275 / 270 porting
« Reply #116 on: 29 / November / 2014, 16:31:33 »
The first command it issues is:
   mount -l -t vfat, fat, msdos
Note : may need to use sudo and there  should be no spaces between the filesystem types :

   sudo mount -l -t vfat,fat,msdos
Ported :   A1200    SD940   G10    Powershot N    G16

Re: SX280 / 275 / 270 porting
« Reply #117 on: 29 / November / 2014, 16:59:46 »
If you're using the -l option to mount, that implies that you expect the SD card to already be mounted.  I definitely did not have it mounted when I was attempting to use STICK, so that is quite likely why it failed to work for me. 


*

Offline zeno

  • *****
  • 891
Re: SX280 / 275 / 270 porting
« Reply #118 on: 30 / November / 2014, 04:56:08 »
STICK does test that a sudo has been issued (and displays a message if not). The commands aren't issued until STICK has got to the stage where it asks for a card to be inserted, so I don't think the mounting is a problem. And there are no blanks between 'vfat', 'fat' and 'msdos' in the actual code.
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit

Re: SX280 / 275 / 270 porting
« Reply #119 on: 10 / December / 2014, 08:12:14 »
Hi, I have SX270 102c
trying to install this CHDK on 32GB SD card with STICK under WIndows 7 64bit
having error:

Preparing Drive G: 32GB - please wait ...
Copying DISKBOOT.BIN from C:\Users\***\Desktop\stick\TEST\ to G:\
Command 'copy *.* G:\' issued
   return code was 0
Output: 'test102c.7z
        1 file(s) copied.'
Copying files from C:\Users\***\Desktop\stick\TEST\ to G:\
Command 'xcopy CHDK G:\CHDK /e /i /y' issued
   return code was 4
Output: '0 File(s) copied'
Installation failed - see log for details


HOW can I install this CHDK? I really want the RAW on this camera   :'(
A590IS user

 

Related Topics