Help - Search - Members - Calendar
Full Version: Sd Support!
OESF Forums > Distros, Development, and Model Specific Forums > Distro Support and Discussion > OpenBSD
mathemajikian
And here it is! laugh.gif The moment we've all been waiting for:

$ dmesg
OpenBSD 4.1-current

pxammc0 at pxaip0: MMC/SD/SDIO controller
sdmmc0 at pxammc0
scsibus0 at sdmmc0: 2 targets
sd0 at scsibus0 targ 1 lun 0: <SD/MMC, Drive #01, > SCSI2 0/direct fixed
sd0: 14MB, 14 cyl, 64 head, 32 sec, 512 bytes/sec, 29120 sec total


Now OpenBSD based Z's can utilize the on board sd slot!
albertr
Great news! Is there any advancement on bluetooth front?
-albertr
HoloVector
That's great news. Does this mean that the C1000 will be a supported model now? I would love to try this on mine using my 4GB SD card.
mathemajikian
QUOTE(HoloVector @ Mar 19 2007, 03:59 AM)
That's great news.  Does this mean that the C1000 will be a supported model now?  I would love to try this on mine using my 4GB SD card.
*


I'm going to see about running OpenBSD off an SD card. I'll post setup instructions if it works. Might take me a little while to complete since I'm undergoing numerous college courses at the moment.
Speedy
Full (SD Booting, CF Extension Cards) OpenBSD support for C1000 will be great! Then my whole computers runs on Openbsd smile.gif

What were the steps to do this?
Booting Openbsd from CF Card and try to take the installdrive sd0 (SD Card)? Or is it much complex?

greets
Andi
mathemajikian
QUOTE(Speedy @ Mar 19 2007, 11:40 AM)
Full (SD Booting, CF Extension Cards) OpenBSD support for C1000 will be great! Then my whole computers runs on Openbsd smile.gif

What were the steps to do this?
Booting Openbsd from CF Card and try to take the installdrive sd0 (SD Card)? Or is it much complex?

greets
Andi


I think all you'll need to do is create an image of your current Z's partitions onto a SD card. (You'll also have to edit /etc/fstab) Then recompile and install a kernel with the following changes:
config bsd root on wd0a to --> config bsd root on sd0a
Make sure and install the new kernel to the root partition of your current CF install and SD image. Don't delete the old kernel because if this doesn't work then you'll need it to reboot your system. So before installing the new kernel cp /bsd /bsd.bak and then after installing the new kernel rename the sd-root kernel as sdbsd, ie mv /bsd /sdbsd. Boot this kernel instead of the normal bsd kernel, ie at the boot prompt type:

boot> boot wd0a:/sdbsd

Note I have not tried this yet; hence, if you ruin your install don't blame me. wink.gif However, I'm pretty sure this will work.
danboid
Great news!

So, apart from pxa270 SRAM support (video accel) which I would presume isn't done yet, is their anything else missing from the Zaurus OpenBSD kernel that a sharp rom/pdax user may expect to work? I'm not bothered about bluetooth personally.

Does it have working support for USB host on the cxxxx?
mathemajikian
QUOTE(danboid @ Mar 19 2007, 12:28 PM)
Does it have working support for USB host on the cxxxx?
*


Enable usbf(4) and cdcef(4) on Zaurus: http://www.openbsd.org/plus41.html

QUOTE
USBF(4)                  OpenBSD Programmer's Manual                  USBF(4)

NAME
    usbf - introduction to Universal Serial Bus function support

SYNOPSIS
    usbf* at pxaudc?    # zaurus
    cdcef* at usbf?

DESCRIPTION
    OpenBSD provides machine-independent bus support and drivers for Univer-
    sal Serial Bus (USB) functions, making it possible in principle for ma-
    chines running OpenBSD to act as USB device to a USB host.

    The OpenBSD usbf driver has three layers: the controller, the logical de-
    vice, and the function layer.  The controller attaches to a physical bus.
    The logical device attaches to the controller and the function attaches
    to the logical device.

    Function drivers implement the characteristics of a particular USB device
    class that the USB host will see when the device is connected to the bus.


Bluetooth devices work, but we are still lacking a communication protocol. It's in the works. NAND flash memory should be coming soon as can be seen from:
flash0 at pxaip0: Samsung K9F1G08U0A 128Mx8 3.3V
jpmatrix
and about SDIO,
does it open us a way to true SDIO controllers like SDIO GPS or SDIO WLAN cards ???
DaemonsGR
Great!!! Have you test any 4g SD?!?

Thnx
mathemajikian
QUOTE(DaemonsGR @ Mar 20 2007, 12:01 PM)
Great!!! Have you test any 4g SD?!?

Thnx
*


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 tongue.gif )
cal
i just gave 4.1 a whirl on my C1000, and install fails. The SD card isn't found and dmesg doesn't show
CODE
pxammc0 at pxaip0: MMC/SD/SDIO controller
. I have been running obsd on a CF card, and I was looking forward to getting rid of my usb ethernet adapter and switching to a CF wifi card...
mathemajikian
QUOTE(mathemajikian @ Mar 20 2007, 01:00 PM)
QUOTE(DaemonsGR @ Mar 20 2007, 12:01 PM)
Great!!! Have you test any 4g SD?!?

Thnx
*


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 tongue.gif )
*



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.
mathemajikian
QUOTE(cal @ Mar 20 2007, 01:24 PM)
i just gave 4.1 a whirl on my C1000, and install fails.  The SD card isn't found and dmesg doesn't show
CODE
pxammc0 at pxaip0: MMC/SD/SDIO controller
.  I have been running obsd on a CF card, and I was looking forward to getting rid of my usb ethernet adapter and switching to a CF wifi card...
*


How did you install? If you just went and downloaded 4.1-release sources then this is understandable. The SD driver support was only added two days ago. To gain SD support your going to have to update your 4.1-release system via cvs to 4.1-current. Follow the cvs update instructions found on this page to update your Z to 4.1-current: Zaurus updating

Furthermore, trying to run/install OpenBSD off/on an SD card will require a little ingenuity. (See my earlier post) This is mainly due to the limits of the current bootloader. Quoting Uwe once again
QUOTE
The current standalone boot program doesn't know about "sd" or "wd" disks.  All it has is "hd" devices, which map (in a non-intuitive way) to the linux devices /dev/hda, /dev/hdc, etc.
I'm going to try and get BSD running off an SD card later this week. I'll post my results.
cal
Thanks I was taking it one step at a time. I just wanted to see the dmesg for the first time. I might try the CVS version later, thanks for pointing that out.
mathemajikian
Running OpenBSD off an SD card isn't going to happen just yet. sad.gif The driver is very buggy and is going to require a lot of tweaking.
jpmatrix
QUOTE(mathemajikian @ Mar 25 2007, 12:36 AM)
Running OpenBSD off an SD card isn't going to happen just yet.  sad.gif  The driver is very buggy and is going to require a lot of tweaking.
*


do you mean the driver is buggy for using openbsd off an sdcard OR is it buggy for a common usage (only for storage) ???
mathemajikian
QUOTE(jpmatrix @ Mar 27 2007, 09:59 PM)
QUOTE(mathemajikian @ Mar 25 2007, 12:36 AM)
Running OpenBSD off an SD card isn't going to happen just yet.  sad.gif  The driver is very buggy and is going to require a lot of tweaking.
*


do you mean the driver is buggy for using openbsd off an sdcard OR is it buggy for a common usage (only for storage) ???
*



both.
ZDevil
QUOTE(mathemajikian @ Mar 20 2007, 03:28 PM)
QUOTE(mathemajikian @ Mar 20 2007, 01:00 PM)
QUOTE(DaemonsGR @ Mar 20 2007, 12:01 PM)
Great!!! Have you test any 4g SD?!?

Thnx
*


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 tongue.gif )
*



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.
*



I have an Apacer 4GB 150x SD.
dmesg reads:
CODE
scsibus0 at sdmmc0: 2 targets
sd0 at scsibus0 targ 1 lun 0: <SD/MMC, Drive #01, > SCSI2 0/direct fixed
sd0: 3926MB, 125 cyl, 255 head, 63 sec, 2048 bytes/sec, 2010112 sec total

hotplug the card shows:
CODE
pxammc0: unhandled interrupt 1<DATADONE>
mount_ffs: /dev/sd0c on /mnt/card: Input/output error
jpmatrix
QUOTE(ZDevil @ May 1 2007, 06:40 PM)
QUOTE(mathemajikian @ Mar 20 2007, 03:28 PM)
QUOTE(mathemajikian @ Mar 20 2007, 01:00 PM)
QUOTE(DaemonsGR @ Mar 20 2007, 12:01 PM)
Great!!! Have you test any 4g SD?!?

Thnx
*


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 tongue.gif )
*



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.
*



I have an Apacer 4GB 150x SD.
dmesg reads:
CODE
scsibus0 at sdmmc0: 2 targets
sd0 at scsibus0 targ 1 lun 0: <SD/MMC, Drive #01, > SCSI2 0/direct fixed
sd0: 3926MB, 125 cyl, 255 head, 63 sec, 2048 bytes/sec, 2010112 sec total

hotplug the card shows:
CODE
pxammc0: unhandled interrupt 1<DATADONE>
mount_ffs: /dev/sd0c on /mnt/card: Input/output error

*




hu!
you're not lucky with your zaurus devices under openbsd... blink.gif
ZDevil
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. smile.gif
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. cool.gif
mathemajikian
QUOTE(ZDevil @ May 1 2007, 07:59 PM)
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
QUOTE(mathemajikian @ May 1 2007, 10:13 PM)
QUOTE(ZDevil @ May 1 2007, 07:59 PM)
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.
*



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.
mathemajikian
QUOTE(ZDevil @ May 1 2007, 08:17 PM)
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.
ZDevil
QUOTE(mathemajikian @ May 1 2007, 10:19 PM)
QUOTE(ZDevil @ May 1 2007, 08:17 PM)
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.
*



Now it's this:
CODE
#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"
iamasmith
QUOTE(ZDevil @ May 1 2007, 08:52 PM)
QUOTE(mathemajikian @ May 1 2007, 10:19 PM)
QUOTE(ZDevil @ May 1 2007, 08:17 PM)
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.
*



Now it's this:
CODE
#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"
*



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
ZDevil
Thanks, Andy!
Here is the output of disklabel sd0:
CODE
# /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*
iamasmith
QUOTE(ZDevil @ May 2 2007, 07:24 PM)
Thanks, Andy!
Here is the output of disklabel sd0:
CODE
# /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*

*


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 smile.gif

Good luck,

-Andy
andreask
@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
ZDevil
QUOTE(andreask @ May 3 2007, 11:22 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
*



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... rolleyes.gif

Still getting extremely busy with work so no free time block yet to backup the nearly full 4GB SD and reformat it under obsd.
ZDevil
Now i am trying to reformat the 4GB SD into ext2 and mount it under obsd.
Following Andy's suggestion,
first i used disklabel -E sd0
then choose "a" to add a device
after offset and size,
I am asked to assign an FS type.
The default is "4.2BSD".
I try "Ext2", "ext2", "Linux", but i am told that it is "Unrecognized filesystem type..., treating as 'unknown'"
Then I try "MSDOS", which is supported,
but when i try to save, i got this:
CODE
Write new label: [y]
disklabel: ioctl DIOCWDINFO: Input/output error
disklabel: unable to write label
mathemajikian
QUOTE(ZDevil @ May 5 2007, 11:00 AM)
CODE
Write new label: [y]
disklabel: ioctl DIOCWDINFO: Input/output error
disklabel: unable to write label


Read your last post and you'll see why this is occuring. smile.gif Here's the quote:

QUOTE
there is no SD write support so installing things to SD is not feasible.


hence, changing the disklabel via the onboard SD slot is unsupported at the moment , Use a supported external SD reader/writer to change the disklabel. However, writing to the SD card will result in the same input/output error no matter what filesystem it has been formatted with.
ZDevil
QUOTE(iamasmith @ May 2 2007, 11:48 PM)
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.

*

@Andy:
How to make ext2 using disklabel? I've tried ext2, Ext2, EXT2, Linux, LINUX, all these are invalid. The man page of disklabel doesn't mention ext2 at all.
Searching "ext2" in the Man page search and i only got fsck_ext2fs (8) and mount_ext2fs (8).
Any hint? Thanks!
ZDevil
QUOTE(ZDevil @ May 13 2007, 12:11 PM)
QUOTE(iamasmith @ May 2 2007, 11:48 PM)
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.

*

@Andy:
How to make ext2 using disklabel? I've tried ext2, Ext2, EXT2, Linux, LINUX, all these are invalid. The man page of disklabel doesn't mention ext2 at all.
Searching "ext2" in the Man page search and i only got fsck_ext2fs (8) and mount_ext2fs (8).
Any hint? Thanks!
*




I have fdisked the 4gb SD under the dualboot Cacko. Tried both FAT and Ext2 but the card fails to be recognized under obsd.

disklabel sd0 says: /dev/rsd0c: Device not configured

fdisk sd0 says: sd0: Device not configured

So I turned to my Mac...
Just found e2fsprogs and installed it in my OBSD setup on Macbook@Parallels.
First I used disklabel -E sd0 to add a partition [a], then choose the BSD4.2 as FS type.
After that I used mke2fs to create an ext2 filesystem on this SD.
This SD can be detected and mounted in OBSD on my Mac.
disklabel sd0 shows two partitions, [c] and [a] (the newly created one).
The card can be detected and mounted in Cacko on my 3200.

But ...

The 4.1 official release doesn't seem to have SD support at all.
So I install the latest kernel (dated 8 May).
Reboot and now the SD is detected.

But ...

on my 3200, disklabel sd0 shows only [c], and no [a].

So, now the card can be read by Mac@OBSD, 3200@Cacko, but not 3200@OBSD!
What do i do?
Did I go wrong in the attempt?
Thanks!
ZDevil
It seems that the current SD support is rather picky. My 1gb FAT16 SD can be detected and mounted, but my 4gb FAT32/Ext2/Ext3 SD simply fails. Hope this will fixed soon.
jpmatrix
QUOTE(ZDevil @ May 2 2007, 09:24 PM)
Thanks, Andy!
Here is the output of disklabel sd0:
CODE
# /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*

*



i've just tried my 4gb Transcend sdcard under latest openbsd GENERIC#113 and i have the same problem with the same disklabel output... however mine is fat formatted... no hope to mount it ?
ZDevil
Not sure if it is relevant. For cards bigger than 2gb it has to be FAT32. And for now OBSD's SD driver doesn't seem to like FAT32 at all.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.