Author Topic: Sd Support!  (Read 21783 times)

mathemajikian

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
    • http://exit3.i-55.com/~xikon/openbsdzaurus.html
Sd Support!
« Reply #15 on: March 24, 2007, 06:36:36 pm »
Running OpenBSD off an SD card isn't going to happen just yet.    The driver is very buggy and is going to require a lot of tweaking.
« Last Edit: March 24, 2007, 06:40:24 pm by mathemajikian »

jpmatrix

  • Hero Member
  • *****
  • Posts: 1014
    • View Profile
    • http://matrixmen.free.fr
Sd Support!
« Reply #16 on: March 27, 2007, 05:59:20 pm »
Quote
Running OpenBSD off an SD card isn't going to happen just yet.    The driver is very buggy and is going to require a lot of tweaking.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=157126\"][{POST_SNAPBACK}][/a][/div]

do you mean the driver is buggy for using openbsd off an sdcard OR is it buggy for a common usage (only for storage) ???
**Fujitsu U1010 !!!  
**ex-Zaurus SL-C3000 owner with Debian kernel 2.6.24-yonggun

mathemajikian

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
    • http://exit3.i-55.com/~xikon/openbsdzaurus.html
Sd Support!
« Reply #17 on: March 27, 2007, 07:37:41 pm »
Quote
Quote
Running OpenBSD off an SD card isn't going to happen just yet.    The driver is very buggy and is going to require a lot of tweaking.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=157126\"][{POST_SNAPBACK}][/a][/div]

do you mean the driver is buggy for using openbsd off an sdcard OR is it buggy for a common usage (only for storage) ???
[div align=\"right\"][a href=\"index.php?act=findpost&pid=157325\"][{POST_SNAPBACK}][/a][/div]

both.

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Sd Support!
« Reply #18 on: May 01, 2007, 12:40:43 pm »
Quote
Quote
Quote
Great!!! Have you test any 4g SD?!?

Thnx
[div align=\"right\"][a href=\"index.php?act=findpost&pid=156797\"][{POST_SNAPBACK}][/a][/div]

I only have a 2GB card to test, but I don't see any reason why you couldn't use a 4GB SD card. (This isn't a Linux ROM   )
[div align=\"right\"][a href=\"index.php?act=findpost&pid=156799\"][{POST_SNAPBACK}][/a][/div]

I just spoke to Uwe concerning this and here's what he had to say:

Quote
I have used a 4GB card in my laptop with sdhc(4), but not yet on the Zaurus.
The controller should not make a difference though.

The main difference, afaik, between small and large SD memory cards is that
they encode the block size in the card information structure differently.
Hence, there shouldn't be any issues in utilizing larger capacity SD cards.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=156801\"][{POST_SNAPBACK}][/a][/div]

I have an Apacer 4GB 150x SD.
dmesg reads:
Code: [Select]
scsibus0 at sdmmc0: 2 targets
sd0 at scsibus0 targ 1 lun 0: SCSI2 0/direct fixed
sd0: 3926MB, 125 cyl, 255 head, 63 sec, 2048 bytes/sec, 2010112 sec total
hotplug the card shows:
Code: [Select]
pxammc0: unhandled interrupt 1
mount_ffs: /dev/sd0c on /mnt/card: Input/output error

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

jpmatrix

  • Hero Member
  • *****
  • Posts: 1014
    • View Profile
    • http://matrixmen.free.fr
Sd Support!
« Reply #19 on: May 01, 2007, 12:44:14 pm »
Quote
Quote
Quote
Quote
Great!!! Have you test any 4g SD?!?

Thnx
[div align=\"right\"][a href=\"index.php?act=findpost&pid=156797\"][{POST_SNAPBACK}][/a][/div]

I only have a 2GB card to test, but I don't see any reason why you couldn't use a 4GB SD card. (This isn't a Linux ROM   )
[div align=\"right\"][a href=\"index.php?act=findpost&pid=156799\"][{POST_SNAPBACK}][/a][/div]

I just spoke to Uwe concerning this and here's what he had to say:

Quote
I have used a 4GB card in my laptop with sdhc(4), but not yet on the Zaurus.
The controller should not make a difference though.

The main difference, afaik, between small and large SD memory cards is that
they encode the block size in the card information structure differently.
Hence, there shouldn't be any issues in utilizing larger capacity SD cards.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=156801\"][{POST_SNAPBACK}][/a][/div]

I have an Apacer 4GB 150x SD.
dmesg reads:
Code: [Select]
scsibus0 at sdmmc0: 2 targets
sd0 at scsibus0 targ 1 lun 0: SCSI2 0/direct fixed
sd0: 3926MB, 125 cyl, 255 head, 63 sec, 2048 bytes/sec, 2010112 sec total
hotplug the card shows:
Code: [Select]
pxammc0: unhandled interrupt 1
mount_ffs: /dev/sd0c on /mnt/card: Input/output error
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160204\"][{POST_SNAPBACK}][/a][/div]


hu!
you're not lucky with your zaurus devices under openbsd...  
« Last Edit: May 01, 2007, 12:44:48 pm by jpmatrix »
**Fujitsu U1010 !!!  
**ex-Zaurus SL-C3000 owner with Debian kernel 2.6.24-yonggun

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Sd Support!
« Reply #20 on: May 01, 2007, 03:59:00 pm »
No, not at all.
Actually I am very happy to keep OpenBSD running on my 3200. One main reason for me to upgrade from C1000 is to run this standard distro. I am quite sure things will just get better but not broken further.
The 4GB card can go to the debian on my 860 for now, if I manage to get debian loaded off SD with the Angstrom kernel. I still have a much abused 1gb card that can hold sources, packages and various documents, besides the 6gb microdrive which provides quite an ample workspace. Today I also ordered an AmbiCom WL1100C-CF dedicated to this setup (the Symbol Spectrum24 CF is actually NOT supported according to http://www.openbsd.org/zaurus.html#hardware ).
Despite some room for improvement (primarily SD support), I think with OpenBSD a Z can really become a genuine full-fledged *nix box and a great laptop replacement.  
« Last Edit: May 01, 2007, 04:02:09 pm by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

mathemajikian

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
    • http://exit3.i-55.com/~xikon/openbsdzaurus.html
Sd Support!
« Reply #21 on: May 01, 2007, 04:13:35 pm »
Quote
pxammc0: unhandled interrupt 1<DATADONE>
mount_ffs: /dev/sd0c on /mnt/card: Input/output error

Did you create a ffs partition on the SD card? Try and mount the card without hotplug. If it's a msdos file system then use mount_msdos /dev/sd0c /mnt/card.

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Sd Support!
« Reply #22 on: May 01, 2007, 04:17:46 pm »
Quote
Quote
pxammc0: unhandled interrupt 1<DATADONE>
mount_ffs: /dev/sd0c on /mnt/card: Input/output error

Did you create a ffs partition on the SD card? Try and mount the card without hotplug. If it's a msdos file system then use mount_msdos /dev/sd0c /mnt/card.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160213\"][{POST_SNAPBACK}][/a][/div]

It's ext2. I tried all the nodes and only sd0c would do, but it returns this error.
Reboot the system with the card inserted gives the same error.
« Last Edit: May 01, 2007, 04:18:42 pm by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

mathemajikian

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
    • http://exit3.i-55.com/~xikon/openbsdzaurus.html
Sd Support!
« Reply #23 on: May 01, 2007, 04:19:37 pm »
Quote
It's ext2. I tried all the nodes and only sd0c would do, but it returns this error.
Reboot the system with the card inserted gives the same error.
Then try and use mount_ext2fs not mount_ffs.
« Last Edit: May 01, 2007, 04:20:41 pm by mathemajikian »

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Sd Support!
« Reply #24 on: May 01, 2007, 04:52:50 pm »
Quote
Quote
It's ext2. I tried all the nodes and only sd0c would do, but it returns this error.
Reboot the system with the card inserted gives the same error.
Then try and use mount_ext2fs not mount_ffs.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160215\"][{POST_SNAPBACK}][/a][/div]

Now it's this:
Code: [Select]
#mount_ext2fs /dev/sd0c /mnt/card
mount_ext2fs: /dev/sd0c on /mnt/card: specified device does not match mounted device

while all other sd0x show "Device not configured"
« Last Edit: May 01, 2007, 04:53:39 pm by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Sd Support!
« Reply #25 on: May 02, 2007, 07:25:12 am »
Quote
Quote
Quote
It's ext2. I tried all the nodes and only sd0c would do, but it returns this error.
Reboot the system with the card inserted gives the same error.
Then try and use mount_ext2fs not mount_ffs.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160215\"][{POST_SNAPBACK}][/a][/div]

Now it's this:
Code: [Select]
#mount_ext2fs /dev/sd0c /mnt/card
mount_ext2fs: /dev/sd0c on /mnt/card: specified device does not match mounted device

while all other sd0x show "Device not configured"
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160217\"][{POST_SNAPBACK}][/a][/div]

Does the device have a disklabel as well as an fdisk partition table? if not the disklabel will be assumed as default.

Quite often expect to see msdos partitions on sd0i but as this is ext2 you should verify what has been assumed by using..

disklabel sd0

This should print out what OpenBSD thinks the partitions are.

Good Luck,

-Andy
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Sd Support!
« Reply #26 on: May 02, 2007, 03:24:32 pm »
Thanks, Andy!
Here is the output of disklabel sd0:
Code: [Select]
# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: Drive #01
flags:
bytes/sector: 2048
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 125
total sectors: 2010112
rpm: 3600
interleave: 1
trackskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

16 partitions:
#           size     offset   fstype  [fsize bsize  cpg]
     c:   2010112          0   unused       0     0      # Cyl        0 -     125*
« Last Edit: May 02, 2007, 03:26:59 pm by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Sd Support!
« Reply #27 on: May 02, 2007, 05:48:45 pm »
Quote
Thanks, Andy!
Here is the output of disklabel sd0:
Code: [Select]
# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: Drive #01
flags:
bytes/sector: 2048
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 125
total sectors: 2010112
rpm: 3600
interleave: 1
trackskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

16 partitions:
#           size     offset   fstype  [fsize bsize  cpg]
     c:   2010112          0   unused       0     0      # Cyl        0 -     125*
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160295\"][{POST_SNAPBACK}][/a][/div]

Ok, here's the problem. The disklabel isn't defaulting based upon an ext2 partition and can't determine the beginning of the logical device to say where the ext2 partition starts.

c will ALWAYS exist if the OS can recognise the disk geometry since c is always the full raw disk area.

If you aren't too fussed about what is on the drive I would suggest that you run..

disklabel -E sd0

Then add a partition, possibly a, and set it up in the disklabel then make your ffs or ext2 filesystem from OpenBSD.

This all may seem a little wacky but UNIX folks still regard MSDOS partition tables as particularly PC'ish and like to rely on their own more portable partition information

Good luck,

-Andy
« Last Edit: May 02, 2007, 05:49:56 pm by iamasmith »
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

andreask

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • http://
Sd Support!
« Reply #28 on: May 03, 2007, 05:22:16 am »
@ZDevil Do you use the SD-Card Function on your C1000 or C3200.
Is it in the meanwhile possible to run the Z from a SD Card?
I think the new snapshot for the Z includes the SD Device, but i will try it today or tomorrow if it recognise my SD ...

Quote
# Enable pxammc(4) and sdmmc(4) on Zaurus RAMDISK kernels too.
# Initial support for PXA27x SD/SDIO/MMC controller on the Zaurus platform.

Greets from Germany
Andi
Zaurus SL-C1000 Wlan Card and other Accessories

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Sd Support!
« Reply #29 on: May 03, 2007, 10:37:35 am »
Quote
@ZDevil Do you use the SD-Card Function on your C1000 or C3200.
Is it in the meanwhile possible to run the Z from a SD Card?
I think the new snapshot for the Z includes the SD Device, but i will try it today or tomorrow if it recognise my SD ...

Quote
# Enable pxammc(4) and sdmmc(4) on Zaurus RAMDISK kernels too.
# Initial support for PXA27x SD/SDIO/MMC controller on the Zaurus platform.

Greets from Germany
Andi
[div align=\"right\"][a href=\"index.php?act=findpost&pid=160350\"][{POST_SNAPBACK}][/a][/div]

The SD card funcionality, as already reported in this thread, is rather flaky; only read and no write (write tends to hang the system). AFAIK booting off SD is not yet supported, so at this point C1000 cannot run obsd off SD. Also perhaps because things have to be extracted to the root partition and the system partitions have to be formatted in ffs during installation, but there is no SD write support so installing things to SD is not feasible.  But maybe i am wrong here...  

Still getting extremely busy with work so no free time block yet to backup the nearly full 4GB SD and reformat it under obsd.
« Last Edit: May 03, 2007, 10:38:40 am by ZDevil »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]