Author Topic: Why not all programs can be installed in SD/CF ?  (Read 2778 times)

david_dahan

  • Newbie
  • *
  • Posts: 43
    • View Profile
    • http://
Why not all programs can be installed in SD/CF ?
« on: March 25, 2004, 04:08:30 pm »
I\'ll appreciate I someone can explain why there are programs that can be instaled only on internal memory and not in SD/CF cards ?

thanks,
David.
SL-C750 running pdaXrom 1.1.0 Beta1
512MB SD
Linux SuSE 10.0 Laptop + desktop

BlackCardinal

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
    • http://www.gelhaus.net
Why not all programs can be installed in SD/CF ?
« Reply #1 on: March 25, 2004, 05:28:48 pm »
In my experience it\'s just been a matter of applications not being installed into the system-recognized executable PATH, library LD_LIBRARY_PATH, etc.  It\'s not that they can\'t be installed onto the cards, it\'s that the system doesn\'t know to find them there.  Even if PATH and LD_LIBRARY_PATH are set up correctly, sometimes an application is hard-coded to expect its own accessory files in a fixed location like /opt/Qtopia/share.  Unless the packager wrote a post-install script to set up the necessary links, the installed files are just kind of hanging out in space.

There are several ways to deal with this, you can see the solution I came up with on my web page:

http://www.gelhaus.net/zaurus

The fixlinks and breaklinks scripts are what I use on my Z to create the links necessary to install to my SD card.  They could easily be modified to include a CF card, as well.
BlackCardinal : http://www.gelhaus.net : Zaurus page

SL-C1000, Cacko ROM v1.23
Lexar SD 512MB, Kingston CF 512MB
Symbol Spectrum24 CF 802.11b

SL-5500 Sharp ROM v3.10
Lexar SD 256MB
Pocketop keyboard, Nutshell 207 leather case

Stubear

  • Hero Member
  • *****
  • Posts: 1164
    • View Profile
    • http://
Why not all programs can be installed in SD/CF ?
« Reply #2 on: March 25, 2004, 09:42:53 pm »
Also the fat file system used by default on SD/CF cards does not allow symlinking, as a number of packages create symlinks between binaries and libaries this won\'t work on fat cards. Probably would work on ext2 cards but have never tried.

Stu
SL-C1000, Hand converted to English with Japanese Input
Running X apps via X/Qt
iRiver USB host cable; Diatec P-Cord usb power cable (extendable); Acro's Reel Cable USB (A to A, B, Mini-B,  & Mini-B 8pin); GreenHouse 1Gb PicoDrive+; 2x256Mb Hagiwara SD cards; 128Mb Transcend CF card; 512Mb PQI CF card; AmbiCom WL1100C-CF 11B WLAN card

BlackCardinal

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
    • http://www.gelhaus.net
Why not all programs can be installed in SD/CF ?
« Reply #3 on: March 25, 2004, 11:29:54 pm »
For a lot of packages I don\'t think this is a real problem.  A symlink on an ext2 filesystem (such as the RAM filesystem) can still point to files on a FAT filesystem, and those are the type of symlinks that would need to be set up so Qtopia can find an application installed on the card.

I don\'t doubt that you\'re right about many packages, though, especially libraries that include soname links.  My SD card is formatted ext2, so I\'ve never had to worry about it.
BlackCardinal : http://www.gelhaus.net : Zaurus page

SL-C1000, Cacko ROM v1.23
Lexar SD 512MB, Kingston CF 512MB
Symbol Spectrum24 CF 802.11b

SL-5500 Sharp ROM v3.10
Lexar SD 256MB
Pocketop keyboard, Nutshell 207 leather case

Stubear

  • Hero Member
  • *****
  • Posts: 1164
    • View Profile
    • http://
Why not all programs can be installed in SD/CF ?
« Reply #4 on: March 26, 2004, 03:46:21 am »
THe problem from my observations isn\'t from linking to files on fat from the RAM filesystem, but linking from files on fat to files on fat (ala the links usually done for libraries where lib.so.1.0.0 has symlinks from lib.so, lib.so.1, lib.so.1.0 etc) also certain apps need files set to certain permissions, another thing that you can\'t do to files on FAT.

I have 2 SD cards one FAT and the other  EXT2, most of the programs that gave \"Must install to main memory\" errors when attempting to install to FAT SD, installed successfully on the EXT2 SD card.

Stu
SL-C1000, Hand converted to English with Japanese Input
Running X apps via X/Qt
iRiver USB host cable; Diatec P-Cord usb power cable (extendable); Acro's Reel Cable USB (A to A, B, Mini-B,  & Mini-B 8pin); GreenHouse 1Gb PicoDrive+; 2x256Mb Hagiwara SD cards; 128Mb Transcend CF card; 512Mb PQI CF card; AmbiCom WL1100C-CF 11B WLAN card

tumnus

  • Hero Member
  • *****
  • Posts: 1176
    • View Profile
    • http://www.cpinkney.org.uk
Why not all programs can be installed in SD/CF ?
« Reply #5 on: March 26, 2004, 08:03:43 am »
The Sharp Package installer in the latest ROMs can install a lot more apps to SD/CF than it used to be able to. Now when a package contains sym links and you install it to a FAT SD/CF card the symlinks are put in internal memory (jffs2 or ext2 depending on the Z, which both support sym links) and are redirected to the real files on the SD/CF card.

So symlinks are no longer an issue whether you have FAT or ext2 formatted SD/CF cards.

But the Sharp installer is very picky about the directories that files get installed in. Under /home/QtPalmtop (symlinked from /opt/QtPalmtop and /opt/Qtopia) on a freshly flashed Z, there are a standard set of directories. If a package only contains files that go in these default directories, the Sharp installer will relocate them to /mnt/cf/QtPalmtop or /mnt/card/QtPalmtop if installing to CF/SD. If a package deviates from these default directories  then the Sharp installer will only let the package be installed to internal memory. Many packages do deviate from the standard directories so maybe the package howto needs updating.

There are some good reasons for doing this. Besides keeping things consistent, if a package contains kernel drivers or initialisation scripts that need to go in /lib/modules or /etc, you need to ensure that those files are available from bootup (i.e. before the SD/CF subsystems have come up) and can never be removed by ejecting a card. So such packages must be forced to install to internal memory.

Other ROMs (like OZ) that use different installers may behave differently.
# Search the Zaurus Howtos ## Search the Zaurus FAQs ## Find Z software at ELSI #
--------------------
UK SL5500 with Sharp ROM 3.13, SL5600 with Sharp ROM 1.32 - SuSE 9.0 Pro, Windows XP Home
Qualendar for Calendar and Todo
Socket Bluetooth CF Card (Rev F), Kingmax 512MB MMC Card, Palm Tungsten T Stylus,
Pretec CF->Smartmedia Adapter, Semsons Universal Battery Extender

grey_moon

  • Full Member
  • ***
  • Posts: 100
    • View Profile
Why not all programs can be installed in SD/CF ?
« Reply #6 on: March 29, 2004, 03:24:59 pm »
Thanks for the great explaination tumnus, was fudging around with the rights on my sd card a while back and now when it wouldnt allow me to select to install to the sd card.   I had chowned /mnt/card/QtPalmtop to root
SL_5600 with Sharp ROM 1.32 - Windows XP Pro
AmbiCom 802.11b CF WL1100C, Pretec CompactBT Bluetooth CF, Hagiwara 256MB SD Card
Expansys Black Chairmans Case, ShirtPocket Battery Extender, ShirtPocket Retractable USB Sync/Charger