Date: Thu, 13 Oct 2011 15:32:11 +1100 From: Mattia Rossi <mrossi@swin.edu.au> To: Warner Losh <imp@bsdimp.com> Cc: freebsd-arm@freebsd.org Subject: Re: Create FAT partition/filesystem on the internal microSD flash of the Dreamplug Message-ID: <4E9669CB.2060707@swin.edu.au> In-Reply-To: <A0FE69B0-B12F-43BA-9881-FFF96AAEB007@bsdimp.com> References: <4E9290FF.7090306@swin.edu.au> <cone.1318239903.356917.1719.500@rlydontknow> <4E92D2D8.8070500@swin.edu.au> <4E9535D0.2030706@swin.edu.au> <A0FE69B0-B12F-43BA-9881-FFF96AAEB007@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 13/10/11 02:06, Warner Losh wrote: > > On Oct 12, 2011, at 12:38 AM, Mattia Rossi wrote: > >> -snip- >>>>> I've tried to recreate it using gpart and newfs_msdos, but can't >>>>> create any new FAT partition that mount_msdosfs would mount. >>>>> >>>>> See: >>>>> >>>>> dreamplug# gpart create -s mbr da0 >>>>> da0 created >>>>> dreamplug# gpart add -t fat32 -i 1 -s 32M da0 >>>>> da0s1 added >>>>> dreamplug# newfs_msdos da0s1 >>>>> /dev/da0s1: 65416 sectors in 8177 FAT16 clusters (4096 bytes/cluster) >>>>> BytesPerSec=512 SecPerClust=8 ResSectors=1 FATs=2 RootDirEnts=512 >>>>> Sectors=65520 Media=0xf0 FATsecs=32 SecPerTrack=63 Heads=255 >>>>> HiddenSecs=0 >>>>> dreamplug# mount_msdosfs /dev/da0s1 /mnt/usb >>>>> mount_msdosfs: /dev/da0s1: Invalid argument >>>>> >> -snap- >> >> I've tested the newfs_msdos command on a variety of i386 and amd64 based machines using different FreeBSD versions (8.2, 9-BETA2, 9-BETA3) and all of them work properly. FS can be craeed and mounts fine. >> >> So this is definitely an ARM problem.. Have no idea why though. >> If someone tells me where to look for the issue, I'll happily do it and help fixing the bug. > > Is there anything in dmesg? Have you tried turning on bootverbose to get more details about what the kernel part of mount_msdosfs hates? > Okay, rebootet with bootverbose built into the kernel (no idea how to activate it otherwise through u-boot). Used a preformatted SD card through a USB reader (as the inbuilt slot is used by my other SD card), but that makes no difference. Result: dreamplug# mount_msdosfs /dev/da2s1 /mnt/usb/ dreamplug# umount /mnt/usb/ dreamplug# newfs_msdos -F 32 /dev/da2s1 /dev/da2s1: 7739392 sectors in 120928 FAT32 clusters (32768 bytes/cluster) BytesPerSec=512 SecPerClust=64 ResSectors=32 FATs=2 Media=0xf0 SecPerTrack=63 H2 dreamplug# mount_msdosfs /dev/da2s1 /mnt/usb/ mount_msdosfs: /dev/da2s1: Invalid argument dmesg (all of it - just in case): KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2011 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 9.0-BETA3 #30 r226271M: Thu Oct 13 13:21:47 EST 2011 root@freebsd82fresh.matnina:/usr/obj/arm.arm/usr/devel/sys/DREAMPLUG arm Preloaded elf kernel "elf kernel" at 0xc0da2280. module mvs already present! CPU: Feroceon 88FR131 rev 1 (Marvell core) DC enabled IC enabled WB enabled EABT branch prediction enabled 16KB/32B 4-way Instruction cache 16KB/32B 4-way write-back-locking-C Data cache real memory = 536870912 (512 MB) Physical memory chunk(s): 00000000 - 0x8fffff, 9437184 bytes (2304 pages) 0xe96000 - 0x1f63bfff, 511336448 bytes (124838 pages) avail memory = 518504448 (494 MB) SOC: (0x6281:0x03) Marvell 88F6281 rev A1, TClock 200MHz wlan: <802.11 Link Layer> snd_unit_init() u=0x00ff8000 [512] d=0x00007c00 [32] c=0x000003ff [1024] feeder_register: snd_unit=-1 snd_maxautovchans=16 latency=5 feeder_rate_min=1 f5 null: <null device, zero device> crypto: <crypto core> random: <entropy source, Software, Yarrow> mem: <memory> openfirm: <Open Firmware control device> fdtbus0: <FDT main bus> on motherboard simplebus0: <Flattened device tree simple bus> on fdtbus0 ic0: <Marvell Integrated Interrupt Controller> mem 0xf1020200-0xf102023b on sim0 timer0: <Marvell CPU Timer> mem 0xf1020300-0xf102032f irq 1 on simplebus0 Event timer "CPUTimer0" frequency 200000000 Hz quality 1000 Timecounter "CPUTimer1" frequency 200000000 Hz quality 1000 gpio0: <Marvell Integrated GPIO Controller> mem 0xf1010100-0xf101011f irq 35,360 device_attach: gpio0 attach returned 6 rtc0: <Marvell Integrated RTC> mem 0xf1010300-0xf1010307 on simplebus0 rtc0: registered as a time-of-day clock (resolution 1000000us, adjustment 0.500) twsi0: <Marvell Integrated I2C Bus Controller> mem 0xf1011000-0xf101101f irq 430 iicbus0: <Philips I2C bus> on twsi0 iic0: <I2C generic I/O> on iicbus0 mge0: <Marvell Gigabit Ethernet controller> mem 0xf1072000-0xf1073fff irq 12,130 mge0: bpf attached mge0: Ethernet address: f0:ad:4e:00:84:c7 miibus0: <MII bus> on mge0 e1000phy0: <Marvell 88E1116R Gigabit PHY> PHY 0 on miibus0 e1000phy0: OUI 0x000ac2, model 0x0024, rev. 0 e1000phy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 10o mge1: <Marvell Gigabit Ethernet controller> mem 0xf1076000-0xf1077fff irq 16,170 mge1: bpf attached mge1: Ethernet address: f0:ad:4e:00:84:c8 miibus1: <MII bus> on mge1 e1000phy1: <Marvell 88E1116R Gigabit PHY> PHY 1 on miibus1 e1000phy1: OUI 0x000ac2, model 0x0024, rev. 0 e1000phy1: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 10o uart0: <16550 or compatible> mem 0xf1012000-0xf101201f irq 33 on simplebus0 uart0: fast interrupt uart0: console (1056,n,8,1) uart1: <16550 or compatible> mem 0xf1012100-0xf101211f irq 34 on simplebus0 uart1: fast interrupt ehci0: <Marvell Integrated USB 2.0 controller> mem 0xf1050000-0xf1050fff irq 480 ehci0: 5.24 GL USB-2 workaround enabled usbus0: EHCI version 1.0 usbus0: set host controller mode usbus0: <Marvell Integrated USB 2.0 controller> on ehci0 usbus0: bpf attached ehci0: usbpf: Attached sata0: <Marvell Integrated SATA Controller> mem 0xf1080000-0xf1085fff irq 21 on0 ata0: <Marvell Integrated SATA Channel> on sata0 ata0: hard reset ... ata0: SATA connect timeout status=00000000 ata1: <Marvell Integrated SATA Channel> on sata0 ata1: hard reset ... ata1: SATA connect timeout status=00000000 sdio0: <Marvell Integrated SDIO Host Controller> mem 0xf1090000-0xf1090133 irq 0 sdio0: mv_gpio_setup_intrhandler failed! device_attach: sdio0 attach returned 6 cryptosoft0: <software crypto> on motherboard crypto: assign cryptosoft0 driver id 0, flags 100663296 crypto: cryptosoft0 registers alg 1 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 2 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 3 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 4 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 5 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 16 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 6 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 7 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 18 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 19 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 20 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 8 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 15 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 9 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 10 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 13 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 14 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 11 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 22 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 21 flags 0 maxoplen 0 crypto: cryptosoft0 registers alg 17 flags 0 maxoplen 0 procfs registered Timecounters tick every 1.000 msec vlan: initialized, using hash tables with chaining lo0: bpf attached ata0: Identifying devices: 00000000 ata0: New devices: 00000000 ata1: Identifying devices: 00000000 ata1: New devices: 00000000 usbus0: 480Mbps High Speed USB v2.0 ugen0.1: <Marvell> at usbus0 uhub0: <Marvell EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0 uhub0: 1 port with 1 removable, self powered Root mount waiting for: usbus0 ugen0.2: <vendor 0x1a40> at usbus0 uhub1: <vendor 0x1a40 USB 2.0 Hub, class 9/0, rev 2.00/1.11, addr 2> on usbus0 Root mount waiting for: usbus0 uhub1: 4 ports with 4 removable, self powered Root mount waiting for: usbus0 ugen0.3: <vendor 0x05e3> at usbus0 umass0: <vendor 0x05e3 USB Storage, class 0/0, rev 2.00/99.10, addr 3> on usbus0 umass0:0:0:-1: Attached to scbus0 (probe0:umass-sim0:0:0:0): Down reving Protocol Version from 2 to 0? pass0 at umass-sim0 bus 0 scbus0 target 0 lun 0 pass0: <Generic STORAGE DEVICE 9910> Removable Direct Access SCSI-0 device pass0: Serial Number 000000009910 pass0: 40.000MB/s transfers GEOM: new disk da0 da0 at umass-sim0 bus 0 scbus0 target 0 lun 0 da0: <Generic STORAGE DEVICE 9910> Removable Direct Access SCSI-0 device da0: Serial Number 000000009910 da0: 40.000MB/s transfers da0: 1876MB (3842048 512 byte sectors: 255H 63S/T 239C) (probe0:umass-sim0:0:0:1): Down reving Protocol Version from 2 to 0? (probe0:umass-sim0:0:0:1): SCSI status error (probe0:umass-sim0:0:0:1): TEST UNIT READY. CDB: 0 20 0 0 0 0 (probe0:umass-sim0:0:0:1): CAM status: SCSI Status Error (probe0:umass-sim0:0:0:1): SCSI status: Check Condition (probe0:umass-sim0:0:0:1): SCSI sense: UNIT ATTENTION asc:28,0 (Not ready to re) (probe0:umass-sim0:0:0:1): Retrying command (per sense data) pass1 at umass-sim0 bus 0 scbus0 target 0 lun 1 pass1: <Generic STORAGE DEVICE 9910> Removable Direct Access SCSI-0 device pass1: Serial Number 000000009910 pass1: 40.000MB/s transfers da1 at umass-sim0 bus 0 scbus0 target 0 lun 1 da1: <Generic STORAGE DEVICE 9910> Removable Direct Access SCSI-0 device da1: Serial Number 000000009910 da1: 40.000MB/s transfers da1: 974MB (1995264 512 byte sectors: 64H 32S/T 974C) GEOM: new disk da1 Root mount waiting for: usbus0 Root mount waiting for: usbus0 ugen0.4: <Generic> at usbus0 umass1: <Generic Mass Storage Device, class 0/0, rev 2.00/1.00, addr 4> on usbu0 umass1:1:1:-1: Attached to scbus1 (probe0:umass-sim1:1:0:0): Down reving Protocol Version from 2 to 0? pass2 at umass-sim1 bus 1 scbus1 target 0 lun 0 pass2: <Multi Flash Reader 1.00> Removable Direct Access SCSI-0 device pass2: Serial Number 058F0O1111B1 pass2: 40.000MB/s transfers GEOM: new disk da2 da2 at umass-sim1 bus 1 scbus1 target 0 lun 0 da2: <Multi Flash Reader 1.00> Removable Direct Access SCSI-0 device da2: Serial Number 058F0O1111B1 da2: 40.000MB/s transfers da2: 3780MB (7741440 512 byte sectors: 255H 63S/T 481C) (da2:umass-sim1:1:0:0): SCSI status error (da2:umass-sim1:1:0:0): READ(10). CDB: 28 0 0 0 0 1 0 0 1 0 (da2:umass-sim1:1:0:0): CAM status: SCSI Status Error (da2:umass-sim1:1:0:0): SCSI status: Check Condition (da2:umass-sim1:1:0:0): SCSI sense: NOT READY asc:ff,ff (Vendor Specific ASC) (da2:umass-sim1:1:0:0): Field Replaceable Unit: 1 (da2:umass-sim1:1:0:0): Command Specific Info: 0xaa5541 (da2:umass-sim1:1:0:0): Polling device for readiness (da2:umass-sim1:1:0:0): SCSI status error (da2:umass-sim1:1:0:0): READ(10). CDB: 28 0 0 0 0 1 0 0 1 0 (da2:umass-sim1:1:0:0): CAM status: SCSI Status Error (da2:umass-sim1:1:0:0): SCSI status: Check Condition (da2:umass-sim1:1:0:0): SCSI sense: NOT READY asc:ff,ff (Vendor Specific ASC) (da2:umass-sim1:1:0:0): Field Replaceable Unit: 1 (da2:umass-sim1:1:0:0): Command Specific Info: 0xaa5541 (da2:umass-sim1:1:0:0): Polling device for readiness (da2:umass-sim1:1:0:0): SCSI status error (da2:umass-sim1:1:0:0): READ(10). CDB: 28 0 0 0 0 1 0 0 1 0 (da2:umass-sim1:1:0:0): CAM status: SCSI Status Error (da2:umass-sim1:1:0:0): SCSI status: Check Condition (da2:umass-sim1:1:0:0): SCSI sense: NOT READY asc:ff,ff (Vendor Specific ASC) (da2:umass-sim1:1:0:0): Field Replaceable Unit: 1 (da2:umass-sim1:1:0:0): Command Specific Info: 0xaa5541 (da2:umass-sim1:1:0:0): Error 16, Retries exhausted (da2:umass-sim1:1:0:0): SCSI status error (da2:umass-sim1:1:0:0): READ(10). CDB: 28 0 0 0 0 0 0 0 1 0 (da2:umass-sim1:1:0:0): CAM status: SCSI Status Error (da2:umass-sim1:1:0:0): SCSI status: Check Condition (da2:umass-sim1:1:0:0): SCSI sense: NOT READY asc:ff,ff (Vendor Specific ASC) (da2:umass-sim1:1:0:0): Field Replaceable Unit: 1 (da2:umass-sim1:1:0:0): Command Specific Info: 0xaa5541 (da2:umass-sim1:1:0:0): Polling device for readiness (da2:umass-sim1:1:0:0): SCSI status error (da2:umass-sim1:1:0:0): READ(10). CDB: 28 0 0 0 0 0 0 0 1 0 (da2:umass-sim1:1:0:0): CAM status: SCSI Status Error (da2:umass-sim1:1:0:0): SCSI status: Check Condition (da2:umass-sim1:1:0:0): SCSI sense: NOT READY asc:ff,ff (Vendor Specific ASC) (da2:umass-sim1:1:0:0): Field Replaceable Unit: 1 (da2:umass-sim1:1:0:0): Command Specific Info: 0xaa5541 (da2:umass-sim1:1:0:0): Polling device for readiness (da2:umass-sim1:1:0:0): SCSI status error (da2:umass-sim1:1:0:0): READ(10). CDB: 28 0 0 0 0 0 0 0 1 0 (da2:umass-sim1:1:0:0): CAM status: SCSI Status Error (da2:umass-sim1:1:0:0): SCSI status: Check Condition (da2:umass-sim1:1:0:0): SCSI sense: NOT READY asc:ff,ff (Vendor Specific ASC) (da2:umass-sim1:1:0:0): Field Replaceable Unit: 1 (da2:umass-sim1:1:0:0): Command Specific Info: 0xaa5541 (da2:umass-sim1:1:0:0): Error 16, Retries exhausted Root mount waiting for: usbus0 ugen0.5: <vendor 0x0d8c> at usbus0 uaudio0: <vendor 0x0d8c C-Media USB Headphone Set, class 0/0, rev 1.10/1.00, ad0 uaudio0: Play: 48000 Hz, 2 ch, 16-bit S-LE PCM format uaudio0: Record: 48000 Hz, 1 ch, 16-bit S-LE PCM format uaudio0: No midi sequencer pcm0: <USB audio> on uaudio0 pcm0: Mixer "vol" -> "none": child=0x00000010 pcm0: Mixer "pcm": parent="vol" pcm0: Mixer "mic": pcm0: clone manager: deadline=750ms flags=0x8000001e uhid0: <vendor 0x0d8c C-Media USB Headphone Set, class 0/0, rev 1.10/1.00, addr0 Trying to mount root from ufs:/dev/da0s2 []... WARNING: / was not properly dismounted start_init: trying /sbin/init --end dmesg-- Lot's of errors which I believe are related to the card reader rather than the card itself, but no message about what's wrong with the FS. Possibly it's because newfs_msdos doesn't hate anything, it believes to do just great.. poor thing ;-) Mat
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E9669CB.2060707>